{
	"info": {
		"_postman_id": "d1ec63d7-85d7-45b9-b715-ed426c2e7454",
		"name": "fiskaly SIGN PT (Version 2026-05-04) Postman Collection",
		"description": "fiskaly Unified API — Postman collection generated from OpenAPI spec(s) `fiskaly.sign-pt.2026-05-04.yaml` (version `2026-05-04`).\n\nHow to use: 1) Open the environment file `fiskaly_sign_pt_2026-05-04_postman_environment.json`. 2) Run the `Auth & Setup` folder top-to-bottom (management token → organization → subject → operation token). 3) Pick an operation folder under `PT — Business Operations` and run its requests in order — each operation creates its prerequisite records, then performs the main transaction, then verifies it.\n\nPair with `fiskaly_sign_pt_2026-05-04_postman_environment.json`.\n\nSpec date: 2026-05-04.",
		"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
		"_exporter_id": "27791249"
	},
	"item": [
		{
			"name": "Auth & Setup",
			"item": [
				{
					"name": "tokens (management)",
					"item": [
						{
							"name": "Create a Token (management)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"apiBearerToken\", data.content.authentication.bearer);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"API_KEY\",\n    \"key\": \"{{apiKey}}\",\n    \"secret\": \"{{apiSecret}}\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/tokens",
								"description": "Create a management-scope token using the account API key + secret."
							},
							"response": []
						}
					]
				},
				{
					"name": "organizations",
					"item": [
						{
							"name": "Create an Organization",
							"event": [
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											"const orgNames = [",
											"    \"Acme Industries\",",
											"    \"Northwind Traders\",",
											"    \"Globex Corporation\",",
											"    \"Initech Solutions\",",
											"    \"Umbrella Holdings\",",
											"    \"Wayne Enterprises\",",
											"    \"Stark Industries\",",
											"    \"Wonka Confectionery\",",
											"    \"Hooli Inc.\",",
											"    \"Pied Piper Networks\",",
											"    \"Vandelay Imports\",",
											"    \"Sterling Cooper\",",
											"    \"Cyberdyne Systems\",",
											"    \"Soylent Group\",",
											"    \"Tyrell Corporation\",",
											"];",
											"pm.variables.set(\"orgName\", orgNames[Math.floor(Math.random() * orgNames.length)]);"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"organizationId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{apiBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"UNIT\",\n    \"name\": \"{{$randomCompanyName}}\"\n  },\n  \"metadata\": {\n    \"key\": \"value\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/organizations",
								"description": "Create an Organization (UNIT). The pre-request script picks a brand-style name from a curated 15-entry list and writes {{orgName}} (portable across Postman / Newman / Cloud)."
							},
							"response": []
						},
						{
							"name": "Retrieve an Organization",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () { pm.response.to.have.status(200); });"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{apiBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/organizations/{{organizationId}}",
								"description": "Retrieve an Organization by ID"
							},
							"response": []
						},
						{
							"name": "Update an Organization",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () { pm.response.to.have.status(200); });"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{apiBearerToken}}"
									}
								},
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"name\": \"Updated Organization Name\"\n  },\n  \"metadata\": {\n    \"updated_key\": \"updated_value\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/organizations/{{organizationId}}",
								"description": "Update an Organization (name and/or metadata)."
							},
							"response": []
						},
						{
							"name": "List Organizations",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () { pm.response.to.have.status(200); });"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{apiBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/organizations",
								"description": "Retrieve a list of Organizations"
							},
							"response": []
						}
					]
				},
				{
					"name": "subjects",
					"item": [
						{
							"name": "Create a Subject::API_KEY",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"subjectId\", data.content.id);",
											"    pm.environment.set(\"subjectApiKey\", data.content.credentials.key);",
											"    pm.environment.set(\"subjectApiSecret\", data.content.credentials.secret);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{apiBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									},
									{
										"key": "X-Scope-Identifier",
										"value": "{{organizationId}}",
										"description": "Scope identifier for the subject"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"API_KEY\",\n    \"name\": \"uapi-postman-runner\"\n  },\n  \"metadata\": {\n    \"key\": \"value\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/subjects",
								"description": "Create an API_KEY subject scoped to the organization. Captures key + secret used by the subsequent operation-scope token request."
							},
							"response": []
						},
						{
							"name": "Retrieve a Subject::API_KEY",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () { pm.response.to.have.status(200); });"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{apiBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/subjects/{{subjectId}}",
								"description": "Retrieve a Subject by ID"
							},
							"response": []
						},
						{
							"name": "List Subjects",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () { pm.response.to.have.status(200); });"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{apiBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/subjects",
								"description": "Retrieve a list of Subjects"
							},
							"response": []
						}
					]
				},
				{
					"name": "tokens (operation)",
					"item": [
						{
							"name": "Create a Token (operation)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"subjectBearerToken\", data.content.authentication.bearer);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{apiBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"API_KEY\",\n    \"key\": \"{{subjectApiKey}}\",\n    \"secret\": \"{{subjectApiSecret}}\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/tokens",
								"description": "Exchange the subject's API_KEY credentials for an operation-scope bearer token (captured as {{subjectBearerToken}})."
							},
							"response": []
						}
					]
				}
			],
			"description": "Account-level, country-agnostic setup: management token → organization → subject → operation token. Run this once per fresh account before any country-folder workflow."
		},
		{
			"name": "Setup",
			"item": [
				{
					"name": "Taxpayer",
					"item": [
						{
							"name": "Create Taxpayer",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"taxpayerId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"COMPANY\",\n    \"name\": {\n      \"legal\": \"Loja Moderna Lda.\",\n      \"trade\": \"Loja Moderna\"\n    },\n    \"address\": {\n      \"line\": {\n        \"type\": \"STREET_NUMBER\",\n        \"street\": \"Avenida da Liberdade\",\n        \"number\": \"12\"\n      },\n      \"code\": \"1250-096\",\n      \"city\": \"Lisboa\",\n      \"country\": \"PT\"\n    },\n    \"fiscalization\": {\n      \"type\": \"PT\",\n      \"tax_id_number\": \"501234567\",\n      \"email\": \"contact@loja-moderna.pt\",\n      \"registration\": {\n        \"capital\": \"50000.00\",\n        \"office\": \"CRC Lisboa\",\n        \"other\": \"sob NIF 501234567\"\n      },\n      \"credentials\": {\n        \"type\": \"AT\",\n        \"username\": \"501234567/5\",\n        \"password\": \"***\"\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/taxpayers",
								"description": "A retail business \"Acme Ltd.\" wants to register in the fiskaly UAPI before deciding on a specific country fiscalization. The accountant authenticates and sends a `POST /taxpayers` of `content.type: COMPANY` with just the legal/trade name and legal address — no `fiscalization` block. The API returns the new taxpayer with `state: ACQUIRED` / `mode: INACTIVE`. A subsequent country flow supplies the country-specific `fiscalization` and transitions the taxpayer to `COMMISSIONED` / `OPERATIVE`.\n\n→ Source: uapi/setup_taxpayer.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Update Taxpayer",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"state\": \"COMMISSIONED\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/taxpayers/{{taxpayerId}}",
								"description": "Transitions the taxpayer created above to `state: COMMISSIONED` (and `mode: OPERATIVE`) once the country-specific `fiscalization` block has been supplied.\n\n→ Source: uapi/setup_taxpayer.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "List Taxpayers",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{apiBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/taxpayers",
								"description": "List taxpayers (paginated via `limit` / `next_token`)\n\n→ Source: uapi/setup_taxpayer.md ## Related Endpoints"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `setup_taxpayer`\n\nFlow source: Portugal (PT) Flow"
				},
				{
					"name": "Location",
					"item": [
						{
							"name": "Create Location",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"locationId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"BRANCH\",\n    \"taxpayer\": {\n      \"id\": \"{{taxpayerId}}\"\n    },\n    \"name\": \"Lisbon Store\",\n    \"address\": {\n      \"line\": {\n        \"type\": \"STREET_NUMBER\",\n        \"street\": \"Avenida da Liberdade\",\n        \"number\": \"12\"\n      },\n      \"code\": \"1250-096\",\n      \"city\": \"Lisboa\",\n      \"country\": \"PT\"\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/locations",
								"description": "→ Source: uapi/setup_location.md (Generic Flow)"
							},
							"response": []
						},
						{
							"name": "Update Location",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"state\": \"COMMISSIONED\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/locations/{{locationId}}",
								"description": "→ Source: uapi/setup_location.md (Generic Flow)"
							},
							"response": []
						},
						{
							"name": "List Locations",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/locations",
								"description": "List locations (filter by `taxpayer_id`, paginated via `limit` / `next_token`)\n\n→ Source: uapi/setup_location.md ## Related Endpoints"
							},
							"response": []
						},
						{
							"name": "Update Location",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"metadata\": {\n    \"updated_by\": \"postman-runner\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/locations/{{locationId}}",
								"description": "Update a location (also used to flip `state`/`mode`, update `taxpayer`, `name`, `address`, `coordinates`, `label`)\n\n→ Source: uapi/setup_location.md ## Related Endpoints"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `setup_location`\n\nFlow source: Generic Flow"
				},
				{
					"name": "System",
					"item": [
						{
							"name": "Create a System::FISCAL_DEVICE",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"fiscalDeviceId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"FISCAL_DEVICE\",\n    \"kind\": \"INTERNAL\",\n    \"location\": {\n      \"id\": \"{{locationId}}\"\n    },\n    \"producer\": {\n      \"type\": \"MPN\",\n      \"number\": \"FD-001\",\n      \"details\": {\n        \"name\": \"My Fiscal Device\",\n        \"model\": \"FD-Model-1\",\n        \"brand\": \"fiskaly\",\n        \"serial\": \"FD-SERIAL-001\"\n      }\n    },\n    \"software\": {\n      \"name\": \"SIGN PT\",\n      \"version\": \"v1.0.0\"\n    }\n  },\n  \"metadata\": {\n    \"device_label\": \"POS-1\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/systems",
								"description": "Create a System::FISCAL_DEVICE with kind=INTERNAL. The `kind` field can be INTERNAL or EXTERNAL."
							},
							"response": []
						},
						{
							"name": "Update a System::FISCAL_DEVICE",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.test(\"State is COMMISSIONED\", function () {",
											"        pm.expect(data.content.state).to.eql(\"COMMISSIONED\");",
											"    });",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"state\": \"COMMISSIONED\"\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/systems/{{fiscalDeviceId}}",
								"description": "Update a System to COMMISSIONED state"
							},
							"response": []
						},
						{
							"name": "Retrieve a System::FISCAL_DEVICE",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/systems/{{fiscalDeviceId}}",
								"description": "Retrieve a System by ID"
							},
							"response": []
						},
						{
							"name": "List Systems",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/systems",
								"description": "Retrieve a list of Systems"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `system_commission`\n\nFlow source: Generic Flow"
				}
			]
		},
		{
			"name": "PT — Business Operations",
			"item": [
				{
					"name": "Receipt (FR)",
					"item": [
						{
							"name": "Create Intention",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"intentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A customer buys a shirt for €120.00 (€100.00 net + €20.00 VAT at 20%) and pays €120.00 in cash. The cashier (label `1023`) first creates an `INTENTION` (Step 1) on the system, then in Step 3 submits the `TRANSACTION::RECEIPT` referencing the intention, with a single `SALE` entry of type `ITEM` and a single `CASH` payment.\n\n→ Source: uapi/receipt.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create Receipt Record",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"receiptRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{intentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"RECEIPT\",\n      \"document\": {\n        \"number\": \"12345\",\n        \"series\": \"2026\",\n        \"total_vat\": {\n          \"amount\": \"23.00\",\n          \"exclusive\": \"100.00\",\n          \"inclusive\": \"123.00\"\n        }\n      },\n      \"entries\": [\n        {\n          \"type\": \"SALE\",\n          \"data\": {\n            \"type\": \"ITEM\",\n            \"text\": \"shirt\",\n            \"unit\": {\n              \"quantity\": \"1\",\n              \"price\": \"123.00\"\n            },\n            \"value\": {\n              \"base\": \"100.00\"\n            },\n            \"vat\": {\n              \"type\": \"VAT_RATE\",\n              \"code\": \"STANDARD\",\n              \"percentage\": \"23.00\",\n              \"amount\": \"23.00\",\n              \"exclusive\": \"100.00\",\n              \"inclusive\": \"123.00\"\n            }\n          },\n          \"details\": {\n            \"concept\": \"GOOD\"\n          }\n        }\n      ],\n      \"payments\": [\n        {\n          \"type\": \"CASH\",\n          \"details\": {\n            \"amount\": \"123.00\"\n          }\n        }\n      ],\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "Submits the `TRANSACTION::RECEIPT` (`REC/12345`) referencing the intention above, with a single `SALE` entry of type `ITEM` (text \"shirt\", concept `GOOD`, quantity `1`, unit price `123.00`, base `100.00`, `STANDARD` `VAT_RATE` at `23%`) and a single `CASH` payment of `123.00`.\n\n→ Source: uapi/receipt.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Retrieve Record",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/records/{{receiptRecordId}}",
								"description": "Retrieve a record by id — useful for verifying the intention and the receipt record\n\n→ Source: uapi/receipt.md ## Related Endpoints"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `receipt`\n\nFlow source: Portugal (PT) Flow"
				},
				{
					"name": "Simplified Invoice (FS)",
					"item": [
						{
							"name": "Create Intention",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"intentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\"\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A customer buys a coffee for €1.50 (€1.22 net + €0.28 VAT at 23%) and pays €1.50 in cash. An `INTENTION` is created (Step 1) on the system.\n\n→ Source: uapi/receipt_simplified_invoice.md (Generic Flow)"
							},
							"response": []
						},
						{
							"name": "Create Receipt Record (Simplified Invoice)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"receiptSimplifiedInvoiceRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{intentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"RECEIPT\",\n      \"document\": {\n        \"number\": \"56789\",\n        \"series\": \"2026\",\n        \"simplified_invoice\": true,\n        \"total_vat\": {\n          \"amount\": \"0.28\",\n          \"exclusive\": \"1.22\",\n          \"inclusive\": \"1.50\"\n        }\n      },\n      \"entries\": [\n        {\n          \"type\": \"SALE\",\n          \"data\": {\n            \"type\": \"ITEM\",\n            \"text\": \"coffee\",\n            \"unit\": {\n              \"quantity\": \"1\",\n              \"price\": \"1.50\"\n            },\n            \"value\": {\n              \"base\": \"1.22\"\n            },\n            \"vat\": {\n              \"type\": \"VAT_RATE\",\n              \"code\": \"STANDARD\",\n              \"percentage\": \"23.00\",\n              \"amount\": \"0.28\",\n              \"exclusive\": \"1.22\",\n              \"inclusive\": \"1.50\"\n            }\n          },\n          \"details\": {\n            \"concept\": \"GOOD\"\n          }\n        }\n      ],\n      \"payments\": [\n        {\n          \"type\": \"CASH\",\n          \"details\": {\n            \"amount\": \"1.50\"\n          }\n        }\n      ]\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "Submits a `TRANSACTION::RECEIPT` (`FS-A/56789`) with `document.simplified_invoice: true`, a single `SALE` entry (\"coffee\") and a single `CASH` payment of `1.50`.\n\n→ Source: uapi/receipt_simplified_invoice.md (Generic Flow)"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `receipt_simplified_invoice`\n\nFlow source: Generic Flow"
				},
				{
					"name": "Return / Credit Note (Correction of Receipt) (NC)",
					"item": [
						{
							"name": "Create Intention (for original receipt)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"originalIntentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A customer bought a shirt for €123.00 (€100.00 net + €23.00 VAT at 23%) at a clothing store. The next day, the customer returns the defective shirt. The store issues a credit note `NC-A/0001` as a `CORRECTION` transaction referencing the original receipt, carrying one `RETURN` entry of type `ITEM` and a single `CASH` payment of `-123.00` reflecting the refund.\n\n(prerequisite sub-step — creates the referenced record so the workflow chains end-to-end on a fresh account)\n\n→ Source: uapi/receipt_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create the original receipt",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"originalRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{originalIntentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"RECEIPT\",\n      \"document\": {\n        \"number\": \"REC-9999\",\n        \"series\": \"2026\",\n        \"total_vat\": {\n          \"amount\": \"23.00\",\n          \"exclusive\": \"100.00\",\n          \"inclusive\": \"123.00\"\n        }\n      },\n      \"entries\": [\n        {\n          \"type\": \"SALE\",\n          \"data\": {\n            \"type\": \"ITEM\",\n            \"text\": \"shirt\",\n            \"unit\": {\n              \"quantity\": \"1\",\n              \"price\": \"123.00\"\n            },\n            \"value\": {\n              \"base\": \"100.00\"\n            },\n            \"vat\": {\n              \"type\": \"VAT_RATE\",\n              \"code\": \"STANDARD\",\n              \"percentage\": \"23.00\",\n              \"amount\": \"23.00\",\n              \"exclusive\": \"100.00\",\n              \"inclusive\": \"123.00\"\n            }\n          },\n          \"details\": {\n            \"concept\": \"GOOD\"\n          }\n        }\n      ],\n      \"payments\": [\n        {\n          \"type\": \"CASH\",\n          \"details\": {\n            \"amount\": \"123.00\"\n          }\n        }\n      ],\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "(prerequisite sub-step — creates the referenced record so the workflow chains end-to-end on a fresh account)\n\n→ Source: uapi/receipt_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create Intention (for correction)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"intentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "→ Source: uapi/receipt_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create Correction Record",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"receiptCorrectionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{intentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"CORRECTION\",\n      \"record\": {\n        \"id\": \"{{originalRecordId}}\"\n      },\n      \"reason\": \"Devolução por defeito\",\n      \"data\": {\n        \"type\": \"RECEIPT\",\n        \"document\": {\n          \"number\": \"REC-0001\",\n          \"series\": \"2026\",\n          \"total_vat\": {\n            \"amount\": \"23.00\",\n            \"exclusive\": \"100.00\",\n            \"inclusive\": \"123.00\"\n          }\n        },\n        \"entries\": [\n          {\n            \"type\": \"RETURN\",\n            \"data\": {\n              \"type\": \"ITEM\",\n              \"text\": \"shirt\",\n              \"unit\": {\n                \"quantity\": \"1\",\n                \"price\": \"123.00\"\n              },\n              \"value\": {\n                \"base\": \"100.00\"\n              },\n              \"vat\": {\n                \"type\": \"VAT_RATE\",\n                \"code\": \"STANDARD\",\n                \"percentage\": \"23.00\",\n                \"amount\": \"23.00\",\n                \"exclusive\": \"100.00\",\n                \"inclusive\": \"123.00\"\n              }\n            },\n            \"details\": {\n              \"concept\": \"GOOD\",\n              \"number\": \"1\"\n            }\n          }\n        ],\n        \"payments\": [\n          {\n            \"type\": \"CASH\",\n            \"details\": {\n              \"amount\": \"-123.00\"\n            }\n          }\n        ],\n        \"details\": {\n          \"creators\": [\n            {\n              \"type\": \"PERSON\",\n              \"label\": \"1023\"\n            }\n          ]\n        }\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "For PT, the cashier (employee label `1023`) additionally sets `operation.reason: \"Devolução por defeito\"` (top-level field on the correction operation since spec 2026-05-04) to feed the SAF-T `Reason` field.\n\n→ Source: uapi/receipt_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Retrieve Record",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/records/{{receiptCorrectionRecordId}}",
								"description": "Retrieve a record by id — useful for verifying the intention, the original receipt, and the correction record\n\n→ Source: uapi/receipt_correction.md ## Related Endpoints"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `receipt_correction`\n\nFlow source: Portugal (PT) Flow"
				},
				{
					"name": "Additional Sale / Debit Note (Correction of Receipt) (ND)",
					"item": [
						{
							"name": "Create Intention (for original receipt)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"originalIntentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A customer bought a shirt for €123.00 (€100.00 net + €23.00 VAT at 23%) at a clothing store, and comes back to buy a second, identical shirt at the same price on the same receipt series. The store issues an additional sale document `ND-A/0001` as a `CORRECTION` transaction referencing the original receipt, carrying an additional `SALE` entry of type `ITEM` and a single `CASH` payment of `123.00`.\n\n(prerequisite sub-step — creates the referenced record so the workflow chains end-to-end on a fresh account)\n\n→ Source: uapi/receipt_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create the original receipt",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"originalRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{originalIntentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"RECEIPT\",\n      \"document\": {\n        \"number\": \"REC-9999\",\n        \"series\": \"2026\",\n        \"total_vat\": {\n          \"amount\": \"23.00\",\n          \"exclusive\": \"100.00\",\n          \"inclusive\": \"123.00\"\n        }\n      },\n      \"entries\": [\n        {\n          \"type\": \"SALE\",\n          \"data\": {\n            \"type\": \"ITEM\",\n            \"text\": \"shirt\",\n            \"unit\": {\n              \"quantity\": \"1\",\n              \"price\": \"123.00\"\n            },\n            \"value\": {\n              \"base\": \"100.00\"\n            },\n            \"vat\": {\n              \"type\": \"VAT_RATE\",\n              \"code\": \"STANDARD\",\n              \"percentage\": \"23.00\",\n              \"amount\": \"23.00\",\n              \"exclusive\": \"100.00\",\n              \"inclusive\": \"123.00\"\n            }\n          },\n          \"details\": {\n            \"concept\": \"GOOD\"\n          }\n        }\n      ],\n      \"payments\": [\n        {\n          \"type\": \"CASH\",\n          \"details\": {\n            \"amount\": \"123.00\"\n          }\n        }\n      ],\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "(prerequisite sub-step — creates the referenced record so the workflow chains end-to-end on a fresh account)\n\n→ Source: uapi/receipt_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create Intention (for correction)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"intentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A customer bought a shirt for €123.00 (€100.00 net + €23.00 VAT at 23%) at a clothing store, and comes back to buy a second, identical shirt at the same price on the same receipt series. The store issues an additional sale document `ND-A/0001` as a `CORRECTION` transaction referencing the original receipt, carrying an additional `SALE` entry of type `ITEM` and a single `CASH` payment of `123.00`.\n\n→ Source: uapi/receipt_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create Correction Record",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"receiptCorrectionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{intentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"CORRECTION\",\n      \"record\": {\n        \"id\": \"{{originalRecordId}}\"\n      },\n      \"reason\": \"Devolução por defeito\",\n      \"data\": {\n        \"type\": \"RECEIPT\",\n        \"document\": {\n          \"number\": \"REC-0001\",\n          \"series\": \"2026\",\n          \"total_vat\": {\n            \"amount\": \"23.00\",\n            \"exclusive\": \"100.00\",\n            \"inclusive\": \"123.00\"\n          }\n        },\n        \"entries\": [\n          {\n            \"type\": \"SALE\",\n            \"data\": {\n              \"type\": \"ITEM\",\n              \"text\": \"shirt\",\n              \"unit\": {\n                \"quantity\": \"1\",\n                \"price\": \"123.00\"\n              },\n              \"value\": {\n                \"base\": \"100.00\"\n              },\n              \"vat\": {\n                \"type\": \"VAT_RATE\",\n                \"code\": \"STANDARD\",\n                \"percentage\": \"23.00\",\n                \"amount\": \"23.00\",\n                \"exclusive\": \"100.00\",\n                \"inclusive\": \"123.00\"\n              }\n            },\n            \"details\": {\n              \"concept\": \"GOOD\",\n              \"number\": \"1\"\n            }\n          }\n        ],\n        \"payments\": [\n          {\n            \"type\": \"CASH\",\n            \"details\": {\n              \"amount\": \"123.00\"\n            }\n          }\n        ],\n        \"details\": {\n          \"creators\": [\n            {\n              \"type\": \"PERSON\",\n              \"label\": \"1023\"\n            }\n          ]\n        }\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "For PT, the cashier (employee label `1023`) additionally sets `operation.reason: \"Devolução por defeito\"` (top-level field on the correction operation since spec 2026-05-04) to feed the SAF-T `Reason` field.\n\n→ Source: uapi/receipt_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Retrieve Record",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/records/{{receiptCorrectionRecordId}}",
								"description": "Retrieve a record by id — useful for verifying the intention, the original receipt, and the correction record\n\n→ Source: uapi/receipt_correction.md ## Related Endpoints"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `receipt_correction`\n\nFlow source: Portugal (PT) Flow"
				},
				{
					"name": "Cancellation (Cancellation of Receipt)",
					"item": [
						{
							"name": "Create Intention (for original receipt)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"originalIntentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A cashier (employee label `1023`) at a restaurant in Porto issues a receipt for the wrong table. The error is caught immediately, before the customer leaves. The cashier creates a new `INTENTION` and submits a `CANCELLATION` transaction referencing the original receipt. For PT, the cashier additionally sets `operation.reason: \"Emitida por erro\"` (top-level field on the cancellation operation since spec 2026-05-04) to feed the SAF-T `Reason` field. The original receipt is now void.\n\n(prerequisite sub-step — creates the referenced record so the workflow chains end-to-end on a fresh account)\n\n→ Source: uapi/receipt_cancellation.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create the original receipt",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"originalRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{originalIntentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"RECEIPT\",\n      \"document\": {\n        \"number\": \"REC-9999\",\n        \"series\": \"2026\",\n        \"total_vat\": {\n          \"amount\": \"2.30\",\n          \"exclusive\": \"10.00\",\n          \"inclusive\": \"12.30\"\n        }\n      },\n      \"entries\": [\n        {\n          \"type\": \"SALE\",\n          \"data\": {\n            \"type\": \"ITEM\",\n            \"text\": \"Menu do dia\",\n            \"unit\": {\n              \"quantity\": \"1\",\n              \"price\": \"12.30\"\n            },\n            \"value\": {\n              \"base\": \"10.00\"\n            },\n            \"vat\": {\n              \"type\": \"VAT_RATE\",\n              \"code\": \"STANDARD\",\n              \"percentage\": \"23.00\",\n              \"amount\": \"2.30\",\n              \"exclusive\": \"10.00\",\n              \"inclusive\": \"12.30\"\n            }\n          },\n          \"details\": {\n            \"concept\": \"SERVICE\"\n          }\n        }\n      ],\n      \"payments\": [\n        {\n          \"type\": \"CASH\",\n          \"details\": {\n            \"amount\": \"12.30\"\n          }\n        }\n      ],\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "(prerequisite sub-step — creates the referenced record so the workflow chains end-to-end on a fresh account)\n\n→ Source: uapi/receipt_cancellation.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create Intention (for cancellation)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"intentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "→ Source: uapi/receipt_cancellation.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create Cancellation Record",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"receiptCancellationRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{intentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"CANCELLATION\",\n      \"record\": {\n        \"id\": \"{{originalRecordId}}\"\n      },\n      \"reason\": \"Emitida por erro\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "→ Source: uapi/receipt_cancellation.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Retrieve Record",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/records/{{receiptCancellationRecordId}}",
								"description": "Retrieve a record by id — useful for verifying the original receipt before cancellation and the cancellation record afterwards\n\n→ Source: uapi/receipt_cancellation.md ## Related Endpoints"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `receipt_cancellation`\n\nFlow source: Portugal (PT) Flow"
				},
				{
					"name": "Invoice (FT)",
					"item": [
						{
							"name": "Create Intention",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"intentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A consulting firm issues an invoice to its corporate client Acme Lda. for €123.00 worth of services (€100.00 net + €23.00 VAT at 23%, payment terms: 30 days). The clerk (label `1023`) creates an `INTENTION` (Step 1).\n\n→ Source: uapi/invoice.md (Generic Flow)"
							},
							"response": []
						},
						{
							"name": "Create Invoice Record",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"invoiceRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{intentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"INVOICE\",\n      \"document\": {\n        \"number\": \"000001\",\n        \"series\": \"2026\",\n        \"total_vat\": {\n          \"amount\": \"23.00\",\n          \"exclusive\": \"100.00\",\n          \"inclusive\": \"123.00\"\n        }\n      },\n      \"entries\": [\n        {\n          \"type\": \"SALE\",\n          \"data\": {\n            \"type\": \"ITEM\",\n            \"text\": \"Consulting service\",\n            \"unit\": {\n              \"quantity\": \"1\",\n              \"price\": \"123.00\"\n            },\n            \"value\": {\n              \"base\": \"100.00\"\n            },\n            \"vat\": {\n              \"type\": \"VAT_RATE\",\n              \"code\": \"STANDARD\",\n              \"percentage\": \"23.00\",\n              \"amount\": \"23.00\",\n              \"exclusive\": \"100.00\",\n              \"inclusive\": \"123.00\"\n            }\n          },\n          \"details\": {\n            \"concept\": \"SERVICE\"\n          }\n        }\n      ],\n      \"recipients\": [\n        {\n          \"type\": \"BUSINESS\",\n          \"name\": \"Acme Lda.\",\n          \"address\": {\n            \"line\": {\n              \"type\": \"STREET_NUMBER\",\n              \"street\": \"Rua das Flores\",\n              \"number\": \"10\"\n            },\n            \"code\": \"4000-001\",\n            \"city\": \"Porto\",\n            \"country\": \"PT\"\n          },\n          \"identification\": {\n            \"type\": \"VAT\",\n            \"number\": \"PT500000000\"\n          }\n        }\n      ],\n      \"payments\": [\n        {\n          \"type\": \"OUTSTANDING\",\n          \"details\": {\n            \"amount\": \"123.00\",\n            \"date\": \"{{currentdate}}\"\n          },\n          \"concept\": \"SERVICE\"\n        }\n      ],\n      \"breakdown\": [\n        {\n          \"percentage\": \"23.00\",\n          \"amount\": \"23.00\"\n        }\n      ],\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "Submits a `TRANSACTION::INVOICE` (`FT-2026/000001`) with one `SALE` entry (\"Consulting service\", `SERVICE`, `STANDARD` `VAT_RATE` at `23%`), a `BUSINESS` recipient (Acme Lda., VAT `PT500000000`), a single `OUTSTANDING` payment of `123.00` and the VAT breakdown.\n\n→ Source: uapi/invoice.md (Generic Flow)"
							},
							"response": []
						},
						{
							"name": "Retrieve Record",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/records/{{invoiceRecordId}}",
								"description": "Retrieve a record by id — useful for verifying the intention and the invoice record\n\n→ Source: uapi/invoice.md ## Related Endpoints"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `invoice`\n\nFlow source: Generic Flow",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"type": "text/javascript",
								"packages": {},
								"exec": [
									"var moment = require('moment');",
									"",
									"pm.environment.set('currentdate', moment().format((\"YYYY-MM-DD\")));"
								]
							}
						},
						{
							"listen": "test",
							"script": {
								"type": "text/javascript",
								"packages": {},
								"exec": [
									""
								]
							}
						}
					]
				},
				{
					"name": "Return / Credit Note (Correction of Invoice) (NC)",
					"item": [
						{
							"name": "Create Intention (for original invoice)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"originalIntentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A customer bought a shirt for €123.00 (€100.00 net + €23.00 VAT at 23%) on a B2B invoice. The next day the customer returns the defective shirt. The store issues a credit note `NC-2026/0001` as a `CORRECTION` transaction referencing the original invoice, carrying one `RETURN` entry, the original buyer in `recipients[]`, the VAT `breakdown`, and a single `CASH` payment of `-123.00` reflecting the refund. For PT, the cashier (employee label `1023`) additionally sets `operation.reason: \"Devolução de mercadoria por defeito\"` (top-level field on the correction operation since spec 2026-05-04) so the AT receives the SAF-T justification.\n\n→ Source: uapi/invoice_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create the original invoice",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"originalRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{originalIntentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"INVOICE\",\n      \"document\": {\n        \"number\": \"000999\",\n        \"series\": \"2026\",\n        \"total_vat\": {\n          \"amount\": \"23.00\",\n          \"exclusive\": \"100.00\",\n          \"inclusive\": \"123.00\"\n        }\n      },\n      \"entries\": [\n        {\n          \"type\": \"SALE\",\n          \"data\": {\n            \"type\": \"ITEM\",\n            \"text\": \"shirt\",\n            \"unit\": {\n              \"quantity\": \"1\",\n              \"price\": \"123.00\"\n            },\n            \"value\": {\n              \"base\": \"100.00\"\n            },\n            \"vat\": {\n              \"type\": \"VAT_RATE\",\n              \"code\": \"STANDARD\",\n              \"percentage\": \"23.00\",\n              \"amount\": \"23.00\",\n              \"exclusive\": \"100.00\",\n              \"inclusive\": \"123.00\"\n            }\n          },\n          \"details\": {\n            \"concept\": \"GOOD\"\n          }\n        }\n      ],\n      \"recipients\": [\n        {\n          \"type\": \"BUSINESS\",\n          \"name\": \"Acme Lda.\",\n          \"address\": {\n            \"line\": {\n              \"type\": \"STREET_NUMBER\",\n              \"street\": \"Rua das Flores\",\n              \"number\": \"10\"\n            },\n            \"code\": \"4000-001\",\n            \"city\": \"Porto\",\n            \"country\": \"PT\"\n          },\n          \"identification\": {\n            \"type\": \"VAT\",\n            \"number\": \"PT500000000\"\n          }\n        }\n      ],\n      \"payments\": [\n        {\n          \"type\": \"OUTSTANDING\",\n          \"details\": {\n            \"amount\": \"123.00\",\n            \"date\": \"{{currentdate}}\"\n          },\n          \"concept\": \"GOOD\"\n        }\n      ],\n      \"breakdown\": [\n        {\n          \"percentage\": \"23.00\",\n          \"amount\": \"23.00\"\n        }\n      ],\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "(prerequisite sub-step — creates the referenced record so the workflow chains end-to-end on a fresh account)\n\n→ Source: uapi/invoice_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create Intention (for correction)",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"intentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A customer bought a shirt for €123.00 (€100.00 net + €23.00 VAT at 23%) on a B2B invoice. The next day the customer returns the defective shirt. The store issues a credit note `NC-2026/0001` as a `CORRECTION` transaction referencing the original invoice, carrying one `RETURN` entry, the original buyer in `recipients[]`, the VAT `breakdown`, and a single `CASH` payment of `-123.00` reflecting the refund. For PT, the cashier (employee label `1023`) additionally sets `operation.reason: \"Devolução de mercadoria por defeito\"` (top-level field on the correction operation since spec 2026-05-04) so the AT receives the SAF-T justification.\n\n→ Source: uapi/invoice_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Create Correction Record",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"invoiceCorrectionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{intentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"CORRECTION\",\n      \"record\": {\n        \"id\": \"{{originalRecordId}}\"\n      },\n      \"reason\": \"Devolução de mercadoria por defeito\",\n      \"data\": {\n        \"type\": \"INVOICE\",\n        \"document\": {\n          \"number\": \"0001\",\n          \"series\": \"2026\",\n          \"total_vat\": {\n            \"amount\": \"23.00\",\n            \"exclusive\": \"100.00\",\n            \"inclusive\": \"123.00\"\n          }\n        },\n        \"entries\": [\n          {\n            \"type\": \"RETURN\",\n            \"data\": {\n              \"type\": \"ITEM\",\n              \"text\": \"shirt\",\n              \"unit\": {\n                \"quantity\": \"1\",\n                \"price\": \"123.00\"\n              },\n              \"value\": {\n                \"base\": \"100.00\"\n              },\n              \"vat\": {\n                \"type\": \"VAT_RATE\",\n                \"code\": \"STANDARD\",\n                \"percentage\": \"23.00\",\n                \"amount\": \"23.00\",\n                \"exclusive\": \"100.00\",\n                \"inclusive\": \"123.00\"\n              }\n            },\n            \"details\": {\n              \"concept\": \"GOOD\",\n              \"number\": \"1\"\n            }\n          }\n        ],\n        \"recipients\": [\n          {\n            \"type\": \"BUSINESS\",\n            \"name\": \"Acme Lda.\",\n            \"address\": {\n              \"line\": {\n                \"type\": \"STREET_NUMBER\",\n                \"street\": \"Rua das Flores\",\n                \"number\": \"10\"\n              },\n              \"code\": \"4000-001\",\n              \"city\": \"Porto\",\n              \"country\": \"PT\"\n            },\n            \"identification\": {\n              \"type\": \"VAT\",\n              \"number\": \"PT500000000\"\n            }\n          }\n        ],\n        \"payments\": [\n          {\n            \"type\": \"CASH\",\n            \"details\": {\n              \"amount\": \"-123.00\"\n            }\n          }\n        ],\n        \"breakdown\": [\n          {\n            \"percentage\": \"23.00\",\n            \"amount\": \"23.00\"\n          }\n        ],\n        \"details\": {\n          \"creators\": [\n            {\n              \"type\": \"PERSON\",\n              \"label\": \"1023\"\n            }\n          ]\n        }\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "→ Source: uapi/invoice_correction.md (Portugal (PT) Flow)"
							},
							"response": []
						},
						{
							"name": "Retrieve Record",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/records/{{invoiceCorrectionRecordId}}",
								"description": "Retrieve a record by id — useful for verifying the intention, the original invoice, and the correction record\n\n→ Source: uapi/invoice_correction.md ## Related Endpoints"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `invoice_correction`\n\nFlow source: Portugal (PT) Flow"
				},
				{
					"name": "Discount (on Item Level)",
					"item": [
						{
							"name": "Create Intention",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"intentionRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"INTENTION\",\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    },\n    \"operation\": {\n      \"type\": \"TRANSACTION\",\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ]\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "Prerequisite step — creates the `INTENTION` record referenced by the discounted receipt below.\n\n→ Source: uapi/entry_discount.md (Generic Flow)"
							},
							"response": []
						},
						{
							"name": "Create Transaction",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 200\", function () {",
											"    pm.response.to.have.status(200);",
											"    var data = pm.response.json();",
											"    pm.environment.set(\"entryDiscountRecordId\", data.content.id);",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									},
									{
										"key": "X-Idempotency-Key",
										"value": "{{$guid}}",
										"description": "(Required) Idempotency key"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n  \"content\": {\n    \"type\": \"TRANSACTION\",\n    \"record\": {\n      \"id\": \"{{intentionRecordId}}\"\n    },\n    \"operation\": {\n      \"type\": \"RECEIPT\",\n      \"document\": {\n        \"number\": \"REC-30021\",\n        \"series\": \"2026\",\n        \"total_vat\": {\n          \"amount\": \"18.70\",\n          \"exclusive\": \"81.30\",\n          \"inclusive\": \"100.00\"\n        }\n      },\n      \"entries\": [\n        {\n          \"type\": \"SALE\",\n          \"data\": {\n            \"type\": \"ITEM\",\n            \"text\": \"Shoes\",\n            \"unit\": {\n              \"quantity\": \"1\",\n              \"price\": \"120.00\"\n            },\n            \"value\": {\n              \"base\": \"81.30\",\n              \"discount\": \"20.00\"\n            },\n            \"vat\": {\n              \"type\": \"VAT_RATE\",\n              \"code\": \"STANDARD\",\n              \"percentage\": \"23.00\",\n              \"amount\": \"18.70\",\n              \"exclusive\": \"81.30\",\n              \"inclusive\": \"100.00\"\n            }\n          },\n          \"details\": {\n            \"concept\": \"GOOD\"\n          }\n        }\n      ],\n      \"customer\": {\n        \"type\": \"EXTERNAL\"\n      },\n      \"payments\": [\n        {\n          \"type\": \"CASH\",\n          \"details\": {\n            \"amount\": \"100.00\"\n          }\n        }\n      ],\n      \"details\": {\n        \"creators\": [\n          {\n            \"type\": \"PERSON\",\n            \"label\": \"1023\"\n          }\n        ],\n        \"training\": false\n      }\n    }\n  }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": "{{apiBaseUrl}}/records",
								"description": "A customer buys a pair of shoes priced at €120.00 (incl. 23% VAT). The cashier (employee label `1023`) applies a €20.00 loyalty discount on that item. The receipt (`REC-30021`) records a single `SALE` entry of type `ITEM`, quantity `1` at unit price `120.00`, with `value.base: 81.30`, `value.discount: 20.00`, and a `STANDARD` `VAT_RATE` at `23.00%` on the discounted base (VAT amount `18.70`, exclusive `81.30`, inclusive `100.00`). The customer pays €100.00 in cash.\n\n→ Source: uapi/entry_discount.md (Generic Flow)"
							},
							"response": []
						},
						{
							"name": "Retrieve Record",
							"request": {
								"auth": {
									"type": "bearer",
									"bearer": {
										"token": "{{subjectBearerToken}}"
									}
								},
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/json"
									},
									{
										"key": "X-Api-Version",
										"value": "{{apiVersion}}",
										"description": "API version"
									}
								],
								"url": "{{apiBaseUrl}}/records/{{entryDiscountRecordId}}",
								"description": "Retrieve a record by id — useful for inspecting the receipt that carries the item-level discount entry\n\n→ Source: uapi/entry_discount.md ## Related Endpoints"
							},
							"response": []
						}
					],
					"description": "business_operation_id: `entry_discount`\n\nFlow source: Generic Flow"
				}
			]
		},
		{
			"name": "SAF-T Export",
			"item": [
				{
					"name": "Create File",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"pm.test(\"Status code is 200\", function () {",
									"    pm.response.to.have.status(200);",
									"    var data = pm.response.json();",
									"    pm.environment.set(\"fileId\", data.content.id);",
									"});"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{subjectBearerToken}}"
							}
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/json"
							},
							{
								"key": "X-Api-Version",
								"value": "{{apiVersion}}",
								"description": "API version"
							},
							{
								"key": "X-Idempotency-Key",
								"value": "{{$guid}}",
								"description": "(Required) Idempotency key"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\n  \"content\": {\n    \"type\": \"AUDIT\",\n    \"range\": {\n      \"from\": \"2026-01-01\",\n      \"to\": \"2026-01-31\"\n    },\n    \"taxpayer\": {\n      \"id\": \"{{taxpayerId}}\"\n    },\n    \"system\": {\n      \"id\": \"{{fiscalDeviceId}}\"\n    }\n  }\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": "{{apiBaseUrl}}/files",
						"description": "An accountant prepares the monthly SAF-T (PT) submission for a Portuguese taxpayer covering the period from `2026-01-01` to `2026-01-31`, narrowed to a specific cash register (`content.system.id`) via `POST /files` with `content.type: AUDIT`. The UAPI dispatches to the SAF-T (PT) renderer, returning a downloadable `application/zip` artifact at `/files/{id}.zip` and a JWS integrity file at `/files/{id}.zip.jws`, which is then uploaded to Portal das Finanças.\n\n→ Source: uapi/fiscal_archive_export.md (Generic Flow)"
					},
					"response": []
				},
				{
					"name": "Stream File",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": {
								"token": "{{subjectBearerToken}}"
							}
						},
						"method": "GET",
						"header": [
							{
								"key": "Accept",
								"value": "application/json"
							},
							{
								"key": "X-Api-Version",
								"value": "{{apiVersion}}",
								"description": "API version"
							}
						],
						"url": "{{apiBaseUrl}}/files/{{fileId}}.zip",
						"description": "→ Source: uapi/fiscal_archive_export.md (Generic Flow)"
					},
					"response": []
				}
			]
		}
	]
}
