{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"a9e743ef-a81a-49d2-b798-b3867915bcad","name":"Breeze Interface - Order Confirmation","description":"# Introduction\n\nThe API is an interface between input data and standard documents in Microsoft Dynamics 365 Business Central. It enables, for example, an update of a purchase order from metadata (with a pre-defined schema).\n\n## JSON Schema for a Purchase Order Update (order confirmation)\n\n``` json\n{\n  \"$schema\": \"http://json-schema.org/draft-04/schema#\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"orderNo\": { \"type\": \"string\" },\n    \"vendorNo\": { \"type\": \"string\" },\n    \"vendorOrderNo\": { \"type\": \"string\" },\n    \"closeOrder\": { \"type\": \"boolean\", \"description\": \"true = close the order: every line quantity is reduced to the quantity received, no other changes\" },\n    \"paymentTerms\": { \"type\": \"string\", \"description\": \"Payment terms code\" },\n    \"currency\": { \"type\": \"string\" },\n    \"netAmount\": { \"type\": \"number\" },\n    \"taxAmount\": { \"type\": \"number\" },\n    \"totalAmount\": { \"type\": \"number\" },\n    \"additionalFields\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": { \"type\": \"string\" },\n          \"value\": { \"type\": \"string\" }\n        },\n        \"required\": [\"name\", \"value\"]\n      }\n    },\n    \"errors\": {\n      \"type\": \"array\",\n      \"items\": { \"type\": \"string\" },\n      \"description\": \"Filled by Breeze Interface in the returned JSON if the plausibility check fails\"\n    },\n    \"lines\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"lineNo\": { \"type\": \"integer\", \"description\": \"Line No. of the existing order line to update; omit to create a new line\" },\n          \"lineId\": {\n            \"type\": \"string\",\n            \"description\": \"Identifier of the line, unique within the document. Needed on item lines that a charge line refers to and on Charge (Item) lines\"\n          },\n          \"type\": { \"type\": \"string\", \"description\": \"Item, G/L Account, Resource, Fixed Asset, Charge (Item) or \\\" \\\" (text line)\" },\n          \"vendorItemNo\": { \"type\": \"string\" },\n          \"no\": { \"type\": \"string\" },\n          \"description\": { \"type\": \"string\" },\n          \"qty\": { \"type\": \"number\" },\n          \"uom\": { \"type\": \"string\" },\n          \"unitPrice\": { \"type\": \"number\" },\n          \"lineDisc\": { \"type\": \"number\" },\n          \"locationCode\": { \"type\": \"string\" },\n          \"binCode\": { \"type\": \"string\" },\n          \"promisedReceiptDate\": { \"type\": \"string\", \"format\": \"date\" },\n          \"netAmount\": { \"type\": \"number\" },\n          \"totalAmount\": { \"type\": \"number\" },\n          \"taxRate\": { \"type\": \"number\" },\n          \"vatBusPostingGroup\": { \"type\": \"string\" },\n          \"vatProdPostingGroup\": { \"type\": \"string\" },\n          \"deferralCode\": { \"type\": \"string\", \"description\": \"Deferral template code\" },\n          \"jobNo\": { \"type\": \"string\", \"description\": \"Project no.\" },\n          \"jobTaskNo\": { \"type\": \"string\", \"description\": \"Project task no.\" },\n          \"jobPlanningLineNo\": { \"type\": \"integer\", \"description\": \"Project planning line no.\" },\n          \"jobLineType\": { \"type\": \"string\", \"description\": \"Budget, Billable or Both Budget and Billable\" },\n          \"jobUnitPrice\": { \"type\": \"number\" },\n          \"jobLineAmount\": { \"type\": \"number\" },\n          \"itemChargeAssignment\": {\n            \"type\": \"object\",\n            \"description\": \"Only on lines of type Charge (Item): links the surcharge/allowance to item lines\",\n            \"properties\": {\n              \"type\": { \"type\": \"string\", \"enum\": [\"Equally\", \"ByAmount\", \"None\"] },\n              \"ids\": {\n                \"type\": \"array\",\n                \"items\": { \"type\": \"string\" },\n                \"description\": \"lineId values of the item lines; empty or missing = all item lines of the document\"\n              }\n            },\n            \"required\": [\"type\"]\n          },\n          \"dimensions\": {\n            \"type\": \"object\",\n            \"description\": \"Key = dimension code, value = dimension value code, e.g. {\\\"DEPARTMENT\\\": \\\"SALES\\\"}\",\n            \"additionalProperties\": { \"type\": \"string\" }\n          },\n          \"additionalFields\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"name\": { \"type\": \"string\" },\n                \"value\": { \"type\": \"string\" }\n              },\n              \"required\": [\"name\", \"value\"]\n            }\n          },\n          \"errors\": {\n            \"type\": \"array\",\n            \"items\": { \"type\": \"string\" },\n            \"description\": \"Filled by Breeze Interface in the returned JSON if the plausibility check fails\"\n          }\n        },\n        \"required\": [\"type\", \"no\", \"qty\", \"unitPrice\", \"uom\", \"promisedReceiptDate\", \"vatBusPostingGroup\", \"vatProdPostingGroup\"]\n      }\n    }\n  },\n  \"required\": [\"orderNo\", \"vendorNo\", \"lines\"]\n}\n```\n\n## Recently added fields\n\n- Header: `closeOrder`, `paymentTerms`\n- Lines: `deferralCode`\n- Lines: `jobNo`, `jobTaskNo`, `jobPlanningLineNo`, `jobLineType`, `jobUnitPrice`, `jobLineAmount` (project / job planning lines)\n- Lines: `lineId` and `itemChargeAssignment` (item charges, see below)\n\n## Item charges (surcharges and allowances)\n\nSurcharges (for example freight or packaging) and allowances can be sent as lines of type `Charge (Item)` and linked to the item lines they belong to. Breeze Interface passes the link on to DEXPRO Core, which creates the item charge assignments in Business Central.\n\n1. Give every item line that a charge refers to a `lineId` (any text, unique within the document).\n2. Send the surcharge or allowance as a line with `\"type\": \"Charge (Item)\"`, the item charge code in `no`, its own `lineId` and an `itemChargeAssignment` object:\n    - `type`: how the charge is distributed: `Equally`, `ByAmount` or `None` (lines are linked, nothing is distributed)\n    - `ids`: the `lineId` values of the item lines to assign to. Leave it empty or omit it to distribute over all item lines of the document. Every id must belong to an item line of the same document.\n3. An allowance is a `Charge (Item)` line with a negative `qty`.\n\nThe assignment is only created if the charge line carries both `lineId` and `itemChargeAssignment`; otherwise the charge line is created without assignment. The order of the lines does not matter.\n\nShortened example (the other line fields are omitted):\n\n``` json\n{\n  \"lines\": [\n    { \"lineNo\": 10000, \"lineId\": \"L1\", \"type\": \"Item\", \"no\": \"1000\", \"qty\": 8, \"unitPrice\": 149.99 },\n    { \"lineNo\": 20000, \"lineId\": \"L2\", \"type\": \"Item\", \"no\": \"1001\", \"qty\": 4, \"unitPrice\": 149.49 },\n    {\n      \"lineId\": \"C1\",\n      \"type\": \"Charge (Item)\",\n      \"no\": \"P-FREIGHT\",\n      \"qty\": 1,\n      \"unitPrice\": 95.0,\n      \"itemChargeAssignment\": { \"type\": \"ByAmount\", \"ids\": [\"L1\", \"L2\"] }\n    },\n    {\n      \"lineId\": \"C2\",\n      \"type\": \"Charge (Item)\",\n      \"no\": \"P-ALLOWANCE\",\n      \"qty\": -1,\n      \"unitPrice\": 20.5,\n      \"itemChargeAssignment\": { \"type\": \"Equally\", \"ids\": [\"L1\"] }\n    }\n  ]\n}\n```\n\nThe request **(Optional) Add Json with item charges to a BREEZE Document** contains a complete example.\n\n# Overview\n\nYou can get, create (post) or edit (patch) BREEZE Documents. Check out the examples for more information.\n\nThe following scenarios are possible:\n\n1. You do not specify a single \"lineNo\" -> All lines in an order are replaced.\n2. You specify at least one \"lineNo\" -> The matching line in an order is updated and \"line\" objects without \"lineNo\" are created in the order.\n3. You set `\"closeOrder\": true` -> The order is closed: the quantity of every line is reduced to the quantity already received and the order is released. Lines in the JSON are ignored.\n\n``` json\n{ \"orderNo\": \"B23106027\", \"vendorNo\": \"K00170\", \"closeOrder\": true, \"lines\": [] }\n```\n\n## Breeze Documents API\n\nEntity set `breezedocumentsapi` (API `dexprosolutionsgmbh/breezeinterface4bc/v2.0`). Fields: `company`, `companyName`, `systemId`, `no`, `targetTemplate`, `coreDocumentNo`, `status`, `processId`, `note`, `duplicateRecord`, `apiDocumentId`, `systemCreatedBy`, `systemModifiedBy`, `jsonBlob`.\n\n- `status`: `WaitingForRetrieval`, `Retrieved`, `Processed`, `Error`, `Rejected`, `WaitingForJson`, `ChangeCompany`\n- `targetTemplate`: `None`, `Purchase Document`, `Purchase Order`, `Order Confirmation`, `Delivery Note`\n- `systemCreatedBy` / `systemModifiedBy`: user who created / last changed the record (read-only)\n\n# Authentication\n\nOAuth 2.0\n\n# Rate limit\n\nThe limit is defined by the Microsoft Dynamics 365 Business Central environment.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"23495599","team":4075377,"collectionId":"a9e743ef-a81a-49d2-b798-b3867915bcad","publishedId":"2s93z9b2r4","public":true,"publicUrl":"https://documenter-api.postman.tech/view/23495599/2s93z9b2r4","privateUrl":"https://go.postman.co/documentation/23495599-a9e743ef-a81a-49d2-b798-b3867915bcad","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.12.14","publishDate":"2023-06-28T07:42:18.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/t_team_logo_pubdoc/v1/team/6afce46b244e5fd364d07116aa5716a0542fdb9ba1ef6ffd6efef3e5d7970b7e","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s93z9b2r4"}