{"info":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","description":"<html><head></head><body><p>This document contains the necessary data and requirements  for integration with the <strong>supplyAPI conector</strong>, a passive API to connect <strong>Purchase and/or Supply Chain systems</strong> with ERP systems, as SAP Business One or TOTVS Protheus.</p>\n<p>__supplyAPI conector currently has the following HTTP REST Plain services - version 2 (v2.2):</p>\n<ul>\n<li>buyers: search buyers in ERP</li>\n<li>purchaseContracts: search purchase contracts in ERP</li>\n<li>purchaseRequests: search purchase requests in ERP</li>\n<li>purchaseOrders: search purchase orders in ERP</li>\n<li>purchaseInvoices: search purchase invoices in ERP</li>\n<li>payables: search payables in ERP</li>\n<li>outPayments: search outcoming payments in ERP</li>\n<li>purCreditNotes: search purchase credit notes in ERP</li>\n<li>purDownPayments: search purchase down payments in ERP (only SAP Business One)</li>\n</ul>\n<hr>\n<p><strong>Content Type</strong>: all supplyAPI services use the “content-type” application/json for Parameters (body request) and Responses.</p>\n<p><strong>Authentication</strong>: supplyAPI uses Basic Authentication (user/password)</p>\n<p><strong>Characteristics</strong>: pagination, incremental query, default fields, objects and processes, use of custom fields (limited use), API usage and ERP transactions monitoring</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"8243187","collectionId":"4c83bf58-1218-42d8-aa44-7924700e9149","publishedId":"TVKA5Khm","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-09-17T19:30:44.000Z"},"item":[{"name":"Base Objects","item":[{"name":"Buyers","id":"d301566b-12c9-4714-b7ff-721590951bdb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/buyers?erpKey=1","description":"<h4 id=\"search-buyers-in-erp\">Search buyers in ERP</h4>\n<p><em>(sapBusinessOne=53/OSLP, totvsProtheus=SY1)</em></p>\n<p>The search of buyers allows you to filter the ERP by:</p>\n<ul>\n<li>List Search</li>\n<li>Unitary Search: by <code>erpKey</code></li>\n</ul>\n<p>If no field for unitary query (<code>erpKey</code>) is informed in the request, the search returns as a list.</p>\n<p>The buyer service will consider as valid buyer:</p>\n<ul>\n<li>SAP Business One: [1] </li>\n<li>TOTVS Protheus: [1]</li>\n</ul>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the <code>count</code> field</li>\n</ul>\n<p>This service does not have pagination or incremental treatment.</p>\n<p>This service does not have user field (UDF) treatment.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["buyers"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Buyer Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"1"}],"variable":[]}},"response":[{"id":"5442d99e-3c00-4f67-8190-1d0f4a5a2834","name":"Buyers - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/buyers","host":["{{endpoint}}"],"path":["buyers"],"query":[{"key":"erpKey","value":"1","description":"Buyer Primary Key in ERP (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=308E5DB9432CF3906BE8B611D9EB0117; Path=/B1iXcellerator; HttpOnly"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Thu, 05 Nov 2020 18:54:16 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"Buyers\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"buyers\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-05T16:54:11\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"1\",\n            \"fullName\": \"Helen Roche\",\n            \"email\": \"\",\n            \"phone\": \"\",\n            \"phoneSecondary\": \"\",\n            \"cellular\": \"\",\n            \"commissionRate\": 0,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"adf214e8-8f18-4745-8b70-00967b7112e2","name":"Buyers - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/buyers","host":["{{endpoint}}"],"path":["buyers"],"query":[{"key":"erpKey","value":"1","description":"Buyer Primary Key in ERP (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Version","value":"1.1"},{"key":"FWRESTBUILD","value":"1.15.0717"},{"key":"Content-Type","value":"application/json"},{"key":"Status","value":"200 OK"},{"key":"Content-Encoding","value":"gzip"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=15"}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"Buyers\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"buyers\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-09T16:57:45\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"001\",\n            \"erpId\": \"1\",\n            \"fullName\": \"API - Intergate\",\n            \"email\": \"rafael.ogeda@intergate.net.br\",\n            \"phone\": \"+5547988493101\",\n            \"phoneSecondary\": \"\",\n            \"cellular\": null,\n            \"commissionRate\": 0,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"d301566b-12c9-4714-b7ff-721590951bdb"}],"id":"f9b0b73f-5ab8-4e60-9248-4651e03356c8","_postman_id":"f9b0b73f-5ab8-4e60-9248-4651e03356c8","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Purchase Contracts NEW","item":[{"name":"Purchase Contracts","id":"f9c6f34a-eadf-4c48-9975-b7a7fb3afcdb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/purchaseContracts?createdFrom=2011-01-01&createdTo=2021-12-31&partnerKey=C001&docStatus=O/A&erpKey=149231&docNum=122608&pageNum=1&updatedAt=2021-05-01T00:00:00","description":"<h4 id=\"search-purchase-contracts-in-erp\">Search purchase contracts in ERP</h4>\n<p><em>(sapBusinessOne=1250000025/OOAT, totvsProtheus=&lt;&gt;)</em></p>\n<p>This service will allow you to pruchase contracts on the ERP.</p>\n<p>Searching sales contracts allows you to filter the ERP by:</p>\n<ul>\n<li>List search: by <code>createdFrom</code> + <code>createdTo</code> {required}, by <code>partnerKey</code> or <code>docStatus</code> {optional}</li>\n<li>Unitary search: by <code>erpKey</code> or <code>docNum</code></li>\n</ul>\n<p>If no field for unitary query is provided in the request (<code>erpKey</code> or <code>docNum</code>), the query for pruchase contracts is done by creation date from/to (which become mandatory).</p>\n<p>The contracts service will consider pruchase contracts with:</p>\n<ul>\n<li>SAP Business One: OOAT.ObjType = 1250000025 + OOAT.BpType=S</li>\n<li>TOTVS Protheus:</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (x), TOTVS Protheus (x)</li>\n<li><code>partnerKey</code>: SAP Business One (OOAT.CardCode), TOTVS Protheus (x)</li>\n<li><code>sellerKey</code>: SAP Business One (x)</li>\n<li><code>salesAgentKey</code>: SAP Business One (x)</li>\n<li><code>erpKey</code>: SAP Business One (OOAT.AbsID), TOTVS Protheus (x)</li>\n<li><code>docNum</code>: SAP Business One (OOAT.Number), TOTVS Protheus (x)</li>\n<li><code>orderNum</code>: SAP Business One (x), TOTVS Protheus (x)</li>\n<li><code>docStatus</code>: O = open/draft, X = cancelled, A = approved</li>\n</ul>\n<p>Data returned in response: Purchase Contract data, Partner data, Items (+ taxes), Totals</p>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the <code>count</code> field</li>\n</ul>\n<p>For list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:</p>\n<ul>\n<li><code>pageSize</code> = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response</li>\n<li><code>pageNum</code> = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” &lt;=0 = 1, If “pageNum”&gt; ”pageTotal” = last page</li>\n<li><code>pageTotal</code> = total pages, reported in the response</li>\n<li><code>hasNext</code> = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service will allow you to search the pruchase contracts list in two situations:</p>\n<ul>\n<li>Full Search: will result in all sales contracts, according to filters.</li>\n<li>Incremental Search: will result in all sales contracts, according to filters, which have been included and / or changed in the main register after a certain date / time provided in the request. In the Incremental Consultation, the <code>updatedAt</code> field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which sales orders should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Document Update Date fields in SAP Business One (OOAT.CreateDate, OOAT.UpdateDate, OOAT.UpdtTime), [2] TOTVS Protheus: fields x</li>\n</ul>\n<p>For the use of user fields (UDF) created in the sales order table (SAPB1: OOAT, TOTVS: x), the respective registration must be performed in the Custom Table.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseContracts"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter purchase contracts (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2011-01-01"},{"description":{"content":"<p>Final create date to filter purchase contracts (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2021-12-31"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"C001"},{"description":{"content":"<p>Contract Status to filter sales quotations (optional in list search)</p>\n","type":"text/plain"},"key":"docStatus","value":"O/A"},{"description":{"content":"<p>Contract Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"149231"},{"description":{"content":"<p>Contract Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"122608"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"1"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2021-05-01T00:00:00"}],"variable":[]}},"response":[{"id":"3d11458f-d52a-46e2-9b61-23cd3ed07416","name":"Purchase Contracts - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purchaseContracts?createdFrom=2011-01-01&createdTo=2021-12-31","host":["{{endpoint}}"],"path":["purchaseContracts"],"query":[{"key":"createdFrom","value":"2011-01-01","description":"Initial create date to filter purchase contracts (required if not unitary search)"},{"key":"createdTo","value":"2021-12-31","description":"Final create date to filter purchase contracts (required if not unitary search)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"docStatus","value":"O/A","description":"Contract Status to filter sales quotations (optional in list search)","disabled":true},{"key":"erpKey","value":"149231","description":"Contract Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"122608","description":"Contract Document Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2021-05-01T00:00:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Thu, 13 May 2021 22:37:16 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurchaseContracts\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"purchaseContracts\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.102\",\n    \"effectiveTimestamp\": \"2021-05-13T19:37:13\",\n    \"createdFrom\": \"2011-01-01\",\n    \"createdTo\": \"2021-12-31\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": \"true\",\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"2\",\n            \"docNum\": \"1\",\n            \"description\": \"Fornecimento de Material Esportivo\",\n            \"docStatus\": \"A\",\n            \"startDate\": \"2015-06-01\",\n            \"endDate\": \"2016-12-31\",\n            \"signDate\": \"2015-06-01\",\n            \"docValue\": 91000,\n            \"partnerKey\": \"F001\",\n            \"partnerName\": \"Adidas\",\n            \"type\": \"G\",\n            \"method\": \"I\",\n            \"payConditionKey\": \"\",\n            \"payMethodKey\": \"\",\n            \"pricelistKey\": \"\",\n            \"comments\": \"\",\n            \"createdAt\": \"2015-06-18T13:40:42\",\n            \"updatedAt\": \"2016-05-19T13:40:42\",\n            \"canceledAt\": null,\n            \"items\": [\n                {\n                    \"lineNum\": \"1\",\n                    \"productKey\": \"I005\",\n                    \"productName\": \"Bola Adidas TG 2 Olympics\",\n                    \"quantity\": 1000,\n                    \"confirmedQuantity\": 10,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 70,\n                    \"taxBasis\": 70000,\n                    \"lineStatus\": \"O\",\n                    \"comments\": \"\"\n                },\n                {\n                    \"lineNum\": \"2\",\n                    \"productKey\": \"I004\",\n                    \"productName\": \"Bola Adidas Finale Sportivo\",\n                    \"quantity\": 300,\n                    \"confirmedQuantity\": 0,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 70,\n                    \"taxBasis\": 21000,\n                    \"lineStatus\": \"O\",\n                    \"comments\": \"\"\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 91000,\n                    \"grossValue\": 91000,\n                    \"baseValue\": 91000,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 91000,\n                    \"grossValue\": 91000,\n                    \"baseValue\": 91000,\n                    \"taxValue\": 0\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0\n                }\n            }\n        }\n    ]\n}"}],"_postman_id":"f9c6f34a-eadf-4c48-9975-b7a7fb3afcdb"}],"id":"ea3f4e55-45c7-4167-b22e-d348cc8de2e4","_postman_id":"ea3f4e55-45c7-4167-b22e-d348cc8de2e4","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Purchase Requests NEW","item":[{"name":"Purchase Requests","id":"1c6f684a-e6cb-4d48-ac15-6fea458f829b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/purchaseRequests?createdFrom=2017-04-07&createdTo=2017-04-07&branch=1&docStatus&erpKey=53929&docNum=121313&orderNum=1050321450678-01&pageNum=2&updatedAt=2020-08-26T00:00:00","description":"<h4 id=\"search-purchase-requests-in-erp\">Search purchase requests in ERP</h4>\n<p><em>(sapBusinessOne=1470000113/OPRQ, totvsProtheus=x)</em></p>\n<p>This service will allow you to search purchase requests on the ERP.</p>\n<p>Searching purchase orders allows you to filter the ERP by:</p>\n<ul>\n<li>List search: by <code>createdFrom</code> + <code>createdTo</code> {required}, by <code>branch</code> or <code>docStatus</code> {optional}</li>\n<li>Unitary search: by <code>erpKey</code> or <code>docNum</code> or \n<code>orderNum</code>\nIf no field for unitary query is provided in the request (<code>erpKey</code> or <code>docNum</code> or <code>orderNum</code>), the query for purchase orders is carried out by creation date from/to (which become mandatory).</li>\n</ul>\n<p>The purchaseRequests service will consider purchase requests with:</p>\n<ul>\n<li>SAP Business One: OPRQ.ObjType=1470000113</li>\n<li>TOTVS Protheus:</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (OPRQ.BPLId), TOTVS Protheus (x)</li>\n<li><code>erpKey</code>: SAP Business One (OPRQ.DocEntry), TOTVS Protheus (x)</li>\n<li><code>docNum</code>: SAP Business One (OPRQ.DocNum), TOTVS Protheus (x)</li>\n<li><code>orderNum</code>: SAP Business One (OPRQ.NumAtCard), TOTVS Protheus (x)</li>\n<li><code>docStatus</code>: O = open, C = canceled, A = approved</li>\n</ul>\n<p>Data returned in response: Purchase Eequest data, Partner data, Items (+ taxes), Totals</p>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the <code>count</code> field</li>\n</ul>\n<p>For list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:</p>\n<ul>\n<li><code>pageSize</code> = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response</li>\n<li><code>pageNum</code> = desired page, provided in the request, and informed in the response. If <code>pageNum</code> not informed = 1, If <code>pageNum</code> &lt;=0 = 1, If <code>pageNum</code>&gt; <code>pageTotal</code> = last page</li>\n<li><code>pageTotal</code> = total pages, reported in the response</li>\n<li><code>hasNext</code> = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service will allow you to search the purchase requests list in two situations:</p>\n<ul>\n<li>Full Search: will result in all purchase requests, according to filters.</li>\n<li>Incremental Search: will result in all purchase requests, according to filters, which have been included and / or changed in the main register after a certain date / time provided in the request. In the Incremental Consultation, the <code>updatedAt</code> field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which sales orders should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Document Update Date fields in SAP Business One (OPRQ.CreateDate, OPRQ.UpdateDate, OPRQ.CreateTS, OPRQ.UpdateTS), [2] TOTVS Protheus: fields x</li>\n</ul>\n<p>For the use of user fields (UDF) created in the purchase orders table (SAPB1: OPRQ, TOTVS: x), the respective registration must be performed in the Custom Table.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseRequests"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter purchase requests (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2017-04-07"},{"description":{"content":"<p>Final create date to filter purchase requests (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2017-04-07"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Purchase Request Status in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docStatus","value":null},{"description":{"content":"<p>Purchase Request Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"53929"},{"description":{"content":"<p>Purchase Request Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"121313"},{"description":{"content":"<p>Partner Purchase Request Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1050321450678-01"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"2"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-08-26T00:00:00"}],"variable":[]}},"response":[{"id":"6b92a180-507f-4026-8444-d404d9993e8a","name":"Purchase Requests - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purchaseRequests?createdFrom=2017-04-07&createdTo=2017-04-07","host":["{{endpoint}}"],"path":["purchaseRequests"],"query":[{"key":"createdFrom","value":"2017-04-07","description":"Initial create date to filter purchase requests (required if not unitary search)"},{"key":"createdTo","value":"2017-04-07","description":"Final create date to filter purchase requests (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"docStatus","value":null,"description":"Purchase Request Status in ERP (optional - unitary search)","disabled":true},{"key":"erpKey","value":"53929","description":"Purchase Request Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"121313","description":"Purchase Request Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1050321450678-01","description":"Partner Purchase Request Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-08-26T00:00:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Thu, 13 May 2021 22:04:52 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurchaseRequests\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"purchaseRequests\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.102\",\n    \"effectiveTimestamp\": \"2021-05-13T19:04:48\",\n    \"createdFrom\": \"2017-04-07\",\n    \"createdTo\": \"2017-04-07\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": \"true\",\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"19\",\n            \"orderNum\": \"\",\n            \"docNum\": \"19\",\n            \"docStatus\": \"P\",\n            \"docDate\": \"2017-04-07\",\n            \"docDueDate\": \"2017-05-07\",\n            \"taxDate\": \"2017-04-07\",\n            \"requestDate\": \"2017-04-10\",\n            \"docValue\": 0,\n            \"comments\": \"Será necessário um assistente técnico para instalar os equipamentos do escritório\",\n            \"customOrderKey\": \"\",\n            \"customStatus\": \"\",\n            \"customStatusNotify\": \"\",\n            \"createdAt\": \"2017-04-07T18:11:44\",\n            \"updatedAt\": \"2017-04-07T18:11:44\",\n            \"canceledAt\": null,\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"ASV0121\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Pino Roscado Din 976 8 m16 x 80 cl. 8.8. Zincado\",\n                    \"quantity\": 1,\n                    \"unit\": \"pc\",\n                    \"unitPrice\": 0,\n                    \"taxBasis\": 0,\n                    \"usage\": \"\",\n                    \"cfop\": \"\",\n                    \"whsCode\": \"01\",\n                    \"taxValue\": 0,\n                    \"itemDueDate\": \"2017-04-10\",\n                    \"costCenter\": \"\",\n                    \"accountCode\": \"1.1.3.1.1\",\n                    \"financialProject\": \"\",\n                    \"comments\": \"\"\n                },\n                {\n                    \"lineNum\": \"1\",\n                    \"productKey\": \"ASV0122\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Porca M16 Din934 Zincado\",\n                    \"quantity\": 1,\n                    \"unit\": \"pc\",\n                    \"unitPrice\": 0,\n                    \"taxBasis\": 0,\n                    \"usage\": \"\",\n                    \"cfop\": \"\",\n                    \"whsCode\": \"01\",\n                    \"taxValue\": 0,\n                    \"itemDueDate\": \"2017-04-10\",\n                    \"costCenter\": \"\",\n                    \"accountCode\": \"1.1.3.1.1\",\n                    \"financialProject\": \"\",\n                    \"comments\": \"\"\n                },\n                {\n                    \"lineNum\": \"2\",\n                    \"productKey\": \"ASV0123\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Pino Rosca Din 976 8 M20 x 125 CL 8.8 Zincado\",\n                    \"quantity\": 1,\n                    \"unit\": \"pc\",\n                    \"unitPrice\": 0,\n                    \"taxBasis\": 0,\n                    \"usage\": \"\",\n                    \"cfop\": \"\",\n                    \"whsCode\": \"01\",\n                    \"taxValue\": 0,\n                    \"itemDueDate\": \"2017-04-10\",\n                    \"costCenter\": \"\",\n                    \"accountCode\": \"1.1.3.1.1\",\n                    \"financialProject\": \"\",\n                    \"comments\": \"\"\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0\n                }\n            }\n        }\n    ]\n}"}],"_postman_id":"1c6f684a-e6cb-4d48-ac15-6fea458f829b"},{"name":"Purchase Requests","id":"1addfffc-2fc7-40f7-be1b-e6c30822be51","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"1\",\n    \"orderNum\": \"1013\",\n    \"dueDate\": \"2021-05-31\",\n    \"comments\": \"Teste\",\n    \"items\": [\n        {\n            \"productKey\": \"I004\",\n            \"productName\": \"Camisa Nike Flamengo I 09/10\",\n            \"quantity\": 1,\n            \"unit\": \"PAR\",\n            \"unitPrice\": 49.9,\n            \"taxBasis\": 49.9\n        }\n    ],\n    \"totals\": {\n        \"orderTotal\": {\n            \"netValue\": 49.9,\n            \"grossValue\": 49.9,\n            \"baseValue\": 49.9,\n            \"taxValue\": 0\n        },\n        \"merchandizeTotal\": {\n            \"netValue\": 49.9,\n            \"grossValue\": 49.9,\n            \"baseValue\": 49.9,\n            \"taxValue\": 0\n        },\n        \"shippingTotal\": {\n            \"netValue\": 0,\n            \"grossValue\": 0,\n            \"baseValue\": 0,\n            \"taxValue\": 0\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/purchaseRequests","description":"<h4 id=\"insert-purchase-request-in-erp\">Insert purchase request in ERP</h4>\n<p><em>(sapBusinessOne=1470000113/OPRQ, totvsProtheus=x)</em></p>\n<h2 id=\"not-yet-available-release-in-2020-q4\">&lt;&lt;&lt; NOT YET AVAILABLE. RELEASE IN 2020 Q4 &gt;&gt;&gt;</h2>\n<p>This service allows to insert a new purchase request in the ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new purchase request will be added if the purchase request is not found on the ERP by <code>branch</code> + <code>orderNum</code>:</p>\n<ul>\n<li>SAP B1: OPRQ.BPLId + OPRQ.NumAtCard</li>\n<li>TOTVS Protheus: x</li>\n</ul>\n<p>The products sent for the service will be identified in the ERP:</p>\n<ul>\n<li>SAP B1: OITM.ItemCode = <code>productKey</code> or OITM.CodeBars = <code>codeBars</code></li>\n<li>TOTVS Protheus: B1_COD = <code>productKey</code> or B1_CODBAR = <code>codeBars</code></li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>Discounts: in total items (<code>priceAdjustValue</code>), in total freight (<code>shipAdjustValue</code>). <code>shipAdjustType</code> = minus or plus</li>\n<li><code>items</code>: <code>basePrice</code>: base/gross price, <code>taxBasis</code>: total value of the item (<code>quantity</code> * <code>price</code>), calculation date for tax</li>\n<li><code>totals</code>: <code>netValue</code>: net value with discounts applied, <code>grossValue</code>: gross value with discounts and taxes applied, <code>baseValue</code>: base value for tax calculation, <code>taxValue</code>: taxes that increase order value (IPI, ICMS-ST, ...)</li>\n</ul>\n<p>For the use of user fields (UDF) created in the purchase orders table (SAPB1: OPRQ, TOTVS: x), the respective registration must be performed in the Custom Table.</p>\n<h4 id=\"request-object-has-the-following-properties\">Request object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>branch</td>\n<td>string</td>\n<td>Number branch</td>\n</tr>\n<tr>\n<td>orderNum</td>\n<td>string</td>\n<td>Number Sales Order</td>\n</tr>\n<tr>\n<td>paymentCondition</td>\n<td>string</td>\n<td>Payment Condition key</td>\n</tr>\n<tr>\n<td>paymentMethod</td>\n<td>string</td>\n<td>Payment Method key</td>\n</tr>\n<tr>\n<td>mainUsage</td>\n<td>string</td>\n<td>Main Usage key for all order items</td>\n</tr>\n<tr>\n<td>mainCostCenter</td>\n<td>string</td>\n<td>Main Cost Center key for all order items</td>\n</tr>\n<tr>\n<td>whsCode</td>\n<td>string</td>\n<td>Wharehouse key for all order items</td>\n</tr>\n<tr>\n<td>dueDate</td>\n<td>string</td>\n<td>Due date</td>\n</tr>\n<tr>\n<td>comments</td>\n<td>string</td>\n<td>Comments</td>\n</tr>\n<tr>\n<td>customOrderKey</td>\n<td>string</td>\n<td>Custom order external key</td>\n</tr>\n<tr>\n<td>customStatus</td>\n<td>string</td>\n<td>Custom status</td>\n</tr>\n<tr>\n<td>customStatusNotify</td>\n<td>string</td>\n<td>Custom Notify status</td>\n</tr>\n<tr>\n<td>items</td>\n<td>array</td>\n<td>Order Items Object</td>\n</tr>\n<tr>\n<td>items.productKey</td>\n<td>string</td>\n<td>Product key (optional if codeBars)</td>\n</tr>\n<tr>\n<td>items.codeBars</td>\n<td>string</td>\n<td>Product codebars (optional if productKey)</td>\n</tr>\n<tr>\n<td>items.productName</td>\n<td>string</td>\n<td>Product Name</td>\n</tr>\n<tr>\n<td>items.quantity</td>\n<td>number</td>\n<td>Quantity</td>\n</tr>\n<tr>\n<td>items.unit</td>\n<td>string</td>\n<td>Unit</td>\n</tr>\n<tr>\n<td>items.unitPrice</td>\n<td>number</td>\n<td>Unit price</td>\n</tr>\n<tr>\n<td>items.taxBasis</td>\n<td>number</td>\n<td>Tax Basis</td>\n</tr>\n<tr>\n<td>items.usage</td>\n<td>string</td>\n<td>Usage key</td>\n</tr>\n<tr>\n<td>items.costCenter</td>\n<td>string</td>\n<td>Cost Center key</td>\n</tr>\n<tr>\n<td>items.accountCode</td>\n<td>string</td>\n<td>Account Code key</td>\n</tr>\n<tr>\n<td>items.financialProject</td>\n<td>string</td>\n<td>Financial Project key</td>\n</tr>\n<tr>\n<td>items.comments</td>\n<td>string</td>\n<td>Line comments</td>\n</tr>\n<tr>\n<td>totals</td>\n<td>object</td>\n<td>Totals</td>\n</tr>\n<tr>\n<td>totals.orderTotal</td>\n<td>object</td>\n<td>Order totals</td>\n</tr>\n<tr>\n<td>totals.orderTotal.netValue</td>\n<td>number</td>\n<td>Totals net value</td>\n</tr>\n<tr>\n<td>totals.orderTotal.grossValue</td>\n<td>number</td>\n<td>Totals gross value</td>\n</tr>\n<tr>\n<td>totals.orderTotal.baseValue</td>\n<td>number</td>\n<td>Totals base value</td>\n</tr>\n<tr>\n<td>totals.orderTotal.taxValue</td>\n<td>number</td>\n<td>Totals taxes that increase the value</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal</td>\n<td>object</td>\n<td>Merchandize Totals</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.netValue</td>\n<td>number</td>\n<td>Net value merchandize</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.grossValue</td>\n<td>number</td>\n<td>Gross value merchandize</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.baseValue</td>\n<td>number</td>\n<td>Base value merchandize</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.taxValue</td>\n<td>number</td>\n<td>Taxes that increase the value merchandizeTotal</td>\n</tr>\n<tr>\n<td>totals.shippingTotal</td>\n<td>object</td>\n<td>Shipping totals</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.netValue</td>\n<td>number</td>\n<td>Shipping total Net value</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.grossValue</td>\n<td>number</td>\n<td>Shipping total Gross value</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.baseValue</td>\n<td>number</td>\n<td>Shipping totals base value</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.taxValue</td>\n<td>number</td>\n<td>Shipping total Tax value</td>\n</tr>\n<tr>\n<td>* = <em>Required field</em></td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n</div><h4 id=\"response-object-has-the-following-properties\">Response object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>package</td>\n<td>string</td>\n<td>package</td>\n</tr>\n<tr>\n<td>process</td>\n<td>string</td>\n<td>process</td>\n</tr>\n<tr>\n<td>system</td>\n<td>string</td>\n<td>System</td>\n</tr>\n<tr>\n<td>target</td>\n<td>string</td>\n<td>Target</td>\n</tr>\n<tr>\n<td>user</td>\n<td>string</td>\n<td>user</td>\n</tr>\n<tr>\n<td>host</td>\n<td>string</td>\n<td>host</td>\n</tr>\n<tr>\n<td>effectiveTimestamp</td>\n<td>string</td>\n<td>Effective Time stamp</td>\n</tr>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>Code</td>\n</tr>\n<tr>\n<td>success</td>\n<td>booleano</td>\n<td>Success</td>\n</tr>\n<tr>\n<td>values</td>\n<td>array</td>\n<td>Values</td>\n</tr>\n<tr>\n<td>values.object</td>\n<td>string</td>\n<td>Object</td>\n</tr>\n<tr>\n<td>values.table</td>\n<td>string</td>\n<td>Table</td>\n</tr>\n<tr>\n<td>values.action</td>\n<td>string</td>\n<td>action</td>\n</tr>\n<tr>\n<td>values.erpKey</td>\n<td>string</td>\n<td>Erpkey</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseRequests"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1addfffc-2fc7-40f7-be1b-e6c30822be51"}],"id":"33635d06-a70f-49ce-bf84-a015fe9d502f","_postman_id":"33635d06-a70f-49ce-bf84-a015fe9d502f","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Purchase Quotations NEW","item":[{"name":"Purchase Quotations","id":"d9d5a6b8-748e-40f6-8afb-c3a443877bcb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{endpoint}}/purchaseQuotations","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseQuotations"],"host":["{{endpoint}}"],"query":[{"disabled":true,"key":"createdFrom","value":"2021-11-01"},{"disabled":true,"key":"createdTo","value":"2021-11-31"},{"disabled":true,"key":"partnerKey","value":"C001"},{"disabled":true,"key":"docStatus","value":"O/A"},{"disabled":true,"key":"erpKey","value":"2"},{"disabled":true,"key":"docNum","value":"122608"},{"disabled":true,"key":"pageNum","value":"1"},{"disabled":true,"key":"updatedAt","value":"2021-05-01T00:00:00"}],"variable":[]}},"response":[],"_postman_id":"d9d5a6b8-748e-40f6-8afb-c3a443877bcb"}],"id":"6f53c6c8-e0e0-41a6-9839-3ee8e73083c5","_postman_id":"6f53c6c8-e0e0-41a6-9839-3ee8e73083c5","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Purchase Orders*","item":[{"name":"Purchase Orders","id":"bba25fb6-d88b-4269-b29e-bfe5a2f7ecfa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/purchaseOrders?createdFrom=2018-09-17&createdTo=2020-12-31&branch=1&partnerKey=00003801&buyerKey=22&erpKey=53929&docNum=121313&orderNum=1050321450678-01&pageNum=2&updatedAt=2020-08-26T00:00:00","description":"<h4 id=\"search-purchase-orders-in-erp\">Search purchase orders in ERP</h4>\n<p><em>(sapBusinessOne=22/OPOR, totvsProtheus=SC7)</em></p>\n<p>This service will allow you to search purchase orders on the ERP.</p>\n<p>Searching purchase orders allows you to filter the ERP by:</p>\n<ul>\n<li>List search: by <code>createdFrom</code> + <code>createdTo</code> {required}, by <code>branch</code>, <code>partnerKey</code> {optional}</li>\n<li>Unitary search: by <code>erpKey</code> or <code>docNum</code></li>\n</ul>\n<p>If no field for unitary query is provided in the request (<code>erpKey</code> or <code>docNum</code>), the query for purchase orders is carried out by creation date from/to (which become mandatory).</p>\n<p>The orders service will consider purchase orders with:</p>\n<ul>\n<li>SAP Business One: </li>\n<li>TOTVS Protheus:</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (OPOR.BPLId), TOTVS Protheus (C7_FILIAL)</li>\n<li><code>partnerKey</code>: SAP Business One (OPOR.CardCode), TOTVS Protheus (C7_FORNECE+'_'+C7_LOJA)</li>\n<li><code>buyerKey</code>: SAP Business One (OPOR.SlpCode), TOTVS Protheus (C7_COMPRA)</li>\n<li><code>erpKey</code>: SAP Business One (OPOR.DocEntry), TOTVS Protheus (C7_NUM)</li>\n<li><code>docNum</code>: SAP Business One (OPOR.DocNum), TOTVS Protheus (C7_NUMSC)</li>\n<li><code>orderNum</code>: SAP Business One (OPOR.NumAtCard), TOTVS Protheus (C7_NUMIMP)</li>\n<li><code>docStatus</code>: O = open, C = canceled, B = billed, P = paid, R = returned</li>\n</ul>\n<p>Data returned in response: Purchase orders data, Partner data, Items (+ taxes), Totals</p>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the <code>count</code> field</li>\n</ul>\n<p>For list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:</p>\n<ul>\n<li><code>pageSize</code> = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response</li>\n<li><code>pageNum</code> = desired page, provided in the request, and informed in the response. If <code>pageNum</code> not informed = 1, If <code>pageNum</code> &lt;=0 = 1, If <code>pageNum</code>&gt; <code>pageTotal</code> = last page</li>\n<li><code>pageTotal</code> = total pages, reported in the response</li>\n<li><code>hasNext</code> = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service will allow you to search the purchase orders list in two situations:</p>\n<ul>\n<li>Full Search: will result in all purchase orders, according to filters.</li>\n<li>Incremental Search: will result in all purchase orders, according to filters, which have been included and / or changed in the main register after a certain date / time provided in the request. In the Incremental Consultation, the <code>updatedAt</code> field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which sales orders should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Document Update Date fields in SAP Business One (OPOR.CreateDate, OPOR.UpdateDate, OPOR.CreateTS, OPOR.UpdateTS), [2] TOTVS Protheus: fields C7_USERLGI and C7_USERLGA</li>\n</ul>\n<p>For the use of user fields (UDF) created in the purchase orders table (SAPB1: OPOR, TOTVS: SC7), the respective registration must be performed in the Custom Table.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseOrders"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter purchase orders (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2018-09-17"},{"description":{"content":"<p>Final create date to filter purchase orders (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-12-31"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"00003801"},{"description":{"content":"<p>Buyer Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"buyerKey","value":"22"},{"description":{"content":"<p>Purchase Order Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"53929"},{"description":{"content":"<p>Purchase Order Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"121313"},{"description":{"content":"<p>Partner Purchase Order Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1050321450678-01"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"2"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-08-26T00:00:00"}],"variable":[]}},"response":[{"id":"d4d14d0c-d04a-467a-a56f-ceadceca2874","name":"Purchase Orders - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purchaseOrders?createdFrom=2018-09-17&createdTo=2020-12-31","host":["{{endpoint}}"],"path":["purchaseOrders"],"query":[{"key":"createdFrom","value":"2018-09-17","description":"Initial create date to filter purchase orders (required if not unitary search)"},{"key":"createdTo","value":"2020-12-31","description":"Final create date to filter purchase orders (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"partnerKey","value":"00003801","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"buyerKey","value":"22","description":"Buyer Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"53929","description":"Purchase Order Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"121313","description":"Purchase Order Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1050321450678-01","description":"Partner Purchase Order Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-08-26T00:00:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Version","value":"1.1"},{"key":"FWRESTBUILD","value":"1.15.0717"},{"key":"Content-Type","value":"application/json"},{"key":"Status","value":"200 OK"},{"key":"Content-Encoding","value":"gzip"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=15"}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurchaseOrders\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"purchaseOrders\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-15T15:50:21\",\n    \"createdFrom\": \"2018-09-17\",\n    \"createdTo\": \"2020-12-31\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"count\": 2,\n    \"values\": [\n        {\n            \"branch\": \"01\",\n            \"branchName\": \"TESTE\",\n            \"branchTaxNumber\": \"  .   .   /    -  \",\n            \"buyerKey\": \"\",\n            \"erpKey\": \"000001\",\n            \"docNum\": \"      \",\n            \"orderNum\": \"\",\n            \"docStatus\": \"\",\n            \"docDate\": \"2020-11-10\",\n            \"docDueDate\": \"2020-11-10\",\n            \"taxDate\": \"1900-01-01\",\n            \"docValue\": 240,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null,\n            \"supplier\": {\n                \"type\": \"S\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"000001_01\",\n                \"fullName\": \"PIXEL INFORMATICA EIRELI - ME\",\n                \"aliasName\": \"PIXEL INFO\",\n                \"email\": \"\",\n                \"phone\": \"47 33696269\",\n                \"phoneSecundary\": \"\",\n                \"cellular\": null,\n                \"taxNumber\": \"11061994000172\",\n                \"stateTaxNumber\": \"255.920.350\",\n                \"cityTaxNumber\": \"\",\n                \"contactPerson\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"RUA JOSE GUERREIRO FILHO 89\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"SALA 01\",\n                    \"community\": \"CENTRO\",\n                    \"city\": \"PORTO BELO\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"\",\n                    \"streetType\": null\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"RUA JOSE GUERREIRO FILHO 89\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"SALA 01\",\n                    \"community\": \"CENTRO\",\n                    \"city\": \"PORTO BELO\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"\",\n                    \"streetType\": null\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0001\",\n                    \"productKey\": \"MC000003\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"CARTUCHO HP 662 PRETO\",\n                    \"quantity\": 2,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 120,\n                    \"taxBasis\": 240,\n                    \"usage\": \"\",\n                    \"cfop\": null,\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 240,\n                    \"unitCost\": 105.6\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 240,\n                    \"grossValue\": 240,\n                    \"baseValue\": 240,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 240,\n                    \"grossValue\": 240,\n                    \"baseValue\": 240,\n                    \"taxValue\": 0,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            }\n        },\n        {\n            \"branch\": \"01\",\n            \"branchName\": \"TESTE\",\n            \"branchTaxNumber\": \"  .   .   /    -  \",\n            \"buyerKey\": \"\",\n            \"erpKey\": \"000002\",\n            \"docNum\": \"      \",\n            \"orderNum\": \"\",\n            \"docStatus\": \"\",\n            \"docDate\": \"2020-11-15\",\n            \"docDueDate\": \"2020-11-20\",\n            \"taxDate\": \"1900-01-01\",\n            \"docValue\": 510,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null,\n            \"supplier\": {\n                \"type\": \"S\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"000031_01\",\n                \"fullName\": \"TUPY S/A\",\n                \"aliasName\": \"TUPY S/A\",\n                \"email\": \"recebe.nfe@tupy.com.br\",\n                \"phone\": \"47 40098181\",\n                \"phoneSecundary\": \"\",\n                \"cellular\": null,\n                \"taxNumber\": \"84683374000300\",\n                \"stateTaxNumber\": \"255505256\",\n                \"cityTaxNumber\": \"\",\n                \"contactPerson\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"R ALBANO SCHMIDT, 3400\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"\",\n                    \"community\": \"BOA VISTA\",\n                    \"city\": \"JOINVILLE\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"01058\",\n                    \"postalCode\": \"89227-901\",\n                    \"streetType\": null\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"R ALBANO SCHMIDT, 3400\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"\",\n                    \"community\": \"BOA VISTA\",\n                    \"city\": \"JOINVILLE\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"01058\",\n                    \"postalCode\": \"89227-901\",\n                    \"streetType\": null\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0001\",\n                    \"productKey\": \"MC000001\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"ADAPTADOR SATA DVD->HD\",\n                    \"quantity\": 1,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 350,\n                    \"taxBasis\": 350,\n                    \"usage\": \"\",\n                    \"cfop\": null,\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 20.59,\n                    \"grossValue\": 350,\n                    \"unitCost\": 0\n                },\n                {\n                    \"lineNum\": \"0002\",\n                    \"productKey\": \"MC000002\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"SSD 120GB\",\n                    \"quantity\": 2,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 80,\n                    \"taxBasis\": 160,\n                    \"usage\": \"\",\n                    \"cfop\": null,\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 9.41,\n                    \"grossValue\": 160,\n                    \"unitCost\": 0\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 510,\n                    \"grossValue\": 510,\n                    \"baseValue\": 510,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 510,\n                    \"grossValue\": 510,\n                    \"baseValue\": 510,\n                    \"taxValue\": 0,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            }\n        }\n    ]\n}"},{"id":"2928648b-dc17-4112-bf24-780eba383d61","name":"Purchase Orders - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purchaseOrders?createdFrom=2018-09-17&createdTo=2020-12-31","host":["{{endpoint}}"],"path":["purchaseOrders"],"query":[{"key":"createdFrom","value":"2018-09-17","description":"Initial create date to filter purchase orders (required if not unitary search)"},{"key":"createdTo","value":"2020-12-31","description":"Final create date to filter purchase orders (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"partnerKey","value":"00003801","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"buyerKey","value":"22","description":"Buyer Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"53929","description":"Purchase Order Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"121313","description":"Purchase Order Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1050321450678-01","description":"Partner Purchase Order Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-08-26T00:00:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Thu, 13 May 2021 22:10:02 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurchaseOrders\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"purchaseOrders\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.102\",\n    \"effectiveTimestamp\": \"2021-05-13T19:09:57\",\n    \"createdFrom\": \"2018-09-17\",\n    \"createdTo\": \"2020-12-31\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": \"true\",\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"buyerKey\": \"-1\",\n            \"erpKey\": \"115\",\n            \"orderNum\": \"\",\n            \"docNum\": \"109\",\n            \"docStatus\": \"P\",\n            \"docDate\": \"2018-09-17\",\n            \"docDueDate\": \"2018-09-18\",\n            \"taxDate\": \"2018-09-17\",\n            \"docValue\": 0,\n            \"taxValue\": 0,\n            \"paymentCondition\": \"-1\",\n            \"paymentMethod\": \"Pgto em Cheque\",\n            \"comments\": \"Baseado em Pedidos de venda 245.\",\n            \"customOrderKey\": \"\",\n            \"customStatus\": \"\",\n            \"customStatusNotify\": \"\",\n            \"createdAt\": \"2018-09-17T22:43:08\",\n            \"updatedAt\": \"2018-09-17T22:43:08\",\n            \"canceledAt\": null,\n            \"supplier\": {\n                \"type\": \"S\",\n                \"taxType\": \"\",\n                \"partnerKey\": \"V22222\",\n                \"fullName\": \"OEC 2\",\n                \"aliasName\": \"\",\n                \"email\": \"\",\n                \"phone\": \"\",\n                \"phoneSecondary\": \"\",\n                \"cellular\": \"\",\n                \"taxNumber\": \"\",\n                \"stateTaxNumber\": \"\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"\",\n                    \"address2\": \"\",\n                    \"city\": \"\",\n                    \"county\": \"\",\n                    \"postalCode\": \"\",\n                    \"stateCode\": \"\",\n                    \"countryCode\": \"\",\n                    \"community\": \"\",\n                    \"exteriorNumber\": \"\",\n                    \"streetType\": \"\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"das Nações Unidas\",\n                    \"address2\": \"6° andar\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"04795-100\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Brooklin\",\n                    \"exteriorNumber\": \"14.171\",\n                    \"streetType\": \"Av.\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"A00001\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Impressora 1\",\n                    \"quantity\": 5,\n                    \"unit\": \"\",\n                    \"unitPrice\": 0,\n                    \"taxBasis\": 0,\n                    \"usage\": \"\",\n                    \"cfop\": \"\",\n                    \"whsCode\": \"01\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 0,\n                    \"unitCost\": 0,\n                    \"costCenter\": \"\",\n                    \"accountCode\": \"1.1.3.1.1\",\n                    \"financialProject\": \"\",\n                    \"comments\": \"200.00\"\n                },\n                {\n                    \"lineNum\": \"1\",\n                    \"productKey\": \"A00004\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Impressora 4\",\n                    \"quantity\": 4,\n                    \"unit\": \"\",\n                    \"unitPrice\": 0,\n                    \"taxBasis\": 0,\n                    \"usage\": \"\",\n                    \"cfop\": \"\",\n                    \"whsCode\": \"01\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 0,\n                    \"unitCost\": 0,\n                    \"costCenter\": \"\",\n                    \"accountCode\": \"1.1.3.1.1\",\n                    \"financialProject\": \"\",\n                    \"comments\": \"250.00\"\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0\n                }\n            }\n        }\n    ]\n}"}],"_postman_id":"bba25fb6-d88b-4269-b29e-bfe5a2f7ecfa"},{"name":"Purchase Orders*","id":"1dfb437f-62e4-48e1-b8d4-19c08d507bf8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"1\",\n    \"orderNum\": \"1013\",\n    \"buyerKey\": \"3\",\n    \"dueDate\": \"2021-05-31\",\n    \"mainUsage\": \"22\",\n    \"paymentCondition\": \"\",\n    \"paymentMethod\": \"\",\n    \"comments\": \"Teste\",\n    \"supplier\": {\n\t\t\"type\": \"S\",\n\t\t\"taxType\": \"C\",\n\t\t\"fullName\": \"Sport Club Corinthians Paulista\",\n\t\t\"aliasName\": \"Timão\",\n\t\t\"email\": \"campeão@corinthians.com.br\",\n\t\t\"phone\": \"2095-3000\",\n\t\t\"phoneSecondary\": \"11\",\n\t    \"cellular\": \"11-9595-2000\",\n\t\t\"taxNumber\": \"61.902.722/0001-26\",\n\t\t\"stateTaxNumber\": \"113.440.120.113\",\n\t\t\"cityTaxNumber\": \"\",\n\t\t\"billingAddress\": {\n\t\t\t\"address1\": \"São Jorge\",\n\t\t\t\"address2\": \"\",\n\t\t\t\"city\": \"São Paulo\",\n\t\t\t\"postalCode\": \"03087-000\",\n\t\t\t\"stateCode\": \"SP\",\n\t\t\t\"community\": \"Tatuapé\",\n\t\t\t\"exteriorNumber\": \"777\",\n\t\t\t\"streetType\": \"Rua\",\n\t\t\t\"countryCode\": \"BR\"\n\t\t}\n    },\n    \"items\": [\n        {\n            \"productKey\": \"I004\",\n            \"productName\": \"Camisa Nike Flamengo I 09/10\",\n            \"quantity\": 1,\n            \"unit\": \"PAR\",\n            \"unitPrice\": 49.9,\n            \"taxBasis\": 49.9,\n            \"usage\": \"\",\n            \"costCenter\": \"\",\n            \"accountCode\": \"\",\n            \"fincancialProject\": \"\"\n\n        }\n    ],\n    \"shipment\": {\n            \"shippingAddress\": {\n\t\t\t\t\"address1\": \"São Jorge 2\",\n\t\t\t\t\"address2\": \"\",\n\t\t\t\t\"city\": \"São Paulo\",\n\t\t\t\t\"postalCode\": \"03087-000\",\n\t\t\t\t\"stateCode\": \"SP\",\n\t\t\t\t\"community\": \"Tatuapé\",\n\t\t\t\t\"exteriorNumber\": \"777\",\n\t\t\t\t\"streetType\": \"Rua\",\n\t\t\t\t\"countryCode\": \"BR\"\n            }\n    },\n    \"totals\": {\n        \"orderTotal\": {\n            \"netValue\": 59.71,\n            \"grossValue\": 59.71,\n            \"baseValue\": 59.71,\n            \"taxValue\": 0\n        },\n        \"merchandizeTotal\": {\n            \"netValue\": 49.9,\n            \"grossValue\": 49.9,\n            \"baseValue\": 49.9,\n            \"taxValue\": 0\n        },\n        \"shippingTotal\": {\n            \"netValue\": 9.81,\n            \"grossValue\": 9.81,\n            \"baseValue\": 9.81,\n            \"taxValue\": 0\n        }\n    },\n    \"payments\": [\n        {\n            \"paymentMethod\": \"cash\",\n            \"installments\": 1,\n            \"amount\": 49.71\n        },\n        {\n            \"paymentMethod\": \"transfer\",\n            \"installments\": 1,\n            \"amount\": 10.00\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/purchaseOrders","description":"<h4 id=\"insert-purchase-orders-in-erp\">Insert purchase orders in ERP</h4>\n<p><em>(sapBusinessOne=22/OPOR, totvsProtheus=SC7)</em></p>\n<h2 id=\"not-yet-available-release-in-2020-q4\">&lt;&lt;&lt; NOT YET AVAILABLE. RELEASE IN 2020 Q4 &gt;&gt;&gt;</h2>\n<p>This service allows to insert a new purchase order in the ERP, with treatment for new and existing partner.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new purchase order will be added if the purchase orders is not found on the ERP by <code>branch</code> + <code>orderNum</code>:</p>\n<ul>\n<li>SAP B1: OPOR.BPLId + OPOR.NumAtCard</li>\n<li>TOTVS Protheus: C7_FILIAL + C7_NUMIMP</li>\n</ul>\n<p>The key to finding the partner is through <code>taxNumber</code>. If the partner is located by <code>taxNumber</code>, the data is updated, otherwise the new partner is added in the ERP.</p>\n<ul>\n<li>SAP Business One: CRD7.TaxId0 (company/government) or CRD7.TaxId4 (person/employee)</li>\n<li>TOTVS Protheus: A2_CGC</li>\n</ul>\n<p>The products sent for the service will be identified in the ERP:</p>\n<ul>\n<li>SAP B1: OITM.ItemCode = <code>productKey</code> or OITM.CodeBars = <code>codeBars</code></li>\n<li>TOTVS Protheus: B1_COD = <code>productKey</code> or B1_CODBAR = <code>codeBars</code></li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>Supplier: [1] <code>supplier</code>/<code>type</code>: C = supplier, S = supplier, L = lead, [2] <code>supplier</code>/<code>taxType</code>: P = person, C = company, G = government, E = employee. Each supplier in SAP Business One will have 2 registered addresses (CRD1, CRD7), namely: ShipToCode (S) = /supplier/fullName OR /shipment/shippingAddress/firstName + \"\" + /shipment/shippingAddress/lastName, BillToCode (B) = /supplier/fullName OR /supplier/billingAddress/firstName + \"\" + /supplier/billingAddress/lastName. Each supplier in SAP Business One will have 3 tax identification numbers (CRD12), namely: ShipToCode, BillToCode, empty.</li>\n<li>Buyer: <code>buyerKey</code></li>\n<li>Discounts: in total items (<code>priceAdjustValue</code>), in total freight (<code>shipAdjustValue</code>). <code>shipAdjustType</code> = minus or plus</li>\n<li><code>items</code>: <code>basePrice</code>: base/gross price, <code>taxBasis</code>: total value of the item (<code>quantity</code> * <code>price</code>), calculation date for tax</li>\n<li><code>totals</code>: <code>netValue</code>: net value with discounts applied, <code>grossValue</code>: gross value with discounts and taxes applied, <code>baseValue</code>: base value for tax calculation, <code>taxValue</code>: taxes that increase order value (IPI, ICMS-ST, ...)</li>\n<li><code>payments</code>: 5 paymentMethods are accepted: transfer, boe, creditCard (mandatory fields: <code>cardName</code> and <code>authid</code>), cash, check</li>\n<li>The ERP payment method code can be entered in the <code>paymentMethodKey</code> field</li>\n</ul>\n<p>For the use of user fields (UDF) created in the purchase orders table (SAPB1: OPOR, TOTVS: SC7), the respective registration must be performed in the Custom Table.</p>\n<h4 id=\"request-object-has-the-following-properties\">Request object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>branch</td>\n<td>string</td>\n<td>Number branch</td>\n</tr>\n<tr>\n<td>orderNum</td>\n<td>string</td>\n<td>Number Purchase Order</td>\n</tr>\n<tr>\n<td>buyerKey</td>\n<td>string</td>\n<td>Buyer Primary Key in ERP</td>\n</tr>\n<tr>\n<td>paymentCondition</td>\n<td>string</td>\n<td>Payment Condition key</td>\n</tr>\n<tr>\n<td>paymentMethod</td>\n<td>string</td>\n<td>Payment Method key</td>\n</tr>\n<tr>\n<td>mainUsage</td>\n<td>string</td>\n<td>Main Usage key for all order items</td>\n</tr>\n<tr>\n<td>mainCostCenter</td>\n<td>string</td>\n<td>Main Cost Center key for all order items</td>\n</tr>\n<tr>\n<td>whsCode</td>\n<td>string</td>\n<td>Wharehouse key for all order items</td>\n</tr>\n<tr>\n<td>dueDate</td>\n<td>string</td>\n<td>Due date</td>\n</tr>\n<tr>\n<td>comments</td>\n<td>string</td>\n<td>Comments</td>\n</tr>\n<tr>\n<td>customOrderKey</td>\n<td>string</td>\n<td>Custom order external key</td>\n</tr>\n<tr>\n<td>customStatus</td>\n<td>string</td>\n<td>Custom status</td>\n</tr>\n<tr>\n<td>customStatusNotify</td>\n<td>string</td>\n<td>Custom Notify status</td>\n</tr>\n<tr>\n<td>customShipMethod</td>\n<td>string</td>\n<td>Custom shipping method</td>\n</tr>\n<tr>\n<td>customShipType</td>\n<td>string</td>\n<td>Custom shipping type</td>\n</tr>\n<tr>\n<td>baseObject</td>\n<td>string</td>\n<td>Base Object (default 1470000113 or SC1)</td>\n</tr>\n<tr>\n<td>baseKey</td>\n<td>string</td>\n<td>Base key</td>\n</tr>\n<tr>\n<td>supplier</td>\n<td>object</td>\n<td>Supplier</td>\n</tr>\n<tr>\n<td>supplier.type</td>\n<td>string</td>\n<td>C=supplier, S=supplier, L=lead</td>\n</tr>\n<tr>\n<td>supplier.taxType</td>\n<td>string</td>\n<td>P=person, C=company, G=government, E=employee</td>\n</tr>\n<tr>\n<td>supplier.fullName</td>\n<td>string</td>\n<td>Supplier full name</td>\n</tr>\n<tr>\n<td>supplier.aliasName</td>\n<td>string</td>\n<td>Supplier alias name</td>\n</tr>\n<tr>\n<td>supplier.email</td>\n<td>string</td>\n<td>Supplier emai</td>\n</tr>\n<tr>\n<td>supplier.phone</td>\n<td>string</td>\n<td>Supplier phone Number</td>\n</tr>\n<tr>\n<td>supplier.phoneSecondary</td>\n<td>string</td>\n<td>Supplier secondary phone number</td>\n</tr>\n<tr>\n<td>supplier.cellular</td>\n<td>string</td>\n<td>cell Supplier phone number</td>\n</tr>\n<tr>\n<td>supplier.taxNumber</td>\n<td>string</td>\n<td>Supplier identification number</td>\n</tr>\n<tr>\n<td>supplier.stateTaxNumber</td>\n<td>string</td>\n<td>State supplier identification number</td>\n</tr>\n<tr>\n<td>supplier.cityTaxNumber</td>\n<td>string</td>\n<td>City supplier identification number</td>\n</tr>\n<tr>\n<td>supplier.billingAddress</td>\n<td>object</td>\n<td>Supplier billing addresses</td>\n</tr>\n<tr>\n<td>supplier.billingAddress.address1</td>\n<td>string</td>\n<td>Supplier billing address1</td>\n</tr>\n<tr>\n<td>supplier.billingAddress.address2</td>\n<td>string</td>\n<td>Supplier billing address2</td>\n</tr>\n<tr>\n<td>supplier.billingAddress.city</td>\n<td>string</td>\n<td>Supplier billing city</td>\n</tr>\n<tr>\n<td>supplier.billingAddress.postalCode</td>\n<td>string</td>\n<td>Supplier billing postal Code</td>\n</tr>\n<tr>\n<td>supplier.billingAddress.stateCode</td>\n<td>string</td>\n<td>Supplier billing state Code</td>\n</tr>\n<tr>\n<td>supplier.billingAddress.community</td>\n<td>string</td>\n<td>Supplier billing community</td>\n</tr>\n<tr>\n<td>supplier.billingAddress.exteriorNumber</td>\n<td>string</td>\n<td>Supplier billing exterior number</td>\n</tr>\n<tr>\n<td>supplier.billingAddress.streetType</td>\n<td>string</td>\n<td>Supplier billing type street</td>\n</tr>\n<tr>\n<td>supplier.billingAddress.countryCode</td>\n<td>string</td>\n<td>Supplier billing country code</td>\n</tr>\n<tr>\n<td>items</td>\n<td>array</td>\n<td>Order Items Object</td>\n</tr>\n<tr>\n<td>items.productKey</td>\n<td>string</td>\n<td>Product key (optional if codeBars)</td>\n</tr>\n<tr>\n<td>items.codeBars</td>\n<td>string</td>\n<td>Product codebars (optional if productKey)</td>\n</tr>\n<tr>\n<td>items.productName</td>\n<td>string</td>\n<td>Product Name</td>\n</tr>\n<tr>\n<td>items.quantity</td>\n<td>number</td>\n<td>Quantity</td>\n</tr>\n<tr>\n<td>items.unit</td>\n<td>string</td>\n<td>Unit</td>\n</tr>\n<tr>\n<td>items.unitPrice</td>\n<td>number</td>\n<td>Unit price</td>\n</tr>\n<tr>\n<td>items.taxBasis</td>\n<td>number</td>\n<td>Tax Basis</td>\n</tr>\n<tr>\n<td>items.usage</td>\n<td>string</td>\n<td>Usage key</td>\n</tr>\n<tr>\n<td>items.costCenter</td>\n<td>string</td>\n<td>Cost Center key</td>\n</tr>\n<tr>\n<td>items.accountCode</td>\n<td>string</td>\n<td>Account Code key</td>\n</tr>\n<tr>\n<td>items.financialProject</td>\n<td>string</td>\n<td>Financial Project key</td>\n</tr>\n<tr>\n<td>items.baseLineNum</td>\n<td>string</td>\n<td>Base line number (with baseObject + baseKey)</td>\n</tr>\n<tr>\n<td>items.comments</td>\n<td>string</td>\n<td>Line comments</td>\n</tr>\n<tr>\n<td>shipment</td>\n<td>object</td>\n<td>Shipment</td>\n</tr>\n<tr>\n<td>shipment.shippingMethod</td>\n<td>string</td>\n<td>Shipping method</td>\n</tr>\n<tr>\n<td>shipment.carrierMessage</td>\n<td>string</td>\n<td>Carrier message</td>\n</tr>\n<tr>\n<td>shipment.shippingAddress</td>\n<td>array</td>\n<td>Shipping adress</td>\n</tr>\n<tr>\n<td>shippingAdress.address1</td>\n<td>string</td>\n<td>Shipping first adress</td>\n</tr>\n<tr>\n<td>shippingAdress.address2</td>\n<td>string</td>\n<td>Shipping second adress</td>\n</tr>\n<tr>\n<td>shippingAdress.city</td>\n<td>string</td>\n<td>Shipping city</td>\n</tr>\n<tr>\n<td>shippingAdress.postalCode</td>\n<td>string</td>\n<td>Shipping postal Code</td>\n</tr>\n<tr>\n<td>shippingAdress.stateCode</td>\n<td>string</td>\n<td>Shipping state Code</td>\n</tr>\n<tr>\n<td>shippingAdress.community</td>\n<td>string</td>\n<td>Shipping community</td>\n</tr>\n<tr>\n<td>shippingAdress.exteriorNumber</td>\n<td>string</td>\n<td>Shipping exterior number</td>\n</tr>\n<tr>\n<td>shippingAdress.streetType</td>\n<td>string</td>\n<td>Shipping type street</td>\n</tr>\n<tr>\n<td>shippingAdress.countryCode</td>\n<td>string</td>\n<td>Shipping country Code</td>\n</tr>\n<tr>\n<td>totals</td>\n<td>object</td>\n<td>Totals</td>\n</tr>\n<tr>\n<td>totals.orderTotal</td>\n<td>object</td>\n<td>Order totals</td>\n</tr>\n<tr>\n<td>totals.orderTotal.netValue</td>\n<td>number</td>\n<td>Totals net value</td>\n</tr>\n<tr>\n<td>totals.orderTotal.grossValue</td>\n<td>number</td>\n<td>Totals gross value</td>\n</tr>\n<tr>\n<td>totals.orderTotal.baseValue</td>\n<td>number</td>\n<td>Totals base value</td>\n</tr>\n<tr>\n<td>totals.orderTotal.taxValue</td>\n<td>number</td>\n<td>Totals taxes that increase the value</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal</td>\n<td>object</td>\n<td>Merchandize Totals</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.netValue</td>\n<td>number</td>\n<td>Net value merchandize</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.grossValue</td>\n<td>number</td>\n<td>Gross value merchandize</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.baseValue</td>\n<td>number</td>\n<td>Base value merchandize</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.taxValue</td>\n<td>number</td>\n<td>Taxes that increase the value merchandizeTotal</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.priceAdjustValue</td>\n<td>number</td>\n<td>Discounts in total items</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.priceAdjustType</td>\n<td>string</td>\n<td>Price adjustment type</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.priceAdjustPromotionId</td>\n<td>string</td>\n<td>Price adjustment Id promotion</td>\n</tr>\n<tr>\n<td>totals.merchandizeTotal.priceAdjustCouponId</td>\n<td>string</td>\n<td>Price adjustment Id coupon</td>\n</tr>\n<tr>\n<td>totals.shippingTotal</td>\n<td>object</td>\n<td>Shipping totals</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.netValue</td>\n<td>number</td>\n<td>Shipping total Net value</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.grossValue</td>\n<td>number</td>\n<td>Shipping total Gross value</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.baseValue</td>\n<td>number</td>\n<td>Shipping totals base value</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.taxValue</td>\n<td>number</td>\n<td>Shipping total Tax value</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.priceAdjustValue</td>\n<td>number</td>\n<td>Discounts on total shipping</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.priceAdjustType</td>\n<td>string</td>\n<td>Price adjust type</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.priceAdjustPromotionId</td>\n<td>string</td>\n<td>Price adjust Id promotion</td>\n</tr>\n<tr>\n<td>totals.shippingTotal.priceAdjustCouponId</td>\n<td>string</td>\n<td>Price adjust Id coupon</td>\n</tr>\n<tr>\n<td>payments</td>\n<td>array</td>\n<td>Payments</td>\n</tr>\n<tr>\n<td>payments.paymentMethod</td>\n<td>string</td>\n<td>Payment Method</td>\n</tr>\n<tr>\n<td>payments.installments</td>\n<td>number</td>\n<td>Installments</td>\n</tr>\n<tr>\n<td>payments.amount</td>\n<td>number</td>\n<td>Amount</td>\n</tr>\n<tr>\n<td>payments.details</td>\n<td>object</td>\n<td>Details</td>\n</tr>\n<tr>\n<td>payments.details.tid</td>\n<td>string</td>\n<td>Tid</td>\n</tr>\n<tr>\n<td>payments.details.cardName</td>\n<td>string</td>\n<td>Card name</td>\n</tr>\n<tr>\n<td>payments.details.acquirer</td>\n<td>booleano</td>\n<td>Acquirer</td>\n</tr>\n<tr>\n<td>payments.details.authid</td>\n<td>string</td>\n<td>Authid</td>\n</tr>\n<tr>\n<td>payments.details.nsu</td>\n<td>string</td>\n<td>nsu</td>\n</tr>\n<tr>\n<td>payments.gateway</td>\n<td>object</td>\n<td>gateway</td>\n</tr>\n<tr>\n<td>payments.gateway.gatewayName</td>\n<td>string</td>\n<td>Gateway name</td>\n</tr>\n<tr>\n<td>payments.gateway.gatewayOrderId</td>\n<td>string</td>\n<td>Gateway Id order</td>\n</tr>\n<tr>\n<td>payments.gateway.gatewayPayId</td>\n<td>string</td>\n<td>Gateway Id payment</td>\n</tr>\n<tr>\n<td>payments.paymentMethod</td>\n<td>string</td>\n<td>Payment Method</td>\n</tr>\n<tr>\n<td>payments.installments</td>\n<td>number</td>\n<td>Installments</td>\n</tr>\n<tr>\n<td>payments.amount</td>\n<td>number</td>\n<td>Amount</td>\n</tr>\n</tbody>\n</table>\n</div><p>* = <em>Required field</em></p>\n<h4 id=\"response-object-has-the-following-properties\">Response object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>package</td>\n<td>string</td>\n<td>package</td>\n</tr>\n<tr>\n<td>process</td>\n<td>string</td>\n<td>process</td>\n</tr>\n<tr>\n<td>system</td>\n<td>string</td>\n<td>System</td>\n</tr>\n<tr>\n<td>target</td>\n<td>string</td>\n<td>Target</td>\n</tr>\n<tr>\n<td>user</td>\n<td>string</td>\n<td>user</td>\n</tr>\n<tr>\n<td>host</td>\n<td>string</td>\n<td>host</td>\n</tr>\n<tr>\n<td>effectiveTimestamp</td>\n<td>string</td>\n<td>Effective Time stamp</td>\n</tr>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>Code</td>\n</tr>\n<tr>\n<td>success</td>\n<td>booleano</td>\n<td>Success</td>\n</tr>\n<tr>\n<td>values</td>\n<td>array</td>\n<td>Values</td>\n</tr>\n<tr>\n<td>values.object</td>\n<td>string</td>\n<td>Object</td>\n</tr>\n<tr>\n<td>values.table</td>\n<td>string</td>\n<td>Table</td>\n</tr>\n<tr>\n<td>values.action</td>\n<td>string</td>\n<td>action</td>\n</tr>\n<tr>\n<td>values.erpKey</td>\n<td>string</td>\n<td>Erpkey</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseOrders"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1dfb437f-62e4-48e1-b8d4-19c08d507bf8"},{"name":"Purchase Order Status","id":"c0a5cefd-bf2b-4917-ac73-a20187bafef1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/purchaseOrderStatus?createdFrom=2018-09-17&createdTo=2018-09-17&branch=1&partnerKey=NEW&buyerKey=NEW&docStatus=NEW&customStatus=2&customStatusNotify=NEW&customShipMethod=NEW&customShipType=NEW&erpKey=NEW&docNum=NEW&orderNum=NEW&customOrderKey=NEW&pageNum=1&updatedAt=2020-01-13T10:00:00","description":"<h4 id=\"search-sales-order-status-changes-in-erp\">Search sales order status changes in ERP</h4>\n<p><em>(sapBusinessOne=17/ORDR)</em></p>\n<p>This service will allow you to search sales orders status on the ERP.</p>\n<p>Searching sales orders status allows you to filter the ERP by:</p>\n<ul>\n<li>List search: by <code>createdFrom</code> + <code>createdTo</code> {required}, by <code>branch</code>, <code>partnerKey</code>, <code>sellerKey</code>, <code>salesAgentKey</code>, <code>carrierKey</code>, <code>docStatus</code> or any of four custom fields definied in this service {optional}</li>\n<li>Unitary search: by <code>erpKey</code> or <code>orderNum</code> or <code>docNum</code> or <code>customOrderKey</code></li>\n</ul>\n<p>If no field for unitary query is provided in the request (<code>erpKey</code> or <code>orderNum</code> or <code>docNum</code> or <code>customOrderKey</code>), the query for sales orders is carried out by creation date from/to (which become mandatory) and any other filter applied.</p>\n<p>The orders service will consider sales orders with:</p>\n<ul>\n<li>SAP Business One: ORDR.ObjType = 17</li>\n<li>TOTVS Protheus: C5_TIPO IN 'N', 'C', 'I', 'P'</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (ORDR.BPLId), TOTVS Protheus (C5_FILIAL)</li>\n<li><code>partnerKey</code>: SAP Business One (ORDR.CardCode), TOTVS Protheus (C5_CLIENTE+'_'+C5_LOJACLI)</li>\n<li><code>sellerKey</code>: SAP Business One (ORDR.SlpCode), TOTVS Protheus (C5_VEND1)</li>\n<li><code>salesAgentKey</code>: SAP Business One (ORDR.AgentCode), TOTVS Protheus (A3_UNIDAD)</li>\n<li><code>erpKey</code>: SAP Business One (ORDR.DocEntry), TOTVS Protheus (C5_NUM)</li>\n<li><code>orderNum</code>: SAP Business One (ORDR.NumAtCard), TOTVS Protheus (C5_PEDECOM)</li>\n<li><code>docNum</code>: SAP Business One (ORDR.DocNum), TOTVS Protheus (R_E_C_N_O_)</li>\n<li><code>docStatus</code>: O=open, C=closed, X=canceled, B=billed, P=paid, R=returned</li>\n<li><code>customOrderKey</code>: sales order custom field definied in API Setup, and present in filter and response</li>\n<li><code>customStatus</code>: sales order custom field definied in API Setup, and present in filter and response</li>\n<li><code>customStatusNotify</code>: sales order custom field definied in API Setup, and present in filter and response</li>\n<li><code>customShipMethod</code>: sales order custom field definied in API Setup, and present in filter and response</li>\n<li><code>customShipType</code>: sales order custom field  definied in API Setup, and present in filter and response</li>\n<li><code>customTrackingKey</code>: sales order custom field definied in API Setup, and present in response</li>\n<li><code>customTrackingUrl</code>: sales order custom field definied in API Setup, and present in response</li>\n</ul>\n<p>This service will allow you to search the sales order status list in two situations:</p>\n<ul>\n<li>Full Search: will result in all orders from a specific branch that had a status change in the createdFrom/createdTo period. </li>\n<li>Incremental Search: will result in all orders from a specific branch that have changed status in the createdFrom / createdTo period and after a given date / time provided in the request. The <code>updatedAt</code> field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which records should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Creation Time fields of the transaction table in SAP Business One (OIVL.CreateDate and OIVL.CreateTime), [2] TOTVS Protheus: not implemented</li>\n</ul>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in <code>count</code> field</li>\n</ul>\n<p>For list search the pagination feature in the response will be used, where the following fields are used to control the pagination:</p>\n<ul>\n<li><code>pageSize</code> = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response</li>\n<li><code>pageNum</code> = desired page, provided in the request, and informed in the response. If <code>pageNum</code> not informed = 1, If <code>pageNum</code> &lt;=0 = 1, If <code>pageNum</code>&gt; <code>pageTotal</code> = last page</li>\n<li><code>pageTotal</code> = total pages, informed in the response</li>\n<li><code>hasNext</code> = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service does not have user field (UDF) treatment.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseOrderStatus"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter change sales orders (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2018-09-17"},{"description":{"content":"<p>Final create date to filter sales orders (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2018-09-17"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"NEW"},{"description":{"content":"<p>Buyer Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"buyerKey","value":"NEW"},{"description":{"content":"<p>Default Purchase Order Status to filter sales order (optional in list search - NEW)</p>\n","type":"text/plain"},"key":"docStatus","value":"NEW"},{"description":{"content":"<p>Custom Purchase Order Status to filter sales order (optional in list search - depends on UDF in API setup - NEW)</p>\n","type":"text/plain"},"key":"customStatus","value":"2"},{"description":{"content":"<p>Custom Purchase Order Status Notify to filter sales order (optional in list search - depends on UDF in API setup - NEW)</p>\n","type":"text/plain"},"key":"customStatusNotify","value":"NEW"},{"description":{"content":"<p>Custom Shipping Method to filter purchase orders (optional in list search - depends on UDF in API setup - NEW)</p>\n","type":"text/plain"},"key":"customShipMethod","value":"NEW"},{"description":{"content":"<p>Custom Shipping Type  to filter purchase orders (optional in list search - depends on UDF in API setup - NEW)</p>\n","type":"text/plain"},"key":"customShipType","value":"NEW"},{"description":{"content":"<p>Purchase Order Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"NEW"},{"description":{"content":"<p>Purchase Order Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"NEW"},{"description":{"content":"<p>Partner Purchase Order Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"NEW"},{"description":{"content":"<p>Custom Purchase Order Key to filter purchase order (optional in list search - depends on UDF in API setup - NEW)</p>\n","type":"text/plain"},"key":"customOrderKey","value":"NEW"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"1"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-01-13T10:00:00"}],"variable":[]}},"response":[{"id":"5abccda2-efd0-4310-9c16-0ba5f7065787","name":"Purchase Order Status - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purchaseOrderStatus?createdFrom=2018-09-17&createdTo=2018-09-17","host":["{{endpoint}}"],"path":["purchaseOrderStatus"],"query":[{"key":"createdFrom","value":"2018-09-17","description":"Initial create date to filter change sales orders (required if not unitary search)"},{"key":"createdTo","value":"2018-09-17","description":"Final create date to filter sales orders (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"partnerKey","value":"NEW","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"buyerKey","value":"NEW","description":"Buyer Primary Key in ERP (optional in list search)","disabled":true},{"key":"docStatus","value":"NEW","description":"Default Purchase Order Status to filter sales order (optional in list search - NEW)","disabled":true},{"key":"customStatus","value":"2","description":"Custom Purchase Order Status to filter sales order (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"customStatusNotify","value":"NEW","description":"Custom Purchase Order Status Notify to filter sales order (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"customShipMethod","value":"NEW","description":"Custom Shipping Method to filter purchase orders (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"customShipType","value":"NEW","description":"Custom Shipping Type  to filter purchase orders (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"erpKey","value":"NEW","description":"Purchase Order Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"NEW","description":"Purchase Order Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"NEW","description":"Partner Purchase Order Number in ERP (optional - unitary search)","disabled":true},{"key":"customOrderKey","value":"NEW","description":"Custom Purchase Order Key to filter purchase order (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-13T10:00:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 12 May 2021 21:13:24 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurchaseOrderStatus\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"purchaseOrderStatus\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.102\",\n    \"effectiveTimestamp\": \"2021-05-12T18:13:21\",\n    \"createdFrom\": \"2018-09-17\",\n    \"createdTo\": \"2018-09-17\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"V22222\",\n            \"buyerKey\": \"-1\",\n            \"erpKey\": \"115\",\n            \"orderNum\": \"\",\n            \"docNum\": \"109\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2018-09-17\",\n            \"docDueDate\": \"2018-09-18\",\n            \"createdAt\": \"2018-09-17T22:43:08\",\n            \"updatedAt\": \"2018-09-17T22:43:08\",\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"c0a5cefd-bf2b-4917-ac73-a20187bafef1"},{"name":"Purchase Order Status - Options","id":"cb440b37-f42e-45b8-8be5-5bbd014d6b2c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/purchaseOrderStatus/options","description":"<h4 id=\"search-custom-purchase-order-status-options-in-erp\">Search custom purchase order status options in ERP</h4>\n<p><em>(sapBusinessOne=UFD1)</em></p>\n<p>This service will allow you to search custom purchase order status options on the ERP.</p>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in <code>count</code> field</li>\n</ul>\n<p>This service does not have user field (UDF) treatment.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseOrderStatus","options"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"cb440b37-f42e-45b8-8be5-5bbd014d6b2c"},{"name":"Purchase Order Status","id":"7ec8e666-8cd1-4bb6-8e46-7be570049efb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"erpKey\": \"115\",\n    \"customOrderKey\": \"10100121-01\"\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/purchaseOrderStatus","description":"<h4 id=\"update-purchase-order-status-in-erp\">Update purchase order status in ERP</h4>\n<p><em>(sapBusinessOne=22/OPOR, totvsProtheus=SC7)</em></p>\n<p>This service allows to update a purchase order status in ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>Purchase order status will be updated if the purchase order is found on the ERP by the key informed: erpKey or docNum or orderNum.</p>\n<p>In this service you can:</p>\n<ul>\n<li>close a purchase order (<code>docStatus</code>=\"C\")</li>\n<li>change any of five custom fields in purchase order definied in API Setup (including purchase order closed or canceled): <code>custosOrderKey</code>, <code>custosStatus</code>, <code>customStatusNotify</code>, <code>customShipMethod</code>, <code>customShipType</code>, <code>customTrackingKey</code>, <code>customTrackingUrl</code></li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>erpKey</code>: SAP Business One (OPOR.DocEntry), TOTVS Protheus (x)</li>\n<li><code>orderNum</code>: SAP Business One (OPOR.NumAtCard), TOTVS Protheus (x)</li>\n<li><code>docNum</code>: SAP Business One (OPOR.DocNum), TOTVS Protheus (x)</li>\n<li><code>docStatus</code>: C=closed</li>\n<li><code>customOrderKey</code>: custom field in order definied in API Setup, and present in body</li>\n<li><code>customStatus</code>: custom field in order definied in API Setup, and present in body</li>\n<li><code>customStatusNotify</code>: custom field in order definied in API Setup, and present body</li>\n<li><code>customShipMethod</code>: custom field in order definied in API Setup, and present in body</li>\n<li><code>customShipType</code>: custom field in order definied in API Setup, and present in body</li>\n<li><code>customTrackingKey</code>: custom field in order definied in API Setup, and present in body</li>\n<li><code>customTrackingUrl</code>: custom field in order definied in API Setup, and present in body</li>\n</ul>\n<p>This service does not have user field (UDF) treatment.</p>\n<h4 id=\"request-object-has-the-following-properties\">Request object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>erpKey *</td>\n<td>string</td>\n<td>Purchase Order Primary Key in ERP</td>\n</tr>\n<tr>\n<td>docNum *</td>\n<td>string</td>\n<td>Purchase Order Number in ERP</td>\n</tr>\n<tr>\n<td>orderNum *</td>\n<td>string</td>\n<td>Purchase Order Partner Number in ERP</td>\n</tr>\n<tr>\n<td>docStatus</td>\n<td>string</td>\n<td>Purchase Order Status in ERP (accepts only C to close sales order)</td>\n</tr>\n<tr>\n<td>customOrderKey</td>\n<td>string</td>\n<td>Custom Purchase Order Key in external system in ERP (UDF definied in Setup API)</td>\n</tr>\n<tr>\n<td>customStatus</td>\n<td>string</td>\n<td>Custom Purchase Order Status in ERP (UDF definied in Setup API)</td>\n</tr>\n<tr>\n<td>customStatusNotify</td>\n<td>string</td>\n<td>Purchase Order Custom Status Notify in ERP (UDF definied in Setup API)</td>\n</tr>\n<tr>\n<td>customShipMethod</td>\n<td>string</td>\n<td>Custom Shipping Method in ERP (UDF definied in Setup API)</td>\n</tr>\n<tr>\n<td>customShipType</td>\n<td>string</td>\n<td>Custom Shipping Type in ERP (UDF definied in Setup API)</td>\n</tr>\n<tr>\n<td>customTrackingKey</td>\n<td>string</td>\n<td>Custom Tracking Key in ERP (UDF definied in Setup API)</td>\n</tr>\n<tr>\n<td>customTrackingUrl</td>\n<td>string</td>\n<td>Custom Tracking URL in ERP (UDF definied in Setup API)</td>\n</tr>\n</tbody>\n</table>\n</div><p>* = <em>Required field</em></p>\n<h4 id=\"response-object-has-the-following-properties\">Response object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>package</td>\n<td>string</td>\n<td>package</td>\n</tr>\n<tr>\n<td>process</td>\n<td>string</td>\n<td>process</td>\n</tr>\n<tr>\n<td>system</td>\n<td>string</td>\n<td>System</td>\n</tr>\n<tr>\n<td>target</td>\n<td>string</td>\n<td>Target</td>\n</tr>\n<tr>\n<td>user</td>\n<td>string</td>\n<td>user</td>\n</tr>\n<tr>\n<td>host</td>\n<td>string</td>\n<td>host</td>\n</tr>\n<tr>\n<td>effectiveTimestamp</td>\n<td>string</td>\n<td>Effective Time stamp</td>\n</tr>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>Code</td>\n</tr>\n<tr>\n<td>success</td>\n<td>booleano</td>\n<td>Success</td>\n</tr>\n<tr>\n<td>values</td>\n<td>array</td>\n<td>Values</td>\n</tr>\n<tr>\n<td>values.object</td>\n<td>string</td>\n<td>Object</td>\n</tr>\n<tr>\n<td>values.table</td>\n<td>string</td>\n<td>Table</td>\n</tr>\n<tr>\n<td>values.action</td>\n<td>string</td>\n<td>action</td>\n</tr>\n<tr>\n<td>values.erpKey</td>\n<td>string</td>\n<td>Erpkey</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseOrderStatus"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"c713e7f7-49fc-4ac1-b96a-a77d1e21d32b","name":"Purchase Order Status - SAP Business One","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"erpKey\": \"115\",\n    \"customOrderKey\": \"10100121-01\"\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/purchaseOrderStatus"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 12 May 2021 21:26:46 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurchaseOrderStatus\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"purchaseOrderStatus\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.102\",\n    \"effectiveTimestamp\": \"2021-05-12T18:26:42\",\n    \"erpKey\": \"115\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"22\",\n            \"table\": \"OPOR\",\n            \"action\": \"Update\",\n            \"erpKey\": \"115\"\n        }\n    ]\n}"}],"_postman_id":"7ec8e666-8cd1-4bb6-8e46-7be570049efb"}],"id":"16c53091-c156-4795-b7e2-4b18475f8de0","_postman_id":"16c53091-c156-4795-b7e2-4b18475f8de0","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Purchase Invoices*","item":[{"name":"Purchase Invoices","id":"805760e7-74c1-4398-b7be-3eb3862dd5b6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/purchaseInvoices?createdFrom=2018-09-17&createdTo=2020-09-30&branch=1&partnerKey=C001&buyerKey=22&erpKey=120&docNum=49084&orderNum=1049210322364-01&nfeKey&nfeAuthCode=100&pageNum=2&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-purchase-invoices-in-erp\">Search purchase invoices in ERP</h4>\n<p><em>(sapBusinessOne=18/OPCH, totvsProtheus=SF1)</em></p>\n<p>This service will allow to search purchase invoices in the ERP.</p>\n<p>The search of purchase invoices allows filtering the ERP by:</p>\n<ul>\n<li><p>List Search: by <code>createdFrom</code> + <code>createdTo</code> {required}, by <code>branch</code>, <code>partnerKey</code> {optional}</p>\n</li>\n<li><p>Unitary Search: <code>erpKey</code> or <code>orderNum</code> or <code>docNum</code></p>\n</li>\n</ul>\n<p>If no field for unitary search (<code>erpKey</code> or <code>orderNum</code> or <code>docNum</code>) is informed in the request, the search for purchase invoices is carried out by date of creation from/to (which become mandatory.</p>\n<p>The purchaseInvoices service will consider purchase invoices with:</p>\n<ul>\n<li><p>SAP Business One: OPCH.ObjType = 18</p>\n</li>\n<li><p>TOTVS Protheus: F1_TIPO IN 'N', 'C', 'I', 'P'</p>\n</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><p><code>branch</code>: SAP Business One (OPCH.BPLId), TOTVS Protheus (F1_FILIAL)</p>\n</li>\n<li><p><code>partnerKey</code>: SAP Business One (OPCH.CardCode), TOTVS Protheus (F1_FORNECE+'_'+F1_LOJA)</p>\n</li>\n<li><p><code>erpKey</code>: SAP Business One (OPCH.DocEntry), TOTVS Protheus (F1_SERIE+'_'+F1_NUM)</p>\n</li>\n<li><p><code>orderNum</code>: SAP Business One (OPCH.NumAtCard), TOTVS Protheus (D1_PEDIDO)</p>\n</li>\n<li><p><code>docNum</code>: SAP Business One (OPCH.DocNum), TOTVS Protheus (R_E_C_N_O_)</p>\n</li>\n<li><p><code>docStatus</code>: O = open, C = canceled, B = billed, P = paid, R = returned, D = draft (*new)</p>\n</li>\n</ul>\n<p>Data returned in response: purchase invoice data, partner data, items (+ taxes), totals, payments, taxes</p>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the <code>count</code> field</li>\n</ul>\n<p>For list search the pagination feature in the response will be used, where the following fields are used to control the pagination:</p>\n<ul>\n<li><p><code>pageSize</code> = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response</p>\n</li>\n<li><p><code>pageNum</code> = desired page, provided in the request, and informed in the response. If <code>pageNum</code> not informed = 1, If <code>pageNum</code> &lt;=0 = 1, If <code>pageNum</code> &gt; <code>pageTotal</code> = last page</p>\n</li>\n<li><p><code>pageTotal</code> = total pages, informed in the response</p>\n</li>\n<li><p><code>hasNext</code> = if there are more pages (true / false), informed in the response</p>\n</li>\n</ul>\n<p>This service will allow you to search the purchase invoices list in two situations:</p>\n<ul>\n<li><p>Full Search: will result in all purchase invoices, according to filters.</p>\n</li>\n<li><p>Incremental Search: will result in all purchase invoices, according to filters, which have been included and/or changed in the main register after a certain date/time provided in the request. In the Incremental Search, the <code>updatedAt</code> field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which exit notes should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Update Date fields for the Document record in SAP Business One (OPCH.CreateDate, OPCH.UpdateDate, OPCH.CreateTS, OPCH.UpdateTS), [2] TOTVS Protheus: the F1_USERLGI and F1_USERLGA fields</p>\n</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of purchase invoices (SAPB1: OPCH, TOTVS: SF1), the respective registration must be performed in the Custom Table.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseInvoices"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter invoices (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2018-09-17"},{"description":{"content":"<p>Final create date to filter invoices (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-09-30"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"C001"},{"description":{"content":"<p>Buyer Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"buyerKey","value":"22"},{"description":{"content":"<p>Purchase Invoice Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"120"},{"description":{"content":"<p>Purchase Invoice Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"49084"},{"description":{"content":"<p>Partner Purchase Order Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1049210322364-01"},{"description":{"content":"<p>NFe key (optional - unitary search)</p>\n","type":"text/plain"},"key":"nfeKey","value":null},{"description":{"content":"<p>Authorization NFe code (optional)</p>\n","type":"text/plain"},"key":"nfeAuthCode","value":"100"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"2"},{"description":{"content":"<p>Date to filter purchase invoices changes - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-01-24T15:34:00"}],"variable":[]}},"response":[{"id":"4febe9fa-fd08-4efe-8426-b5e80d14fe1b","name":"Purchase Invoices - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purchaseInvoices?createdFrom=2018-09-17&createdTo=2020-09-30","host":["{{endpoint}}"],"path":["purchaseInvoices"],"query":[{"key":"createdFrom","value":"2018-09-17","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2020-09-30","description":"Final create date to filter invoices (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"buyerKey","value":"22","description":"Buyer Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"120","description":"Purchase Invoice Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"49084","description":"Purchase Invoice Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1049210322364-01","description":"Partner Purchase Order Number in ERP (optional - unitary search)","disabled":true},{"key":"nfeKey","value":null,"description":"NFe key (optional - unitary search)","type":"text","disabled":true},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional)","disabled":true},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date to filter purchase invoices changes - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Version","value":"1.1"},{"key":"FWRESTBUILD","value":"1.15.0717"},{"key":"Content-Type","value":"application/json"},{"key":"Status","value":"200 OK"},{"key":"Content-Encoding","value":"gzip"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=15"}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurchaseInvoices\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"purchaseInvoices\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-09T15:04:01\",\n    \"createdFrom\": \"2018-09-17\",\n    \"createdTo\": \"2020-09-30\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"branch\": \"01\",\n            \"branchName\": \"TESTE\",\n            \"branchTaxNumber\": \"  .   .   /    -  \",\n            \"buyerKey\": \"\",\n            \"erpKey\": \"1/000102345\",\n            \"docNum\": \"000102345\",\n            \"docSeries\": \"1\",\n            \"orderNum\": \"\",\n            \"docStatus\": \"D\",\n            \"docDate\": \"2020-09-01\",\n            \"docDueDate\": \"2020-09-01\",\n            \"taxDate\": \"2020-09-17\",\n            \"docValue\": 0,\n            \"nfeNum\": \"000102345\",\n            \"nfeSeries\": \"1\",\n            \"nfeType\": \"SPED\",\n            \"nfeModel\": \"55\",\n            \"nfeKeyAccess\": \"\",\n            \"nfeValue\": 0,\n            \"nfeAuthCode\": \"\",\n            \"nfeAuthProtocol\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null,\n            \"supplier\": {\n                \"type\": \"S\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"00000101\",\n                \"fullName\": \"PIXEL INFORMATICA EIRELI - ME\",\n                \"aliasName\": \"PIXEL INFO\",\n                \"email\": \"\",\n                \"phone\": \"47 33696269\",\n                \"phoneSecundary\": \"\",\n                \"cellular\": null,\n                \"taxNumber\": \"11061994000172\",\n                \"stateTaxNumber\": \"255.920.350\",\n                \"cityTaxNumber\": \"\",\n                \"contactPerson\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"RUA JOSE GUERREIRO FILHO 89\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"SALA 01\",\n                    \"community\": \"CENTRO\",\n                    \"city\": \"PORTO BELO\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"\",\n                    \"streetType\": null\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"RUA JOSE GUERREIRO FILHO 89\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"SALA 01\",\n                    \"community\": \"CENTRO\",\n                    \"city\": \"PORTO BELO\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"\",\n                    \"streetType\": null\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0001\",\n                    \"productKey\": \"MC000001\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"ADAPTADOR SATA DVD->HD\",\n                    \"quantity\": 1,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 99,\n                    \"taxBasis\": 99,\n                    \"usage\": \"\",\n                    \"cfop\": \"1556\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 99,\n                    \"unitCost\": 0\n                },\n                {\n                    \"lineNum\": \"0002\",\n                    \"productKey\": \"MC000002\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"SSD 120GB\",\n                    \"quantity\": 1,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 329,\n                    \"taxBasis\": 329,\n                    \"usage\": \"\",\n                    \"cfop\": \"1556\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 329,\n                    \"unitCost\": 0\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"payments\": null,\n            \"taxes\": null\n        }\n    ]\n}"},{"id":"f8f8f624-45f8-45f5-a39b-e297669cd7a9","name":"Purchase Invoices - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purchaseInvoices?createdFrom=2018-09-17&createdTo=2020-09-30","host":["{{endpoint}}"],"path":["purchaseInvoices"],"query":[{"key":"createdFrom","value":"2018-09-17","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2020-09-30","description":"Final create date to filter invoices (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"buyerKey","value":"22","description":"Buyer Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"120","description":"Purchase Invoice Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"49084","description":"Purchase Invoice Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1049210322364-01","description":"Partner Purchase Order Number in ERP (optional - unitary search)","disabled":true},{"key":"nfeKey","value":null,"description":"NFe key (optional - unitary search)","disabled":true},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional)","disabled":true},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date to filter purchase invoices changes - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Thu, 13 May 2021 22:11:35 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurchaseInvoices\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"purchaseInvoices\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.102\",\n    \"effectiveTimestamp\": \"2021-05-13T19:11:32\",\n    \"createdFrom\": \"2018-09-17\",\n    \"createdTo\": \"2020-09-30\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"buyerKey\": \"2\",\n            \"erpKey\": \"69\",\n            \"docNum\": \"69\",\n            \"orderNum\": \"\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2018-09-17\",\n            \"docDueDate\": \"2018-12-31\",\n            \"taxDate\": \"2018-09-17\",\n            \"docValue\": 24877.5,\n            \"taxValue\": 3109.69,\n            \"paymentCondition\": \"2\",\n            \"paymentMethod\": \"Pgto. Transf.\",\n            \"nfeSeries\": \"2\",\n            \"nfeNum\": \"1023\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 24877.5,\n            \"baseObject\": \"-1\",\n            \"baseKey\": \"\",\n            \"comments\": \"\",\n            \"customOrderKey\": \"\",\n            \"customStatus\": \"\",\n            \"customStatusNotify\": \"\",\n            \"createdAt\": \"2018-09-17T22:09:03\",\n            \"updatedAt\": \"2018-09-17T22:09:05\",\n            \"canceledAt\": null,\n            \"supplier\": {\n                \"type\": \"S\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"F003\",\n                \"docEntry\": \"3\",\n                \"fullName\": \"Oakley\",\n                \"aliasName\": \"\",\n                \"email\": \"oakley@oakley.com\",\n                \"phone\": \"7698-9832\",\n                \"phoneSecondary\": \"51\",\n                \"cellular\": \"51-9873-3248\",\n                \"taxNumber\": \"04.692.027/0002-24\",\n                \"stateTaxNumber\": \"206.198.106.117\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Farroupilha\",\n                    \"address2\": \"10° andar\",\n                    \"city\": \"Porto Alegre\",\n                    \"county\": \"4240\",\n                    \"postalCode\": \"32498\",\n                    \"stateCode\": \"RS\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Jardins\",\n                    \"exteriorNumber\": \"2312\",\n                    \"streetType\": \"Av.\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"das Nações Unidas\",\n                    \"address2\": \"6° andar\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"04795-100\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Brooklin\",\n                    \"exteriorNumber\": \"14.171\",\n                    \"streetType\": \"Av.\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I014\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Óculos LIMITED EDITION RADAR® PATH™\",\n                    \"quantity\": 10,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 2125,\n                    \"taxBasis\": 21250,\n                    \"usage\": \"5\",\n                    \"cfop\": \"1101\",\n                    \"whsCode\": \"05\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 1487.5,\n                    \"freightValue\": 0,\n                    \"grossValue\": 26562.5,\n                    \"unitCost\": 0,\n                    \"costCenter\": \"\",\n                    \"accountCode\": \"1.1.3.1.1\",\n                    \"financialProject\": \"\",\n                    \"comments\": \"\",\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 21250,\n                            \"taxRate\": 18,\n                            \"taxValue\": 3825\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 21250,\n                            \"taxRate\": 7,\n                            \"taxValue\": 1487.5\n                        }\n                    ]\n                },\n                {\n                    \"lineNum\": \"1\",\n                    \"productKey\": \"I015\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Lentes de Reposição\",\n                    \"quantity\": 20,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 100,\n                    \"taxBasis\": 2000,\n                    \"usage\": \"5\",\n                    \"cfop\": \"1101\",\n                    \"whsCode\": \"05\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 140,\n                    \"freightValue\": 0,\n                    \"grossValue\": 2500,\n                    \"unitCost\": 0,\n                    \"costCenter\": \"\",\n                    \"accountCode\": \"1.1.3.1.1\",\n                    \"financialProject\": \"\",\n                    \"comments\": \"\",\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 2000,\n                            \"taxRate\": 18,\n                            \"taxValue\": 360\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 2000,\n                            \"taxRate\": 7,\n                            \"taxValue\": 140\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 21767.81,\n                    \"grossValue\": 24877.5,\n                    \"baseValue\": 24877.5,\n                    \"taxValue\": 3109.69\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 23250,\n                    \"grossValue\": 23250,\n                    \"baseValue\": 23250,\n                    \"taxValue\": 0\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"payments\": [\n                {\n                    \"erpKey\": \"1300\",\n                    \"lineNum\": \"0\",\n                    \"docDueDate\": \"2018-10-30\",\n                    \"status\": \"O\",\n                    \"docValue\": 7255.21,\n                    \"docBalance\": 7255.21\n                },\n                {\n                    \"erpKey\": \"1300\",\n                    \"lineNum\": \"1\",\n                    \"docDueDate\": \"2018-11-30\",\n                    \"status\": \"O\",\n                    \"docValue\": 7255.21,\n                    \"docBalance\": 7255.21\n                },\n                {\n                    \"erpKey\": \"1300\",\n                    \"lineNum\": \"2\",\n                    \"docDueDate\": \"2018-12-31\",\n                    \"status\": \"O\",\n                    \"docValue\": 7257.39,\n                    \"docBalance\": 7257.39\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"805760e7-74c1-4398-b7be-3eb3862dd5b6"},{"name":"Purchase Invoices*","id":"262eeebc-f276-48c0-afd9-e7118d29d4e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"branch\": \"1\",\r\n    \"docStatus\": \"D\",\r\n    \"docDate\": \"2020-09-14\",\r\n\r\n    \"nfeFinality\": 1,\r\n\r\n    \"nfeNum\": \"36871\",\r\n    \"nfeSeries\": \"2\",\r\n    \"nfeModel\": \"55\",\r\n    \"nfeKeyAccess\": \"42200905343620000147550020000368711001058821\",\r\n    \"nfeAuthCode\": 100,\r\n    \"nfeAuthProtocol\": \"135200844436206\",\r\n    \"nfeValue\": 14075.19,\r\n\r\n    \"baseKey *\": \"\",\r\n    \"whsCode *\": \"\",\r\n    \"mainUsage *\": \"\",\r\n    \"orderNum *\": \"\",\r\n\r\n\t\"totalWeight\": 2040.000,\r\n    \"totalGrossWeight\": 2110.000,\r\n\t\"totalVolume\": 5,\r\n    \"volumeName\": \"VOLUMES\",\r\n    \"comments\": \"IPI SUSP. CFE. ART. 29 PAR 1 ITEM 1 LETRA A DA LEI 10637 DE 31/12/02 ICMS Dif. Pro-emprego decr N105 de 14/03/2007 Res. 113/2008-055 Vig. 31/12/2007 Conv. Pela lei 13992 de 15/02/2004 Art. 18 Par\",\r\n    \"supplierComments\": \"DADOS PARA DEPOSITO: Banco do Brasil | Ag 95-7 | CC 3535-1 PEDIDO: 5500003375 ORDEM DE COMPRA: 5500003375\",\r\n\r\n    \"supplier\": {\r\n\t\t\"type\": \"S\",\r\n\t\t\"taxType\": \"C\",\r\n\t\t\"partnerId\": \"\",\r\n\t\t\"fullName\": \"TUPY S/A\",\r\n\t\t\"aliasName\": \"TUPY S/A\",\r\n\t\t\"email\": \"recebe.nfe@tupy.com.br\",\r\n\t\t\"phone\": \"4740098181\",\r\n\t\t\"phoneSecondary\": \"\",\r\n\t    \"cellular\": \"\",\r\n\t\t\"taxNumber\": \"84683374000300\",\r\n\t\t\"stateTaxNumber\": \"255505256\",\r\n\t\t\"cityTaxNumber\": \"\",\r\n\t\t\"billingAddress\": {\r\n            \"address1\": \"R ALBANO SCHMIDT\",\r\n            \"address2\": \"\",\r\n            \"city\": \"JOINVILLE\",\r\n            \"postalCode\": \"89227901\",\r\n            \"stateCode\": \"SC\",\r\n            \"*county\": \"4209102\",\r\n            \"community\": \"BOA VISTA\",\r\n            \"exteriorNumber\": \"3400\",\r\n            \"streetType\": \"Rua\",\r\n            \"countryCode\": \"BR\"\r\n\t\t}\r\n    },\r\n\r\n\t\"items\": [\r\n\t\t{\r\n\t\t\t\"lineNum\": \"1\",\r\n\t\t\t\"productKey\": \"PA12800003\",\r\n            \"productName\": \"PC.REFRAT. NOZZLE RETO VALVULA 24MM EZ 96 AL P - EZP 471.24 (5500003375-170)\",\r\n            \"ncm\": \"69029090\",\r\n\r\n            \"orderNum\": \"5500003375\",\r\n            \"orderLineNum\": 170,\r\n            \"baseKey*\": \"\",\r\n            \"baseLineNum*\": 0,\r\n\r\n\t\t\t\"quantity\": 5.0000,\r\n            \"unit\": \"UN\",\r\n            \"unitPrice\": 27.15000000,\r\n            \"taxBasis\": 135.75,\r\n\r\n            \"cfop\": \"5101\",\r\n            \"discountRate\": 0,\r\n            \"taxValue\": 0.00,\r\n            \"freightValue\": 0.00,\r\n            \"grossValue\": 135.75,\r\n\r\n            \"itemTaxes\": [\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"ICMS51\",\r\n                    \"taxSituationCode\": \"51\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"IPI\",\r\n                    \"taxSituationCode\": \"55\",\r\n                    \"framingCode\": \"122\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"PIS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 135.75,\r\n                    \"taxRate\": 1.6500,\r\n                    \"taxValue\": 2.23\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"COFINS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 135.75,\r\n                    \"taxRate\": 7.6000,\r\n                    \"taxValue\": 10.31\r\n                }\r\n            ]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"lineNum\": \"2\",\r\n\t\t\t\"productKey\": \"PA11340064\",\r\n            \"productName\": \"TIJ.REFRAT. AE 229X114-106X40-37 EZ 810 CR (5500003375-190)\",\r\n            \"ncm\": \"69029090\",\r\n\r\n            \"orderNum\": \"5500003375\",\r\n            \"orderLineNum\": 190,\r\n\r\n\t\t\t\"quantity\": 440.0000,\r\n            \"unit\": \"PC\",\r\n            \"unitPrice\": 22.73000000,\r\n            \"taxBasis\": 10001.20,\r\n\r\n            \"cfop\": \"5101\",\r\n            \"discountRate\": 0,\r\n            \"taxValue\": 0.00,\r\n            \"freightValue\": 0.00,\r\n            \"grossValue\": 10001.20,\r\n\r\n            \"itemTaxes\": [\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"ICMS51\",\r\n                    \"taxSituationCode\": \"51\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"IPI\",\r\n                    \"taxSituationCode\": \"55\",\r\n                    \"framingCode\": \"122\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"PIS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 10001.20,\r\n                    \"taxRate\": 1.6500,\r\n                    \"taxValue\": 165.01\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"COFINS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 10001.20,\r\n                    \"taxRate\": 7.6000,\r\n                    \"taxValue\": 760.09\r\n                }\r\n            ]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"lineNum\": \"3\",\r\n\t\t\t\"productKey\": \"PA11100283\",\r\n            \"productName\": \"TIJ.REFRAT. P 229X114X76 EZ 810 CR (5500003375-30)\",\r\n            \"ncm\": \"69029090\",\r\n\r\n            \"orderNum\": \"5500003375\",\r\n            \"orderLineNum\": 30,\r\n\r\n\t\t\t\"quantity\": 100.0000,\r\n            \"unit\": \"PC\",\r\n            \"unitPrice\": 29.87000000,\r\n            \"taxBasis\": 2987.00,\r\n\r\n            \"cfop\": \"5101\",\r\n            \"discountRate\": 0,\r\n            \"taxValue\": 0.00,\r\n            \"freightValue\": 0.00,\r\n            \"grossValue\": 2987.00,\r\n\r\n            \"itemTaxes\": [\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"ICMS51\",\r\n                    \"taxSituationCode\": \"51\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"IPI\",\r\n                    \"taxSituationCode\": \"55\",\r\n                    \"framingCode\": \"122\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"PIS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 2987.00,\r\n                    \"taxRate\": 1.6500,\r\n                    \"taxValue\": 49.28\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"COFINS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 2987.00,\r\n                    \"taxRate\": 7.6000,\r\n                    \"taxValue\": 227.01\r\n                }\r\n            ]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"lineNum\": \"4\",\r\n\t\t\t\"productKey\": \"PA12930057\",\r\n            \"productName\": \"CONJ. BICA MECANA DFP 1889 FLOW 31/7 (20000490) - SECADA (5500003375-460)\",\r\n            \"ncm\": \"69029090\",\r\n\r\n            \"orderNum\": \"5500003375\",\r\n            \"orderLineNum\": 460,\r\n\r\n\t\t\t\"quantity\": 6.0000,\r\n            \"unit\": \"PC\",\r\n            \"unitPrice\": 158.54000000,\r\n            \"taxBasis\": 951.24,\r\n\r\n            \"cfop\": \"5101\",\r\n            \"discountRate\": 0,\r\n            \"taxValue\": 0.00,\r\n            \"freightValue\": 0.00,\r\n            \"grossValue\": 951.24,\r\n\r\n            \"itemTaxes\": [\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"ICMS51\",\r\n                    \"taxSituationCode\": \"51\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"IPI\",\r\n                    \"taxSituationCode\": \"55\",\r\n                    \"framingCode\": \"122\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"PIS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 951.24,\r\n                    \"taxRate\": 1.6500,\r\n                    \"taxValue\": 15.69\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"COFINS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 951.24,\r\n                    \"taxRate\": 7.6000,\r\n                    \"taxValue\": 72.29\r\n                }\r\n            ]\r\n\t\t}\r\n\t],\r\n\r\n    \"shipment\": {\r\n            \"shippingMethod\": \"0\",\r\n            \"carrierName\": \"EKW DO BRASIL - PRODUTOS REFRATARIOS LTD\",\r\n            \"carrierTaxNumber\": \"05343620000147\",\r\n            \"carrierStateTaxNumber\": \"254480942\",\r\n            \"carrierAddress\": \"RUA VICTOR KONELL\",\r\n            \"carrierCity\": \"POMERODE\",\r\n            \"carrierState\": \"SC\",\r\n            \"carrierPlate\": \"\",\r\n\r\n            \"shippingAddress\": {\r\n\t\t\t\t\"address1\": \"R ALBANO SCHMIDT\",\r\n\t\t\t\t\"address2\": \"\",\r\n\t\t\t\t\"city\": \"JOINVILLE\",\r\n\t\t\t\t\"postalCode\": \"89227901\",\r\n\t\t\t\t\"stateCode\": \"SC\",\r\n                \"*county\": \"4209102\",\r\n\t\t\t\t\"community\": \"BOA VISTA\",\r\n\t\t\t\t\"exteriorNumber\": \"3400\",\r\n\t\t\t\t\"streetType\": \"Rua\",\r\n\t\t\t\t\"countryCode\": \"BR\"\r\n            }\r\n    },\r\n\r\n    \"totals\": {\r\n        \"invoiceTotal\": {\r\n            \"netValue\": 14075.19,\r\n            \"grossValue\": 14075.19,\r\n            \"baseValue\": 14075.19,\r\n            \"taxValue\": 0\r\n        },\r\n        \"merchandizeTotal\": {\r\n            \"netValue\": 14075.19,\r\n            \"grossValue\": 14075.19,\r\n            \"baseValue\": 14075.19,\r\n            \"taxValue\": 0,\r\n            \"priceAdjustValue\": 0,\r\n            \"priceAdjustType\": \"\",\r\n            \"priceAdjustPromotionId\": \"\",\r\n            \"priceAdjustCouponId\": \"\"\r\n        },\r\n        \"shippingTotal\": {\r\n            \"netValue\": 0.00,\r\n            \"grossValue\": 0.00,\r\n            \"baseValue\": 0.00,\r\n            \"taxValue\": 0,\r\n            \"shipAdjustValue\": 0,\r\n            \"shipAdjustType\": \"\",\r\n            \"shipAdjustPromotionId\": \"\",\r\n            \"shipAdjustCouponId\": \"\"\r\n        }\r\n    },\r\n\r\n\t\"payments\": [\r\n\t\t{\r\n\t\t\t\"paymentMethod\": \"boe\",\r\n\t\t\t\"amount\": 14075.19,\r\n\t\t\t\"installments\": 1,\r\n\t\t\t\"details\": {\r\n                \"boeNum\": \"001\",\r\n                \"boeDueDate\": \"2020-10-14\",\r\n                \"boeOurNum\": \"\",\r\n                \"boeCodeBars\": \"\"\r\n\t\t\t}\r\n\t\t}\r\n\t],\r\n\r\n    \"taxes\": [\r\n        {\r\n            \"taxCode\": \"ICMS\",\r\n            \"taxBasis\": 0.00,\r\n            \"taxValue\": 0.00\r\n        },\r\n        {\r\n            \"taxCode\": \"IPI\",\r\n            \"taxBasis\": 0.00,\r\n            \"taxValue\": 0.00\r\n        },\r\n        {\r\n            \"taxCode\": \"PIS\",\r\n            \"taxBasis\": 14075.19,\r\n            \"taxValue\": 232.21\r\n        },\r\n        {\r\n            \"taxCode\": \"COFINS\",\r\n            \"taxBasis\": 14075.19,\r\n            \"taxValue\": 1069.70\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/purchaseInvoices","description":"<h4 id=\"insert-purchase-invoice-in-erp\">Insert purchase invoice in ERP</h4>\n<p><em>(sapBusinessOne=18/OPCH, totvsProtheus=SF1)</em></p>\n<h2 id=\"not-yet-available-release-in-2020-q4\">&lt;&lt;&lt; NOT YET AVAILABLE. RELEASE IN 2020 Q4 &gt;&gt;&gt;</h2>\n<p>This service will allow to insert a new purchase invoice in the ERP. To insert a draft purchase invoice send the filed <code>docStatus</code> as \"D\" in request.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new purchase invoice will be insert with or without a purchase order. If you informe a purchase order in request, it is located and validated on the ERP. The key for locating the purchase order on the ERP can be:</p>\n<ul>\n<li>SAP Business One: OPOR.DocEntry = <code>baseKey</code> or OPOR.DocNum = <code>baseNum</code> or OPOR.NumAtCard = <code>orderNum</code></li>\n<li>TOTVS Protheus: C7_NUM = <code>baseKey</code> or R_E_C_N_O_ = <code>baseNum</code> or C7_NUMIMP = <code>orderNum</code></li>\n</ul>\n<p>Products: [1] <code>productKey</code> or <code>codeBars</code>, [2] <code>purchaseOrder</code> + <code>lineNum</code>, [3] table product x supplier (TOTVS Protheus only), [4] generic product (GP PurInvGenericProduct).</p>\n<p>Products sent to the service will be validated for the search key, purchase order line number (if informed) and quantity. Products can be identified in the ERP in 2 ways:</p>\n<ul>\n<li>SAP B1: [1] OITM.CodeBars = <code>codeBars</code> or OITM.ItemCode = <code>productKey</code>, [2] <code>purchaseOrder</code> + <code>lineNum</code>, [3] generic product (GP PurInvGenericProduct).</li>\n<li>TOTVS Protheus: [1] B1_CODBAR = <code>codeBars</code> or B1_COD = <code>productKey</code>, [2] <code>purchaseOrder</code> + <code>lineNum</code>, [3] table product x supplier (SA5), [4] generic product (GP PurInvGenericProduct).</li>\n</ul>\n<p>In addition to the purchase invoice, the service may or may not include outcoming payments. Outcoming Paymnets has origin from the data received in the request in the <code>payments</code> block.</p>\n<p>For the use of user fields (UDF) created in the table of purchase invoices (SAPB1: OPCH, TOTVS: SF1), the respective registration must be performed in the Custom Table.</p>\n<h4 id=\"request-object-has-the-following-properties\">Request object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>branch</td>\n<td>number</td>\n<td>Branch</td>\n</tr>\n<tr>\n<td>baseKey</td>\n<td>string</td>\n<td>Base Key</td>\n</tr>\n<tr>\n<td>totalWeight</td>\n<td>number</td>\n<td>Total Weight</td>\n</tr>\n<tr>\n<td>totalVolume</td>\n<td>number</td>\n<td>Total Volume</td>\n</tr>\n<tr>\n<td>totalCubage</td>\n<td>number</td>\n<td>Total cubage</td>\n</tr>\n<tr>\n<td>items</td>\n<td>array</td>\n<td>invoice Items Object</td>\n</tr>\n<tr>\n<td>items.lineNum</td>\n<td>string</td>\n<td>number line</td>\n</tr>\n<tr>\n<td>items.productKey</td>\n<td>string</td>\n<td>Product key</td>\n</tr>\n<tr>\n<td>items.codeBars</td>\n<td>string</td>\n<td>Code bars</td>\n</tr>\n<tr>\n<td>items.quantity</td>\n<td>number</td>\n<td>quantity</td>\n</tr>\n<tr>\n<td>payments</td>\n<td>array</td>\n<td>Method</td>\n</tr>\n<tr>\n<td>payments.paymentMethod</td>\n<td>string</td>\n<td>Payment Method</td>\n</tr>\n<tr>\n<td>payments.amount</td>\n<td>number</td>\n<td>Amount</td>\n</tr>\n<tr>\n<td>payments.installments</td>\n<td>number</td>\n<td>installments</td>\n</tr>\n<tr>\n<td>payments.paymentMethod</td>\n<td>string</td>\n<td>Payment Method</td>\n</tr>\n<tr>\n<td>payments.amount</td>\n<td>number</td>\n<td>Amount</td>\n</tr>\n<tr>\n<td>payments.installments</td>\n<td>number</td>\n<td>installments</td>\n</tr>\n<tr>\n<td>payments.details</td>\n<td>object</td>\n<td>details</td>\n</tr>\n<tr>\n<td>payments.details.cardName</td>\n<td>string</td>\n<td>Card name</td>\n</tr>\n<tr>\n<td>payments.details.acquirer</td>\n<td>string</td>\n<td>Acquire</td>\n</tr>\n<tr>\n<td>payments.details.tid</td>\n<td>string</td>\n<td>tid</td>\n</tr>\n<tr>\n<td>payments.details.authid</td>\n<td>string</td>\n<td>Authid</td>\n</tr>\n<tr>\n<td>payments.details.nsu</td>\n<td>string</td>\n<td>nsu</td>\n</tr>\n</tbody>\n</table>\n</div><p>* = <em>Required field</em></p>\n<h4 id=\"response-object-has-the-following-properties\">Response object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>package</td>\n<td>string</td>\n<td>package</td>\n</tr>\n<tr>\n<td>process</td>\n<td>string</td>\n<td>Process</td>\n</tr>\n<tr>\n<td>system</td>\n<td>string</td>\n<td>System</td>\n</tr>\n<tr>\n<td>target</td>\n<td>string</td>\n<td>Target</td>\n</tr>\n<tr>\n<td>user</td>\n<td>string</td>\n<td>User</td>\n</tr>\n<tr>\n<td>host</td>\n<td>string</td>\n<td>Host</td>\n</tr>\n<tr>\n<td>effectiveTimestamp</td>\n<td>string</td>\n<td>Effective Time stamp</td>\n</tr>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>Code</td>\n</tr>\n<tr>\n<td>success</td>\n<td>booleano</td>\n<td>success</td>\n</tr>\n<tr>\n<td>values</td>\n<td>array</td>\n<td>values</td>\n</tr>\n<tr>\n<td>values.object</td>\n<td>string</td>\n<td>Object</td>\n</tr>\n<tr>\n<td>values.table</td>\n<td>string</td>\n<td>Table</td>\n</tr>\n<tr>\n<td>values.action</td>\n<td>string</td>\n<td>action</td>\n</tr>\n<tr>\n<td>values.erpKey</td>\n<td>string</td>\n<td>Erp key</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseInvoices"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"9a39d57c-b236-46e2-a230-d51a0311267a","name":"Purchase Invoices","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"branch\": \"1\",\r\n    \"docNum\": \"36871\",\r\n    \"docSeries\": \"2\",\r\n    \"docStatus\": \"D\",\r\n    \"docDate\": \"2020-09-14\",\r\n    \"docDueDate\": \"2020-09-14\",\r\n    \"taxDate\": \"2020-09-14\",\r\n    \"docValue\": 14075.19,\r\n\r\n    //\"environmentType\": 1,\r\n    //\"nfeFinality\": 1,\r\n    //\"indFinal\": 1,\r\n    //\"indPres\": 9,\r\n\r\n    \"nfeNum\": \"36871\",\r\n    \"nfeSeries\": \"2\",\r\n    \"nfeType\": \"NFe\",\r\n    \"nfeModel\": \"55\",\r\n    \"nfeKey\": \"42200905343620000147550020000368711001058821\",\r\n    \"nfeValue\": 14075.19,\r\n\r\n\t//\"baseKey\": \"000020\",\r\n    //\"baseNum\": \"\",\r\n    //\"baseOrderNum\": \"042688\",\r\n\r\n\t\"totalWeight\": 2040.000,\r\n    \"totalGrossWeight\": 2110.000,\r\n\t\"totalVolume\": 5,\r\n\t\"totalCubage\": 0,\r\n    \"volumeName\": \"VOLUMES\",\r\n    \"comments\": \"IPI SUSP. CFE. ART. 29 PAR 1 ITEM 1 LETRA A DA LEI 10637 DE 31/12/02 ICMS Dif. Pro-emprego decr N105 de 14/03/2007 Res. 113/2008-055 Vig. 31/12/2007 Conv. Pela lei 13992 de 15/02/2004 Art. 18 Par\",\r\n    \"partnerComments\": \"DADOS PARA DEPOSITO: Banco do Brasil | Ag 95-7 | CC 3535-1 PEDIDO: 5500003375 ORDEM DE COMPRA: 5500003375\",\r\n\r\n    \"buyerKey\": null,\r\n    \"mainUsage\": null,\r\n    \"whsCode\": null,\r\n\r\n    \"partner\": {\r\n\t\t\"type\": \"S\",\r\n\t\t\"taxType\": \"C\",\r\n\t\t\"partnerId\": \"\",\r\n\t\t\"fullName\": \"TUPY S/A\",\r\n\t\t\"aliasName\": \"TUPY S/A\",\r\n\t\t\"email\": \"recebe.nfe@tupy.com.br\",\r\n\t\t\"phone\": \"4740098181\",\r\n\t\t\"phoneSecondary\": \"\",\r\n\t    \"cellular\": \"\",\r\n\t\t\"taxNumber\": \"84683374000300\",\r\n\t\t\"stateTaxNumber\": \"255505256\",\r\n\t\t\"cityTaxNumber\": \"\",\r\n\t\t\"billingAddress\": {\r\n            \"address1\": \"R ALBANO SCHMIDT\",\r\n            \"address2\": \"\",\r\n            \"city\": \"JOINVILLE\",\r\n            \"postalCode\": \"89227901\",\r\n            \"stateCode\": \"SC\",\r\n            \"county\": \"4209102\",\r\n            \"community\": \"BOA VISTA\",\r\n            \"exteriorNumber\": \"3400\",\r\n            \"streetType\": \"Rua\",\r\n            \"countryCode\": \"BR\"\r\n\t\t}\r\n    },\r\n\r\n\t\"items\": [\r\n\t\t{\r\n\t\t\t\"lineNum\": \"1\",\r\n\t\t\t\"productKey\": \"PA12800003\",\r\n            \"codeBars\": \"\",\r\n            \"productName\": \"PC.REFRAT. NOZZLE RETO VALVULA 24MM EZ 96 AL P - EZP 471.24 (5500003375-170)\",\r\n            \"ncm\": \"69029090\",\r\n\r\n            \"orderNum\": \"5500003375\",\r\n            \"orderLineNum\": 170,\r\n\r\n\t\t\t\"quantity\": 5.0000,\r\n            \"unit\": \"UN\",\r\n            \"unitPrice\": 27.15000000,\r\n            \"taxBasis\": 135.75,\r\n\r\n            //\"usage\": null,\r\n            \"cfop\": \"5101\",\r\n            \"discountRate\": 0,\r\n            \"taxValue\": 0.00,\r\n            \"freightValue\": 0.00,\r\n            \"grossValue\": 135.75,\r\n            //\"unitCost\": 83.39,\r\n\r\n            \"itemTaxes\": [\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"ICMS51\",\r\n                    \"taxSituationCode\": \"51\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"IPI\",\r\n                    \"taxSituationCode\": \"55\",\r\n                    \"framingCode\": \"122\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"PIS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 135.75,\r\n                    \"taxRate\": 1.6500,\r\n                    \"taxValue\": 2.23\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"COFINS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 135.75,\r\n                    \"taxRate\": 7.6000,\r\n                    \"taxValue\": 10.31\r\n                }\r\n            ]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"lineNum\": \"2\",\r\n\t\t\t\"productKey\": \"PA11340064\",\r\n            \"codeBars\": \"\",\r\n            \"productName\": \"TIJ.REFRAT. AE 229X114-106X40-37 EZ 810 CR (5500003375-190)\",\r\n            \"ncm\": \"69029090\",\r\n\r\n            \"orderNum\": \"5500003375\",\r\n            \"orderLineNum\": 190,\r\n\r\n\t\t\t\"quantity\": 440.0000,\r\n            \"unit\": \"PC\",\r\n            \"unitPrice\": 22.73000000,\r\n            \"taxBasis\": 10001.20,\r\n\r\n            //\"usage\": null,\r\n            \"cfop\": \"5101\",\r\n            \"discountRate\": 0,\r\n            \"taxValue\": 0.00,\r\n            \"freightValue\": 0.00,\r\n            \"grossValue\": 10001.20,\r\n            //\"unitCost\": 83.39,\r\n\r\n            \"itemTaxes\": [\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"ICMS51\",\r\n                    \"taxSituationCode\": \"51\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"IPI\",\r\n                    \"taxSituationCode\": \"55\",\r\n                    \"framingCode\": \"122\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"PIS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 10001.20,\r\n                    \"taxRate\": 1.6500,\r\n                    \"taxValue\": 165.01\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"COFINS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 10001.20,\r\n                    \"taxRate\": 7.6000,\r\n                    \"taxValue\": 760.09\r\n                }\r\n            ]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"lineNum\": \"3\",\r\n\t\t\t\"productKey\": \"PA11100283\",\r\n            \"codeBars\": \"\",\r\n            \"productName\": \"TIJ.REFRAT. P 229X114X76 EZ 810 CR (5500003375-30)\",\r\n            \"ncm\": \"69029090\",\r\n\r\n            \"orderNum\": \"5500003375\",\r\n            \"orderLineNum\": 30,\r\n\r\n\t\t\t\"quantity\": 100.0000,\r\n            \"unit\": \"PC\",\r\n            \"unitPrice\": 29.87000000,\r\n            \"taxBasis\": 2987.00,\r\n\r\n            //\"usage\": null,\r\n            \"cfop\": \"5101\",\r\n            \"discountRate\": 0,\r\n            \"taxValue\": 0.00,\r\n            \"freightValue\": 0.00,\r\n            \"grossValue\": 2987.00,\r\n            //\"unitCost\": 83.39,\r\n\r\n            \"itemTaxes\": [\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"ICMS51\",\r\n                    \"taxSituationCode\": \"51\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"IPI\",\r\n                    \"taxSituationCode\": \"55\",\r\n                    \"framingCode\": \"122\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"PIS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 2987.00,\r\n                    \"taxRate\": 1.6500,\r\n                    \"taxValue\": 49.28\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"COFINS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 2987.00,\r\n                    \"taxRate\": 7.6000,\r\n                    \"taxValue\": 227.01\r\n                }\r\n            ]\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"lineNum\": \"4\",\r\n\t\t\t\"productKey\": \"PA12930057\",\r\n            \"codeBars\": \"\",\r\n            \"productName\": \"CONJ. BICA MECANA DFP 1889 FLOW 31/7 (20000490) - SECADA (5500003375-460)\",\r\n            \"ncm\": \"69029090\",\r\n\r\n            \"orderNum\": \"5500003375\",\r\n            \"orderLineNum\": 460,\r\n\r\n\t\t\t\"quantity\": 6.0000,\r\n            \"unit\": \"PC\",\r\n            \"unitPrice\": 158.54000000,\r\n            \"taxBasis\": 951.24,\r\n\r\n            //\"usage\": null,\r\n            \"cfop\": \"5101\",\r\n            \"discountRate\": 0,\r\n            \"taxValue\": 0.00,\r\n            \"freightValue\": 0.00,\r\n            \"grossValue\": 951.24,\r\n            //\"unitCost\": 83.39,\r\n\r\n            \"itemTaxes\": [\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"ICMS51\",\r\n                    \"taxSituationCode\": \"51\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"IPI\",\r\n                    \"taxSituationCode\": \"55\",\r\n                    \"framingCode\": \"122\",\r\n                    \"taxBasis\": 0.00,\r\n                    \"taxRate\": 0,\r\n                    \"taxValue\": 0.00\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"PIS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 951.24,\r\n                    \"taxRate\": 1.6500,\r\n                    \"taxValue\": 15.69\r\n                },\r\n                {\r\n                    \"taxRelate\": \"product\",\r\n                    \"taxCode\": \"COFINS\",\r\n                    \"taxSituationCode\": \"01\",\r\n                    \"taxBasis\": 951.24,\r\n                    \"taxRate\": 7.6000,\r\n                    \"taxValue\": 72.29\r\n                }\r\n            ]\r\n\t\t}\r\n\t],\r\n\r\n    \"shipment\": {\r\n            \"shippingMethod\": \"0\",\r\n            \"carrierMessage\": \"\",\r\n            \"shippingAddress\": {\r\n\t\t\t\t\"address1\": \"R ALBANO SCHMIDT\",\r\n\t\t\t\t\"address2\": \"\",\r\n\t\t\t\t\"city\": \"JOINVILLE\",\r\n\t\t\t\t\"postalCode\": \"89227901\",\r\n\t\t\t\t\"stateCode\": \"SC\",\r\n                \"county\": \"4209102\",\r\n\t\t\t\t\"community\": \"BOA VISTA\",\r\n\t\t\t\t\"exteriorNumber\": \"3400\",\r\n\t\t\t\t\"streetType\": \"Rua\",\r\n\t\t\t\t\"countryCode\": \"BR\"\r\n            },\r\n\r\n            \"carrierKey\": null,\r\n            \"carrierName\": \"EKW DO BRASIL - PRODUTOS REFRATARIOS LTD\",\r\n            \"carrierTaxNumber\": \"05343620000147\",\r\n            \"carrierStateTaxNumber\": \"254480942\",\r\n            \"carrierAddress\": \"RUA VICTOR KONELL\",\r\n            \"carrierCity\": \"POMERODE\",\r\n            \"carrierState\": \"SC\",\r\n            \"carrierPlate\": \"\",\r\n            \"carrierTrackingLink\": \"\"\r\n    },\r\n\r\n    \"totals\": {\r\n        \"invoiceTotal\": {\r\n            \"netValue\": 14075.19,\r\n            \"grossValue\": 14075.19,\r\n            \"baseValue\": 14075.19,\r\n            \"taxValue\": 0\r\n        },\r\n        \"merchandizeTotal\": {\r\n            \"netValue\": 14075.19,\r\n            \"grossValue\": 14075.19,\r\n            \"baseValue\": 14075.19,\r\n            \"taxValue\": 0,\r\n            \"priceAdjustValue\": 0,\r\n            \"priceAdjustType\": \"\",\r\n            \"priceAdjustPromotionId\": \"\",\r\n            \"priceAdjustCouponId\": \"\"\r\n        },\r\n        \"shippingTotal\": {\r\n            \"netValue\": 0.00,\r\n            \"grossValue\": 0.00,\r\n            \"baseValue\": 0.00,\r\n            \"taxValue\": 0,\r\n            \"shipAdjustValue\": 0,\r\n            \"shipAdjustType\": \"\",\r\n            \"shipAdjustPromotionId\": \"\",\r\n            \"shipAdjustCouponId\": \"\"\r\n        }\r\n    },\r\n\r\n\t\"payments\": [\r\n\t\t{\r\n\t\t\t\"paymentMethod\": \"boe\",\r\n\t\t\t\"amount\": 14075.19,\r\n\t\t\t\"installments\": 1,\r\n\t\t\t\"details\": {\r\n                \"boeNum\": \"001\",\r\n                \"boeDueDate\": \"2020-10-14\",\r\n                \"boeOurNum\": \"\",\r\n                \"boeCodeBars\": \"\"\r\n\t\t\t}\r\n\t\t}\r\n\t],\r\n\r\n    \"taxes\": [\r\n        {\r\n            \"taxCode\": \"ICMS\",\r\n            \"taxBasis\": 0.00,\r\n            \"taxValue\": 0.00\r\n        },\r\n        {\r\n            \"taxCode\": \"IPI\",\r\n            \"taxBasis\": 0.00,\r\n            \"taxValue\": 0.00\r\n        },\r\n        {\r\n            \"taxCode\": \"PIS\",\r\n            \"taxBasis\": 14075.19,\r\n            \"taxValue\": 232.21\r\n        },\r\n        {\r\n            \"taxCode\": \"COFINS\",\r\n            \"taxBasis\": 14075.19,\r\n            \"taxValue\": 1069.70\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/purchaseInvoices"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 11 Mar 2020 04:30:33 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"PurchaseInvoices\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"purchaseinvoices\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-03-11T01:30:10\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"18\",\n            \"table\": \"SF1\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"145345\"\n        }\n    ]\n}"}],"_postman_id":"262eeebc-f276-48c0-afd9-e7118d29d4e3"}],"id":"4f81ab34-7c9c-4edb-8787-67815789c5c6","_postman_id":"4f81ab34-7c9c-4edb-8787-67815789c5c6","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Purchase Returns NEW","item":[{"name":"Purchase Returns","id":"7cb102e8-f4ac-41e6-b2d0-a031afcae832","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{endpoint}}/purchaseReturns","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purchaseReturns"],"host":["{{endpoint}}"],"query":[{"disabled":true,"key":"createdFrom","value":"2021-11-01"},{"disabled":true,"key":"createdTo","value":"2021-11-31"},{"disabled":true,"key":"partnerKey","value":"C001"},{"disabled":true,"key":"docStatus","value":"O/A"},{"disabled":true,"key":"erpKey","value":"2"},{"disabled":true,"key":"docNum","value":"122608"},{"disabled":true,"key":"pageNum","value":"1"},{"disabled":true,"key":"updatedAt","value":"2021-12-01T00:00:00"}],"variable":[]}},"response":[],"_postman_id":"7cb102e8-f4ac-41e6-b2d0-a031afcae832"}],"id":"03e2668b-825f-4972-b4c9-957e8ccf55aa","_postman_id":"03e2668b-825f-4972-b4c9-957e8ccf55aa","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Payables","item":[{"name":"Payables","id":"940b6267-d194-410f-a4ab-ea12d267e6ec","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/payables?createdFrom=2020-01-24&createdTo=2020-12-24&branch=1&dueFrom=2020-01-24&dueTo=2020-01-24&partnerKey=C000004&erpKey=120&pageNum=1&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-payables-in-erp\">Search payables in ERP</h4>\n<p><em>(sapBusinessOne=30/OJDT, totvsProtheus=SE2)</em></p>\n<p>The search of payables allows you to filter the ERP by:</p>\n<ul>\n<li>List Search: by <code>createdFrom</code> + <code>createdTo</code> {required}, by <code>dueFrom</code> + <code>dueTo</code>, <code>branch</code>, <code>partnerKey</code>, <code>buyerKey</code> {optional}</li>\n<li>Unitary Search: by <code>erpKey</code></li>\n</ul>\n<p>If no field for unitary query (<code>erpKey</code>) is informed in the request, the search for payables is performed as a list.</p>\n<p>The payables service will consider payables:</p>\n<ul>\n<li>SAP Business One: [1] Linked to partners who have a balance, [2] Reconciled (OITR / ITR1)</li>\n<li>TOTVS Protheus: [1] With balance: E2_SALDO&gt; 0</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (JDT1.BPLId), TOTVS Protheus (E2_FILIAL)</li>\n<li><code>createdFrom</code> and <code>createdTo</code>: SAP Business One (JDT1.RefDate), TOTVS Protheus (E2_EMISSAO)</li>\n<li><code>dueFrom</code> and <code>dueTo</code>: SAP Business One (JDT1.DueDate, TOTVS Protheus (E2_VENCREA)</li>\n<li><code>erpKey</code>: SAP Business One (JDT1.TransIf), TOTVS Protheus (E2_PREFIXO+”_”+E2_NUM)</li>\n</ul>\n<p>This service will allow you to search the payables list in two situations:</p>\n<ul>\n<li>Full Search: will result in all registers from a specific branch that had a status change in the <code>createdFrom</code> / <code>createdTo</code> period. </li>\n<li>Incremental Search: will result in all registers that have changed status in the <code>createdFrom</code> / <code>createdTo</code> period and after a given date / time provided in the request. In Incremental search, the <code>updatedAt</code> field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which records should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Creation Time fields of the transaction table in SAP Business One  (OJDT.CreateDate, OJDT.UpdateDate), [2] TOTVS Protheus: E2_USERLGI and E2_USERLGA</li>\n</ul>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the <code>count</code> field</li>\n</ul>\n<p>For list search the pagination feature in the response will be used, where the following fields are used to control the pagination:</p>\n<ul>\n<li><code>pageSize</code> = number of records on each page (eg 100), defined in the B1If configuration (Scenarios&gt; Setup) and informed in the response</li>\n<li><code>pageNum</code> = desired page, provided in the request and informed in the response. If <code>pageNum</code> not informed = 1, If <code>pageNum</code> &lt;=0 = 1, If <code>pageNum</code> &gt; <code>pageTotal</code> = last page</li>\n<li><code>pageTotal</code> = total pages, reported in the response</li>\n<li><code>hasNext</code> = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service does not have user field (UDF) treatment.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["payables"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter payables (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2020-01-24"},{"description":{"content":"<p>Final create date to filter payables (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-12-24"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Initial due date to filter payables (optional in list search)</p>\n","type":"text/plain"},"key":"dueFrom","value":"2020-01-24"},{"description":{"content":"<p>Final due date to filter payables (optional in list search)</p>\n","type":"text/plain"},"key":"dueTo","value":"2020-01-24"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"C000004"},{"disabled":true,"description":{"content":"<p>Buyer Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"buyerKey","value":"120"},{"description":{"content":"<p>Payable Primary Key in ERP (optional for unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"120"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"1"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-01-24T15:34:00"}],"variable":[]}},"response":[{"id":"407e6658-71de-4f21-9366-4e78d650e7c1","name":"Payables - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/payables?createdFrom=2018-01-24&createdTo=2020-01-24","host":["{{endpoint}}"],"path":["payables"],"query":[{"key":"createdFrom","value":"2018-01-24","description":"Initial create date to filter payables (required if not unitary search)"},{"key":"createdTo","value":"2020-01-24","description":"Final create date to filter payables (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"dueFrom","value":"2020-01-24","description":"Initial due date to filter payables (optional in list search)","disabled":true},{"key":"dueTo","value":"2020-01-24","description":"Final due date to filter payables (optional in list search)","disabled":true},{"key":"partnerKey","value":"C000004","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"buyerKey","value":"120","description":"Buyer Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"120","description":"Payable Primary Key in ERP (optional for unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=6EAED0F577B8A311A37B0D26BD48A780; Path=/B1iXcellerator; HttpOnly"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Fri, 16 Oct 2020 19:55:53 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"Payables\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"payables\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-10-16T16:55:44\",\n    \"createdFrom\": \"2018-01-24\",\n    \"createdTo\": \"2020-01-24\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"685\",\n            \"lineNum\": \"0\",\n            \"docDate\": \"2018-03-05\",\n            \"docDueDate\": \"2018-03-05\",\n            \"docValue\": 2.14,\n            \"partnerKey\": \"F012\",\n            \"paymentMethod\": \"Pgto em Cheque\",\n            \"baseObject\": \"18\",\n            \"baseKey\": \"61\",\n            \"nfeSeries\": \"6\",\n            \"nfeNum\": \"10101\",\n            \"remarks\": \"Notas fiscais de Entrada - F012\",\n            \"createdAt\": \"2018-03-05T22:37:00\",\n            \"updatedAt\": \"2018-03-05T00:00:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"bea4e597-b973-434d-a9dd-50f6f7d64ae2","name":"Payables - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/payables?createdFrom=2020-01-24&createdTo=2020-12-24","host":["{{endpoint}}"],"path":["payables"],"query":[{"key":"createdFrom","value":"2020-01-24","description":"Initial create date to filter payables (required if not unitary search)"},{"key":"createdTo","value":"2020-12-24","description":"Final create date to filter payables (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"dueFrom","value":"2020-01-24","description":"Initial due date to filter payables (optional in list search)","disabled":true},{"key":"dueTo","value":"2020-01-24","description":"Final due date to filter payables (optional in list search)","disabled":true},{"key":"partnerKey","value":"C000004","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"buyerKey","value":"120","description":"Buyer Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"120","description":"Payable Primary Key in ERP (optional for unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Version","value":"1.1"},{"key":"FWRESTBUILD","value":"1.15.0717"},{"key":"Content-Type","value":"application/json"},{"key":"Status","value":"200 OK"},{"key":"Content-Encoding","value":"gzip"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=15"}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"Payables\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"payables\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-09T18:35:12\",\n    \"createdFrom\": \"2020-01-24\",\n    \"createdTo\": \"2020-12-24\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"values\": [\n        {\n            \"branch\": \"01\",\n            \"branchName\": \"TESTE\",\n            \"branchTaxNumber\": \"  .   .   /    -  \",\n            \"erpKey\": \"1_100000002\",\n            \"lineNum\": \"\",\n            \"docDate\": \"2020-11-09\",\n            \"docDueDate\": \"2020-11-09\",\n            \"docValue\": 70,\n            \"partnerKey\": \"00000101\",\n            \"baseObject\": \"18\",\n            \"baseKey\": \"100000002\",\n            \"nfeSeries\": \"\",\n            \"nfeNum\": \"100000002\",\n            \"paymentMethod\": \"NF\",\n            \"remarks\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"940b6267-d194-410f-a4ab-ea12d267e6ec"}],"id":"d6d651a1-a3e8-4e40-a6bb-9432671406c9","_postman_id":"d6d651a1-a3e8-4e40-a6bb-9432671406c9","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Outcoming Payments*","item":[{"name":"Outcoming Payments","id":"a788b12a-017e-438b-b7c5-22e8a4785f46","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/outPayments?paidFrom=2018-01-01&paidTo=2020-12-31&branch=1&dueFrom=2018-01-01&dueTo=2020-12-31&partnerKey=C001&erpKey=120&pageNum=1&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-outcoming-payments-in-erp\">Search outcoming payments in ERP</h4>\n<p><em>(sapBusinessOne=46/OVPM, totvsProtheus=FK2)</em></p>\n<p>The search of outcoming payments allows filtering the ERP by:</p>\n<ul>\n<li>List Search: by <code>paidFrom</code> + <code>paidTo</code> {required}, by <code>dueFrom</code> + <code>dueTo</code>, <code>branch</code>, <code>partnerKey</code>, <code>buyerKey</code> {optional}</li>\n<li>Unitary Search: by <code>erpKey</code></li>\n</ul>\n<p>If no field for unitary query (<code>erpKey</code>) is informed in the request, the query for outcoming payments is performed as a list.</p>\n<p>The outcoming payments service will consider valid receipts for payables:</p>\n<ul>\n<li>SAP Business One: [1] Not canceled (OVPM.Canceled = 'N')</li>\n<li>TOTVS Protheus: [1] With positive value: FK2_VALUE&gt; 0</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (OVPM.BPLId), TOTVS Protheus (FK1_FILIAL)</li>\n<li><code>paidFrom</code> and <code>paidTo</code>: SAP Business One (OVPM.DocDate, ORCT.TrsfrDate, OBOE.PmntDate or BOT1.TranDate *), TOTVS Protheus (FK2_DATA)</li>\n<li><code>dueFrom</code> and <code>dueTo</code>: SAP Business One (OVPM.DocDueDate, INV6.DueDate or OBOE.DueDate), TOTVS Protheus (FK2_VENCTO)</li>\n<li><code>erpKey</code>: SAP Business One (OVPM.DocEntry), TOTVS Protheus (FK2_IDFK2)</li>\n<li><code>baseObject</code>: 18 (purchaseInvoice), 30 (journalEntry), 19 (purchaseCreditNote), 204 (purDownPayment)</li>\n<li><code>baseKey</code>: SAP Business One (OINV.DocEntry, JDT1.AbsEntry, ORIN.DocEntry), TOTVS Protheus (E2_PREFIXO+'_'+E2_NUM)</li>\n<li><code>lineNum</code>: installment</li>\n<li><code>paymentMethod</code>: cash, transfer, boe, check, creditCard</li>\n</ul>\n<p>This service will allow you to search the outcoming payments list in two situations:</p>\n<ul>\n<li>Full Search: will result in all registers, according to filters.</li>\n<li>Incremental Search: will result in all registers, according to filters, which have been included and/or changed in the main register after a certain date/time provided in the request. In the Incremental Search, the <code>updatedAt</code> field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which exit notes should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Update Date fields for the Document record in SAP Business One (OVPM.CreateDate, OVPM.UpdateDate, OVPM.CreateTS, OVPM.UpdateTS), [2] TOTVS Protheus: the E5_USERLGI and E5_USERLGA fields</li>\n</ul>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the <code>count</code> field</li>\n</ul>\n<p>For outcoming payments list the pagination feature in the response will be used, where the following fields are used to control the pagination:</p>\n<ul>\n<li><code>pageSize</code> = number of records on each page (eg 100), defined in the API configuration and informed in the response</li>\n<li><code>pageNum</code> = desired page, provided in the request and informed in the response. If <code>pageNum</code> not informed = 1, If <code>pageNum</code> &lt;=0 = 1, If <code>pageNum</code> &gt; <code>pageTotal</code> = last page</li>\n<li><code>pageTotal</code> = total pages, reported in the response</li>\n<li><code>hasNext</code> = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service does not have user field (UDF) treatment.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["outPayments"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial payment date to filter outcoming payments (required if not unitary search)</p>\n","type":"text/plain"},"key":"paidFrom","value":"2018-01-01"},{"description":{"content":"<p>Final payment date to filter outcoming payments (required if not unitary search)</p>\n","type":"text/plain"},"key":"paidTo","value":"2020-12-31"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Initial due date to filter incoming payments (optional in list search)</p>\n","type":"text/plain"},"key":"dueFrom","value":"2018-01-01"},{"description":{"content":"<p>Final due date to filter incoming payments (optional in list search)</p>\n","type":"text/plain"},"key":"dueTo","value":"2020-12-31"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"C001"},{"disabled":true,"description":{"content":"<p>Buyer Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"buyerKey","value":null},{"description":{"content":"<p>Outcoming Payment Primary Key in ERP (optional for unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"120"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"1"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-01-24T15:34:00"}],"variable":[]}},"response":[{"id":"060f8abf-cc2f-470e-808b-aacc05107a72","name":"Outcoming Payments - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/outPayments?paidFrom=2018-01-01&paidTo=2020-12-31&branch=1&dueFrom=2018-01-01&dueTo=2020-12-31&partnerKey=C001&erpKey=120&pageNum=1&updatedAt=2020-01-24T15:34:00","host":["{{endpoint}}"],"path":["outPayments"],"query":[{"key":"paidFrom","value":"2018-01-01","description":"Initial payment date to filter outcoming payments (required if not unitary search)"},{"key":"paidTo","value":"2020-12-31","description":"Final payment date to filter outcoming payments (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)"},{"key":"dueFrom","value":"2018-01-01","description":"Initial due date to filter incoming payments (optional in list search)"},{"key":"dueTo","value":"2020-12-31","description":"Final due date to filter incoming payments (optional in list search)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"buyerKey","value":null,"description":"Buyer Primary Key in ERP (optional in list search)","type":"text","disabled":true},{"key":"erpKey","value":"120","description":"Outcoming Payment Primary Key in ERP (optional for unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Version","value":"1.1"},{"key":"FWRESTBUILD","value":"1.15.0717"},{"key":"Content-Type","value":"application/json"},{"key":"Status","value":"200 OK"},{"key":"Content-Encoding","value":"gzip"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=15"}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"OutPayments\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"outPayments\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-09T18:37:19\",\n    \"paidFrom\": \"2018-01-01\",\n    \"paidTo\": \"2020-12-31\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"countTotal\": 1,\n    \"values\": [\n        {\n            \"branch\": \"01\",\n            \"branchName\": \"TESTE\",\n            \"branchTaxNumber\": \"  .   .   /    -  \",\n            \"erpKey\": \"63b428788a2b47639643c4405e2bf590\",\n            \"paymentDate\": \"2020-11-09\",\n            \"docDate\": \"2020-11-09\",\n            \"docDueDate\": \"2020-11-09\",\n            \"paidValue\": 50,\n            \"partnerKey\": \"00000101\",\n            \"baseObject\": \"18\",\n            \"baseKey\": \"1/100000002\",\n            \"baseNum\": \"100000002\",\n            \"lineNum\": \"\",\n            \"nfeNum\": \"100000002\",\n            \"paymentMethod\": \"NOR\",\n            \"remarks\": \"Valor pago s/ Titulo\",\n            \"details\": {},\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 1\n}"},{"id":"7b538a77-415f-442c-bfed-2d399669d4c2","name":"Outcoming Payments - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/outPayments?paidFrom=2018-01-01&paidTo=2020-12-31","host":["{{endpoint}}"],"path":["outPayments"],"query":[{"key":"paidFrom","value":"2018-01-01","description":"Initial payment date to filter outcoming payments (required if not unitary search)"},{"key":"paidTo","value":"2020-12-31","description":"Final payment date to filter outcoming payments (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"dueFrom","value":"2018-01-01","description":"Initial due date to filter incoming payments (optional in list search)","disabled":true},{"key":"dueTo","value":"2020-12-31","description":"Final due date to filter incoming payments (optional in list search)","disabled":true},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"buyerKey","value":"120","description":"Buyer Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"120","description":"Outcoming Payment Primary Key in ERP (optional for unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=2DF2F1C20C7559589FFF40B8AD33B58C; Path=/B1iXcellerator; HttpOnly"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Fri, 16 Oct 2020 17:46:26 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"OutPayments\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"outPayments\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-10-16T14:46:22\",\n    \"paidFrom\": \"2018-01-01\",\n    \"paidTo\": \"2020-12-31\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"\",\n            \"erpKey\": \"25\",\n            \"lineNum\": \"1\",\n            \"paymentDate\": \"2018-05-14\",\n            \"docDate\": \"2018-05-14\",\n            \"docDueDate\": \"2018-05-14\",\n            \"paidValue\": 675,\n            \"partnerKey\": \"F001\",\n            \"baseObject\": \"18\",\n            \"baseKey\": \"62\",\n            \"baseNum\": \"62\",\n            \"nfeNum\": \"60\",\n            \"paymentMethod\": \"cash\",\n            \"remarks\": \"Outgoing Payments - F001\",\n            \"details\": {},\n            \"createdAt\": \"2018-05-14T00:00:00\",\n            \"updatedAt\": \"2018-05-14T00:00:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"a788b12a-017e-438b-b7c5-22e8a4785f46"},{"name":"Outcoming Payment*","id":"bbf17d02-80d6-416e-a4fd-c26a957a996b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"baseObject\": \"13\",\r\n\t\"baseKey\": \"168\",\r\n\t\"paymentMethod\": \"creditCard\",\r\n\t\"amount\": 63.89,\r\n\t\"installments\": 1,\r\n\t\"paymentDate\": \"2020-03-31\",\r\n\t\"details\": {\r\n\t\t\"transferAccount\": \"1.1.1.2.2\",\r\n\t\t\"boeAccount\": \"1.1.1.2.2\",\r\n\t\t\"cardName\": \"Visa\",\r\n\t\t\"acquirer\": \"\",\r\n\t\t\"tid\": \"12125\",\r\n\t\t\"authid\": \"12121872612918721\",\r\n\t\t\"nsu\": \"023567\"\r\n\t}\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/outPayments","description":"<h4 id=\"insert-outcoming-payments-in-erp\">Insert outcoming payments in ERP</h4>\n<p><em>(sapBusinessOne=46/OVPM, totvsProtheus=FK2)</em></p>\n<h2 id=\"not-yet-available-release-in-2020-q4\">&lt;&lt;&lt; NOT YET AVAILABLE. RELEASE IN 2020 Q4 &gt;&gt;&gt;</h2>\n<p>This service will allow to insert a new outcoming payments in the ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new outcoming payments will be insert if the informed purchase invoice is located and validated on the ERP. The key for locating the purchase invoice on the ERP can be:</p>\n<ul>\n<li>SAP Business One: OVPM.DocEntry = <code>baseKey</code> or OVPM.DocNum = <code>baseNum</code> or OVPM.NumAtCard = <code>orderNum</code></li>\n<li>TOTVS Protheus: F1_DOC = <code>baseKey</code> or R_E_C_N_O_ = <code>baseNum</code> or D1_PEDIDO = <code>orderNum</code></li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of outcoming payments (SAPB1: OVPM, TOTVS: FK2, the respective registration must be performed in the Custom Table.</p>\n<h4 id=\"request-object-has-the-following-properties\">Request object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>baseObject</td>\n<td>string</td>\n<td>Base Object</td>\n</tr>\n<tr>\n<td>baseKey</td>\n<td>string</td>\n<td>Base Key</td>\n</tr>\n<tr>\n<td>paymentMethod</td>\n<td>number</td>\n<td>Payment method</td>\n</tr>\n<tr>\n<td>amount</td>\n<td>number</td>\n<td>Amount</td>\n</tr>\n<tr>\n<td>installments</td>\n<td>number</td>\n<td>Installments</td>\n</tr>\n<tr>\n<td>details</td>\n<td>object</td>\n<td>details</td>\n</tr>\n<tr>\n<td>details.cardName</td>\n<td>string</td>\n<td>Card name</td>\n</tr>\n<tr>\n<td>details.acquirer</td>\n<td>string</td>\n<td>Acquire</td>\n</tr>\n<tr>\n<td>details.tid</td>\n<td>string</td>\n<td>tid</td>\n</tr>\n<tr>\n<td>details.authid</td>\n<td>string</td>\n<td>Authid</td>\n</tr>\n<tr>\n<td>details.nsu</td>\n<td>string</td>\n<td>nsu</td>\n</tr>\n</tbody>\n</table>\n</div><p>* = <em>Required field</em></p>\n<h4 id=\"response-object-has-the-following-properties\">Response object has the following properties</h4>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>package</td>\n<td>string</td>\n<td>package</td>\n</tr>\n<tr>\n<td>process</td>\n<td>string</td>\n<td>process</td>\n</tr>\n<tr>\n<td>system</td>\n<td>string</td>\n<td>system</td>\n</tr>\n<tr>\n<td>target</td>\n<td>string</td>\n<td>target</td>\n</tr>\n<tr>\n<td>user</td>\n<td>string</td>\n<td>user</td>\n</tr>\n<tr>\n<td>host</td>\n<td>string</td>\n<td>host</td>\n</tr>\n<tr>\n<td>effectiveTimestamp</td>\n<td>string</td>\n<td>Effective Time stamp</td>\n</tr>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>CodeBars</td>\n</tr>\n<tr>\n<td>success</td>\n<td>booleano</td>\n<td>success</td>\n</tr>\n<tr>\n<td>values</td>\n<td>array</td>\n<td>values</td>\n</tr>\n<tr>\n<td>values.object</td>\n<td>string</td>\n<td>Object</td>\n</tr>\n<tr>\n<td>values.table</td>\n<td>string</td>\n<td>table</td>\n</tr>\n<tr>\n<td>values.action</td>\n<td>string</td>\n<td>action</td>\n</tr>\n<tr>\n<td>values.erpKey</td>\n<td>string</td>\n<td>Erp key</td>\n</tr>\n</tbody>\n</table>\n</div>","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["outPayments"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"e26afe50-f0d4-411b-9a83-0893f86100aa","name":"Outcoming Payments","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"baseObject\": \"13\",\r\n\t\"baseKey\": \"140\",\r\n\t\"paymentMethod\": \"cash\",\r\n\t\"amount\": 63.89,\r\n\t\"installments\": 1,\r\n\t\"details\": {\r\n\t\t\"cardName\": \"\",\r\n\t\t\"acquirer\": \"\",\r\n\t\t\"tid\": \"\",\r\n\t\t\"authid\": \"\",\r\n\t\t\"nsu\": \"\"\r\n\t}\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/outPayments"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Tue, 10 Mar 2020 18:47:22 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"OutPayments\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"outPayments\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-03-10T15:47:12\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"46\",\n            \"table\": \"OVPM\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"190\"\n        }\n    ]\n}"}],"_postman_id":"bbf17d02-80d6-416e-a4fd-c26a957a996b"}],"id":"f4271e34-71ba-4948-9e4a-fd5ef0557e51","_postman_id":"f4271e34-71ba-4948-9e4a-fd5ef0557e51","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Purchase Credit Notes","item":[{"name":"Purchase Credit Notes","id":"90cb93c7-1996-4847-8685-cb88f66caca4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/purCreditNotes?createdFrom=2010-08-27&createdTo=2020-12-31&branch=1&partnerKey=C001&erpKey=120&docNum=49084&pageNum=2&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-purchase-credit-notes-in-erp\">Search purchase credit notes in ERP</h4>\n<p><em>(sapBusinessOne=19/ORPC, totvsProtheus=SF2)</em></p>\n<p>This service will allow to search purchase credit notes in the ERP.</p>\n<p>The search of purchase credit notes allows filtering the ERP by:</p>\n<ul>\n<li>List Search: by <code>createdFrom</code> + <code>createdTo</code> {required}, by <code>branch</code>, <code>partnerKey</code> {optional}</li>\n<li>Unitary Search: <code>erpKey</code> or <code>orderNum</code> or <code>docNum</code></li>\n</ul>\n<p>If no field for unitary search (<code>erpKey</code> or <code>orderNum</code> or <code>docNum</code>) is informed in the request, the search for purchase credit notes is carried out by date of creation from/to (which become mandatory).</p>\n<p>The invoices service will consider purchase credit notes with:</p>\n<ul>\n<li>SAP Business One: ODPO.ObjType = 19</li>\n<li>TOTVS Protheus: F2_TIPO IN 'D', 'B'</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (ODPO.BPLId), TOTVS Protheus (F2_FILIAL)</li>\n<li><code>partnerKey</code>: SAP Business One (ODPO.CardCode), TOTVS Protheus (F2_CLIENTE+'_'+F2_LOJA)</li>\n<li><code>erpKey</code>: SAP Business One (ODPO.DocEntry), TOTVS Protheus (F2_NUM)</li>\n<li><code>orderNum</code>: SAP Business One (ODPO.NumAtCard), TOTVS Protheus (C5_PEDECOM)</li>\n<li><code>docNum</code>: SAP Business One (ODPO.DocNum), TOTVS Protheus (R_E_C_N_O_)</li>\n<li><code>docStatus</code>: O = open, C = canceled, B = billed, P = paid, R = returned</li>\n</ul>\n<p>Data returned in response: purchase credit notes data, partner data, items (+ taxes), totals, payments, taxes</p>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the <code>count</code> field</li>\n</ul>\n<p>For list search the pagination feature in the response will be used, where the following fields are used to control the pagination:</p>\n<ul>\n<li><code>pageSize</code> = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response</li>\n<li><code>pageNum</code> = desired page, provided in the request, and informed in the response. If <code>pageNum</code> not informed = 1, If <code>pageNum</code> &lt;=0 = 1, If <code>pageNum</code> &gt; <code>pageTotal</code> = last page</li>\n<li><code>pageTotal</code> = total pages, informed in the response</li>\n<li><code>hasNext</code> = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service will allow you to search the purchase credit notes list in two situations:</p>\n<ul>\n<li>Full Search: will result in all purchase credit notes, according to filters.</li>\n<li>Incremental Search: will result in all purchase credit notes, according to filters, which have been included and/or changed in the main register after a certain date/time provided in the request. In the Incremental Search, the <code>updatedAt</code> field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which exit notes should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Update Date fields for the Document record in SAP Business One (OINV.CreateDate, OINV.UpdateDate, OINV.CreateTS, OINV.UpdateTS), [2] TOTVS Protheus: the F2_USERLGI and F2_USERLGA fields</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of purchase credit notes (SAPB1: ODPO, TOTVS: SF2), the respective registration must be performed in the Custom Table.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purCreditNotes"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter purchase credit notes (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2010-08-27"},{"description":{"content":"<p>Final create date to filter purchase credit notes (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-12-31"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"C001"},{"disabled":true,"description":{"content":"<p>Buyer Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"buyerKey","value":"22"},{"description":{"content":"<p>Purchase Credit Note Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"120"},{"description":{"content":"<p>Purchase Credit NoteDocument Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"49084"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"2"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-01-24T15:34:00"}],"variable":[]}},"response":[{"id":"93d6cdc6-89fb-45cc-b2b7-bde30a90138a","name":"Purchase Credit Notes - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purCreditNotes?createdFrom=2010-08-27&createdTo=2020-08-27","host":["{{endpoint}}"],"path":["purCreditNotes"],"query":[{"key":"createdFrom","value":"2010-08-27","description":"Initial create date to filter purchase credit notes (required if not unitary search)"},{"key":"createdTo","value":"2020-08-27","description":"Final create date to filter purchase credit notes (required if not unitary search)"},{"description":"Branch (optional in list search)","key":"branch","value":"1","disabled":true},{"description":"Partner Primary Key in ERP (optional in list search)","key":"partnerKey","value":"C001","disabled":true},{"description":"Buyer Primary Key in ERP (optional in list search)","key":"buyerKey","value":"22","disabled":true},{"description":"Purchase Credit Note Primary Key in ERP (optional - unitary search)","key":"erpKey","value":"120","disabled":true},{"description":"Purchase Credit NoteDocument Number in ERP (optional - unitary search)","key":"docNum","value":"49084","disabled":true},{"description":"Number of page - pagination (optional)","key":"pageNum","value":"2","disabled":true},{"description":"Date do filter modified registers - incremental search (optional)","key":"updatedAt","value":"2020-01-24T15:34:00","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Thu, 05 Nov 2020 18:32:05 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurCreditNotes\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"purCreditNotes\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-05T16:32:02\",\n    \"createdFrom\": \"2010-08-27\",\n    \"createdTo\": \"2020-08-27\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"buyerKey\": \"2\",\n            \"erpKey\": \"2\",\n            \"docNum\": \"2\",\n            \"orderNum\": \"\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2017-04-04\",\n            \"docDueDate\": \"2017-04-04\",\n            \"taxDate\": \"2017-04-04\",\n            \"docValue\": 3042.81,\n            \"nfeSeries\": \"\",\n            \"nfeNum\": \"3\",\n            \"nfeType\": \"\",\n            \"nfeModel\": \"\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 3477.5,\n            \"baseObject\": \"18\",\n            \"baseKey\": \"56\",\n            \"comments\": \"Baseado em Pedidos de compra 3. Baseado em Recebimento de mercadorias 28. Baseado em Notas fiscais de Entrada 56.\",\n            \"createdAt\": \"2017-04-04T12:22:38\",\n            \"updatedAt\": \"2017-04-04T12:22:39\",\n            \"canceledAt\": null,\n            \"supplier\": {\n                \"type\": \"S\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"F003\",\n                \"docEntry\": \"3\",\n                \"fullName\": \"Oakley\",\n                \"aliasName\": \"\",\n                \"email\": \"oakley@oakley.com\",\n                \"phone\": \"7698-9832\",\n                \"phoneSecondary\": \"51\",\n                \"cellular\": \"51-9873-3248\",\n                \"taxNumber\": \"04.692.027/0002-24\",\n                \"stateTaxNumber\": \"206.198.106.117\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Farroupilha\",\n                    \"address2\": \"10° andar\",\n                    \"city\": \"Porto Alegre\",\n                    \"county\": \"4240\",\n                    \"postalCode\": \"32498\",\n                    \"stateCode\": \"RS\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Jardins\",\n                    \"exteriorNumber\": \"2312\",\n                    \"streetType\": \"Av.\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"das Nações Unidas\",\n                    \"address2\": \"6° andar\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"04795-100\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Brooklin\",\n                    \"exteriorNumber\": \"14.171\",\n                    \"streetType\": \"Av.\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I016\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Relógio Oakley Minute Machine™\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 3250,\n                    \"taxBasis\": 3250,\n                    \"usage\": \"3\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 227.5,\n                    \"freightValue\": 0,\n                    \"grossValue\": 4062.5,\n                    \"unitCost\": 0,\n                    \"comments\": \"\",\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 3477.5,\n                            \"taxRate\": 18,\n                            \"taxValue\": 625.95\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 3250,\n                            \"taxRate\": 7,\n                            \"taxValue\": 227.5\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 3250,\n                    \"grossValue\": 3042.81,\n                    \"baseValue\": 3250,\n                    \"taxValue\": 227.5\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 3250,\n                    \"grossValue\": 3477.5,\n                    \"baseValue\": 3250,\n                    \"taxValue\": 227.5,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            }\n        }\n    ]\n}"},{"id":"9d78fc40-cd91-4dd7-aee9-59b3e1334ec9","name":"Purchase Credit Notes - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purCreditNotes?createdFrom=2010-08-27&createdTo=2020-12-31","host":["{{endpoint}}"],"path":["purCreditNotes"],"query":[{"key":"createdFrom","value":"2010-08-27","description":"Initial create date to filter purchase credit notes (required if not unitary search)"},{"key":"createdTo","value":"2020-12-31","description":"Final create date to filter purchase credit notes (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)","disabled":true},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"buyerKey","value":"22","description":"Buyer Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"120","description":"Purchase Credit Note Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"49084","description":"Purchase Credit NoteDocument Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Version","value":"1.1"},{"key":"FWRESTBUILD","value":"1.15.0717"},{"key":"Content-Type","value":"application/json"},{"key":"Status","value":"200 OK"},{"key":"Content-Encoding","value":"gzip"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=15"}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurCreditNotes\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"purCreditNotes\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-10T10:34:13\",\n    \"createdFrom\": \"2010-08-27\",\n    \"createdTo\": \"2020-12-31\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"countTotal\": 1,\n    \"values\": [\n        {\n            \"branch\": \"01\",\n            \"branchName\": \"TESTE\",\n            \"branchTaxNumber\": \"  .   .   /    -  \",\n            \"erpKey\": \"1/000000002\",\n            \"erpId\": \"2\",\n            \"orderNum\": \"\",\n            \"docNum\": \"000000002\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-11-10\",\n            \"docDueDate\": \"2020-11-10\",\n            \"taxDate\": \"2020-11-10\",\n            \"docValue\": 120,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"000000002\",\n            \"nfeType\": \"\",\n            \"nfeModel\": \"01\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 0,\n            \"nfeAuthCode\": \"\",\n            \"nfeAuthDesc\": \"\",\n            \"nfeProtocol\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null,\n            \"supplier\": {\n                \"type\": \"S\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"00000101\",\n                \"fullName\": \"PIXEL INFORMATICA EIRELI - ME\",\n                \"aliasName\": \"PIXEL INFO\",\n                \"email\": \"\",\n                \"phone\": \"47 33696269\",\n                \"phoneSecundary\": \"\",\n                \"cellular\": null,\n                \"taxNumber\": \"11061994000172\",\n                \"stateTaxNumber\": \"255.920.350\",\n                \"cityTaxNumber\": \"\",\n                \"contactPerson\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"RUA JOSE GUERREIRO FILHO 89\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"SALA 01\",\n                    \"community\": \"CENTRO\",\n                    \"city\": \"PORTO BELO\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"\",\n                    \"streetType\": null\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"RUA JOSE GUERREIRO FILHO 89\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"SALA 01\",\n                    \"community\": \"CENTRO\",\n                    \"city\": \"PORTO BELO\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"\",\n                    \"streetType\": null\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"01\",\n                    \"productKey\": \"MC000003\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"CARTUCHO HP 662 PRETO\",\n                    \"quantity\": 1,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 120,\n                    \"taxBasis\": 120,\n                    \"usage\": \"601\",\n                    \"cfop\": \"6202\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 120,\n                    \"unitCost\": 105.6\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 120,\n                    \"grossValue\": 120,\n                    \"baseValue\": 120,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 120,\n                    \"grossValue\": 120,\n                    \"baseValue\": 120,\n                    \"taxValue\": 0,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"payments\": null,\n            \"taxes\": null\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"90cb93c7-1996-4847-8685-cb88f66caca4"}],"id":"1c7ab636-74ec-41b1-b702-3f11a581225c","_postman_id":"1c7ab636-74ec-41b1-b702-3f11a581225c","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}},{"name":"Purchase Down Payments","item":[{"name":"Purchase Down Payments","id":"e3c0cf2b-2e02-4aed-874f-18d634db4067","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/purDownPayments?createdFrom=2016-09-19&createdTo=2016-09-19&branch=1&partnerKey=C001&buyerKey=22&erpKey=120&docNum=49084&pageNum=2&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-purchase-down-payments-in-erp\">Search purchase down payments in ERP</h4>\n<p><em>(sapBusinessOne=<em>204/ODPO</em>)</em></p>\n<p>This service will allow to search purchase down payments in the ERP.</p>\n<p>The search of purchase down payments allows filtering the ERP by:</p>\n<ul>\n<li>List Search: by <code>createdFrom</code> + <code>createdTo</code> {required}, by <code>branch</code>, <code>partnerKey</code> {optional}</li>\n<li>Unitary Search: <code>erpKey</code> or <code>orderNum</code> or <code>docNum</code></li>\n</ul>\n<p>If no field for unitary search (<code>erpKey</code> or <code>orderNum</code> or <code>docNum</code>) is informed in the request, the search for purchase down payments is carried out by date of creation from/to (which become mandatory).</p>\n<p>The purchase down payments service will consider purchase down payments with:</p>\n<ul>\n<li>SAP Business One: ORPD.ObjType = 204</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (ORPD.BPLId)</li>\n<li><code>partnerKey</code>: SAP Business One (ORPD.CardCode)</li>\n<li><code>erpKey</code>: SAP Business One (ORPD.DocEntry)</li>\n<li><code>orderNum</code>: SAP Business One (ORPD.NumAtCard)</li>\n<li><code>docNum</code>: SAP Business One (ORPD.DocNum)</li>\n<li><code>docStatus</code>: O = open, C = canceled, B = billed, P = paid, R = returned</li>\n</ul>\n<p>Data returned in response: purchase down payments data, partner data, items (+ taxes), totals</p>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the <code>count</code> field</li>\n</ul>\n<p>For list search the pagination feature in the response will be used, where the following fields are used to control the pagination:</p>\n<ul>\n<li><code>pageSize</code> = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response</li>\n<li><code>pageNum</code> = desired page, provided in the request, and informed in the response. If <code>pageNum</code> not informed = 1, If <code>pageNum</code> &lt;=0 = 1, If <code>pageNum</code> &gt; <code>pageTotal</code> = last page</li>\n<li><code>pageTotal</code> = total pages, informed in the response</li>\n<li><code>hasNext</code> = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service will allow you to search the purchase down payments list in two situations:</p>\n<ul>\n<li>Full Search: will result in all purchase down payments, according to filters.</li>\n<li>Incremental Search: will result in all purchase down payments, according to filters, which have been included and/or changed in the main register after a certain date/time provided in the request. In the Incremental Search, the <code>updatedAt</code> field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which exit notes should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Update Date fields for the Document record in SAP Business One (ORPD.CreateDate, ORPD.UpdateDate, ORPD.CreateTS, ORPD.UpdateTS)</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of purchase down payments (SAPB1: ORPD, TOTVS: SE2), the respective registration must be performed in the Custom Table.</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}},"urlObject":{"path":["purDownPayments"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter purchase down payments (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2016-09-19"},{"description":{"content":"<p>Final create date to filter purchase down payments (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2016-09-19"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"C001"},{"description":{"content":"<p>Buyer Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"buyerKey","value":"22"},{"description":{"content":"<p>Purchase Down Payment Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"120"},{"description":{"content":"<p>Purchase Down Payment Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"49084"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"2"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-01-24T15:34:00"}],"variable":[]}},"response":[{"id":"40a3fe01-c6ea-43cf-ba0f-8dacf295bd3f","name":"Purchase Down Payments - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/purDownPayments?createdFrom=2016-09-19&createdTo=2016-09-19","host":["{{endpoint}}"],"path":["purDownPayments"],"query":[{"key":"createdFrom","value":"2016-09-19","description":"Initial create date to filter purchase down payments (required if not unitary search)"},{"key":"createdTo","value":"2016-09-19","description":"Final create date to filter purchase down payments (required if not unitary search)"},{"description":"Branch (optional in list search)","key":"branch","value":"1","disabled":true},{"description":"Partner Primary Key in ERP (optional in list search)","key":"partnerKey","value":"C001","disabled":true},{"description":"Buyer Primary Key in ERP (optional in list search)","key":"buyerKey","value":"22","disabled":true},{"description":"Purchase Down Payment Primary Key in ERP (optional - unitary search)","key":"erpKey","value":"120","disabled":true},{"description":"Purchase Down Payment Document Number in ERP (optional - unitary search)","key":"docNum","value":"49084","disabled":true},{"description":"Number of page - pagination (optional)","key":"pageNum","value":"2","disabled":true},{"description":"Date do filter modified registers - incremental search (optional)","key":"updatedAt","value":"2020-01-24T15:34:00","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Content-Encoding","value":"gzip"},{"key":"Expires","value":"Thu, 01 Jan 1970 00:00:00 GMT"},{"key":"Content-Type","value":"application/json;charset=UTF-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Thu, 05 Nov 2020 18:33:40 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"supplyAPI\",\n    \"process\": \"PurDownPayments\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"purDownPayments\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-05T16:33:37\",\n    \"createdFrom\": \"2016-09-19\",\n    \"createdTo\": \"2016-09-19\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"buyerKey\": \"2\",\n            \"erpKey\": \"10\",\n            \"docNum\": \"10\",\n            \"orderNum\": \"\",\n            \"docStatus\": \"P\",\n            \"docDate\": \"2016-09-19\",\n            \"docDueDate\": \"2016-09-19\",\n            \"taxDate\": \"2016-09-19\",\n            \"docValue\": 100,\n            \"nfeSeries\": \"\",\n            \"nfeNum\": \"\",\n            \"nfeType\": \"\",\n            \"nfeModel\": \"\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 0,\n            \"baseObject\": \"17\",\n            \"baseKey\": \"95\",\n            \"comments\": \"\",\n            \"createdAt\": \"2016-09-19T16:00:58\",\n            \"updatedAt\": \"2016-09-19T16:00:58\",\n            \"canceledAt\": null,\n            \"supplier\": {\n                \"type\": \"S\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"F001\",\n                \"docEntry\": \"1\",\n                \"fullName\": \"Adidas\",\n                \"aliasName\": \"\",\n                \"email\": \"contato@adidas.com.br\",\n                \"phone\": \"5501-3409\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9834-3249\",\n                \"taxNumber\": \"42.274.696/0001-94\",\n                \"stateTaxNumber\": \"206.274.902.114\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Rio Negro\",\n                    \"address2\": \"5° andar\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"23129-908\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Itaim\",\n                    \"exteriorNumber\": \"123\",\n                    \"streetType\": \"Av.\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"das Nações Unidas\",\n                    \"address2\": \"6° andar\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"04795-100\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Brooklin\",\n                    \"exteriorNumber\": \"14.171\",\n                    \"streetType\": \"Av.\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I002\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Bola Nike Cup Strike UEFA\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 100,\n                    \"taxBasis\": 100,\n                    \"usage\": \"10\",\n                    \"cfop\": \"1101\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 100,\n                    \"unitCost\": 0,\n                    \"comments\": \"\",\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 100,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 100,\n                            \"taxRate\": 18,\n                            \"taxValue\": 0\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 100,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 100,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 100,\n                    \"grossValue\": 100,\n                    \"baseValue\": 100,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 100,\n                    \"grossValue\": 100,\n                    \"baseValue\": 100,\n                    \"taxValue\": 0,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            }\n        }\n    ]\n}"}],"_postman_id":"e3c0cf2b-2e02-4aed-874f-18d634db4067"}],"id":"c7d19d49-4aca-4ebc-bdfd-1d937a35c2e3","_postman_id":"c7d19d49-4aca-4ebc-bdfd-1d937a35c2e3","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"4c83bf58-1218-42d8-aa44-7924700e9149","id":"4c83bf58-1218-42d8-aa44-7924700e9149","name":"supplyAPI - Supply Chain API for ERP (v2)","type":"collection"}}}],"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]}},"event":[{"listen":"prerequest","script":{"id":"c0a7dbcb-428d-4b8b-8891-b1135a335903","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"4557efe4-0eac-4677-ad67-9c16c38e541d","type":"text/javascript","exec":[""]}}]}