{"info":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","description":"<html><head></head><body><p>This document contains the necessary data and requirements for integration with the <strong>salesAPI conector</strong>, a passive API to connect <strong>Sales systems (E-commerce B2C, B2B, CRM, POS and WMS systems)</strong> with ERP systems, as SAP Business One or TOTVS Protheus.</p>\n<p>__salesAPI conector currently has the following HTTP REST Plain services - version 2 (v2.3):</p>\n<ul>\n<li>branches: search branches in ERP</li>\n<li>warehouses: search warehouses in ERP</li>\n<li>binLocations: search bin locations in ERP</li>\n<li>usages: search usages in ERP</li>\n<li>carriers: search carriers in ERP</li>\n<li>itemGroups: search product groups in ERP</li>\n<li>products: search products (with or without Partnumber) and prices in ERP</li>\n<li>stocks: search inventory in ERP</li>\n<li>pricelists: search pricelists in ERP</li>\n<li>prices: search prices in ERP</li>\n<li>partners: search and insert business partners in ERP</li>\n<li>contacts: search and insert partner contacts in ERP</li>\n<li>saleContracts: search sale contracts in ERP</li>\n<li>quotations: search and insert sale quotations in ERP</li>\n<li>orders: search and insert sale orders in ERP</li>\n<li>orderStatus: seach for changes in the status of sale orders in ERP (only SAP Business One)</li>\n<li>picklists: insert sale picklists in ERP</li>\n<li>invoices: search and insert sale invoices in ERP</li>\n<li>deliveries: search and insert sale deliveries in ERP (only SAP Business One)</li>\n<li>creditNotes: search sale credit notes in ERP</li>\n<li>downPayments: search sale down payments in ERP (only SAP Business One)</li>\n<li>receivables: search receivables in ERP</li>\n<li>incPayments: search incoming payments in ERP</li>\n</ul>\n<hr>\n<p><strong>Content Type</strong>: all salesAPI services use the “content-type” application/json for Parameters (body request) and Responses.</p>\n<p><strong>Authentication</strong>: salesAPI 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":"11834bc6-bff3-4272-b68a-24430df885aa","publishedId":"SWE3dfdQ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-09-19T17:08:46.000Z"},"item":[{"name":"Attachments","item":[{"name":"Attachments","id":"75aaac2b-41cb-4c9e-9378-43efbcb5def2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{endpoint}}/attachments?erpKey=30180&linkedObject=23&linkedErpKey=22&pageNum&updatedAt=NOT IMPLEMENTED","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["attachments"],"host":["{{endpoint}}"],"query":[{"key":"erpKey","value":"30180"},{"key":"linkedObject","value":"23"},{"key":"linkedErpKey","value":"22"},{"key":"pageNum","value":null},{"key":"updatedAt","value":"NOT IMPLEMENTED"}],"variable":[]}},"response":[],"_postman_id":"75aaac2b-41cb-4c9e-9378-43efbcb5def2"},{"name":"Attachments","id":"c5a348b9-ae06-4ae2-8813-81806141993f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"erpKey\": \"21813\",\r\n    \"linkedObject\": \"2\",\r\n    \"linkedErpKey\": \"C002082\",\r\n    \"lines\": [\r\n        {\r\n            \"fileSource\": \"\\\\\\\\129.151.36.143\\\\GPImportsChatBot\\\\\",\r\n            \"fileName\": \"logo_vale.gif\"\r\n        },\r\n        {\r\n            \"fileSource\": \"\\\\\\\\129.151.36.143\\\\GPImportsChatBot\\\\\",\r\n            \"fileName\": \"DrayTek-logo.png\"\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/attachments","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["attachments"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"c5a348b9-ae06-4ae2-8813-81806141993f"},{"name":"Attachments","id":"ad4214c2-364f-4ef4-8755-7321ecb2b005","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"erpKey\": \"\",\r\n    \"_linkedObject\": \"\",\r\n    \"_linkedErpKey\": \"\",\r\n    \"lines\": [\r\n        {\r\n            \"lineNum\": \"\",\r\n            \"fileSource\": \"\",\r\n            \"_sourcePath\": \"\",\r\n            \"_subPath\": \"\",\r\n            \"_targetPath\": \"\",\r\n            \"_fileName\": \"\",\r\n            \"_fileExtension\": \"\",\r\n            \"_fileDate\": \"\"\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/attachments","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["attachments"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ad4214c2-364f-4ef4-8755-7321ecb2b005"},{"name":"Attachments","id":"e3610ce2-18c2-49ea-9ff6-dfada5ff34ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"erpKey\": \"\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/attachments?erpKey=22937","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["attachments"],"host":["{{endpoint}}"],"query":[{"key":"erpKey","value":"22937"}],"variable":[]}},"response":[],"_postman_id":"e3610ce2-18c2-49ea-9ff6-dfada5ff34ad"}],"id":"335060ba-a001-4ded-ade2-1feed01bdb6e","_postman_id":"335060ba-a001-4ded-ade2-1feed01bdb6e","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Base Objects","item":[{"name":"Branches","id":"87cde781-8729-42aa-b1b5-52a58d30a884","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/branches?erpKey=1","description":"<h4 id=\"search-branches-in-erp\">Search branches in ERP</h4>\n<p><em>(sapBusinessOne=247/OBPL, totvsProtheus=SM0)</em></p>\n<h6 id=\"atention-for-totvs-protheus-use-igt_branches-conflict-with-totvs-standard-api\">ATENTION: for TOTVS Protheus use /igt_branches (conflict with TOTVS standard API)</h6>\n<p>The search of branches 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 branches service will consider as valid branch:</p>\n<ul>\n<li>SAP Business One: [1] Enabled: OBPL.Disabled=N</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["branches"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Branch Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"1"}],"variable":[]}},"response":[{"id":"e35fc434-63d5-4492-9c63-9b2ee36a7374","name":"Branches - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/branches","host":["{{endpoint}}"],"path":["branches"],"query":[{"key":"erpKey","value":"1","description":"Branch Primary Key in ERP (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, 28 May 2020 23:28:50 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Branches\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"branches\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.210.1\",\n    \"effectiveTimestamp\": \"2020-05-28T20:28:45\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 3,\n    \"values\": [\n        {\n            \"erpKey\": \"1\",\n            \"name\": \"MATRIZ\",\n            \"mainBranch\": true,\n            \"defaultWhsCode\": \"01\",\n            \"taxNumber\": \"98.899.922/0001-87\",\n            \"stateTaxNumber\": \"116.141.588.110\",\n            \"cityTaxNumber\": \"\",\n            \"address\": {\n                \"streetType\": \"Av.\",\n                \"address1\": \"das Nações Unidas\",\n                \"exteriorNumber\": \"14.171\",\n                \"address2\": \"6° andar\",\n                \"community\": \"Brooklin\",\n                \"city\": \"São Paulo\",\n                \"county\": \"5344\",\n                \"stateCode\": \"\",\n                \"countryCode\": \"BR\",\n                \"postalCode\": \"04795-100\"\n            },\n            \"createdAt\": null,\n            \"updatedAt\": \"2017-01-10T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"3\",\n            \"fullName\": \"FILIAL SP\",\n            \"mainBranch\": false,\n            \"defaultWhsCode\": \"SP\",\n            \"taxNumber\": \"98.899.922/0001-87\",\n            \"stateTaxNumber\": \"\",\n            \"cityTaxNumber\": \"\",\n            \"address\": {\n                \"streetType\": \"\",\n                \"address1\": \"\",\n                \"exteriorNumber\": \"\",\n                \"address2\": \"\",\n                \"community\": \"\",\n                \"city\": \"\",\n                \"county\": \"5344\",\n                \"stateCode\": \"\",\n                \"countryCode\": \"BR\",\n                \"postalCode\": \"\"\n            },\n            \"createdAt\": null,\n            \"updatedAt\": \"2017-01-10T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"4\",\n            \"fullName\": \"FILIAL RJ\",\n            \"mainBranch\": false,\n            \"defaultWhsCode\": \"RJ\",\n            \"taxNumber\": \"98.899.922/0001-87\",\n            \"stateTaxNumber\": \"\",\n            \"cityTaxNumber\": \"\",\n            \"address\": {\n                \"streetType\": \"\",\n                \"address1\": \"\",\n                \"exteriorNumber\": \"\",\n                \"address2\": \"\",\n                \"community\": \"\",\n                \"city\": \"\",\n                \"county\": \"5344\",\n                \"stateCode\": \"\",\n                \"countryCode\": \"BR\",\n                \"postalCode\": \"\"\n            },\n            \"createdAt\": null,\n            \"updatedAt\": \"2017-01-10T00:00:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"db13fd2a-de59-4c90-9065-537dab27cf33","name":"Branches - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/igt_branches","host":["{{endpoint}}"],"path":["igt_branches"],"query":[{"key":"erpKey","value":"1","description":"Branch 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\": \"salesAPI\",\n    \"process\": \"Branches\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"branches\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.30.4\",\n    \"effectiveTimestamp\": \"2021-09-03T17:05:57\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"erpKey\": \"01\",\n            \"erpId\": \"1\",\n            \"name\": \"TESTE\",\n            \"mainBranch\": \"true\",\n            \"defaultWhsCode\": \"01\",\n            \"taxNumber\": \"\",\n            \"stateTaxNumber\": \"\",\n            \"cityTaxNumber\": \"\",\n            \"address\": {\n                \"streetType\": null,\n                \"address1\": \"\",\n                \"exteriorNumber\": null,\n                \"address2\": \"\",\n                \"community\": \"\",\n                \"city\": \"\",\n                \"county\": \"\",\n                \"stateCode\": \"\",\n                \"countryCode\": \"BR\",\n                \"postalCode\": \"\"\n            },\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"02\",\n            \"erpId\": \"2\",\n            \"name\": \"FILIAL BNU\",\n            \"mainBranch\": \"false\",\n            \"defaultWhsCode\": \"01\",\n            \"taxNumber\": \"\",\n            \"stateTaxNumber\": \"\",\n            \"cityTaxNumber\": \"\",\n            \"address\": {\n                \"streetType\": null,\n                \"address1\": \"\",\n                \"exteriorNumber\": null,\n                \"address2\": \"\",\n                \"community\": \"\",\n                \"city\": \"\",\n                \"county\": \"\",\n                \"stateCode\": \"\",\n                \"countryCode\": \"BR\",\n                \"postalCode\": \"\"\n            },\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 2\n}"}],"_postman_id":"87cde781-8729-42aa-b1b5-52a58d30a884"},{"name":"Warehouses","id":"f0933670-4e8c-4fbc-bb02-5c273c4c5be7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/warehouses?branch=1&erpKey=01","description":"<h4 id=\"search-warehouses-in-erp\">Search warehouses in ERP</h4>\n<p><em>(sapBusinessOne=64/OWHS, totvsProtheus=NNR)</em></p>\n<p>The search of warehouses allows you to filter the ERP by:</p>\n<ul>\n<li>List Search: by <code>branch</code> </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 is performed as a list.</p>\n<p>The warehouses service will consider as valid warehouse:</p>\n<ul>\n<li>SAP Business One: [1] Not blocked: OWHS.Locked NOT Y</li>\n<li>TOTVS Protheus:</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["warehouses"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Branch Primary Key in ERP (optional for list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Wharehouse Primary Key in ERP (optional for unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"01"}],"variable":[]}},"response":[{"id":"f3d683d7-d1d0-412b-aa83-1a7e2e3f9aa3","name":"Warehouses - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/warehouses","host":["{{endpoint}}"],"path":["warehouses"],"query":[{"key":"erpKey","value":"12","description":"SalesAgent Primary Key in ERP (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":"Sat, 30 May 2020 13:55:32 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Warehouses\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"warehouses\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-05-30T10:55:21\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 8,\n    \"values\": [\n        {\n            \"erpKey\": \"01\",\n            \"name\": \"Depósito geral\",\n            \"branch\": \"1\",\n            \"dropShip\": false,\n            \"createdAt\": null,\n            \"updatedAt\": \"2014-10-24T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"02\",\n            \"name\": \"Terceiros em meu poder\",\n            \"branchKey\": \"1\",\n            \"dropShip\": false,\n            \"createdAt\": \"2009-06-24T00:00:00\",\n            \"updatedAt\": \"2009-06-24T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"03\",\n            \"name\": \"Em poder de terceiros\",\n            \"branchKey\": \"1\",\n            \"dropShip\": true,\n            \"createdAt\": \"2009-06-24T00:00:00\",\n            \"updatedAt\": \"2009-06-24T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"05\",\n            \"name\": \"Depósito 05\",\n            \"branchKey\": \"1\",\n            \"dropShip\": false,\n            \"createdAt\": \"2017-05-10T00:00:00\",\n            \"updatedAt\": \"2017-06-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"08\",\n            \"name\": \"Expedicao Direta\",\n            \"branchKey\": \"1\",\n            \"dropShip\": true,\n            \"createdAt\": \"2017-05-10T00:00:00\",\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"NO\",\n            \"name\": \"Regiao Norte\",\n            \"branchKey\": \"1\",\n            \"dropShip\": false,\n            \"createdAt\": \"2017-05-10T00:00:00\",\n            \"updatedAt\": \"2017-05-10T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"RJ\",\n            \"name\": \"Filial RJ\",\n            \"branchKey\": \"4\",\n            \"dropShip\": false,\n            \"createdAt\": \"2014-02-05T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"SP\",\n            \"name\": \"Filial SP\",\n            \"branchKey\": \"3\",\n            \"dropShip\": false,\n            \"createdAt\": \"2014-02-05T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"75a3210c-a146-46b4-a154-9610e2013b23","name":"Warehouses - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/warehouses","host":["{{endpoint}}"],"path":["warehouses"],"query":[{"key":"branch","value":"1","description":"Branch Primary Key in ERP (optional for list search)","disabled":true},{"key":"erpKey","value":"01","description":"Wharehouse Primary Key in ERP (optional for unitary search)","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\": \"salesAPI\",\n    \"process\": \"Warehouses\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"warehouses\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.30.4\",\n    \"effectiveTimestamp\": \"2021-09-03T17:06:37\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 1,\n    \"useCustom\": true,\n    \"values\": [\n        {\n            \"erpKey\": \"01\",\n            \"erpId\": \"1\",\n            \"name\": \"DEPOSITO GERAL\",\n            \"branch\": \"01\",\n            \"dropShip\": false,\n            \"customExternalId\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"f0933670-4e8c-4fbc-bb02-5c273c4c5be7"},{"name":"Bin Locations","id":"ee238e84-a0cd-4bc4-9087-465afb8b54ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/binLocations?erpKey=1","description":"<h4 id=\"search-bin-locations-in-erp\">Search bin locations in ERP</h4>\n<p><em>(sapBusinessOne=10000206/OBIN, totvsProtheus=SBE)</em></p>\n<p>The search of bin locations 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 bin locations service will consider as valid bin location:</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["binLocations"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Bin Location Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"1"}],"variable":[]}},"response":[{"id":"2a2a44e0-8ab6-454e-9460-466f2f934d98","name":"Bin Locations - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/binLocations","host":["{{endpoint}}"],"path":["binLocations"],"query":[{"key":"erpKey","value":"1","description":"Bin Location 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\": \"salesAPI\",\n    \"process\": \"BinLocations\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"binLocations\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-09T15:50:12\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"01-01-01-01\",\n            \"erpId\": \"1\",\n            \"binLocation\": \"01-01-01-01\",\n            \"isDisabled\": false,\n            \"whsCode\": \"01\",\n            \"minLevel\": 0,\n            \"maxLevel\": 10,\n            \"maxWeight\": 0,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"a8ee0543-d990-43c7-8fe4-a42fecf262fb","name":"Bin Locations - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/binLocations","host":["{{endpoint}}"],"path":["binLocations"],"query":[{"key":"erpKey","value":"1","description":"Bin Location Primary Key in ERP (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, 05 Nov 2020 19:25:36 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"BinLocations\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"binLocations\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-05T17:25:29\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"2\",\n            \"binLocation\": \"01-Z001-A001-C001-P001\",\n            \"isDisabled\": false,\n            \"whsCode\": \"01\",\n            \"minLevel\": 0,\n            \"maxLevel\": 0,\n            \"maxWeight\": 50,\n            \"createdAt\": null,\n            \"updatedAt\": \"2014-10-12T00:00:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"ee238e84-a0cd-4bc4-9087-465afb8b54ce"},{"name":"Usages","id":"36d1187e-a5dc-4de2-a89e-a10e75c6e843","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/usages?erpKey=9","description":"<h4 id=\"search-usages-in-erp\">Search usages in ERP</h4>\n<p><em>(sapBusinessOne=260/OUSG, totvsProtheus=SF4)</em></p>\n<p>The search of usages 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 usages service will consider as valid usage:</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["usages"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Usage Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"9"}],"variable":[]}},"response":[{"id":"ab4b45fd-bbb3-41fd-befd-8e440cabbf37","name":"Usages - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/usages","host":["{{endpoint}}"],"path":["usages"],"query":[{"key":"erpKey","value":"1","description":"Branch 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=AA6D033044F2A81D3B633A0E245A9875; 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":"Wed, 04 Nov 2020 19:35:52 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Usages\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"usages\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-04T17:35:47\",\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            \"erpKey\": \"1\",\n            \"fullName\": \"Industrialização\",\n            \"isLocked\": false,\n            \"freeCharge\": false,\n            \"thirdParty\": false,\n            \"taxOnly\": false,\n            \"taxInStock\": true,\n            \"cfopInc\": \"\",\n            \"cfopOut\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"f6b16f25-ac3a-4f4f-a410-d3c089edb92e","name":"Usages - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/usages","host":["{{endpoint}}"],"path":["usages"],"query":[{"key":"erpKey","value":"9","description":"Usage 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\": \"salesAPI\",\n    \"process\": \"Usages\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"usages\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-09T15:01:46\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 2,\n    \"values\": [\n        {\n            \"erpKey\": \"001\",\n            \"erpId\": \"1\",\n            \"fullName\": \"COMPRA\",\n            \"branch\": \"01\",\n            \"type\": \"I\",\n            \"isLocked\": false,\n            \"freeCharge\": false,\n            \"thirdParty\": false,\n            \"taxOnly\": false,\n            \"taxInStock\": true,\n            \"cfopInc\": \"1101\",\n            \"cfopOut\": \"5101\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"501\",\n            \"erpId\": \"2\",\n            \"fullName\": \"VENDA\",\n            \"branch\": \"01\",\n            \"type\": \"O\",\n            \"isLocked\": false,\n            \"freeCharge\": false,\n            \"thirdParty\": false,\n            \"taxOnly\": false,\n            \"taxInStock\": true,\n            \"cfopInc\": \"1101\",\n            \"cfopOut\": \"5101\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"36d1187e-a5dc-4de2-a89e-a10e75c6e843"},{"name":"Carriers","id":"93a150ae-e856-4fe8-b0e7-24ef0d9eb8cc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/carriers?taxType=C&erpKey=ASV1000&taxNumber=59.546.515/0001-34&pageNum=2","description":"<h4 id=\"search-carriers-in-erp\">Search carriers in ERP</h4>\n<p>#<em>(sapBusinessOne=2/OCRD, totvsProtheus=SA4)</em></p>\n<p>The search of carriers allows you to filter the ERP by:</p>\n<ul>\n<li>List Search: by taxType (C = company, P = person) {optional}</li>\n<li>Unitary Search: by erpKey or taxNumber (with or without punctuation)</li>\n</ul>\n<p>If no fields for unitary search (erpKey or taxNumber) are informed in the request, the search returns as a list (it's possible to filter by taxType).</p>\n<p>The carriers service will consider as valid objects:</p>\n<ul>\n<li>SAP Business One: Valid and not canceled (OCRD.validFor = Y AND OCRD.Canceled = N) + OCRD.GroupCode=GP CarrierGroup (if definied)</li>\n<li>TOTVS Protheus:</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>taxType: SAP Business One (according to CRD7.TaxId0 or CRD7.TaxId4), TOTVS Protheus (A1_PESSOA + A1_TPESSOA = 'EP')</li>\n<li>erpKey: SAP Business One (OCRD.CardCode), TOTVS Protheus (A4_COD)</li>\n<li>taxNumber: SAP Business One (CRD7.TaxId0 or CRD7.TaxId4), TOTVS Protheus (A4_CGC)</li>\n</ul>\n<p>The response will inform:</p>\n<ul>\n<li>The number of returned objects in the “count” field</li>\n</ul>\n<p>For carriers 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>“pageSize” = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response</li>\n<li>“pageNum” = 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>“pageTotal” = total pages, reported in the response</li>\n<li>“hasNext” = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service does not have incremental treatment.</p>\n<p>This service does not have user field treatment (UDF).</p>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["carriers"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Carrier Tax Type: P=person, C=company, G=government, E=employer (optional in list search)</p>\n","type":"text/plain"},"key":"taxType","value":"C"},{"description":{"content":"<p>Carrier Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"ASV1000"},{"description":{"content":"<p>Carrier Tax Number (optional - unitary search)</p>\n","type":"text/plain"},"key":"taxNumber","value":"59.546.515/0001-34"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"2"}],"variable":[]}},"response":[{"id":"fa61d14a-dc55-405a-8817-faa556d74a08","name":"Carriers - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/carriers","host":["{{endpoint}}"],"path":["carriers"],"query":[{"key":"taxType","value":"P","description":"Carrier Tax Type: P=person, C=company, G=government, E=employer (optional in list search)","disabled":true},{"key":"erpKey","value":"C001","description":"Carrier Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"taxNumber","value":"89175174987","description":"Carrier Tax Number (optional - unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (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":"Sat, 30 May 2020 18:14:23 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Carriers\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"carriers\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-05-30T15:13:51\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 10,\n    \"pageNum\": 1,\n    \"pageTotal\": 2,\n    \"hasNext\": true,\n    \"useCustom\": true,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"ASV1000\",\n            \"taxType\": \"C\",\n            \"fullName\": \"Grupo Alves de Medeiros\",\n            \"aliasName\": \"\",\n            \"email\": \"\",\n            \"phone\": \"\",\n            \"phoneSecondary\": \"\",\n            \"cellular\": \"\",\n            \"taxNumber\": \"\",\n            \"stateTaxNumber\": \"\",\n            \"cityTaxNumber\": \"\",\n            \"contactPerson\": \"Paulo Souza\",\n            \"createdAt\": \"2016-05-10T00:00:00\",\n            \"updatedAt\": \"2016-05-10T00:00:00\",\n            \"canceledAt\": null,\n            \"address\": {\n                \"streetType\": \"\",\n                \"address1\": \"\",\n                \"exteriorNumber\": \"\",\n                \"address2\": \"\",\n                \"community\": \"\",\n                \"city\": \"\",\n                \"county\": \"\",\n                \"stateCode\": \"\",\n                \"countryCode\": \"BR\",\n                \"postalCode\": \"\"\n            }\n        }\n    ]\n}"},{"id":"20b3fd8b-0e05-496f-8dc8-2eb9feab2c5e","name":"Carriers - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/carriers","host":["{{endpoint}}"],"path":["carriers"],"query":[{"key":"taxType","value":"C","description":"Carrier Tax Type: P=person, C=company, G=government, E=employer (optional in list search)","disabled":true},{"key":"erpKey","value":"ASV1000","description":"Carrier Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"taxNumber","value":"59.546.515/0001-34","description":"Carrier Tax Number (optional - unitary search)","disabled":true},{"key":"pageNum","value":"2","description":"Number of page - pagination (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\": \"salesAPI\",\n    \"process\": \"Carriers\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"carriers\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.30.4\",\n    \"effectiveTimestamp\": \"2021-09-03T17:07:18\",\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            \"erpKey\": \"000001\",\n            \"erpId\": \"1\",\n            \"taxType\": \"C\",\n            \"fullName\": \"MANDAE\",\n            \"aliasName\": \"MANDAE\",\n            \"email\": \"\",\n            \"phone\": \"\",\n            \"phoneSecundary\": \"\",\n            \"cellular\": null,\n            \"taxNumber\": \"\",\n            \"stateTaxNumber\": \"\",\n            \"cityTaxNumber\": null,\n            \"contactPerson\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null,\n            \"address\": {\n                \"streetType\": null,\n                \"address1\": \"\",\n                \"exteriorNumber\": null,\n                \"address2\": null,\n                \"community\": \"\",\n                \"city\": \"\",\n                \"county\": \"\",\n                \"stateCode\": \"\",\n                \"countryCode\": \"BR\",\n                \"postalCode\": \"\"\n            }\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"93a150ae-e856-4fe8-b0e7-24ef0d9eb8cc"},{"name":"Cost Centres","id":"b98369b3-b5dd-4fd0-8daf-e2208326aa0f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/costCentres?erpKey=1&pageNum","description":"<h4 id=\"search-cost-centres-in-erp\">Search Cost Centres in ERP</h4>\n<p><em>(sapBusinessOne=61/OPRC, totvsProtheus=CTT)</em></p>\n<p>The search Cost Centres 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 Cost Centres service will consider as valid cost center:</p>\n<ul>\n<li>SAP Business One: [1] OPRC.Active=Y</li>\n<li>TOTVS Protheus: [1]</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>type</code>:SAP Business One (OCCT.CctCode), TOTVS Protheus (R=revenue, E=expense)</li>\n<li><code>dimension</code>: SAP Business One (ODIM.DimCode), 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>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 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["costCentres"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Cost Centre Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"1"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":null}],"variable":[]}},"response":[{"id":"84533332-fad3-4d01-b184-1fa223721af3","name":"Cost Centres - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/costCentres","host":["{{endpoint}}"],"path":["costCentres"],"query":[{"key":"erpKey","value":"1","description":"Cost Center Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=3B395AEA3A9CDBB4D59E4EA4F2142432; 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":"Tue, 13 Oct 2020 18:39:32 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"CostCentres\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"costCentres\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-10-13T15:39:29\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 500,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"0100\",\n            \"fullName\": \"RDD\",\n            \"type\": \"\",\n            \"dimension\": \"2\",\n            \"isLocked\": false,\n            \"createdAt\": \"2014-11-05T00:00:00\",\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"9155e818-d142-4d85-9e51-12e8c087ead4","name":"Cost Centres - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/costCentres","host":["{{endpoint}}"],"path":["costCentres"],"query":[{"key":"erpKey","value":"1","description":"Cost Centre Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"description":"Number of page - pagination (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\": \"salesAPI\",\n    \"process\": \"CostCentres\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"costCentres\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-12T15:24:17\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"values\": [\n        {\n            \"erpKey\": \"000000001\",\n            \"fullName\": \"ADM\",\n            \"isTitle\": false,\n            \"type\": \"E\",\n            \"dimension\": \"1\",\n            \"isLocked\": false,\n            \"createdAt\": null,\n            \"updatedAt\": \"2020-11-12\",\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"b98369b3-b5dd-4fd0-8daf-e2208326aa0f"},{"name":"Financial Projects","id":"057716b9-d7f3-47b4-bd40-74c1ca5a4996","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/financialProjects?erpKey=FX&pageNum","description":"<h4 id=\"search-financial-projects-in-erp\">Search Financial Projects in ERP</h4>\n<p><em>(sapBusinessOne=63/OPRJ, totvsProtheus=CTD)</em></p>\n<p>The search Financial Projects 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 projects service will consider as valid financial projects:</p>\n<ul>\n<li>SAP Business One: [1] OPRJ.Active=Y</li>\n<li>TOTVS Protheus:</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>type</code>: TOTVS Protheus (R=revenue, E=expense)</li>\n<li><code>dimension</code>: TOTVS Protheus (2)</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> = 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 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["financialProjects"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Project Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"FX"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":null}],"variable":[]}},"response":[{"id":"f3720939-9cb1-4408-840f-03ed77cfd8da","name":"Financial Projects - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/financialProjects","host":["{{endpoint}}"],"path":["financialProjects"],"query":[{"key":"erpKey","value":"FX","description":"Project Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"description":"Number of page - pagination (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":"Fri, 30 Oct 2020 22:22:14 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"FinancialProjects\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"financialProjects\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-10-30T20:22:11\",\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            \"erpKey\": \"Amadeus\",\n            \"fullName\": \"Amadeus\",\n            \"isLocked\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"6219be6d-9add-4e18-a525-57f31d8101fb","name":"Financial Projects - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/financialProjects","host":["{{endpoint}}"],"path":["financialProjects"],"query":[{"key":"erpKey","value":"FX","description":"Project Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"description":"Number of page - pagination (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\": \"salesAPI\",\n    \"process\": \"FinancialProjects\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"financialProjects\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-12T15:28:39\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"values\": [\n        {\n            \"erpKey\": \"000000001\",\n            \"fullName\": \"PROJETO DENGO\",\n            \"isTitle\": false,\n            \"type\": \"\",\n            \"dimension\": \"2\",\n            \"isLocked\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"057716b9-d7f3-47b4-bd40-74c1ca5a4996"},{"name":"Payment Conditions","id":"34fbabac-532b-4460-a05b-77715c902e03","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/payConditions?erpKey=1&pageNum","description":"<h4 id=\"search-payment-conditions-in-erp\">Search payment conditions in ERP</h4>\n<p><em>(sapBusinessOne=40/OCTG, totvsProtheus=SE4)</em></p>\n<p>The search of payment conditions 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 payment conditions service will consider as valid payment conditions:</p>\n<ul>\n<li>SAP Business One: </li>\n<li>TOTVS Protheus:  E4_MSQLBL not 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>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 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["payConditions"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Payment Condition Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"1"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":null}],"variable":[]}},"response":[{"id":"053d7174-a2b4-4bb3-984d-6e6316846cd5","name":"Payment Conditions - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/payConditions","host":["{{endpoint}}"],"path":["payConditions"],"query":[{"key":"erpKey","value":"1","description":"Payment Condition Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"description":"Number of page - pagination (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":"Fri, 30 Oct 2020 22:31:38 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"PayConditions\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"payConditions\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-10-30T20:31:35\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 2,\n    \"values\": [\n        {\n            \"erpKey\": \"-2\",\n            \"fullName\": \"30 Dias\",\n            \"extraDays\": 30,\n            \"installments\": 0,\n            \"openIncPayment\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"2\",\n            \"fullName\": \"30, 60, 90 x\",\n            \"extraDays\": 0,\n            \"installments\": 3,\n            \"openIncPayment\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"d89ee4e9-b420-4917-bee7-3d0951f9b45f","name":"Payment Conditions - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/payConditions","host":["{{endpoint}}"],"path":["payConditions"],"query":[{"key":"erpKey","value":"1","description":"Payment Condition Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"description":"Number of page - pagination (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\": \"salesAPI\",\n    \"process\": \"PayConditions\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"payConditions\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-12T17:36:19\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"values\": [\n        {\n            \"erpKey\": \"001\",\n            \"fullName\": \"A VISTA\",\n            \"extraDays\": 0,\n            \"installments\": 1,\n            \"openIncPayment\": null,\n            \"type\": \"1\",\n            \"payDetails\": \"0\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"002\",\n            \"fullName\": \"30/60 DD\",\n            \"extraDays\": 44,\n            \"installments\": 2,\n            \"openIncPayment\": null,\n            \"type\": \"1\",\n            \"payDetails\": \"30,60\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 2\n}"}],"_postman_id":"34fbabac-532b-4460-a05b-77715c902e03"},{"name":"Payment Methods","id":"96a330dd-d1da-4e7e-afe1-4068fed996b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/payMethods?erpKey=Transf Bancária&pageNum","description":"<h4 id=\"search-payment-methods-in-erp\">Search payment methods in ERP</h4>\n<p><em>(sapBusinessOne=147/OPYM, totvsProtheus=SX5)</em></p>\n<p>The search of payment methods 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 payment methods service will consider as valid payment methods:</p>\n<ul>\n<li>SAP Business One: [1] OPYM.Active=Y</li>\n<li>TOTVS Protheus: [1] X5_TABELA=24</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> = 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 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["payMethods"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Payment Method Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"Transf Bancária"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":null}],"variable":[]}},"response":[{"id":"a9e355bc-d45f-4881-97db-f8644ff5cd61","name":"Payment Methods - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/payMethods","host":["{{endpoint}}"],"path":["payMethods"],"query":[{"key":"erpKey","value":"1","description":"Payment Method Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"description":"Number of page - pagination (optional)","type":"text","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":"Fri, 30 Oct 2020 22:23:21 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"PayMethods\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"payMethods\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-10-30T20:23:18\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 6,\n    \"values\": [\n        {\n            \"erpKey\": \"Boleto receber\",\n            \"fullName\": \"Boleto a Receber\",\n            \"type\": \"I\",\n            \"paymentType\": \"boe\",\n            \"accountCode\": \"1.1.1.2.2\",\n            \"createdAt\": \"2009-06-23T00:00:00\",\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"Transf Bancaria\",\n            \"fullName\": \"Transferência Bancária - Recebimento\",\n            \"type\": \"I\",\n            \"paymentType\": \"transfer\",\n            \"accountCode\": \"1.1.1.2.2\",\n            \"createdAt\": \"2018-05-14T00:00:00\",\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"Boleto Pagar BB\",\n            \"fullName\": \"Boleto a pagar Banco do Brasil\",\n            \"type\": \"O\",\n            \"paymentType\": \"boe\",\n            \"accountCode\": \"1.1.1.2.2\",\n            \"createdAt\": \"2009-06-23T00:00:00\",\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"2cdd1688-6074-4717-83b1-f0fd0c7fae99","name":"Payment Methods - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/payMethods","host":["{{endpoint}}"],"path":["payMethods"],"query":[{"key":"erpKey","value":"Transf Bancária","description":"Payment Method Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"description":"Number of page - pagination (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\": \"salesAPI\",\n    \"process\": \"PayMethods\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"payMethods\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-12T17:04:43\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"values\": [\n        {\n            \"erpKey\": \"BOL\",\n            \"fullName\": \"BOLETO BANCARIO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"CC\",\n            \"fullName\": \"CARTAO DE CREDITO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"CD\",\n            \"fullName\": \"CARTAO DE DEBITO AUTOMATICO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"CH\",\n            \"fullName\": \"CHEQUE\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"CI\",\n            \"fullName\": \"CONSUMO INTERNO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"CO\",\n            \"fullName\": \"CONVENIO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"CQ\",\n            \"fullName\": \"CREDITO AO QUARTO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"CR\",\n            \"fullName\": \"CREDITO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"DC\",\n            \"fullName\": \"DEBITO EM CONTA CORRENTE\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"FA\",\n            \"fullName\": \"A FATURAR\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"FI\",\n            \"fullName\": \"FINANCIADO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"FID\",\n            \"fullName\": \"FIDELIDADE\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"R$\",\n            \"fullName\": \"DINHEIRO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"RA\",\n            \"fullName\": \"RECEBIMENTO ANTECIPADO\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"VA\",\n            \"fullName\": \"VALES\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"VP\",\n            \"fullName\": \"VALE PRESENTE\",\n            \"type\": \"A\",\n            \"paymentType\": null,\n            \"accountCode\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 16\n}"}],"_postman_id":"96a330dd-d1da-4e7e-afe1-4068fed996b3"},{"name":"Credit Cards","id":"b03d21a9-265a-4c82-add2-5c9ee69282fd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/creditCards?erpKey=1&pageNum","description":"<h4 id=\"search-credit-cards-in-erp\">Search credit cards in ERP</h4>\n<p><em>(sapBusinessOne=36/OCRC, totvsProtheus=SAE)</em></p>\n<p>The search of credit cards 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 credit cards service will consider as valid credit cards:</p>\n<ul>\n<li>SAP Business One: [1] </li>\n<li>TOTVS Protheus: [1] AE_TIPO=CC</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> = 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 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["creditCards"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Credit Card Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"1"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":null}],"variable":[]}},"response":[{"id":"c5401131-1895-439c-b856-0e33d14a6193","name":"Credit Cards - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/creditCards","host":["{{endpoint}}"],"path":["creditCards"],"query":[{"key":"erpKey","value":"1","description":"Credit Card Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"description":"Number of page - pagination (optional)","type":"text","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=1D85D6A03D92F61136BDE8762646C651; 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, 30 Oct 2020 22:38:05 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"CreditCards\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"creditCards\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-10-30T20:38:03\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 3,\n    \"values\": [\n        {\n            \"erpKey\": \"1\",\n            \"fullName\": \"Visa\",\n            \"accountCode\": \"1.1.2.10.2\",\n            \"phone\": \"0800-213-3129\",\n            \"isLocked\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"2\",\n            \"fullName\": \"Mastercard\",\n            \"accountCode\": \"1.1.2.10.3\",\n            \"phone\": \"0300-1239-321\",\n            \"isLocked\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"3\",\n            \"fullName\": \"Amex\",\n            \"accountCode\": \"1.1.2.10.4\",\n            \"phone\": \"5503-3292\",\n            \"isLocked\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"6542ee30-f28b-48fc-8e65-b2854af7e8b9","name":"Credit Cards - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/creditCards","host":["{{endpoint}}"],"path":["creditCards"],"query":[{"key":"erpKey","value":"1","description":"Credit Card Primary Key in ERP (optional)","disabled":true},{"key":"pageNum","value":null,"description":"Number of page - pagination (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\": \"salesAPI\",\n    \"process\": \"CreditCards\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"creditCards\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-12T17:03:00\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"values\": [\n        {\n            \"erpKey\": \"001\",\n            \"fullName\": \"VISA\",\n            \"accountCode\": \"\",\n            \"phone\": \"\",\n            \"isLocked\": \"false\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"b03d21a9-265a-4c82-add2-5c9ee69282fd"},{"name":"Numering Series","id":"5043248b-81b6-4d82-ac5b-8b9f10ccad06","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/numeringSeries?object=2","description":"<h4 id=\"search-numering-series-in-erp\">Search numering series in ERP</h4>\n<p><em>(sapBusinessOne=35/ONNM)</em></p>\n<p>The search of numering series 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 numering series service will consider all numering series as valid.</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>This service does not have 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["numeringSeries"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Object Code in ERP (required if not unitary search)</p>\n","type":"text/plain"},"key":"object","value":"2"},{"disabled":true,"description":{"content":"<p>Subtype Numering Series in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"subtype","value":"C"},{"disabled":true,"description":{"content":"<p>Numering Serie Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"1"}],"variable":[]}},"response":[{"id":"b30ddbdb-c9e5-40e2-9a50-8720ff9f2037","name":"Numering Series - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/numeringSeries?object=2","host":["{{endpoint}}"],"path":["numeringSeries"],"query":[{"key":"object","value":"2","description":"Object Code in ERP (required if not unitary search)"},{"key":"subtype","value":"C","description":"Subtype Numering Series in ERP (optional in list search)","type":"text","disabled":true},{"key":"erpKey","value":"1","description":"Numering Serie Primary Key in ERP (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, 24 Jun 2021 16:23:51 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"NumeringSeries\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"numeringSeries\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.103\",\n    \"effectiveTimestamp\": \"2021-06-24T13:23:48\",\n    \"object\": \"2\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": \"true\",\n    \"count\": 1,\n    \"values\": [\n        {\n            \"object\": \"2\",\n            \"items\": [\n                {\n                    \"subtype\": \"C\",\n                    \"erpKey\": \"37\",\n                    \"name\": \"Manual\",\n                    \"beginString\": \"\",\n                    \"default\": true,\n                    \"manual\": true,\n                    \"locked\": false\n                },\n                {\n                    \"subtype\": \"C\",\n                    \"erpKey\": \"70\",\n                    \"name\": \"Primário\",\n                    \"beginString\": \"C\",\n                    \"default\": false,\n                    \"manual\": false,\n                    \"locked\": false\n                },\n                {\n                    \"subtype\": \"S\",\n                    \"erpKey\": \"38\",\n                    \"name\": \"Manual\",\n                    \"beginString\": \"\",\n                    \"default\": false,\n                    \"manual\": true,\n                    \"locked\": false\n                },\n                {\n                    \"subtype\": \"S\",\n                    \"erpKey\": \"71\",\n                    \"name\": \"Primário\",\n                    \"beginString\": \"F\",\n                    \"default\": true,\n                    \"manual\": false,\n                    \"locked\": false\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"5043248b-81b6-4d82-ac5b-8b9f10ccad06"}],"id":"d1e1c250-77dd-4ac8-a9af-31331af65d3f","description":"<p>Branches, Warehouses, Carriers</p>\n","event":[{"listen":"prerequest","script":{"id":"158b4fb3-b2c5-44b9-bc73-4ab304a74443","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"ce1e940c-ddf2-4f8d-a5e0-116fadb1026f","type":"text/javascript","exec":[""]}}],"_postman_id":"d1e1c250-77dd-4ac8-a9af-31331af65d3f","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Products","item":[{"name":"Item Groups","id":"d30ebcb2-166f-4c1d-a1e1-76502b633e1a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/itemGroups?erpKey=100","description":"<h4 id=\"search-product-groups-in-erp\">Search product groups in ERP</h4>\n<p><em>(sapBusinessOne=52/OITB, totvsProtheus=SBM)</em></p>\n<p>The service will search the ERP database and return the product groups, linked with valid products.</p>\n<p>The search can also be unitary, informing the desired <code>erpKey</code> in the request.</p>\n<ul>\n<li>SAP Business One: OITB.ItmsGrpCod</li>\n<li>TOTVS Protheus: BM_GRUPO</li>\n</ul>\n<p>The itemGroups service will consider as valid products:</p>\n<ul>\n<li>SAP Business One: [1] Sale Item (OITM.SellItem = Y), [2] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)</li>\n<li>TOTVS Protheus: [1] “Finished Product” Type (B1_TIPO = PA), [2] active product (B1_MSBLQL other than 1), [3] E-commerce field active (B5_ECFLAG = 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["itemGroups"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Item Group Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"100"}],"variable":[]}},"response":[{"id":"eccb344f-045e-4502-a79b-0c8675415df8","name":"Item Groups  - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/itemGroups","host":["{{endpoint}}"],"path":["itemGroups"],"query":[{"key":"erpKey","value":"100","description":"Item Group Primary Key in ERP (optional - unitary search)","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":"Sat, 18 Apr 2020 18:06:22 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"ItemGroups\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"itemGroups\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.105\",\n    \"effectiveTimestamp\": \"2020-04-18T15:06:19\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"100\",\n            \"itemGroup\": \"100-Suplementos\",\n            \"materialType\": \"4-Produtos acabados\",\n            \"materialGroup\": \"3-Suplementos\",\n            \"createdAt\": null,\n            \"updatedAt\": \"2009-06-24T00:00:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"02badba3-6691-4ea0-a244-d07f13fca29b","name":"Item Groups - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/itemGroups","host":["{{endpoint}}"],"path":["itemGroups"],"query":[{"key":"erpKey","value":"100","description":"Item Group Primary Key in ERP (optional - unitary search)","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\": \"salesAPI\",\n    \"process\": \"ItemGroups\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"itemGroups\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.30.4\",\n    \"effectiveTimestamp\": \"2021-09-03T17:09:58\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 2,\n    \"values\": [\n        {\n            \"erpKey\": \"1001\",\n            \"itemGroup\": \"1001-MATERIA PRIMA\",\n            \"materialType\": \"1-Outros\",\n            \"materialGroup\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"5001\",\n            \"itemGroup\": \"5001-PRODUTO ACABADO\",\n            \"materialType\": \"1-Outros\",\n            \"materialGroup\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"d30ebcb2-166f-4c1d-a1e1-76502b633e1a"},{"name":"Products","id":"92a1d6f8-afd0-4230-ba4c-37a31a4470c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/products?itemType=4&itemGroup=103&brand=2&erpKey=PA00244&codeBars=I004&pageNum=1&updatedAt=2020-08-20T00:00:00&usePartnumber=false&showComplement=false","description":"<h4 id=\"search-products-in-erp\">Search products in ERP</h4>\n<p><em>(sapBusinessOne=4/OITM, totvsProtheus=SB1)</em></p>\n<p>The service will search the ERP database and return the items located (skus), grouped or not by <code>partnumber</code> (Configurable Product).</p>\n<p>The search of products allows filtering the ERP by:</p>\n<ul>\n<li>List Search: by <code>itemType</code>, by <code>itemGroup</code> and/or by <code>brand</code> {optional}</li>\n<li>Unitary Search: by <code>erpKey</code> or <code>codeBars</code></li>\n</ul>\n<p>If no field for unitary search (<code>erpKey</code> or <code>codeBars</code>) is informed in the request, the search returns all valid products. The list search can be optionally filtered by <code>itemType</code>, by <code>itemGroup</code> and/or by <code>brand</code>.</p>\n<p>Comments:</p>\n<ul>\n<li>Item Type: [1] SAP Business One: OITM.MatType (table OMTP), [2] TOTVS Protheus: B1_TIPO (table SX5/02)</li>\n<li>Item Group: [1] SAP Business One: OITM.ItmsGrpCod (table OITB), [2] TOTVS Protheus: B1_GRUPO (table SBM)</li>\n<li>Brand (or Manufacturer): [1] SAP Business One: OITM.FirmCode (table OMRC), [2] TOTVS Protheus: B1_FABRIC</li>\n<li>treeType: S=sales (kit), P=production, N=no. [1] SAP Business One: OITM.TreeType, [2] TOTVS Protheus: B1_TIPO=KT, with valid component in SG1</li>\n</ul>\n<p>The products service will consider as valid products:</p>\n<ul>\n<li>SAP Business One: [1] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)</li>\n<li>TOTVS Protheus: [1] active product (B1_MSBLQL other than 1)</li>\n<li>optionally you can define in Setup API to return only products with valid <code>codeBars</code></li>\n</ul>\n<p>By default, the products service consider all items/products as the SKU (Simple Product), that is, without the concept of a grouping Partnumber (Configurable Product). To implement the Partnumber concept: create UDF field and define the field created in the API configuration and in the Custom Table. Search response will modify with or without Partnumber concept.</p>\n<p>The service will return two prices for each product: <code>price</code> (normal price) and <code>pricePromo</code> (promotional price). The table price used for normal and promotional prices are definied in API Setup.</p>\n<p>Price list:</p>\n<ul>\n<li>SAP Business One: OITM.PriceList</li>\n<li>TOTVS Protheus: [1] If the price tables are not definied in the API Setup (IG_PRICEL+IG_PRICELP): fields B1_PRV1 and B5_PRV2 will be used, [2] If the price tables are definied in the API Setup: tables DA0/DA1 will be used</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 search the products list in two situations:</p>\n<ul>\n<li>Full Search: will result in all partnumber/SKU (optionally by brand).</li>\n<li>Incremental Search: will result in all partnumber/SKU (optionally by brand) that have been included and/or changed in 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 products (partnumber/skus) should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Update Date fields of the product in SAP Business One (OITM.CreateDate, OITM.UpdateDate, OITM.CreateTS*, OITM.UpdateTS*), [2] TOTVS Protheus: fields B1_USERLGI and B1_USERLGA. Time treatment: available from SAP B1 9.2 PL8, and not available for TOTVS Protheus.</li>\n</ul>\n<p>The response will inform:</p>\n<ul>\n<li>The total number of skus or partnumbers in the <code>count</code> field</li>\n<li>The total number of SKUs per partnumber in the <code>countSKU</code> field</li>\n</ul>\n<p>For use of user fields (UDF) created in the product table (SAPB1: OITM, TOTVS: SB1) 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["products"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Type of products (optional in list search)</p>\n","type":"text/plain"},"key":"itemType","value":"4"},{"description":{"content":"<p>Group of products (optional in list search)</p>\n","type":"text/plain"},"key":"itemGroup","value":"103"},{"description":{"content":"<p>Brand of products (optional in list search)</p>\n","type":"text/plain"},"key":"brand","value":"2"},{"description":{"content":"<p>Product Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"PA00244"},{"description":{"content":"<p>Product Code Bars in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"codeBars","value":"I004"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"1"},{"description":{"content":"<p>Date do filter modified register - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-08-20T00:00:00"},{"description":{"content":"<p>Define if show response in partnumber format to sellItems</p>\n","type":"text/plain"},"key":"usePartnumber","value":"false"},{"description":{"content":"<p>Define if show response with complement object (PROTHEUS only=SB5)</p>\n","type":"text/plain"},"key":"showComplement","value":"false"}],"variable":[]}},"response":[{"id":"f5f252a2-236c-4b0f-8b27-3058f09e9af0","name":"Products","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/products","host":["{{endpoint}}"],"path":["products"],"query":[{"key":"brand","value":"01","description":"Brand of products (optional in list search)","disabled":true},{"key":"erpKey","value":"I004","description":"Product Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"codeBars","value":"I004","description":"Product Code Bars in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-28T17:00:00","description":"Date do filter modified register - incremental search (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=273149D3D786E905CFAAED807D3C2707; 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, 23 Apr 2020 12:19:21 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"Products\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"products\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.100\",\n    \"effectiveTimestamp\": \"2020-04-23T09:18:36\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 10,\n    \"pageNum\": 1,\n    \"pageTotal\": 11,\n    \"hasNext\": true,\n    \"useCustom\": true,\n    \"usePartnumber\": false,\n    \"dimensionUnit\": \"cm\",\n    \"weightUnit\": \"kg\",\n    \"priceList\": \"3\",\n    \"priceListPromo\": \"1\",\n    \"count\": 6,\n    \"values\": [\n        {\n            \"erpKey\": \"A00001\",\n            \"codeBars\": \"\",\n            \"brand\": \"-1-- Nenhum fabricante -\",\n            \"itemGroup\": \"107-Impressoras\",\n            \"itemType\": \"1-Matéria-prima\",\n            \"materialGroup\": \"\",\n            \"description\": \"Impressora 1\",\n            \"longDescription\": \"\",\n            \"measureUnit\": \"UN\",\n            \"swidth\": 0,\n            \"slength\": 0,\n            \"sheight\": 0,\n            \"sweight\": 1,\n            \"price\": 69,\n            \"pricePromo\": 60,\n            \"availableStock\": 79,\n            \"itemtypeproj\": \"110-01\",\n            \"partnumber\": \"\",\n            \"createdAt\": \"2017-04-24T18:24:57\",\n            \"updatedAt\": \"2017-11-30T23:28:33\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"A00002\",\n            \"codeBars\": \"\",\n            \"brand\": \"-1-- Nenhum fabricante -\",\n            \"itemGroup\": \"107-Impressoras\",\n            \"itemType\": \"1-Matéria-prima\",\n            \"materialGroup\": \"\",\n            \"description\": \"Impressora 2\",\n            \"longDescription\": \"\",\n            \"measureUnit\": \"UN\",\n            \"swidth\": 0,\n            \"slength\": 0,\n            \"sheight\": 0,\n            \"sweight\": 0,\n            \"price\": 103.5,\n            \"pricePromo\": 100,\n            \"availableStock\": 88,\n            \"itemtypeproj\": \"110-01\",\n            \"partnumber\": \"\",\n            \"createdAt\": \"2017-04-24T18:25:22\",\n            \"updatedAt\": \"2017-04-24T18:37:32\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"A00003\",\n            \"codeBars\": \"\",\n            \"brand\": \"-1-- Nenhum fabricante -\",\n            \"itemGroup\": \"107-Impressoras\",\n            \"itemType\": \"1-Matéria-prima\",\n            \"materialGroup\": \"\",\n            \"description\": \"Impressora 3\",\n            \"longDescription\": \"\",\n            \"measureUnit\": \"UN\",\n            \"swidth\": 0,\n            \"slength\": 0,\n            \"sheight\": 0,\n            \"sweight\": 0,\n            \"price\": 0,\n            \"pricePromo\": 0,\n            \"availableStock\": 20,\n            \"itemtypeproj\": \"110-01\",\n            \"partnumber\": \"\",\n            \"createdAt\": \"2017-04-24T18:25:38\",\n            \"updatedAt\": \"2017-04-24T18:37:39\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"ASV0121\",\n            \"codeBars\": \"\",\n            \"brand\": \"-1-- Nenhum fabricante -\",\n            \"itemGroup\": \"101-Produto Nacional\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"materialGroup\": \"1-Material Esportivo Terrestre\",\n            \"description\": \"Pino Roscado Din 976 8 m16 x 80 cl. 8.8. Zincado\",\n            \"longDescription\": \"\",\n            \"measureUnit\": \"UN\",\n            \"swidth\": 0,\n            \"slength\": 0,\n            \"sheight\": 0,\n            \"sweight\": 0,\n            \"price\": 4.14,\n            \"pricePromo\": 4,\n            \"availableStock\": 260,\n            \"itemtypeproj\": \"110-01\",\n            \"partnumber\": \"\",\n            \"createdAt\": \"2016-05-10T10:41:20\",\n            \"updatedAt\": \"2017-04-07T17:46:53\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"ASV0122\",\n            \"codeBars\": \"\",\n            \"brand\": \"-1-- Nenhum fabricante -\",\n            \"itemGroup\": \"101-Produto Nacional\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"materialGroup\": \"1-Material Esportivo Terrestre\",\n            \"description\": \"Porca M16 Din934 Zincado\",\n            \"longDescription\": \"\",\n            \"measureUnit\": \"pc\",\n            \"swidth\": 0,\n            \"slength\": 0,\n            \"sheight\": 0,\n            \"sweight\": 0,\n            \"price\": 5.52,\n            \"pricePromo\": 5,\n            \"availableStock\": 398,\n            \"itemtypeproj\": \"110-01\",\n            \"partnumber\": \"\",\n            \"createdAt\": \"2016-05-10T10:42:47\",\n            \"updatedAt\": \"2017-04-07T17:47:30\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"ASV0123\",\n            \"codeBars\": \"\",\n            \"brand\": \"-1-- Nenhum fabricante -\",\n            \"itemGroup\": \"101-Produto Nacional\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"materialGroup\": \"1-Material Esportivo Terrestre\",\n            \"description\": \"Pino Rosca Din 976 8 M20 x 125 CL 8.8 Zincado\",\n            \"longDescription\": \"\",\n            \"measureUnit\": \"pc\",\n            \"swidth\": 0,\n            \"slength\": 0,\n            \"sheight\": 0,\n            \"sweight\": 0,\n            \"price\": 6.9,\n            \"pricePromo\": 6,\n            \"availableStock\": 510,\n            \"itemtypeproj\": \"110-01\",\n            \"partnumber\": \"\",\n            \"createdAt\": \"2016-05-10T10:48:44\",\n            \"updatedAt\": \"2017-04-07T17:47:39\",\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"92a1d6f8-afd0-4230-ba4c-37a31a4470c1"},{"name":"Bill of Materials","id":"da6677e0-2e29-48fb-b258-ab480565e7a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/billOfMaterials?itemType=4&itemGroup=&brand=&treeType=&productKey=&codeBars=&pageNum=&updatedAt=","description":"<h4 id=\"search-bill-of-materials-in-erp\">Search bill of materials in ERP</h4>\n<p><em>(sapBusinessOne=66/OITT, totvsProtheus=SG1)</em></p>\n<p>This service will allow you to search bill of materials on the ERP.</p>\n<p>Products with treeType not equals N=No have bill of components for sale (S=sales - kit or bundle) or bill of components for production (P=production). </p>\n<p>The search of bill of materials allows filtering the ERP by:</p>\n<ul>\n<li>List Search: by <code>itemType</code>, by <code>itemGroup</code> and/or by <code>brand</code> {optional}</li>\n<li>Unitary Search: by <code>erpKey</code> or <code>codeBars</code></li>\n</ul>\n<p>If no field for unitary search (<code>erpKey</code> or <code>codeBars</code>) is informed in the request, the search returns all valid bill of materials. The list search can be optionally filtered by <code>itemType</code>, by <code>itemGroup</code> and/or by <code>brand</code>.</p>\n<p>Comments:</p>\n<ul>\n<li><code>itemType</code>: [1] SAP Business One: OITM.MatType (table OMTP), [2] TOTVS Protheus: B1_TIPO (table SX5/02)</li>\n<li><code>item Group</code>: [1] SAP Business One: OITM.ItmsGrpCod (table OITB), [2] TOTVS Protheus: B1_GRUPO (table SBM)</li>\n<li><code>brand</code> (or Manufacturer): [1] SAP Business One: OITM.FirmCode (table OMRC), [2] TOTVS Protheus: B1_FABRIC</li>\n</ul>\n<p>The bill of materiais service will consider as valid bill of materials:</p>\n<ul>\n<li>SAP Business One: </li>\n<li>TOTVS Protheus:</li>\n</ul>\n<p>The bill of materiais service will consider as valid products:</p>\n<ul>\n<li>SAP Business One: [1] Sale Item (OITM.SellItem = Y), [2] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)</li>\n<li>TOTVS Protheus: [1] active product (B1_MSBLQL other than 1)</li>\n<li>optionally you can define in Setup API to return only products with valid codeBars</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> = 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 bill of materials list in two situations:</p>\n<ul>\n<li>Full Search: will result in all bill of materials, according to filters.</li>\n<li>Incremental Search: will result in all bill of materials, 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 bill of materials 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 (OITT.CreateDate, OITT.UpdateDate, OITT.CreateTS, OITT.UpdateTS), [2] TOTVS Protheus: fields G1_USERLGI and G1_USERLGA</li>\n</ul>\n<p>For the use of user fields (UDF) created in the bill of materials table (SAPB1: OITT, TOTVS: SG1), 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["billOfMaterials"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Type of products (optional in list search)</p>\n","type":"text/plain"},"key":"itemType","value":"4"},{"description":{"content":"<p>Group of products (optional in list search)</p>\n","type":"text/plain"},"key":"itemGroup","value":""},{"description":{"content":"<p>Brand of products (optional in list search)</p>\n","type":"text/plain"},"key":"brand","value":""},{"description":{"content":"<p>Type of Tree: P=production, S=sales, T=template,  A=assembly (optional - list search)</p>\n","type":"text/plain"},"key":"treeType","value":""},{"description":{"content":"<p>Product Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"productKey","value":""},{"description":{"content":"<p>Product Code Bars in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"codeBars","value":""},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":""},{"description":{"content":"<p>Date to filter bill of materials changes - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":""}],"variable":[]}},"response":[{"id":"3aa4446c-ebfe-4346-8194-f53ab90597fb","name":"Bill of Materials - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/billOfMaterials","host":["{{endpoint}}"],"path":["billOfMaterials"],"query":[{"key":"itemType","value":"4","description":"Type of products (optional in list search)","disabled":true},{"key":"itemGroup","value":"","description":"Group of products (optional in list search)","disabled":true},{"key":"treeType","value":"","description":"Type of Tree: P=production, S=sales, T=template,  A=assembly (optional - list search)","disabled":true},{"key":"brand","value":"","description":"Brand of products (optional in list search)","disabled":true},{"key":"productKey","value":"NESKIT","description":"Product Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"codeBars","value":"","description":"Product Code Bars in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"","description":"Date to filter bill of materials 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":"Wed, 04 Nov 2020 22:11:37 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"mesAPI\",\n    \"process\": \"BillOfMaterials\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"billOfMaterials\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-04T20:11:32\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": \"\",\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"productKey\": \"ASV28500\",\n            \"codeBars\": \"\",\n            \"treeType\": \"P\",\n            \"measureUnit\": \"\",\n            \"baseQuantity\": 1,\n            \"productionWhsCode\": \"01\",\n            \"priceListKey\": \"8\",\n            \"financialProjectKey\": \"\",\n            \"createdAt\": \"2016-05-10T00:00:00\",\n            \"updatedAt\": \"2016-05-10T00:00:00\",\n            \"canceledAt\": null,\n            \"lines\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"componentType\": \"T\",\n                    \"componentKey\": \"\",\n                    \"description\": \"1o Passo\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 0,\n                    \"issueMethod\": \"M\",\n                    \"whsCode\": \"\",\n                    \"priceListKey\": \"\",\n                    \"currency\": \"\",\n                    \"price\": 0\n                },\n                {\n                    \"lineNum\": \"1\",\n                    \"componentType\": \"R\",\n                    \"componentKey\": \"MAQ015\",\n                    \"description\": \"\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": \"\",\n                    \"currency\": \"R$\",\n                    \"price\": 25\n                },\n                {\n                    \"lineNum\": \"2\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"ASV0121\",\n                    \"description\": \"VALVULA CONDUIT DISCO DUPLO DN 20\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": \"3\",\n                    \"currency\": \"R$\",\n                    \"price\": 1.61\n                },\n                {\n                    \"lineNum\": \"3\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"ASV0122\",\n                    \"description\": \"VALVULA CONDUIT DISCO DUPLO DN 20\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": \"-2\",\n                    \"currency\": \"R$\",\n                    \"price\": 2.2\n                },\n                {\n                    \"lineNum\": \"4\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"ASV0123\",\n                    \"description\": \"VALVULA CONDUIT DISCO DUPLO DN 20\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": \"-2\",\n                    \"currency\": \"R$\",\n                    \"price\": 1.61\n                },\n                {\n                    \"lineNum\": \"5\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"ASV0124\",\n                    \"description\": \"VALVULA CONDUIT DISCO DUPLO DN 20\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": \"-2\",\n                    \"currency\": \"R$\",\n                    \"price\": 3.23\n                },\n                {\n                    \"lineNum\": \"6\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"ASV0125\",\n                    \"description\": \"VALVULA CONDUIT DISCO DUPLO DN 20\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": \"-2\",\n                    \"currency\": \"R$\",\n                    \"price\": 3\n                },\n                {\n                    \"lineNum\": \"7\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"ASV0126\",\n                    \"description\": \"VALVULA CONDUIT DISCO DUPLO DN 20\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": \"-2\",\n                    \"currency\": \"R$\",\n                    \"price\": 45.21\n                },\n                {\n                    \"lineNum\": \"8\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"ASV0129\",\n                    \"description\": \"VALVULA CONDUIT DISCO DUPLO DN 20\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": \"-2\",\n                    \"currency\": \"R$\",\n                    \"price\": 4.04\n                },\n                {\n                    \"lineNum\": \"9\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"ASV0134\",\n                    \"description\": \"VALVULA CONDUIT DISCO DUPLO DN 20\",\n                    \"measureUnit\": \"\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": \"-2\",\n                    \"currency\": \"R$\",\n                    \"price\": 37.14\n                }\n            ]\n        }\n    ]\n}"},{"id":"3f920045-c5f8-4552-a65e-e53b694a52a2","name":"Bill of Materials - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/billOfMaterials","host":["{{endpoint}}"],"path":["billOfMaterials"],"query":[{"key":"itemType","value":"4","description":"Type of products (optional in list search)","disabled":true},{"key":"itemGroup","value":"","description":"Group of products (optional in list search)","disabled":true},{"key":"treeType","value":"","description":"Type of Tree: P=production, S=sales, T=template,  A=assembly (optional - list search)","disabled":true},{"key":"brand","value":"","description":"Brand of products (optional in list search)","disabled":true},{"key":"productKey","value":"","description":"Product Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"codeBars","value":"","description":"Product Code Bars in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"","description":"Date to filter bill of materials 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\": \"mesAPI\",\n    \"process\": \"BillOfMaterials\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"billOfMaterials\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-10T12:26:30\",\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            \"productKey\": \"PA000001\",\n            \"codeBars\": \"\",\n            \"treeType\": \"P\",\n            \"measureUnit\": \"UN\",\n            \"baseQuantity\": 1,\n            \"productionWhsCode\": \"01\",\n            \"priceListKey\": null,\n            \"financialProjectKey\": null,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null,\n            \"lines\": [\n                {\n                    \"lineNum\": \"1\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"MP000001\",\n                    \"description\": \"MATERIA PRIMA\",\n                    \"measureUnit\": \"KG\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": null,\n                    \"currency\": null,\n                    \"price\": null,\n                    \"comments\": \"\"\n                },\n                {\n                    \"lineNum\": \"2\",\n                    \"componentType\": \"P\",\n                    \"componentKey\": \"MP000002\",\n                    \"description\": \"MATERIA PRIMA 2\",\n                    \"measureUnit\": \"UN\",\n                    \"quantity\": 1,\n                    \"issueMethod\": \"A\",\n                    \"whsCode\": \"01\",\n                    \"priceListKey\": null,\n                    \"currency\": null,\n                    \"price\": null,\n                    \"comments\": \"\"\n                }\n            ]\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"da6677e0-2e29-48fb-b258-ab480565e7a7"}],"id":"29aa9251-f5a2-4e1a-8bd4-046a8dfb0390","_postman_id":"29aa9251-f5a2-4e1a-8bd4-046a8dfb0390","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Stocks & Prices","item":[{"name":"PriceLists","id":"442173c5-a469-43b6-8ade-3a0d0370b995","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/priceLists?erpKey=1","description":"<h4 id=\"search-pricelists-in-erp\">Search priceLists in ERP</h4>\n<p><em>(sapBusinessOne=6/OPLN, totvsProtheus=DA0)</em></p>\n<p>The priceList search 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 search (<code>erpKey</code>) is informed in the request, the search will return all valid priceLists.</p>\n<p>The priceLists service will consider as valid priceList:</p>\n<ul>\n<li>SAP Business One: [1] Valid (OPLN.validFor = Y)</li>\n<li>TOTVS Protheus: [1] active (DA0_ATIVO=1), [2] initial validity (DA0_DATDE&lt;=dDataBase)</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["priceLists"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>PriceList Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"1"}],"variable":[]}},"response":[{"id":"77ce138c-33b0-4800-97aa-6d2cb3524f22","name":"PriceLists - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/priceLists","host":["{{endpoint}}"],"path":["priceLists"],"query":[{"key":"erpKey","value":"1","description":"PriceList Primary Key in ERP (optional - unitary search)","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":"Sat, 30 May 2020 14:51:57 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"PriceLists\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"priceLists\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-05-30T11:51:54\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 10,\n    \"values\": [\n        {\n            \"erpKey\": \"1\",\n            \"name\": \"Lista de Preço Principal\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"1\",\n            \"baseFactor\": 1,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"2\",\n            \"name\": \"Lista de Preço Varejo\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"1\",\n            \"baseFactor\": 2.5,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"3\",\n            \"name\": \"Lista de Preço Corporativo\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"-1\",\n            \"baseFactor\": 1.38,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"4\",\n            \"name\": \"Lista de Preço Sudeste\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"4\",\n            \"baseFactor\": 1,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": \"2015-06-09T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"5\",\n            \"name\": \"Lista de Preço Nordeste\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"4\",\n            \"baseFactor\": 0.65,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": \"2015-06-09T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"6\",\n            \"name\": \"Lista de Preço Sul\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"4\",\n            \"baseFactor\": 0.85,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": \"2015-06-09T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"7\",\n            \"name\": \"Lista de Preço Norte\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"4\",\n            \"baseFactor\": 0.5,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": \"2015-06-09T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"8\",\n            \"name\": \"Lista de Preço Centro-Oeste\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"4\",\n            \"baseFactor\": 0.7,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": \"2015-06-09T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"9\",\n            \"name\": \"Lista de preços 09\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"9\",\n            \"baseFactor\": 1,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": \"2015-06-09T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"10\",\n            \"name\": \"Lista de preços 10\",\n            \"currency\": \"R$\",\n            \"basePriceList\": \"10\",\n            \"baseFactor\": 1,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"9635a914-3111-4c10-96de-35386c1a562a","name":"PriceLists - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/priceLists","host":["{{endpoint}}"],"path":["priceLists"],"query":[{"key":"erpKey","value":"1","description":"PriceList Primary Key in ERP (optional - unitary search)","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\": \"salesAPI\",\n    \"process\": \"PriceLists\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"priceLists\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.30.4\",\n    \"effectiveTimestamp\": \"2021-09-03T17:12:17\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"001\",\n            \"erpId\": \"1\",\n            \"name\": \"TABELA GERAL\",\n            \"currency\": \"R$\",\n            \"basePriceList\": null,\n            \"baseFactor\": null,\n            \"grossPrice\": false,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"442173c5-a469-43b6-8ade-3a0d0370b995"},{"name":"Prices","id":"e84cecaf-a084-4f3e-8664-5af86699055a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"{{endpoint}}/prices","description":"<h4 id=\"search-prices-in-erp\">Search prices in ERP</h4>\n<p><em>(sapBusinessOne=ITM1, totvsProtheus=DA1)</em></p>\n<p>The prices search allows you to filter the ERP by:</p>\n<ul>\n<li>List Search: by <code>priceListKey</code> or <code>brand</code> or <code>itemType</code> or <code>itemGroup</code> {optional}</li>\n<li>Unitary Search: by <code>productKey</code> or <code>codeBars</code></li>\n</ul>\n<p>If no field for unitary search (<code>productKey</code> or <code>codeBars</code>) is informed in the request, the search will return the price of all valid products. The list search can be filtered by <code>priceListKey</code> or by <code>brand</code> or by <code>itemType</code> or by <code>itemGroup</code>.</p>\n<p>PriceList:</p>\n<ul>\n<li>SAP Business One: ITM1.PriceList=OPLN.LineNum. The service does not treat Special Prices (OSPP), Special Prices for Groups (OSPG), Interest Prices (OIRT).</li>\n<li>TOTVS Protheus: DA1_CODTAB=DA0_CODTAB</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>Item Type: [1] SAP Business One: OITM.MatType (table OMTP), [2] TOTVS Protheus: B1_TIPO (table SX5/02 - ToDo)</li>\n<li>Item Group: [1] SAP Business One: OITM.ItmsGrpCod (table OITB), [2] TOTVS Protheus: B1_GRUPO (table SBM - ToDo)</li>\n<li>Brand (or Manufacturer): [1] SAP Business One: OITM.FirmCode (table OMRC), [2] TOTVS Protheus: B1_FABRIC</li>\n</ul>\n<p>The prices service will consider as valid price:</p>\n<ul>\n<li>SAP Business One:</li>\n<li>TOTVS Protheus: [1] active (DA1_ATIVO=1), [2] initial validity (DA1_DATVIG&lt;=dDataBase)</li>\n</ul>\n<p>The prices service will consider as valid priceList:</p>\n<ul>\n<li>SAP Business One: [1] Valid (OPLN.validFor = Y)</li>\n<li>TOTVS Protheus: [1] active (DA0_ATIVO=1), [2] initial validity (DA0_DATDE&lt;=dDataBase)</li>\n</ul>\n<p>The prices service will consider as valid products:</p>\n<ul>\n<li>SAP Business One: [1] Sale Item (OITM.SellItem = Y), [2] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)</li>\n<li>TOTVS Protheus: [1] active product (B1_MSBLQL other than 1)</li>\n</ul>\n<p>If <code>priceListKey</code> is not informed, the price in all priceLists will be searched.</p>\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 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, 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>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 will allow you to search the list in two situations:</p>\n<ul>\n<li>Full Search: will result in all items with the price, optionally by priceList.</li>\n<li>Incremental Search: will result in all objects with changes after a certain date / time provided in the request, with a balance greater than or equal to zero. 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 stocks should be returned. This information will be used in conjunction with: [1] SAP Business One: the fields Creation Date and Creation Time of the transaction table in SAP Business One (OITM.CreateDate+OITM.CreateTS and OITM.UpdateDate+OITM.UpdateTS), [2] TOTVS Protheus: not implemented</li>\n</ul>\n<p>This service does not have user field (UDF) treatment.</p>\n<p>Observation: products/GET service can consider two prices in response:</p>\n<ul>\n<li><code>price</code> = normal price (API Setup &gt; GP PriceList or IGT_PRICEL)</li>\n<li><code>pricePromo</code> = promotional price (API Setup &gt; GP PriceListPromo or IGT_PRICELP)</li>\n</ul>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["prices"],"host":["{{endpoint}}"],"query":[{"disabled":true,"description":{"content":"<p>PriceList Primary Key in ERP (optional - list search)</p>\n","type":"text/plain"},"key":"priceListKey","value":"2"},{"disabled":true,"description":{"content":"<p>Type of products (optional in list search)</p>\n","type":"text/plain"},"key":"itemType","value":"4"},{"disabled":true,"description":{"content":"<p>Group of products (optional in list search)</p>\n","type":"text/plain"},"key":"itemGroup","value":"103"},{"disabled":true,"description":{"content":"<p>Brand of products (optional in list search)</p>\n","type":"text/plain"},"key":"brand","value":"1"},{"disabled":true,"description":{"content":"<p>Product Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"PA00773"},{"disabled":true,"description":{"content":"<p>Product Code Bars in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"codeBars","value":"I004"},{"disabled":true,"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"2"},{"disabled":true,"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-08-04T00:00:00"}],"variable":[]}},"response":[{"id":"fb440841-4a06-4b77-a4bb-7c8d82efd403","name":"Prices - SAP Business One (v2.0.7)","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/prices?itemType=4&itemGroup=103","host":["{{endpoint}}"],"path":["prices"],"query":[{"key":"priceListKey","value":"2","description":"PriceList Primary Key in ERP (optional - list search)","disabled":true},{"key":"itemType","value":"4","description":"Type of products (optional in list search)"},{"key":"itemGroup","value":"103","description":"Group of products (optional in list search)"},{"key":"brand","value":"1","description":"Brand of products (optional in list search)","disabled":true},{"key":"productKey","value":"I005","description":"Product Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"codeBars","value":"I004","description":"Product Code Bars in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-08-04T00: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":"Sat, 20 Feb 2021 01:43:31 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Prices\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"prices\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2021-02-19T23:43:28\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 21,\n    \"values\": [\n        {\n            \"productKey\": \"I014\",\n            \"codeBars\": \"I014\",\n            \"partnumber\": \"\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"1\",\n            \"priceListName\": \"Lista de Preço Principal\",\n            \"currency\": \"R$\",\n            \"price\": 850,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2018-09-17T22:07:33\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I014\",\n            \"codeBars\": \"I014\",\n            \"partnumber\": \"\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"2\",\n            \"priceListName\": \"Lista de Preço Varejo\",\n            \"currency\": \"R$\",\n            \"price\": 2125,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2018-09-17T22:07:33\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I014\",\n            \"codeBars\": \"I014\",\n            \"partnumber\": \"\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"3\",\n            \"priceListName\": \"Lista de Preço Corporativo\",\n            \"currency\": \"R$\",\n            \"price\": 2932.5,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2018-09-17T22:07:33\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I015\",\n            \"codeBars\": \"I015\",\n            \"partnumber\": \"\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"1\",\n            \"priceListName\": \"Lista de Preço Principal\",\n            \"currency\": \"R$\",\n            \"price\": 40,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I015\",\n            \"codeBars\": \"I015\",\n            \"partnumber\": \"\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"2\",\n            \"priceListName\": \"Lista de Preço Varejo\",\n            \"currency\": \"R$\",\n            \"price\": 100,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I015\",\n            \"codeBars\": \"I015\",\n            \"partnumber\": \"\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"3\",\n            \"priceListName\": \"Lista de Preço Corporativo\",\n            \"currency\": \"R$\",\n            \"price\": 138,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I017\",\n            \"codeBars\": \"I017\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"1\",\n            \"priceListName\": \"Lista de Preço Principal\",\n            \"currency\": \"R$\",\n            \"price\": 149.9,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I017\",\n            \"codeBars\": \"I017\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"2\",\n            \"priceListName\": \"Lista de Preço Varejo\",\n            \"currency\": \"R$\",\n            \"price\": 374.75,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I017\",\n            \"codeBars\": \"I017\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"3\",\n            \"priceListName\": \"Lista de Preço Corporativo\",\n            \"currency\": \"R$\",\n            \"price\": 151.99,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I018\",\n            \"codeBars\": \"I018\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"1\",\n            \"priceListName\": \"Lista de Preço Principal\",\n            \"currency\": \"R$\",\n            \"price\": 149.9,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I018\",\n            \"codeBars\": \"I018\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"2\",\n            \"priceListName\": \"Lista de Preço Varejo\",\n            \"currency\": \"R$\",\n            \"price\": 374.75,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I018\",\n            \"codeBars\": \"I018\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"3\",\n            \"priceListName\": \"Lista de Preço Corporativo\",\n            \"currency\": \"R$\",\n            \"price\": 179.59,\n            \"createdAt\": \"2009-06-26T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I019\",\n            \"codeBars\": \"I019\",\n            \"partnumber\": \"I015\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"1\",\n            \"priceListName\": \"Lista de Preço Principal\",\n            \"currency\": \"R$\",\n            \"price\": 189.9,\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I019\",\n            \"codeBars\": \"I019\",\n            \"partnumber\": \"I015\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"2\",\n            \"priceListName\": \"Lista de Preço Varejo\",\n            \"currency\": \"R$\",\n            \"price\": 474.75,\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I019\",\n            \"codeBars\": \"I019\",\n            \"partnumber\": \"I015\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"3\",\n            \"priceListName\": \"Lista de Preço Corporativo\",\n            \"currency\": \"R$\",\n            \"price\": 262.06,\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2014-02-05T00:00:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I020\",\n            \"codeBars\": \"78934354335453\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"1\",\n            \"priceListName\": \"Lista de Preço Principal\",\n            \"currency\": \"R$\",\n            \"price\": 219.9,\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2020-01-13T17:45:30\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I020\",\n            \"codeBars\": \"78934354335453\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"2\",\n            \"priceListName\": \"Lista de Preço Varejo\",\n            \"currency\": \"R$\",\n            \"price\": 549.75,\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2020-01-13T17:45:30\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I020\",\n            \"codeBars\": \"78934354335453\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"3\",\n            \"priceListName\": \"Lista de Preço Corporativo\",\n            \"currency\": \"R$\",\n            \"price\": 185.17,\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2020-01-13T17:45:30\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I021\",\n            \"codeBars\": \"I021\",\n            \"partnumber\": \"I015\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"1\",\n            \"priceListName\": \"Lista de Preço Principal\",\n            \"currency\": \"R$\",\n            \"price\": 189.9,\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2020-01-13T17:46:25\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I021\",\n            \"codeBars\": \"I021\",\n            \"partnumber\": \"I015\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"2\",\n            \"priceListName\": \"Lista de Preço Varejo\",\n            \"currency\": \"R$\",\n            \"price\": 474.75,\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2020-01-13T17:46:25\",\n            \"canceledAt\": null\n        },\n        {\n            \"productKey\": \"I021\",\n            \"codeBars\": \"I021\",\n            \"partnumber\": \"I015\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"priceListKey\": \"3\",\n            \"priceListName\": \"Lista de Preço Corporativo\",\n            \"currency\": \"R$\",\n            \"price\": 262.06,\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2020-01-13T17:46:25\",\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"4c47f494-15f7-4415-9071-57f1d7842c5e","name":"Prices - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/prices","host":["{{endpoint}}"],"path":["prices"],"query":[{"key":"priceListKey","value":"2","description":"PriceList Primary Key in ERP (optional - list search)","disabled":true},{"key":"itemType","value":"4","description":"Type of products (optional in list search)","disabled":true},{"key":"itemGroup","value":"103","description":"Group of products (optional in list search)","disabled":true},{"key":"brand","value":"1","description":"Brand of products (optional in list search)","disabled":true},{"key":"productKey","value":"PA00773","description":"Product Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"codeBars","value":"I004","description":"Product Code Bars in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-08-04T00: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\": \"salesAPI\",\n    \"process\": \"Prices\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"prices\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.30.4\",\n    \"effectiveTimestamp\": \"2021-09-03T17:13:26\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": true,\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"values\": [\n        {\n            \"erpKey\": \"PA000001\",\n            \"codeBars\": \"\",\n            \"itemType\": \"PA-PRODUTO ACABADO\",\n            \"itemGroup\": \"5001-PRODUTO ACABADO\",\n            \"brand\": \"INTERGATE\",\n            \"priceListKey\": \"001\",\n            \"priceListName\": \"TABELA GERAL\",\n            \"priceType\": \"1\",\n            \"currency\": \"R$\",\n            \"price\": 60,\n            \"createdAt\": \"2020-09-03\",\n            \"updatedAt\": \"2021-08-13\",\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"e84cecaf-a084-4f3e-8664-5af86699055a"},{"name":"Stocks","id":"1d70a1df-00c1-4374-ab9d-7bd38444a4dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/stocks?whsCode=01&binCode=001-07&itemType=4&itemGroup=103&brand=2&erpKey=PA00244&codeBars=78968064001054&pageNum=1&updatedAt=2020-01-01T00:00:00&showBatchNumbers=true&showPositiveOnly=true","description":"<h4 id=\"search-stocks-in-erp\">Search stocks in ERP</h4>\n<p><em>(sapBusinessOne=OITW-OIBQ, totvsProtheus=SB2-x)</em></p>\n<p>The inventory search allows you to filter the ERP by:</p>\n<ul>\n<li>List Search: by <code>itemType</code> or <code>itemGroup</code> or <code>brand</code> or <code>whsCode</code> or <code>binCode</code> {optional only for sapBusinessOne}</li>\n<li>Unitary Search: by <code>erpKey</code> or <code>codeBars</code></li>\n</ul>\n<p>If no field for unitary search (<code>erpKey</code> or <code>codeBars</code>) is informed in the request, the search will return the stock of all valid products. The list search can be filtered by <code>itemType</code> or <code>itemGroup</code> or <code>brand</code> or <code>whsCode</code> or <code>binCode</code> (only sapBusinessOne).</p>\n<p>Fields in response:</p>\n<ul>\n<li><code>erpKey</code>, <code>codeBars</code>, <code>partNumber</code> (if UdfPartNumber is enabled in API Setup)</li>\n<li><code>whsCode</code>, <code>binCode</code> (if UseBin is enabled in API Setup - only sapBusinessOne)</li>\n<li><code>stock</code> (quantity), <code>stockValue</code> (currency), <code>availableStock</code></li>\n<li><code>batchNumbers</code>: array of batch numbers with stock (if <code>showBatchNumbers</code>=true and product has batch stock control)</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>Item Type: [1] SAP Business One: OITM.MatType (table OMTP), [2] TOTVS Protheus: B1_TIPO (table SX5/02 - ToDo)</li>\n<li>Item Group: [1] SAP Business One: OITM.ItmsGrpCod (table OITB), [2] TOTVS Protheus: B1_GRUPO (table SBM - ToDo)</li>\n<li><code>brand</code> (or Manufacturer): [1] SAP Business One: OITM.FirmCode (table OMRC), [2] TOTVS Protheus: B1_FABRIC</li>\n<li><code>showPositiveOnly</code>: if true the response will show only positive stocks (default=false)</li>\n<li><code>showBatchNumbers</code>: if true the response will show the batchNumbers array for each stock register (default=false)</li>\n</ul>\n<p>The stocks service will consider as valid products:</p>\n<ul>\n<li>SAP Business One: [1] Sale Item (OITM.SellItem = Y), [2] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)</li>\n<li>TOTVS Protheus: [1] active product (B1_MSBLQL other than 1)</li>\n</ul>\n<p>If <code>whsCode</code> is not informed, the stock in all warehouses will be searched. If <code>binCode</code> is not informed, the stock in all bin locations will be searched (if UseBin=true in API Setup).</p>\n<p>Treatment for <code>batchNumbers</code> {only SAP Business One}:</p>\n<ul>\n<li>If <code>showBatchNumbers</code> is not informed or not true, only total stock is returned.</li>\n<li>To show batch numbers details, do the request with <code>showBatchNumbers</code>=true.</li>\n</ul>\n<p>Treatment for <code>availableStock</code>:</p>\n<ul>\n<li>SAP Business One: [1] OITW.OnHand - SUM (PKL1.RelQtty + PKL1.PickQtty linked with RDR1 and WTQ1). [2] OIBQ.OnHandQty - SUM (PKL1.RelQtty + PKL1.PickQtty linked with RDR1 and WTQ1), [3] Batch Numbers: OIBT.Quantity-OIBT.IsCommited</li>\n<li>TOTVS Protheus: According to parameter MV_TPSALDO, TOTVS documentation at <a href=\"https://centraldeatendimento.totvs.com/hc/pt-br/articles/360013215531-MP-SIGAEST-Utiliza%C3%A7%C3%A3o-do-par%C3%A2metro-SX6-MV-TPSALDO\">https://centraldeatendimento.totvs.com/hc/pt-br/articles/360013215531-MP-SIGAEST-Utilização-do-parâmetro-SX6-MV-TPSALDO</a></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 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>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 will allow you to search the stocks list in two situations:</p>\n<ul>\n<li>Full Search: will result in all items with an inventory balance greater than zero, optionally by brand and by warehouse.</li>\n<li>Incremental Search: will result in all items that had inventory movements after a certain date / time provided in the request, with a balance greater than or equal to zero. 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 stocks should be returned. This information will be used in conjunction with: [1] SAP Business One: the fields Creation Date and Creation Time of the transaction table in SAP Business One (OIVL.CreateDate and OIVL.CreateTime), [2] TOTVS Protheus: not implemented</li>\n</ul>\n<p>For use of user fields (UDF) created in the product table (SAPB1: -, TOTVS: SB2) 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["stocks"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Wharehouse code (optional in list and unitary search)</p>\n","type":"text/plain"},"key":"whsCode","value":"01"},{"description":{"content":"<p>Bin Location code (optional in list and unitary search)</p>\n","type":"text/plain"},"key":"binCode","value":"001-07"},{"description":{"content":"<p>Type of products (optional in list search)</p>\n","type":"text/plain"},"key":"itemType","value":"4"},{"description":{"content":"<p>Group of products (optional in list search)</p>\n","type":"text/plain"},"key":"itemGroup","value":"103"},{"description":{"content":"<p>Brand of products (optional in list search)</p>\n","type":"text/plain"},"key":"brand","value":"2"},{"description":{"content":"<p>Product Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"PA00244"},{"description":{"content":"<p>Product Code Bars in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"codeBars","value":"78968064001054"},{"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-01T00:00:00"},{"description":{"content":"<p>Show details by batch numbers? true to show (optional)</p>\n","type":"text/plain"},"key":"showBatchNumbers","value":"true"},{"description":{"content":"<p>Show only positive stocks? true to show only positive (optional)</p>\n","type":"text/plain"},"key":"showPositiveOnly","value":"true"}],"variable":[]}},"response":[{"id":"471edfaf-110f-4dcc-b1a9-bbf33821a92a","name":"Stocks - SAP Business One (v2.0.7)","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/stocks?itemType=4&itemGroup=103","host":["{{endpoint}}"],"path":["stocks"],"query":[{"key":"whsCode","value":"01","description":"Wharehouse code (optional in list and unitary search)","disabled":true},{"key":"binCode","value":"001-07","description":"Bin Location code (optional in list and unitary search)","disabled":true},{"key":"itemType","value":"4","description":"Type of products (optional in list search)"},{"key":"itemGroup","value":"103","description":"Group of products (optional in list search)"},{"key":"brand","value":"2","description":"Brand of products (optional in list search)","disabled":true},{"key":"erpKey","value":"PA00244","description":"Product Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"codeBars","value":"78968064001054","description":"Product Code Bars in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-01T00:00:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true},{"key":"showBatchNumbers","value":"true","description":"Show details by batch numbers? true to show (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":"Sat, 20 Feb 2021 18:18:18 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Stocks\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"stocks\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2021-02-20T16:18:13\",\n    \"useBin\": \"false\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 8,\n    \"values\": [\n        {\n            \"erpKey\": \"I014\",\n            \"codeBars\": \"I014\",\n            \"partnumber\": \"\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"whsCode\": \"05\",\n            \"stock\": 10,\n            \"stockValue\": 21250,\n            \"availableStock\": 10,\n            \"createdAt\": \"2018-09-17T22:09:00\",\n            \"updatedAt\": \"2018-09-17T22:09:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"I015\",\n            \"codeBars\": \"I015\",\n            \"partnumber\": \"\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"whsCode\": \"02\",\n            \"stock\": 81,\n            \"stockValue\": 4330.69,\n            \"availableStock\": 81,\n            \"createdAt\": \"2009-06-27T05:33:00\",\n            \"updatedAt\": \"2015-03-26T15:19:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"I015\",\n            \"codeBars\": \"I015\",\n            \"partnumber\": \"\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"whsCode\": \"05\",\n            \"stock\": 20,\n            \"stockValue\": 2000,\n            \"availableStock\": 20,\n            \"createdAt\": \"2018-09-17T22:09:00\",\n            \"updatedAt\": \"2018-09-17T22:09:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"I017\",\n            \"codeBars\": \"I017\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"whsCode\": \"01\",\n            \"stock\": 491,\n            \"stockValue\": 70415.33,\n            \"availableStock\": 489,\n            \"createdAt\": \"2009-06-27T05:30:00\",\n            \"updatedAt\": \"2018-06-13T15:28:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"I018\",\n            \"codeBars\": \"I018\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"whsCode\": \"01\",\n            \"stock\": 117,\n            \"stockValue\": 16663.15,\n            \"availableStock\": 115,\n            \"createdAt\": \"2009-06-27T05:30:00\",\n            \"updatedAt\": \"2018-06-13T15:28:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"I019\",\n            \"codeBars\": \"I019\",\n            \"partnumber\": \"I015\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"whsCode\": \"01\",\n            \"stock\": 189,\n            \"stockValue\": 36827.69,\n            \"availableStock\": 189,\n            \"createdAt\": \"2009-06-27T05:30:00\",\n            \"updatedAt\": \"2020-01-24T15:33:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"I020\",\n            \"codeBars\": \"78934354335453\",\n            \"partnumber\": \"I014\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"whsCode\": \"01\",\n            \"stock\": 1739,\n            \"stockValue\": 373644.41,\n            \"availableStock\": 1739,\n            \"createdAt\": \"2009-06-27T05:30:00\",\n            \"updatedAt\": \"2014-06-11T07:48:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"I021\",\n            \"codeBars\": \"I021\",\n            \"partnumber\": \"I015\",\n            \"itemType\": \"4-Produtos acabados\",\n            \"itemGroup\": \"103-Serviços\",\n            \"whsCode\": \"01\",\n            \"stock\": 265,\n            \"stockValue\": 49477.7,\n            \"availableStock\": 265,\n            \"createdAt\": \"2009-06-27T05:35:00\",\n            \"updatedAt\": \"2020-02-05T12:39:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"98a6ac2b-d675-4876-9ab1-c476870d0b44","name":"Stocks - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/stocks","host":["{{endpoint}}"],"path":["stocks"],"query":[{"key":"whsCode","value":"01","description":"Wharehouse code (optional in list and unitary search)","disabled":true},{"key":"binCode","value":"001-07","description":"Bin Location code (optional in list and unitary search)","disabled":true},{"key":"itemType","value":"4","description":"Type of products (optional in list search)","disabled":true},{"key":"itemGroup","value":"103","description":"Group of products (optional in list search)","disabled":true},{"key":"brand","value":"2","description":"Brand of products (optional in list search)","disabled":true},{"key":"erpKey","value":"PA00244","description":"Product Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"codeBars","value":"78968064001054","description":"Product Code Bars in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-01T00:00:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true},{"key":"showBatchNumbers","value":"true","description":"Show details by batch numbers? true to show (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\": \"salesAPI\",\n    \"process\": \"Stocks\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"stocks\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.30.4\",\n    \"effectiveTimestamp\": \"2021-09-03T17:11:04\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": true,\n    \"usePartnumber\": false,\n    \"useBin\": false,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"values\": [\n        {\n            \"erpKey\": \"MC000001\",\n            \"codeBars\": \"\",\n            \"itemType\": \"MC-MATERIAL DE CONSUMO\",\n            \"itemGroup\": \"-\",\n            \"brand\": \"\",\n            \"branch\": \"01\",\n            \"whsCode\": \"01\",\n            \"stock\": 0,\n            \"stockValue\": 0,\n            \"availableStock\": 0,\n            \"createdAt\": null,\n            \"updatedAt\": \"2021-08-18\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"MC000002\",\n            \"codeBars\": \"\",\n            \"itemType\": \"MC-MATERIAL DE CONSUMO\",\n            \"itemGroup\": \"-\",\n            \"brand\": \"\",\n            \"branch\": \"01\",\n            \"whsCode\": \"01\",\n            \"stock\": 0,\n            \"stockValue\": 0,\n            \"availableStock\": 0,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"MC000003\",\n            \"codeBars\": \"\",\n            \"itemType\": \"MC-MATERIAL DE CONSUMO\",\n            \"itemGroup\": \"-\",\n            \"brand\": \"\",\n            \"branch\": \"01\",\n            \"whsCode\": \"01\",\n            \"stock\": 601,\n            \"stockValue\": 52905.6,\n            \"availableStock\": 601,\n            \"createdAt\": null,\n            \"updatedAt\": \"2021-08-18\",\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"MP000001\",\n            \"codeBars\": \"\",\n            \"itemType\": \"MP-MATERIA PRIMA\",\n            \"itemGroup\": \"1001-MATERIA PRIMA\",\n            \"brand\": \"\",\n            \"branch\": \"01\",\n            \"whsCode\": \"01\",\n            \"stock\": 890,\n            \"stockValue\": 89,\n            \"availableStock\": 890,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"MP000002\",\n            \"codeBars\": \"\",\n            \"itemType\": \"MP-MATERIA PRIMA\",\n            \"itemGroup\": \"-\",\n            \"brand\": \"\",\n            \"branch\": \"01\",\n            \"whsCode\": \"01\",\n            \"stock\": -90,\n            \"stockValue\": 1,\n            \"availableStock\": 0,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        },\n        {\n            \"erpKey\": \"PA000001\",\n            \"codeBars\": \"\",\n            \"itemType\": \"PA-PRODUTO ACABADO\",\n            \"itemGroup\": \"5001-PRODUTO ACABADO\",\n            \"brand\": \"INTERGATE\",\n            \"branch\": \"01\",\n            \"whsCode\": \"01\",\n            \"stock\": 198,\n            \"stockValue\": 999.9,\n            \"availableStock\": 198,\n            \"createdAt\": null,\n            \"updatedAt\": \"2021-08-13\",\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 6\n}"}],"_postman_id":"1d70a1df-00c1-4374-ab9d-7bd38444a4dc"}],"id":"e2aa7972-1831-4028-a265-4e0aa871448a","_postman_id":"e2aa7972-1831-4028-a265-4e0aa871448a","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Partners","item":[{"name":"Partners","id":"2dfe5b34-599b-4f29-aff5-29839ef3a853","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/partners?type=S&taxType=P&sellerKey=000001&erpKey=C001&taxNumber=89175174987&pageNum=1&updatedAt=2020-01-30T15:00:00","description":"<h4 id=\"search-partners-in-erp\">Search partners in ERP</h4>\n<p><em>(sapBusinessOne=2/OCRD, totvsProtheus=SA1|SA2|SUS)</em></p>\n<p>The search of partners allows filtering the ERP by:</p>\n<ul>\n<li>List Search: by <code>type</code> (C = customer, S = supplier, L = lead) {required}, by <code>taxType</code> (C = company, P = person, G = government, E = employee) or <code>sellerKey</code> {optional}</li>\n<li>Unitary Search: by <code>erpKey</code> or <code>taxNumber</code> (with or without punctuation)</li>\n</ul>\n<p>If no fields for unitary search (erpKey or taxNumber) are informed in the request, the partner search is performed by <code>type</code> (which becomes required), and it is also possible to filter partners by <code>taxType</code> and/or <code>sellerKey</code>.</p>\n<p>The partners service will consider partners:</p>\n<ul>\n<li>SAP Business One: Valid and not canceled (OCRD.validFor = Y AND OCRD.Canceled = N)</li>\n<li>TOTVS Protheus: Active (A1_MSBLQL other than 1)</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>type</code>: SAP Business One (OCRD.CardType), TOTVS Protheus (tables SA1, SA2 and SUS)</li>\n<li><code>taxType</code>: SAP Business One (CRD7.TaxId0 or CRD7.TaxId4), TOTVS Protheus (A1_PESSOA + A1_TPESSOA=EP)</li>\n<li><code>sellerKey</code>: SAP Business One (OCRD.SlpCode), TOTVS Protheus (A1_VEND)</li>\n<li><code>erpKey</code>: SAP Business One (OCRD.CardCode), TOTVS Protheus (A1_COD+'_'+A1_LOJA)</li>\n<li><code>taxNumber</code>: SAP Business One (CRD7.TaxId0 or CRD7.TaxId4), TOTVS Protheus (A1_CGC)</li>\n<li><code>balanceValue</code> and <code>openOrdersValue</code>: for TOTVS Protheus refer <a href=\"https://tdn.totvs.com/pages/releaseview.action?pageId=253989073\">https://tdn.totvs.com/pages/releaseview.action?pageId=253989073</a></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 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>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 will allow you to search partners list in two situations:</p>\n<ul>\n<li>Full Search: will result in all partners, according to filters.</li>\n<li>Incremental Search: will result in all partners, according to filters, that 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 partners should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Update Date fields of the Business Partner record in SAP Business One (OCRD.CreateDate, OCRD.UpdateDate, OCRD.CreateTS, OCRD.UpdateTS), [2] TOTVS Protheus: the fields A1_USERLGI and A1_USERLGA, A2_USERLGI and A2_USERLGA, US_USERLGI and US_USERLGA</li>\n</ul>\n<p>For the use of user fields (UDF) created in the partner table (SAPB1: OCRD, TOTVS: SA1, SA2, SUS), 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["partners"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Partner Type: C=customer, S=supplier, L=lead (required if not unitary search)</p>\n","type":"text/plain"},"key":"type","value":"S"},{"description":{"content":"<p>Partner Tax Type: P=person, C=company, G=government, E=employer (optional in list search)</p>\n","type":"text/plain"},"key":"taxType","value":"P"},{"description":{"content":"<p>Seller Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"000001"},{"description":{"content":"<p>Partner Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"C001"},{"description":{"content":"<p>Partner Tax Number (optional - unitary search)</p>\n","type":"text/plain"},"key":"taxNumber","value":"89175174987"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"1"},{"description":{"content":"<p>Date do filter modified register - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-01-30T15:00:00"}],"variable":[]}},"response":[{"id":"87366df2-acad-4f25-b34c-2e41fa12dc8f","name":"partners","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/partners?erpKey=C001","host":["{{endpoint}}"],"path":["partners"],"query":[{"key":"erpKey","value":"C001","description":"Primary Key in ERP (optional)"},{"description":"Tax number (optional)","key":"taxNumber","value":"89175174987","disabled":true},{"key":"type","value":"C","description":"Partner type: C=customer, S=supplier, L=lead","disabled":true},{"key":"taxType","value":"P","description":"Partner tax type: P=person, C=company, G=government, E=employer","disabled":true},{"description":"Number of page - pagination (optional)","key":"pageNum","value":"1","disabled":true},{"key":"updatedAt","value":"2020-01-30T15:00:00","description":"Date do filter modified register - incremental query (optional)","disabled":true},{"key":"action","value":"partners","disabled":true},{"key":"sellerKey","value":null,"description":"Seller Primary Key in ERP (optional in list search)","type":"text","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, 30 Jan 2020 18:15:21 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"Partners\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"partners\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-01-30T15:15:20\",\n    \"erpKey\": \"C001\",\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            \"erpKey\": \"C001\",\n            \"type\": \"C\",\n            \"taxType\": \"C\",\n            \"fullName\": \"Sport Club Corinthians Paulista\",\n            \"aliasName\": \"Timão\",\n            \"email\": \"campeão@corinthians.com.br\",\n            \"phone\": \"2095-3000\",\n            \"phoneSecondary\": \"11\",\n            \"cellular\": \"11-9595-2001\",\n            \"taxNumber\": \"61.902.722/0001-26\",\n            \"stateTaxNumber\": \"113.440.120.113\",\n            \"cityTaxNumber\": \"\",\n            \"contactPerson\": \"Andrés Navarro Sanchez\",\n            \"sellerKey\": \"\",\n            \"createdAt\": \"2009-06-27T00:00:00\",\n            \"updatedAt\": \"2020-01-16T18:53:19\",\n            \"canceledAt\": null,\n            \"billingAddress\": {\n                \"streetType\": \"Rua\",\n                \"address1\": \"São Jorge\",\n                \"exteriorNumber\": \"777\",\n                \"address2\": \"\",\n                \"community\": \"Tatuapé\",\n                \"city\": \"São Paulo\",\n                \"county\": \"5344\",\n                \"stateCode\": \"SP\",\n                \"countryCode\": \"BR\",\n                \"postalCode\": \"03087-000\"\n            },\n            \"shippingAddress\": {\n                \"streetType\": \"Rua\",\n                \"address1\": \"São Jorge 2\",\n                \"exteriorNumber\": \"777\",\n                \"address2\": \"\",\n                \"community\": \"Tatuapé\",\n                \"city\": \"São Paulo\",\n                \"county\": \"5344\",\n                \"stateCode\": \"SP\",\n                \"countryCode\": \"BR\",\n                \"postalCode\": \"03087-000\"\n            }\n        }\n    ]\n}"}],"_postman_id":"2dfe5b34-599b-4f29-aff5-29839ef3a853"},{"name":"Partner","id":"4b2e166a-f44e-4981-8270-dc92aea05db7","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\"type\": \"C\",\r\n\t\"taxType\": \"C\",\r\n\t\"partnerId\": \"C001\",\r\n\t\"fullName\": \"Sport Club Corinthians Paulista\",\r\n\t\"aliasName\": \"Timão\",\r\n\t\"email\": \"campeão@corinthians.com.br\",\r\n\t\"phone\": \"2095-3000\",\r\n\t\"phoneSecondary\": \"11\",\r\n    \"cellular\": \"11-9595-2001\",\r\n\t\"taxNumber\": \"61.902.722/0001-26\",\r\n\t\"stateTaxNumber\": \"113.440.120.113\",\r\n\t\"cityTaxNumber\": \"\",\r\n    \"inssTaxNumber\": \"0000\",\r\n    \"paymentCondition\": \"46\",\r\n\t\"billingAddress\": {\r\n\t\t\"address1\": \"São Jorge\",\r\n\t\t\"address2\": \"\",\r\n\t\t\"city\": \"São Paulo\",\r\n\t\t\"postalCode\": \"03087-000\",\r\n\t\t\"stateCode\": \"SP\",\r\n\t\t\"community\": \"Tatuapé\",\r\n\t\t\"exteriorNumber\": \"777\",\r\n\t\t\"streetType\": \"Rua\",\r\n\t\t\"countryCode\": \"BR\"\r\n\t},\r\n\t\"shippingAddress\": {\r\n\t\t\"address1\": \"São Jorge 2\",\r\n\t\t\"address2\": \"\",\r\n\t\t\"city\": \"São Paulo\",\r\n\t\t\"postalCode\": \"03087-000\",\r\n\t\t\"stateCode\": \"SP\",\r\n\t\t\"community\": \"Tatuapé\",\r\n\t\t\"exteriorNumber\": \"777\",\r\n\t\t\"streetType\": \"Rua\",\r\n\t\t\"countryCode\": \"BR\"\r\n\t},\r\n    \"bankData\": {\r\n        \"bankCountry\": \"BR\",\r\n        \"bankName\": \"Itau\",\r\n        \"bankCode\": \"341\",\r\n        \"bankBranch\": \"0134\",\r\n        \"bankAccount\": \"08254\",\r\n        \"bankBranchKey\": \"\",\r\n        \"bankAccountKey\": \"1\"\r\n    }\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/partners","description":"<h4 id=\"insertupdate-partner-in-erp\">Insert/update partner in ERP</h4>\n<p><em>(sapBusinessOne=2/OCRD, totvsProtheus=SA1|SA2|SUS)</em></p>\n<p>This service will allow to insert a new partner in the ERP, or to update an existing partner.</p>\n<p>Partners are classified in the ERP as:</p>\n<ul>\n<li><code>type</code>: C = customer, S = supplier, L = lead</li>\n<li><code>taxType</code>: P = person, C = company, G = government, E = employee</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 included 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: A1_CGC (customer) or A2_CGC (supplier) or US_CGC (lead)</li>\n</ul>\n<p><code>sellerKey</code>:</p>\n<ul>\n<li>SAP BusinessOne: sellerKey=OCRD.SlpCode (OSLP)</li>\n<li>TOTVS Protheus: sellerKey=A1_VEND (SA3)</li>\n</ul>\n<p><code>phone</code>/<code>phoneSecundary</code>/<code>cellular</code> (format recommended: +XXYYNNNNNNNNN):</p>\n<ul>\n<li>SAP BusinessOne: OCRD.Phone1/OCRD.Phone2/OCRD.Cellular</li>\n<li>TOTVS Protheus: A1_FONE/A1_FAX/not used (note.: the value informed in field <code>phone</code>is splitted in fields A1_DDI/A1_DDD/A1_FONE)</li>\n</ul>\n<p><code>Adresses</code>:</p>\n<ul>\n<li><code>shippingAddress</code> and <code>billingAddress</code>: shipping and billing address are required blocks</li>\n<li>SAP Business One: Each PN will have 2 registered addresses (CRD1, CRD7), namely: [1] ShipToCode (S) = /fullName, [2] BillToCode (B) = /fullName. Each PN will have 3 tax identification numbers (CRD12), namely: ShipToCode, BillToCode, empty</li>\n<li>TOTVS Protheus: Standard address fields and delivery address fields will be used. The Billing fields (only on recording) and Delivery Client will not be used.</li>\n</ul>\n<p><code>bankData</code>:</p>\n<ul>\n<li>partner bank data is optional</li>\n</ul>\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>type *</td>\n<td>string</td>\n<td>Type of partner (C=customer, S=supplier, L=lead)</td>\n</tr>\n<tr>\n<td>taxType *</td>\n<td>string</td>\n<td>Tax Type of partner (P=person, C=company, G=government, E=employee)</td>\n</tr>\n<tr>\n<td>partnerId</td>\n<td>string</td>\n<td>ID Partner</td>\n</tr>\n<tr>\n<td>fullName *</td>\n<td>string</td>\n<td>Partner full name</td>\n</tr>\n<tr>\n<td>aliasName</td>\n<td>string</td>\n<td>Partner alias name</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>Email</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>string</td>\n<td>Phone number (try to use in format +XXYYPPPPPPPP)</td>\n</tr>\n<tr>\n<td>phoneSecondary</td>\n<td>string</td>\n<td>Secondary phone number (try to use in format +XXYYPPPPPPPP)</td>\n</tr>\n<tr>\n<td>cellular</td>\n<td>string</td>\n<td>Cellular number (try to use in format +XXYYPPPPPPPP - SAPB1 only)</td>\n</tr>\n<tr>\n<td>taxNumber *</td>\n<td>string</td>\n<td>Partner Tax Number</td>\n</tr>\n<tr>\n<td>stateTaxNumber</td>\n<td>string</td>\n<td>State Tax Number</td>\n</tr>\n<tr>\n<td>cityTaxNumber</td>\n<td>string</td>\n<td>City Tax Number</td>\n</tr>\n<tr>\n<td>inssTaxNumber</td>\n<td>string</td>\n<td>INSS Tax Number {new}</td>\n</tr>\n<tr>\n<td>sellerKey</td>\n<td>string</td>\n<td>Seller Primary Key in ERP</td>\n</tr>\n<tr>\n<td>paymentCondition</td>\n<td>string</td>\n<td>Payment Condition Key {new}</td>\n</tr>\n<tr>\n<td>paymentMethod</td>\n<td>string</td>\n<td>Payment Method Key {new}</td>\n</tr>\n<tr>\n<td>billingAddress *</td>\n<td>object</td>\n<td>Billing Address</td>\n</tr>\n<tr>\n<td>billingAddress.fullName</td>\n<td>string</td>\n<td>Full address name (example: BILLING or COBRANCA)</td>\n</tr>\n<tr>\n<td>billingAddress.adress1 *</td>\n<td>string</td>\n<td>First address</td>\n</tr>\n<tr>\n<td>billingAddress.adress2</td>\n<td>string</td>\n<td>Second address</td>\n</tr>\n<tr>\n<td>billingAddress.city *</td>\n<td>string</td>\n<td>City</td>\n</tr>\n<tr>\n<td>billingAddress.postalCode *</td>\n<td>string</td>\n<td>Postal Code</td>\n</tr>\n<tr>\n<td>billingAddress.stateCode *</td>\n<td>string</td>\n<td>State Code</td>\n</tr>\n<tr>\n<td>billingAddress.countryCode</td>\n<td>string</td>\n<td>Country Code (example: BR)</td>\n</tr>\n<tr>\n<td>billingAddress.community</td>\n<td>string</td>\n<td>Community</td>\n</tr>\n<tr>\n<td>billingAddress.county</td>\n<td>string</td>\n<td>City County</td>\n</tr>\n<tr>\n<td>billingAddress.exteriorNumber</td>\n<td>string</td>\n<td>Exterior number</td>\n</tr>\n<tr>\n<td>billingAddress.streetType</td>\n<td>string</td>\n<td>Street type</td>\n</tr>\n<tr>\n<td>shippingAddress</td>\n<td>object</td>\n<td>Shipping Address</td>\n</tr>\n<tr>\n<td>shippingAddress.fullName</td>\n<td>string</td>\n<td>Full address name (example: SHIPPING or ENTREGA)</td>\n</tr>\n<tr>\n<td>shippingAddress.adress1 *</td>\n<td>string</td>\n<td>First address</td>\n</tr>\n<tr>\n<td>shippingAddress.adress2</td>\n<td>string</td>\n<td>Second address</td>\n</tr>\n<tr>\n<td>shippingAddress.city *</td>\n<td>string</td>\n<td>City</td>\n</tr>\n<tr>\n<td>shippingAddress.postalCode *</td>\n<td>string</td>\n<td>Postal Code</td>\n</tr>\n<tr>\n<td>shippingAddress.stateCode *</td>\n<td>string</td>\n<td>State Code</td>\n</tr>\n<tr>\n<td>shippingAddress.countryCode</td>\n<td>string</td>\n<td>Country Code</td>\n</tr>\n<tr>\n<td>shippingAddress.community</td>\n<td>string</td>\n<td>Community</td>\n</tr>\n<tr>\n<td>shippingAddress.county</td>\n<td>string</td>\n<td>County</td>\n</tr>\n<tr>\n<td>shippingAddress.exteriorNumber</td>\n<td>string</td>\n<td>Exterior Number</td>\n</tr>\n<tr>\n<td>shippingAddress.streetType</td>\n<td>string</td>\n<td>Street type</td>\n</tr>\n<tr>\n<td>bankData.bankCountry</td>\n<td>string</td>\n<td>Bank Country (ex: BR) {new}</td>\n</tr>\n<tr>\n<td>bankData.bankName</td>\n<td>string</td>\n<td>Bank Name {new}</td>\n</tr>\n<tr>\n<td>bankData.bankCode</td>\n<td>string</td>\n<td>Bank Code {new}</td>\n</tr>\n<tr>\n<td>bankData.bankBranch</td>\n<td>string</td>\n<td>Bank Branch {new}</td>\n</tr>\n<tr>\n<td>bankData.bankAccount</td>\n<td>string</td>\n<td>Bank Account {new}</td>\n</tr>\n<tr>\n<td>bankData.bankBranchKey</td>\n<td>string</td>\n<td>Bank Branch Key {new}</td>\n</tr>\n<tr>\n<td>bankData.bankAccountKey</td>\n<td>string</td>\n<td>Bank Account Key {new}</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>API Package</td>\n</tr>\n<tr>\n<td>process</td>\n<td>string</td>\n<td>API Process</td>\n</tr>\n<tr>\n<td>system</td>\n<td>string</td>\n<td>ERP System</td>\n</tr>\n<tr>\n<td>target</td>\n<td>string</td>\n<td>API Target</td>\n</tr>\n<tr>\n<td>user</td>\n<td>string</td>\n<td>User of request</td>\n</tr>\n<tr>\n<td>host</td>\n<td>string</td>\n<td>Host of request</td>\n</tr>\n<tr>\n<td>effectiveTimestamp</td>\n<td>string</td>\n<td>Effective Timestamp of processing</td>\n</tr>\n<tr>\n<td>code</td>\n<td>string</td>\n<td>Return Code (200, 400, 401, 403, 404, 500, ...)</td>\n</tr>\n<tr>\n<td>success</td>\n<td>booleano</td>\n<td>Success in processing? (true/false)</td>\n</tr>\n<tr>\n<td>values</td>\n<td>array</td>\n<td>Values resulting of processing</td>\n</tr>\n<tr>\n<td>values.Object</td>\n<td>string</td>\n<td>Object in ERP</td>\n</tr>\n<tr>\n<td>values.Table</td>\n<td>string</td>\n<td>Table in ERP</td>\n</tr>\n<tr>\n<td>values.Action</td>\n<td>string</td>\n<td>Action (insert, update, ...)</td>\n</tr>\n<tr>\n<td>values.DocEntry</td>\n<td>string</td>\n<td>Primary Key in ERP</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["partners"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"ab0364a2-5430-4bf7-b413-86a289153179","name":"partners","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"type\": \"C\",\r\n\t\"taxType\": \"P\",\r\n\t\"partnerId\": \"1234\",\r\n\t\"fullName\": \"Jeferson Barros\",\r\n\t\"aliasName\": \"Jeferson Barros\",\r\n\t\"email\": \"jeferson.barros.adv@gmail.com\",\r\n\t\"phone\": \"66999847068\",\r\n\t\"phoneSecondary\": \"\",\r\n    \"cellular\": \"\",\r\n\t\"taxNumber\": \"62790145172\",\r\n\t\"stateTaxNumber\": \"\",\r\n\t\"cityTaxNumber\": \"\",\r\n\t\"sellerKey\": null,\r\n\t\"billingAddress\": {\r\n\t\t\"firstName\": \"Jeferson\",\r\n\t\t\"lastName\": \"Barros\",\r\n\t\t\"address1\": \"Rua Maranhão\",\r\n\t\t\"address2\": \"Próximo a Spaço Aquático\",\r\n\t\t\"city\": \"Rondonópolis\",\r\n\t\t\"postalCode\": \"78715-226\",\r\n\t\t\"stateCode\": \"MT\",\r\n\t\t\"countryCode\": \"BR\",\r\n\t\t\"community\": \"Jardim Santa Luzia\",\r\n\t\t\"exteriorNumber\": \"251\",\r\n\t\t\"streetType\": \"\"\r\n\t},\r\n\t\"shippingAddress\": {\r\n\t\t\"firstName\": \"Jeferson\",\r\n\t\t\"lastName\": \"\",\r\n\t\t\"address1\": \"Rua Maranhão\",\r\n\t\t\"address2\": \"Próximo a Spaço Aquático\",\r\n\t\t\"city\": \"Rondonópolis\",\r\n\t\t\"postalCode\": \"78715-226\",\r\n\t\t\"stateCode\": \"MT\",\r\n\t\t\"countryCode\": \"BR\",\r\n\t\t\"community\": \"Jardim Santa Luzia\",\r\n\t\t\"exteriorNumber\": \"251\",\r\n\t\t\"streetType\": \"\"\r\n\t}\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":{"raw":"{{endpoint}}?action=partners","host":["{{endpoint}}"],"query":[{"key":"action","value":"partners"}]}},"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":"Fri, 22 Nov 2019 14:06:58 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"Partners\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"partners\",\n    \"user\": \"intergate\",\n    \"host\": \"170.81.220.186\",\n    \"effectiveTimestamp\": \"2019-11-22T12:06:48\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"Object\": \"2\",\n            \"Table\": \"OCRD\",\n            \"Action\": \"Update\",\n            \"DocEntry\": \"C3079042\"\n        }\n    ]\n}"},{"id":"e72fc905-a4a3-4adf-85a5-7777ab1e644c","name":"Partner - Supplier","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"type\": \"S\",\r\n    \"taxType\": \"C\",\r\n    \"fullName\": \"TUPY S/A\",\r\n    \"aliasName\": \"TUPY S/A\",\r\n    \"email\": \"recebe.nfe@tupy.com.br\",\r\n    \"phone\": \"4740098181\",\r\n    \"phoneSecondary\": \"\",\r\n    \"cellular\": \"\",\r\n    \"taxNumber\": \"84683374000300\",\r\n    \"stateTaxNumber\": \"255505256\",\r\n    \"cityTaxNumber\": \"\",\r\n    \"billingAddress\": {\r\n        \"address1\": \"R ALBANO SCHMIDT\",\r\n        \"address2\": \"\",\r\n        \"city\": \"JOINVILLE\",\r\n        \"postalCode\": \"89227901\",\r\n        \"stateCode\": \"SC\",\r\n        \"community\": \"BOA VISTA\",\r\n        \"exteriorNumber\": \"3400\"\r\n\t},\r\n\t\"shippingAddress\": {\r\n        \"address1\": \"R ALBANO SCHMIDT\",\r\n        \"address2\": \"\",\r\n        \"city\": \"JOINVILLE\",\r\n        \"postalCode\": \"89227901\",\r\n        \"stateCode\": \"SC\",\r\n        \"community\": \"BOA VISTA\",\r\n        \"exteriorNumber\": \"3400\"\r\n\t}\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/partners"},"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\": \"salesAPI\",\n    \"process\": \"Partners\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"partners\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-09-28T21:23:46\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"2\",\n            \"table\": \"SA2\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"00002701\"\n        }\n    ]\n}"}],"_postman_id":"4b2e166a-f44e-4981-8270-dc92aea05db7"},{"name":"Contacts NEW","id":"eaa6b28e-6394-4c2c-97e0-701a5724c588","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/contacts?partnerType=C&partnerKey=C001&erpKey=1&pageNum=1&updatedAt=2010-01-30T15:00:00","description":"<h4 id=\"search-contacts-in-erp\">Search contacts in ERP</h4>\n<p><em>(sapBusinessOne=11/OCPR, totvsProtheus=SU5)</em></p>\n<p>The search of contacts allows filtering the ERP by:</p>\n<ul>\n<li>List Search: by <code>partnerKey</code> or <code>partnerType</code> (C = customer, S = supplier, L = lead) {optional}</li>\n<li>Unitary Search: by <code>erpKey</code></li>\n</ul>\n<p>If no fields for unitary search (<code>erpKey</code>) are informed in the request, the partner search is performed by <code>partnerKey</code> or <code>partnerType</code>.</p>\n<p>The contacts service will consider contacts:</p>\n<ul>\n<li>SAP Business One: Active (OCPR.Active=Y)</li>\n<li>TOTVS Protheus: Active (SU5.U5_MSBLQL!='1')</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>partnerKey</code>: SAP Business One (OCPR.CardCode), TOTVS Protheus (AC8.AC8_CODENT)</li>\n<li><code>partnerType</code>: SAP Business One (OCRD.CardType), TOTVS Protheus (AC8.AC8_ENTIDA)</li>\n<li><code>erpKey</code>: SAP Business One (OCPR.CntctCode), TOTVS Protheus (SU5.U5_CODCONT)</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 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>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 will allow you to search partners list in two situations:</p>\n<ul>\n<li>Full Search: will result in all partners, according to filters.</li>\n<li>Incremental Search: will result in all partners, according to filters, that 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 partners should be returned. This information will be used in conjunction with: [1] SAP Business One: the Creation Date and Update Date fields of the Business Partner record in SAP Business One (OCRD.CreateDate, OCRD.UpdateDate, OCRD.CreateTS, OCRD.UpdateTS), [2] TOTVS Protheus: the fields _USERLGI and _USERLGA in table SU5</li>\n</ul>\n<p>For the use of user fields (UDF) created in the partner table (SAPB1: OCPR, TOTVS: SU5), 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["contacts"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Partner Type: C=customer, S=supplier, L=lead (optional in list search)</p>\n","type":"text/plain"},"key":"partnerType","value":"C"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"C001"},{"description":{"content":"<p>Contact Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"1"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"1"},{"description":{"content":"<p>Date do filter modified register - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2010-01-30T15:00:00"}],"variable":[]}},"response":[{"id":"c07753f6-2295-4cb7-b9c4-97bfc0fb7686","name":"Contacts - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/contacts","host":["{{endpoint}}"],"path":["contacts"],"query":[{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"partnerType","value":"C","description":"Partner Type: C=customer, S=supplier, L=lead (optional in list search)","disabled":true},{"key":"erpKey","value":"1","description":"Contact Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-30T15:00:00","description":"Date do filter modified register - 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":"Sat, 27 Mar 2021 14:21:27 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Contacts\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"contacts\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2021-03-27T11:21:24\",\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            \"erpKey\": \"1\",\n            \"fullName\": \"Roseli Gouvêa\",\n            \"email\": \"roseli@adidas.com.br\",\n            \"phone\": \"5503-1234\",\n            \"phoneSecondary\": \"11\",\n            \"cellular\": \"8972-3218\",\n            \"partnerKey\": \"F001\",\n            \"partnerType\": \"S\",\n            \"blockComm\": \"N\",\n            \"createdAt\": null,\n            \"updatedAt\": \"2009-06-27T00:40:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"ac533efd-d376-4f8d-a721-863da0cf46ff","name":"Contacts - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/contacts","host":["{{endpoint}}"],"path":["contacts"],"query":[{"key":"partnerType","value":"C","description":"Partner Type: C=customer, S=supplier, L=lead (optional in list search)","disabled":true},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"1","description":"Contact Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2010-01-30T15:00:00","description":"Date do filter modified register - 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\": \"salesAPI\",\n    \"process\": \"Contacts\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"contacts\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2021-04-23T19:29:50\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 200,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"useCustom\": true,\n    \"values\": [\n        {\n            \"erpKey\": \"000001\",\n            \"fullName\": \"RAFAEL OGEDA\",\n            \"email\": \"rafael.ogeda@intergate.net.br\",\n            \"phone\": \"\",\n            \"phoneSecundary\": \"\",\n            \"cellular\": \"\",\n            \"partnerKey\": \"000015_01\",\n            \"partnerType\": \"C\",\n            \"blockComm\": \"N\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"eaa6b28e-6394-4c2c-97e0-701a5724c588"}],"id":"2134e516-8bc3-4684-977c-9df590466659","_postman_id":"2134e516-8bc3-4684-977c-9df590466659","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Sellers","item":[{"name":"Sale Agents","id":"aa47a6ca-4572-4692-a305-47c55de05e2a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/saleAgents?erpKey=Intergate","description":"<h4 id=\"search-salesagents-in-erp\">Search salesAgents in ERP</h4>\n<p><em>(sapBusinessOne=177/OAGP, totvsProtheus=ADK)</em></p>\n<p>The search of salesAgents (PROTHEUS=Business Units) 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 salesAgents service will consider as valid salesAgent:</p>\n<ul>\n<li>SAP Business One: [1] Not blocked: OAGP.Locked NOT Y</li>\n<li>TOTVS Protheus: [1] Not blocked: ADK_MSBLQL NOT 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["saleAgents"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>SalesAgent Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"Intergate"}],"variable":[]}},"response":[{"id":"4ebe8d28-8e89-4c8a-b79d-8a7b96710674","name":"Sale Agents - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/saleAgents","host":["{{endpoint}}"],"path":["saleAgents"],"query":[{"key":"erpKey","value":"12","description":"SalesAgent 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=E4B4597094789A6EDAEF22988C02AF40; 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":"Sat, 30 May 2020 14:40:13 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"SaleAgents\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"saleAgents\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-05-30T11:40:07\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 1,\n    \"values\": [\n        {\n            \"erpKey\": \"Intergate\",\n            \"name\": \"Intergate\",\n            \"memo\": \"Intergate\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"aa47a6ca-4572-4692-a305-47c55de05e2a"},{"name":"Sellers","id":"0f8a8363-6f53-446a-8ed8-d8ddf58c5510","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/sellers?erpKey=12&pageNum=1","description":"<h4 id=\"search-sellers-in-erp\">Search sellers in ERP</h4>\n<p><em>(sapBusinessOne=53/OSLP, totvsProtheus=SA3)</em></p>\n<h6 id=\"atention-for-totvs-protheus-use-igt_sellers-conflict-with-totvs-standard-api\">ATENTION: for TOTVS Protheus use /igt_sellers (conflict with TOTVS standard API)</h6>\n<p>The search of sellers 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 seller search is performed as a list.</p>\n<p>The sellers service will consider as valid sellers:</p>\n<ul>\n<li>SAP Business One: [1] Active and not blocked: OSLP.Active = Y AND OSLP.Locked = N</li>\n<li>TOTVS Protheus: [1] Active: A3_MSBLQL other than 1</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 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>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 the use of user fields (UDF) created in the seller table (SAPB1: OSLP, TOTVS: SA3), 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["sellers"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Seller Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"12"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"1"}],"variable":[]}},"response":[{"id":"47d6de8f-d55e-4292-9cf0-f8ebe6a4c399","name":"sellers - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/sellers?erpKey=2","host":["{{endpoint}}"],"path":["sellers"],"query":[{"key":"erpKey","value":"2","description":"Seller Primary Key in ERP (optional)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (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":"Mon, 02 Mar 2020 21:42:25 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Sellers\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"sellers\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-03-02T18:42:22\",\n    \"erpKey\": \"2\",\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\": \"2\",\n            \"fullName\": \"Sócrates Gouvêa\",\n            \"email\": \"\",\n            \"phone\": \"\",\n            \"phoneSecondary\": \"\",\n            \"cellular\": \"\",\n            \"commissionRate\": 0,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"0f8a8363-6f53-446a-8ed8-d8ddf58c5510"},{"name":"Sellers","id":"cedfa780-ae1b-40a8-bf9a-a83a2f8bd573","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\"erpKey\": \"5\",\r\n\t\"fullName\": \"Rafael Hernandes Ogeda\",\r\n\t\"email\": \"teste@teste.com.br\",\r\n\t\"phone\": \"\",\r\n\t\"phoneSecondary\": \"\",\r\n    \"cellular\": \"\",\r\n\t\"commissionRate\": 3.0\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/sellers","description":"<h4 id=\"insertupdate-seller-in-erp\">Insert/update seller in ERP</h4>\n<p><em>(sapBusinessOne=53/OSLP, totvsProtheus=SA3)</em></p>\n<p>This service will allow to insert a new seller in the ERP.</p>\n<p>The key to finding the seller is via erpKey (optional). If erpKey is informed and the seller is located by erpKey, the  data is updated, otherwise the new seller is inserted in the ERP.</p>\n<ul>\n<li>SAP Business One: OSLP.SlpCode</li>\n<li>TOTVS Protheus: A3_CODE</li>\n</ul>\n<p><em>Note: TOTVS Protheus does not allow 2 sellers with the same fullName.</em></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>Erp key</td>\n</tr>\n<tr>\n<td>fullName</td>\n<td>string</td>\n<td>Full name</td>\n</tr>\n<tr>\n<td>email</td>\n<td>string</td>\n<td>email</td>\n</tr>\n<tr>\n<td>phone</td>\n<td>string</td>\n<td>Number phone</td>\n</tr>\n<tr>\n<td>phoneSecondary</td>\n<td>string</td>\n<td>Number phone Secondary</td>\n</tr>\n<tr>\n<td>cellular</td>\n<td>string</td>\n<td>Number cellular</td>\n</tr>\n<tr>\n<td>commissionRate</td>\n<td>number</td>\n<td>Comission rate</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>useCustom</td>\n<td>booleano</td>\n<td>Use Custom</td>\n</tr>\n<tr>\n<td>values</td>\n<td>array</td>\n<td>Values</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["sellers"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"6a4e51f4-37ad-4aa2-b5ef-790dab012197","name":"sellers - SAP Business One","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"erpKey\": \"5\",\r\n\t\"fullName\": \"Rafael Hernandes Ogeda\",\r\n\t\"email\": \"teste@teste.com.br\",\r\n\t\"phone\": \"\",\r\n\t\"phoneSecondary\": \"\",\r\n    \"cellular\": \"\",\r\n\t\"commissionRate\": 3.0\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/sellers"},"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":"Mon, 02 Mar 2020 22:33:32 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Sellers\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"sellers\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-03-02T19:33:30\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": true,\n    \"values\": [\n        {\n            \"object\": \"53\",\n            \"table\": \"OSLP\",\n            \"action\": \"Update\",\n            \"erpKey\": \"5\"\n        }\n    ]\n}"}],"_postman_id":"cedfa780-ae1b-40a8-bf9a-a83a2f8bd573"}],"id":"5bb7bdf0-df20-49b8-af7e-1334fab85509","event":[{"listen":"prerequest","script":{"id":"b6a06da1-87bd-4295-9df1-aa6b38c2d0d3","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"87aa5876-b97a-4fdb-8e4a-30283ab9e794","type":"text/javascript","exec":[""]}}],"_postman_id":"5bb7bdf0-df20-49b8-af7e-1334fab85509","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Sale Contracts NEW","item":[{"name":"Sale Contracts","id":"0975c384-cbae-40f4-86e5-b843124f6ab5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/saleContracts?createdFrom=2011-01-01&createdTo=2021-12-31&partnerKey=C001&docStatus=O/A&erpKey=149231&docNum=122608&orderNum=1074052740415-01&pageNum=1&updatedAt=2021-05-01T00:00:00","description":"<h4 id=\"search-sale-contracts-in-erp\">Search sale contracts in ERP</h4>\n<p><em>(sapBusinessOne=1250000025/OOAT, totvsProtheus=&lt;&gt;)</em></p>\n<p>This service will allow you to search sale 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>orderNum</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>orderNum</code> or <code>docNum</code>), the query for sale contracts is done by creation date from/to (which become mandatory).</p>\n<p>The contracts service will consider sale contracts with:</p>\n<ul>\n<li>SAP Business One: OOAT.ObjType = 1250000025 + OOAT.BpType=C</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>orderNum</code>: SAP Business One (OOAT.NumAtCard), TOTVS Protheus (x)</li>\n<li><code>docNum</code>: SAP Business One (OOAT.Number), 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: Sale Contract data, Partner data, Items (+ taxes), Totals (Payments, Taxes, Sales Orders = roadmap)</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 sale 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["saleContracts"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter sales quotations (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2011-01-01"},{"description":{"content":"<p>Final create date to filter sales quotations (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>Partner Contract Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1074052740415-01"},{"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":"5dfd1f23-b228-46e5-985b-044916a8757d","name":"Sale Contracts - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/saleContracts?createdFrom=2011-01-01&createdTo=2021-12-31","host":["{{endpoint}}"],"path":["saleContracts"],"query":[{"key":"createdFrom","value":"2011-01-01","description":"Initial create date to filter sales quotations (required if not unitary search)"},{"key":"createdTo","value":"2021-12-31","description":"Final create date to filter sales quotations (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":"orderNum","value":"1074052740415-01","description":"Partner Contract 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:37 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"SaleContracts\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"saleContracts\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.102\",\n    \"effectiveTimestamp\": \"2021-05-13T19:37:34\",\n    \"createdFrom\": \"2011-01-01\",\n    \"createdTo\": \"2021-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\": 2,\n    \"values\": [\n        {\n            \"description\": \"\",\n            \"erpKey\": \"1\",\n            \"docNum\": \"1\",\n            \"docStatus\": \"A\",\n            \"startDate\": \"2015-01-01\",\n            \"endDate\": \"2017-12-31\",\n            \"signDate\": \"2015-01-01\",\n            \"docValue\": 17400,\n            \"partnerKey\": \"C001\",\n            \"partnerName\": \"Sport Club Corinthians Paulista\",\n            \"type\": \"G\",\n            \"method\": \"I\",\n            \"payConditionKey\": \"\",\n            \"payMethodKey\": \"\",\n            \"pricelistKey\": \"\",\n            \"comments\": \"\",\n            \"createdAt\": \"2015-01-30T15:11:51\",\n            \"updatedAt\": \"2015-11-25T15:11:51\",\n            \"canceledAt\": null,\n            \"items\": [\n                {\n                    \"lineNum\": \"1\",\n                    \"productKey\": \"I001\",\n                    \"productName\": \"Bola Nike Total 90 Pitch CBF\",\n                    \"quantity\": 40,\n                    \"confirmedQuantity\": 0,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 60,\n                    \"taxBasis\": 2400,\n                    \"lineStatus\": \"O\",\n                    \"comments\": \"\"\n                },\n                {\n                    \"lineNum\": \"2\",\n                    \"productKey\": \"I003\",\n                    \"productName\": \"Bola Nike Corinthians II nd Club\",\n                    \"quantity\": 200,\n                    \"confirmedQuantity\": 4,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 75,\n                    \"taxBasis\": 15000,\n                    \"lineStatus\": \"O\",\n                    \"comments\": \"\"\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 17400,\n                    \"grossValue\": 17400,\n                    \"baseValue\": 17400,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 17400,\n                    \"grossValue\": 17400,\n                    \"baseValue\": 17400,\n                    \"taxValue\": 0\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 0,\n                    \"grossValue\": 0,\n                    \"baseValue\": 0,\n                    \"taxValue\": 0\n                }\n            }\n        },\n        {\n            \"description\": \"\",\n            \"erpKey\": \"3\",\n            \"docNum\": \"2\",\n            \"docStatus\": \"A\",\n            \"startDate\": \"2018-07-26\",\n            \"endDate\": \"2019-12-31\",\n            \"signDate\": \"2018-07-26\",\n            \"docValue\": 100000,\n            \"partnerKey\": \"C001\",\n            \"partnerName\": \"Sport Club Corinthians Paulista\",\n            \"type\": \"G\",\n            \"method\": \"M\",\n            \"payConditionKey\": \"\",\n            \"payMethodKey\": \"\",\n            \"pricelistKey\": \"1\",\n            \"comments\": \"\",\n            \"createdAt\": \"2018-07-26T00:28:38\",\n            \"updatedAt\": \"2018-07-26T00:28:38\",\n            \"canceledAt\": null,\n            \"items\": [\n                {\n                    \"lineNum\": \"1\",\n                    \"taxBasis\": 100000,\n                    \"confirmedTaxBasis\": 4000,\n                    \"lineStatus\": \"O\",\n                    \"comments\": \"\"\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 100000,\n                    \"grossValue\": 100000,\n                    \"baseValue\": 100000,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 100000,\n                    \"grossValue\": 100000,\n                    \"baseValue\": 100000,\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":"0975c384-cbae-40f4-86e5-b843124f6ab5"}],"id":"d5591cb4-0b9c-4bff-a844-bfa8fecc4ae3","_postman_id":"d5591cb4-0b9c-4bff-a844-bfa8fecc4ae3","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Sale Quotations","item":[{"name":"Sale Quotations","id":"7da6881d-9b7c-4031-acfc-f0f9e4d860f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/quotations?createdFrom=2021-01-01&createdTo=2021-01-31&branch=01&partnerKey=C001&sellerKey=22&salesAgentKey=Intergate&docStatus=&erpKey=149231&docNum=122608&orderNum=1074052740415-01&pageNum=3&updatedAt=2020-11-03T18:00:00","description":"<h4 id=\"search-sales-quotations-in-erp\">Search sales quotations in ERP</h4>\n<p><em>(sapBusinessOne=23/OQUT, totvsProtheus=SCJ)</em></p>\n<p>This service will allow you to search sales quotations on the ERP.</p>\n<p>Searching sales quotations 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> (SAPB1 only), <code>salesAgentKey</code> (SAPB1 only) or <code>docStatus</code> \n {optional}</li>\n<li>Unitary search: by <code>erpKey</code> or <code>orderNum</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>orderNum</code> or <code>docNum</code>), the query for sales quotations is done by creation date from/to (which become mandatory).</p>\n<p>The quotations service will consider sales quotations with:</p>\n<ul>\n<li>SAP Business One: ORDR.ObjType = 23</li>\n<li>TOTVS Protheus:</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (OQUT.BPLId), TOTVS Protheus (CJ_FILIAL)</li>\n<li><code>partnerKey</code>: SAP Business One (OQUT.CardCode), TOTVS Protheus (CJ_CLIENTE+'<em>'+CJ_LOJA ou CJ_PROSPE+'</em>'+CJ_LOJPRO)</li>\n<li><code>sellerKey</code>: SAP Business One (OQUT.SlpCode)</li>\n<li><code>salesAgentKey</code>: SAP Business One (OQUT.AgentCode)</li>\n<li><code>erpKey</code>: SAP Business One (OQUT.DocEntry), TOTVS Protheus (CJ_NUM)</li>\n<li><code>orderNum</code>: SAP Business One (OQUT.NumAtCard), TOTVS Protheus (CJ_COTCLI)</li>\n<li><code>docNum</code>: SAP Business One (OQUT.DocNum), TOTVS Protheus (R_E_C_N_O_)</li>\n<li><code>docStatus</code>: O = open, X = cancelled, A = approved (only PROTHEUS), N = not budgeted (only PROTHEUS), P = paid (only SAPB1)</li>\n</ul>\n<p>Data returned in response: Quotation data, Partner data, Items (+ taxes), Totals (Payments, Taxes, Sales Orders = roadmap)</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 sales quotation list in two situations:</p>\n<ul>\n<li>Full Search: will result in all sales quotations, according to filters.</li>\n<li>Incremental Search: will result in all sales quotations, 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 (OQUT.CreateDate, OQUT.UpdateDate, OQUT.CreateTS, OQUT.UpdateTS), [2] TOTVS Protheus: fields CJ_USERLGI and CJ_USERLGA</li>\n</ul>\n<p>For the use of user fields (UDF) created in the sales order table (SAPB1: OQUT, TOTVS: SCJ), 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["quotations"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter sales quotations (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2021-01-01"},{"description":{"content":"<p>Final create date to filter sales quotations (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2021-01-31"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"01"},{"description":{"content":"<p>Partner Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"partnerKey","value":"C001"},{"description":{"content":"<p>Seller Primary Key in ERP (optional in list search - SAPB1 only)</p>\n","type":"text/plain"},"key":"sellerKey","value":"22"},{"description":{"content":"<p>Sales Agent Primary Key in ERP (optional in list search - SAPB1 only)</p>\n","type":"text/plain"},"key":"salesAgentKey","value":"Intergate"},{"description":{"content":"<p>Quotation Status to filter sales quotations (optional in list search - depends on UDF in GP API setup)</p>\n","type":"text/plain"},"key":"docStatus","value":""},{"description":{"content":"<p>Quotation Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"149231"},{"description":{"content":"<p>Quotation Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"122608"},{"description":{"content":"<p>Partner Quotation Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1074052740415-01"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"3"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-11-03T18:00:00"}],"variable":[]}},"response":[{"id":"70dd0c5c-7601-41a5-83bd-7271f5164d05","name":"Sale Quotations - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/quotations?createdFrom=2018-06-19&createdTo=2018-06-19","host":["{{endpoint}}"],"path":["quotations"],"query":[{"key":"createdFrom","value":"2018-06-19","description":"Initial create date to filter sales quotations (required if not unitary search)"},{"key":"createdTo","value":"2018-06-19","description":"Final create date to filter sales quotations (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":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional in list search)","disabled":true},{"key":"salesAgentKey","value":"Intergate","description":"Sales Agent Primary Key in ERP (optional in list search)","disabled":true},{"key":"status","value":null,"description":"Quotation Status to filter sales quotations (optional in list search - depends on UDF in GP API setup)","disabled":true},{"key":"erpKey","value":"149231","description":"Quotation Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"122608","description":"Quotation Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1074052740415-01","description":"Partner Quotation Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"3","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-11-03T18: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":"Set-Cookie","value":"JSESSIONID=892C487C3725B39F829847C8C87C1AB1; 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":"Tue, 01 Dec 2020 21:43:37 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Quotations\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"quotations\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-12-01T19:43:32\",\n    \"createdFrom\": \"2018-06-19\",\n    \"createdTo\": \"2018-06-19\",\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            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"erpKey\": \"45\",\n            \"orderNum\": \"\",\n            \"docNum\": \"45\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2018-06-19\",\n            \"docDueDate\": \"2018-07-19\",\n            \"taxDate\": \"2018-06-19\",\n            \"docValue\": 1050,\n            \"comments\": \"\",\n            \"createdAt\": \"2018-06-19T10:31:00\",\n            \"updatedAt\": \"2018-06-19T10:40:40\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C005\",\n                \"fullName\": \"Confederação Brasileira de Futebol\",\n                \"aliasName\": \"\",\n                \"email\": \"\",\n                \"phone\": \"9843-2300\",\n                \"phoneSecondary\": \"21\",\n                \"cellular\": \"\",\n                \"taxNumber\": \"33.655.721/0001-99\",\n                \"stateTaxNumber\": \"Isento\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Rio Branco\",\n                    \"address2\": \"\",\n                    \"city\": \"Rio de Janeiro\",\n                    \"county\": \"3656\",\n                    \"postalCode\": \"\",\n                    \"stateCode\": \"RJ\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"\",\n                    \"exteriorNumber\": \"123\",\n                    \"streetType\": \"Av.\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"Rio Branco\",\n                    \"address2\": \"\",\n                    \"city\": \"Rio de Janeiro\",\n                    \"county\": \"3656\",\n                    \"postalCode\": \"\",\n                    \"stateCode\": \"RJ\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"\",\n                    \"exteriorNumber\": \"123\",\n                    \"streetType\": \"Av.\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"Consultoria\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Consultoria\",\n                    \"quantity\": 1,\n                    \"unit\": \"\",\n                    \"unitPrice\": 1000,\n                    \"taxBasis\": 1000,\n                    \"usage\": \"\",\n                    \"cfop\": \"5933\",\n                    \"whsCode\": \"01\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 1050,\n                    \"unitCost\": 0,\n                    \"comments\": \"\"\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 1000,\n                    \"grossValue\": 1050,\n                    \"baseValue\": 1000,\n                    \"taxValue\": 50\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 1000,\n                    \"grossValue\": 1050,\n                    \"baseValue\": 1000,\n                    \"taxValue\": 50,\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":"c063b892-3332-4a89-9837-fb78668a33ad","name":"Sale Quotations - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/quotations?createdFrom=2021-01-01&createdTo=2021-01-31","host":["{{endpoint}}"],"path":["quotations"],"query":[{"key":"createdFrom","value":"2021-01-01","description":"Initial create date to filter sales quotations (required if not unitary search)"},{"key":"createdTo","value":"2021-01-31","description":"Final create date to filter sales quotations (required if not unitary search)"},{"key":"branch","value":"01","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":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional in list search - SAPB1 only)","disabled":true},{"key":"salesAgentKey","value":"Intergate","description":"Sales Agent Primary Key in ERP (optional in list search - SAPB1 only)","disabled":true},{"key":"status","value":null,"description":"Quotation Status to filter sales quotations (optional in list search - depends on UDF in GP API setup)","disabled":true},{"key":"erpKey","value":"149231","description":"Quotation Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"122608","description":"Quotation Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1074052740415-01","description":"Partner Quotation Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"3","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-11-03T18: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\": \"salesAPI\",\n    \"process\": \"Quotations\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"quotations\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.210.1\",\n    \"effectiveTimestamp\": \"2021-01-05T17:22:15\",\n    \"createdFrom\": \"2021-01-01\",\n    \"createdTo\": \"2021-01-31\",\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\": \"000001\",\n            \"orderNum\": \"\",\n            \"docNum\": \"1\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2021-01-05\",\n            \"docDueDate\": \"2021-01-05\",\n            \"taxDate\": \"2021-01-05\",\n            \"docValue\": 45,\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"000001_01\",\n                \"fullName\": \"CLIENTE\",\n                \"aliasName\": \"CLIENTE\",\n                \"email\": \"\",\n                \"phone\": \"\",\n                \"phoneSecundary\": \"\",\n                \"cellular\": null,\n                \"taxNumber\": \"\",\n                \"stateTaxNumber\": \"\",\n                \"cityTaxNumber\": \"\",\n                \"contactPerson\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \".\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"\",\n                    \"community\": \".\",\n                    \"city\": \".\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"01058\",\n                    \"postalCode\": \"\",\n                    \"streetType\": null\n                },\n                \"shippingAddress\": {\n                    \"address1\": \".\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"\",\n                    \"community\": \".\",\n                    \"city\": \".\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"01058\",\n                    \"postalCode\": \"\",\n                    \"streetType\": null\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"01\",\n                    \"productKey\": \"PA000001\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"TENIS TOPPER STYLUS 35\",\n                    \"quantity\": 1,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 45,\n                    \"taxBasis\": 45,\n                    \"usage\": \"501\",\n                    \"cfop\": \"\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 45,\n                    \"unitCost\": 5.05\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 45,\n                    \"grossValue\": 45,\n                    \"baseValue\": 45,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 45,\n                    \"grossValue\": 45,\n                    \"baseValue\": 45,\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    \"count\": 1\n}"}],"_postman_id":"7da6881d-9b7c-4031-acfc-f0f9e4d860f5"},{"name":"Sale Quotation","id":"095974ea-c553-41ed-8880-18cbe039fd1a","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-01-10\",\n    \"comments\": \"Test\",\n    \"customer\": {\n\t\t\"type\": \"L\",\n\t\t\"taxType\": \"P\",\n\t\t\"fullName\": \"Rafael Hernandes Ogeda\",\n\t\t\"aliasName\": \"Ogeda\",\n\t\t\"email\": \"rafael.ogeda@terra.com.br\",\n\t\t\"phone\": \"+5547988493101\",\n\t    \"cellular\": \"+5547988493101\",\n\t\t\"taxNumber\": \"891.751.749-87\",\n\t\t\"billingAddress\": {\n\t\t\t\"address1\": \"Luiz Walendowsky\",\n\t\t\t\"address2\": \"\",\n\t\t\t\"city\": \"Porto Belo\",\n\t\t\t\"postalCode\": \"88210-000\",\n\t\t\t\"stateCode\": \"SC\",\n\t\t\t\"community\": \"Pereque\",\n\t\t\t\"exteriorNumber\": \"218\",\n\t\t\t\"streetType\": \"Rua\",\n\t\t\t\"countryCode\": \"BR\"\n\t\t}\n    },\n    \"items\": [\n        {\n            \"productKey\": \"PA100001\",\n            \"productName\": \"CAMISA TOPPER FLAMENGO P\",\n            \"quantity\": 1,\n            \"unit\": \"UN\",\n            \"unitPrice\": 49.9,\n            \"taxBasis\": 49.9,\n            \"comments\": \"\"\n        }\n    ],\n    \"shipment\": {\n            \"shippingAddress\": {\n                \"address1\": \"Luiz Walendowsky\",\n                \"address2\": \"\",\n                \"city\": \"Porto Belo\",\n                \"postalCode\": \"88210-000\",\n                \"stateCode\": \"SC\",\n                \"community\": \"Pereque\",\n                \"exteriorNumber\": \"218\",\n                \"streetType\": \"Rua\",\n                \"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            \"priceAdjustValue\": 0,\n            \"priceAdjustType\": \"\",\n            \"priceAdjustPromotionId\": \"\",\n            \"priceAdjustCouponId\": \"\"\n        },\n        \"shippingTotal\": {\n            \"netValue\": 9.81,\n            \"grossValue\": 9.81,\n            \"baseValue\": 9.81,\n            \"taxValue\": 0,\n            \"shipAdjustValue\": 0,\n            \"shipAdjustType\": \"\",\n            \"shipAdjustPromotionId\": \"\",\n            \"shipAdjustCouponId\": \"\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/quotations","description":"<h4 id=\"insert-sales-quotation-in-erp\">Insert sales quotation in ERP</h4>\n<p><em>(sapBusinessOne=23/OQUT, totvsProtheus=SCJ)</em></p>\n<p>This service allows to insert a new sales quotation 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 sales quotation will be added if the sales quotation is not found on the ERP by branch + orderNum:</p>\n<ul>\n<li>SAP B1: OQUT.BPLId + OQUT.NumAtCard</li>\n<li>TOTVS Protheus: CJ_FILIAL + CJ_PEDECOM</li>\n</ul>\n<p>The key to finding the partner is through taxNumber. If the partner is located by taxNumber, 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: A1_CGC (customer / lead) or A2_CGC (supplier)</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.CodeBars = codeBars or OITM.ItemCode = productKey</li>\n<li>TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>Customer: [1] customer/type: C = customer, S = supplier, L = lead, [2] customer/taxType: P = person, C = company, G = government, E = employee. Each PN will have 2 registered addresses (CRD1, CRD7), namely: ShipToCode (S) = /customer/fullName OR /shipment/shippingAddress/firstName + \"\" + /shipment/shippingAddress/lastName, BillToCode (B) = /customer/fullName OR /customer/billingAddress/firstName + \"\" + /customer/billingAddress/lastName. Each PN will have 3 tax identification numbers (CRD12), namely: ShipToCode, BillToCode, empty.</li>\n<li>Seller: sellerKey</li>\n<li>Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus</li>\n<li>items: Duplication of items on more than 1 order line is not accepted, basePrice: base/gross price, taxBasis: total value of the item (quantity * price), calculation date for tax</li>\n<li>shipment: shipment data, as shipping address, carrier primary key in ERP, shipping method and carrier message</li>\n<li>totals: netValue: net value with discounts applied, grossValue: gross value with discounts and taxes applied, baseValue: base value for tax calculation, taxValue: taxes that increase order value (IPI, ICMS-ST, ...)</li>\n</ul>\n<p>For the use of user fields (UDF) created in the sales order table (SAPB1: OQUT, TOTVS: SCJ), 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>brand</td>\n<td>string</td>\n<td>Brand</td>\n</tr>\n<tr>\n<td>sellerKey</td>\n<td>string</td>\n<td>Seller Primary Key in ERP</td>\n</tr>\n<tr>\n<td>salesAgentKey</td>\n<td>string</td>\n<td>Sales Agent Primary Key in ERP</td>\n</tr>\n<tr>\n<td>customer</td>\n<td>object</td>\n<td>Customer</td>\n</tr>\n<tr>\n<td>customer.type</td>\n<td>string</td>\n<td>C=customer, S=supplier, L=lead</td>\n</tr>\n<tr>\n<td>customer.taxType</td>\n<td>string</td>\n<td>P=person, C=company, G=government, E=employee</td>\n</tr>\n<tr>\n<td>customer.partnerId</td>\n<td>string</td>\n<td>Id partner</td>\n</tr>\n<tr>\n<td>customer.fullName</td>\n<td>string</td>\n<td>Customer full name</td>\n</tr>\n<tr>\n<td>customer.aliasName</td>\n<td>string</td>\n<td>Customer alias name</td>\n</tr>\n<tr>\n<td>customer.email</td>\n<td>string</td>\n<td>Customer emai</td>\n</tr>\n<tr>\n<td>customer.phone</td>\n<td>string</td>\n<td>Customer phone Number</td>\n</tr>\n<tr>\n<td>customer.phoneSecondary</td>\n<td>string</td>\n<td>Customer secondary phone number</td>\n</tr>\n<tr>\n<td>customer.cellular</td>\n<td>string</td>\n<td>cell Customer phone number</td>\n</tr>\n<tr>\n<td>customer.taxNumber</td>\n<td>string</td>\n<td>Customer identification number</td>\n</tr>\n<tr>\n<td>customer.stateTaxNumber</td>\n<td>string</td>\n<td>State customer identification number</td>\n</tr>\n<tr>\n<td>customer.cityTaxNumber</td>\n<td>string</td>\n<td>City customer identification number</td>\n</tr>\n<tr>\n<td>customer.billingAddress</td>\n<td>object</td>\n<td>Customer billing addresses</td>\n</tr>\n<tr>\n<td>customer.billingAddress.address1</td>\n<td>string</td>\n<td>Customer billing address1</td>\n</tr>\n<tr>\n<td>customer.billingAddress.address2</td>\n<td>string</td>\n<td>Customer billing address2</td>\n</tr>\n<tr>\n<td>customer.billingAddress.city</td>\n<td>string</td>\n<td>Customer billing city</td>\n</tr>\n<tr>\n<td>customer.billingAddress.postalCode</td>\n<td>string</td>\n<td>Customer billing postal Code</td>\n</tr>\n<tr>\n<td>customer.billingAddress.stateCode</td>\n<td>string</td>\n<td>Customer billing state Code</td>\n</tr>\n<tr>\n<td>customer.billingAddress.community</td>\n<td>string</td>\n<td>Customer billing community</td>\n</tr>\n<tr>\n<td>customer.billingAddress.exteriorNumber</td>\n<td>string</td>\n<td>Customer billing exterior number</td>\n</tr>\n<tr>\n<td>customer.billingAddress.streetType</td>\n<td>string</td>\n<td>Customer billing type street</td>\n</tr>\n<tr>\n<td>customer.billingAddress.countryCode</td>\n<td>string</td>\n<td>Customer 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>productKey</td>\n<td>string</td>\n<td>Product key</td>\n</tr>\n<tr>\n<td>productName</td>\n<td>string</td>\n<td>Product Name</td>\n</tr>\n<tr>\n<td>quantity</td>\n<td>number</td>\n<td>Quantity</td>\n</tr>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Unit</td>\n</tr>\n<tr>\n<td>unitPrice</td>\n<td>number</td>\n<td>Unit price</td>\n</tr>\n<tr>\n<td>taxBasis</td>\n<td>number</td>\n<td>Tax Basis</td>\n</tr>\n<tr>\n<td>shipment</td>\n<td>object</td>\n<td>Shipment</td>\n</tr>\n<tr>\n<td>shipment.carrierKey</td>\n<td>string</td>\n<td>Carrier Primary Key in ERP</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</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["quotations"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"a57179d2-8c8f-41fa-90a9-94eef423ba45","name":"Sale Quotation - TOTVS Protheus","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"01\",\n    \"orderNum\": \"1013\",\n    \"dueDate\": \"2021-01-10\",\n    \"comments\": \"Test\",\n    \"customer\": {\n\t\t\"type\": \"L\",\n\t\t\"taxType\": \"P\",\n\t\t\"fullName\": \"Rafael Hernandes Ogeda\",\n\t\t\"aliasName\": \"Ogeda\",\n\t\t\"email\": \"rafael.ogeda@terra.com.br\",\n\t\t\"phone\": \"+5547988493101\",\n\t    \"cellular\": \"+5547988493101\",\n\t\t\"taxNumber\": \"891.751.749-87\",\n\t\t\"billingAddress\": {\n\t\t\t\"address1\": \"Luiz Walendowsky\",\n\t\t\t\"address2\": \"\",\n\t\t\t\"city\": \"Porto Belo\",\n\t\t\t\"postalCode\": \"88210-000\",\n\t\t\t\"stateCode\": \"SC\",\n\t\t\t\"community\": \"Pereque\",\n\t\t\t\"exteriorNumber\": \"218\",\n\t\t\t\"streetType\": \"Rua\",\n\t\t\t\"countryCode\": \"BR\"\n\t\t}\n    },\n    \"items\": [\n        {\n            \"productKey\": \"PA100001\",\n            \"productName\": \"CAMISA TOPPER FLAMENGO P\",\n            \"quantity\": 1,\n            \"unit\": \"UN\",\n            \"unitPrice\": 49.9,\n            \"taxBasis\": 49.9,\n            \"comments\": \"\"\n        }\n    ],\n    \"shipment\": {\n            \"shippingAddress\": {\n                \"address1\": \"Luiz Walendowsky\",\n                \"address2\": \"\",\n                \"city\": \"Porto Belo\",\n                \"postalCode\": \"88210-000\",\n                \"stateCode\": \"SC\",\n                \"community\": \"Pereque\",\n                \"exteriorNumber\": \"218\",\n                \"streetType\": \"Rua\",\n                \"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            \"priceAdjustValue\": 0,\n            \"priceAdjustType\": \"\",\n            \"priceAdjustPromotionId\": \"\",\n            \"priceAdjustCouponId\": \"\"\n        },\n        \"shippingTotal\": {\n            \"netValue\": 9.81,\n            \"grossValue\": 9.81,\n            \"baseValue\": 9.81,\n            \"taxValue\": 0,\n            \"shipAdjustValue\": 0,\n            \"shipAdjustType\": \"\",\n            \"shipAdjustPromotionId\": \"\",\n            \"shipAdjustCouponId\": \"\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/quotations"},"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\": \"salesAPI\",\n    \"process\": \"Quotations\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"quotations\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.210.1\",\n    \"effectiveTimestamp\": \"2021-01-05T18:06:37\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"2\",\n            \"table\": \"SUS\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"000006_01\"\n        },\n        {\n            \"object\": \"23\",\n            \"table\": \"SCJ\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"000003\"\n        }\n    ]\n}"},{"id":"fc28b360-32b1-4ade-b136-471cb48c740c","name":"Sale Quotation - SAP Business One","originalRequest":{"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\": \"2020-12-10\",\n    \"comments\": \"Test\",\n    \"customer\": {\n\t\t\"type\": \"C\",\n\t\t\"taxType\": \"C\",\n\t\t\"partnerId\": \"C001\",\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\": \"+551120953000\",\n\t    \"cellular\": \"+551195952000\",\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\": \"I001\",\n            \"productName\": \"Camisa Nike Flamengo I 09/10\",\n            \"quantity\": 1,\n            \"unit\": \"PAR\",\n            \"unitPrice\": 49.9,\n            \"taxBasis\": 49.9,\n            \"comments\": \"\"\n        }\n    ],\n    \"shipment\": {\n            \"carrierKey\": \"\",\n            \"shippingMethod\": \"BR-Standard-Shipping\",\n            \"carrierMessage\": \"\",\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            \"priceAdjustValue\": 0,\n            \"priceAdjustType\": \"\",\n            \"priceAdjustPromotionId\": \"\",\n            \"priceAdjustCouponId\": \"\"\n        },\n        \"shippingTotal\": {\n            \"netValue\": 9.81,\n            \"grossValue\": 9.81,\n            \"baseValue\": 9.81,\n            \"taxValue\": 0,\n            \"shipAdjustValue\": 0,\n            \"shipAdjustType\": \"\",\n            \"shipAdjustPromotionId\": \"\",\n            \"shipAdjustCouponId\": \"\"\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/quotations"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=9AEEE810218BEBDCC23D20DE5C4CCA2B; 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":"Tue, 01 Dec 2020 22:04:46 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Quotations\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"quotations\",\n    \"user\": \"intergate\",\n    \"host\": \"186.251.108.77\",\n    \"effectiveTimestamp\": \"2020-12-01T19:29:59\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": \"true\",\n    \"values\": [\n        {\n            \"object\": \"2\",\n            \"table\": \"OCRD\",\n            \"action\": \"Update\",\n            \"erpKey\": \"C144611\"\n        },\n        {\n            \"object\": \"23\",\n            \"table\": \"OQUT\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"19\"\n        }\n    ]\n}"}],"_postman_id":"095974ea-c553-41ed-8880-18cbe039fd1a"},{"name":"Sale Quotation","id":"73a7c5c3-5f6b-4939-9a44-7520b6994ad3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"01\",\n    \"orderNum\": \"1015\",\n    \"freightType\": \"A\",\n    \"customSCJ\": \"\",\n    \"customer\": {\n        \"type\": \"C\",\n        \"taxType\": \"C\",\n        \"partnerType\": \"R\",\n        \"fullName\": \"4INFRA CONSULTORIA EM TI LTDA\",\n        \"aliasName\": \"4INFRA CONSULTORIA E\",\n        \"phone\": \"31 994575976\",\n        \"taxNumber\": \"17364114000113\",\n        \"stateTaxNumber\": \"ISENTO\",\n        \"financialNature\": \"5000000001\",\n        \"homepage\": \"http://intergate.net.br\",\n        \"recMkt\": false,\n        \"billingAddress\": {\n            \"address1\": \"R PEDRA BONITA, 922\",\n            \"address2\": \"COMPBILL\",\n            \"community\": \"BARROCA\",\n            \"city\": \"BELO HORIZONTE\",\n            \"county\": \"06200\",\n            \"stateCode\": \"MG\",\n            \"postalCode\": \"30431-065\"\n        },\n        \"shippingAddress\": {\n            \"address1\": \"R PEDRA BONITA, 922\",\n            \"address2\": \"COMPSHIP\",\n            \"community\": \"BARROCA\",\n            \"city\": \"BELO HORIZONTE\",\n            \"county\": \"06200\",\n            \"stateCode\": \"MG\",\n            \"postalCode\": \"30431-065\"\n        }\n    },\n    \"items\": [\n        {\n            \"productKey\": \"PA000002\",\n            \"productName\": \"CAMISA TOPPER FLAMENGO P\",\n            \"quantity\": 2,\n            \"unit\": \"UN\",\n            \"unitPrice\": 200,\n            \"taxBasis\": 400,\n            \"whsCode\": \"01\",\n            \"customSCK\": \"ABC\",\n            \"comissionPercent1\": 3\n        },\n        {\n            \"productKey\": \"PA000001\",\n            \"productName\": \"CAMISA TOPPER FLAMENGO P\",\n            \"quantity\": 1,\n            \"unit\": \"UN\",\n            \"unitPrice\": 250,\n            \"taxBasis\": 250,\n            \"whsCode\": \"01\",\n            \"customSCK\": \"abc\",\n            \"comissionPercent1\": 1\n        }\n    ],\n    \"totals\": {\n        \"orderTotal\": {\n            \"netValue\": 670,\n            \"grossValue\": 670,\n            \"baseValue\": 670,\n            \"taxValue\": 0\n        },\n        \"merchandizeTotal\": {\n            \"netValue\": 650,\n            \"grossValue\": 650,\n            \"baseValue\": 650,\n            \"taxValue\": 0\n        },\n        \"shippingTotal\": {\n            \"netValue\": 20,\n            \"grossValue\": 20,\n            \"baseValue\": 20,\n            \"taxValue\": 0\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/quotations","description":"<h4 id=\"insert-sales-quotation-in-erp\">Insert sales quotation in ERP</h4>\n<p><em>(sapBusinessOne=23/OQUT, totvsProtheus=SCJ)</em></p>\n<p>This service allows to insert a new sales quotation 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 sales quotation will be added if the sales quotation is not found on the ERP by branch + orderNum:</p>\n<ul>\n<li>SAP B1: OQUT.BPLId + OQUT.NumAtCard</li>\n<li>TOTVS Protheus: CJ_FILIAL + CJ_PEDECOM</li>\n</ul>\n<p>The key to finding the partner is through taxNumber. If the partner is located by taxNumber, 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: A1_CGC (customer / lead) or A2_CGC (supplier)</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.CodeBars = codeBars or OITM.ItemCode = productKey</li>\n<li>TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>Customer: [1] customer/type: C = customer, S = supplier, L = lead, [2] customer/taxType: P = person, C = company, G = government, E = employee. Each PN will have 2 registered addresses (CRD1, CRD7), namely: ShipToCode (S) = /customer/fullName OR /shipment/shippingAddress/firstName + \"\" + /shipment/shippingAddress/lastName, BillToCode (B) = /customer/fullName OR /customer/billingAddress/firstName + \"\" + /customer/billingAddress/lastName. Each PN will have 3 tax identification numbers (CRD12), namely: ShipToCode, BillToCode, empty.</li>\n<li>Seller: sellerKey</li>\n<li>Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus</li>\n<li>items: Duplication of items on more than 1 order line is not accepted, basePrice: base/gross price, taxBasis: total value of the item (quantity * price), calculation date for tax</li>\n<li>shipment: shipment data, as shipping address, carrier primary key in ERP, shipping method and carrier message</li>\n<li>totals: netValue: net value with discounts applied, grossValue: gross value with discounts and taxes applied, baseValue: base value for tax calculation, taxValue: taxes that increase order value (IPI, ICMS-ST, ...)</li>\n</ul>\n<p>For the use of user fields (UDF) created in the sales order table (SAPB1: OQUT, TOTVS: SCJ), 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>brand</td>\n<td>string</td>\n<td>Brand</td>\n</tr>\n<tr>\n<td>sellerKey</td>\n<td>string</td>\n<td>Seller Primary Key in ERP</td>\n</tr>\n<tr>\n<td>salesAgentKey</td>\n<td>string</td>\n<td>Sales Agent Primary Key in ERP</td>\n</tr>\n<tr>\n<td>customer</td>\n<td>object</td>\n<td>Customer</td>\n</tr>\n<tr>\n<td>customer.type</td>\n<td>string</td>\n<td>C=customer, S=supplier, L=lead</td>\n</tr>\n<tr>\n<td>customer.taxType</td>\n<td>string</td>\n<td>P=person, C=company, G=government, E=employee</td>\n</tr>\n<tr>\n<td>customer.partnerId</td>\n<td>string</td>\n<td>Id partner</td>\n</tr>\n<tr>\n<td>customer.fullName</td>\n<td>string</td>\n<td>Customer full name</td>\n</tr>\n<tr>\n<td>customer.aliasName</td>\n<td>string</td>\n<td>Customer alias name</td>\n</tr>\n<tr>\n<td>customer.email</td>\n<td>string</td>\n<td>Customer emai</td>\n</tr>\n<tr>\n<td>customer.phone</td>\n<td>string</td>\n<td>Customer phone Number</td>\n</tr>\n<tr>\n<td>customer.phoneSecondary</td>\n<td>string</td>\n<td>Customer secondary phone number</td>\n</tr>\n<tr>\n<td>customer.cellular</td>\n<td>string</td>\n<td>cell Customer phone number</td>\n</tr>\n<tr>\n<td>customer.taxNumber</td>\n<td>string</td>\n<td>Customer identification number</td>\n</tr>\n<tr>\n<td>customer.stateTaxNumber</td>\n<td>string</td>\n<td>State customer identification number</td>\n</tr>\n<tr>\n<td>customer.cityTaxNumber</td>\n<td>string</td>\n<td>City customer identification number</td>\n</tr>\n<tr>\n<td>customer.billingAddress</td>\n<td>object</td>\n<td>Customer billing addresses</td>\n</tr>\n<tr>\n<td>customer.billingAddress.address1</td>\n<td>string</td>\n<td>Customer billing address1</td>\n</tr>\n<tr>\n<td>customer.billingAddress.address2</td>\n<td>string</td>\n<td>Customer billing address2</td>\n</tr>\n<tr>\n<td>customer.billingAddress.city</td>\n<td>string</td>\n<td>Customer billing city</td>\n</tr>\n<tr>\n<td>customer.billingAddress.postalCode</td>\n<td>string</td>\n<td>Customer billing postal Code</td>\n</tr>\n<tr>\n<td>customer.billingAddress.stateCode</td>\n<td>string</td>\n<td>Customer billing state Code</td>\n</tr>\n<tr>\n<td>customer.billingAddress.community</td>\n<td>string</td>\n<td>Customer billing community</td>\n</tr>\n<tr>\n<td>customer.billingAddress.exteriorNumber</td>\n<td>string</td>\n<td>Customer billing exterior number</td>\n</tr>\n<tr>\n<td>customer.billingAddress.streetType</td>\n<td>string</td>\n<td>Customer billing type street</td>\n</tr>\n<tr>\n<td>customer.billingAddress.countryCode</td>\n<td>string</td>\n<td>Customer 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>productKey</td>\n<td>string</td>\n<td>Product key</td>\n</tr>\n<tr>\n<td>productName</td>\n<td>string</td>\n<td>Product Name</td>\n</tr>\n<tr>\n<td>quantity</td>\n<td>number</td>\n<td>Quantity</td>\n</tr>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Unit</td>\n</tr>\n<tr>\n<td>unitPrice</td>\n<td>number</td>\n<td>Unit price</td>\n</tr>\n<tr>\n<td>taxBasis</td>\n<td>number</td>\n<td>Tax Basis</td>\n</tr>\n<tr>\n<td>shipment</td>\n<td>object</td>\n<td>Shipment</td>\n</tr>\n<tr>\n<td>shipment.carrierKey</td>\n<td>string</td>\n<td>Carrier Primary Key in ERP</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</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["quotations"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"7b580349-3a2c-4475-bd9c-11d3a9796fce","name":"Sale Quotation - TOTVS PROTHEUS - troca de itens","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"01\",\n    \"erpKey\": \"000005\",\n    \"_orderNum\": \"1013\",\n    \"_paymentCondition\": \"001\",\n    \"items\": [\n        {\n            \"productKey\": \"PA000001\",\n            \"productName\": \"TENIS TOPPER STYLUS 1 35\",\n            \"quantity\": 2,\n            \"unit\": \"UN\",\n            \"unitPrice\": 200,\n            \"taxBasis\": 400,\n            \"whsCode\": \"01\",\n            \"-comments\": \"\"\n        },\n        {\n            \"productKey\": \"PA000002\",\n            \"productName\": \"TENIS TOPPER STYLUS 40\",\n            \"quantity\": 1,\n            \"unit\": \"UN\",\n            \"unitPrice\": 250,\n            \"taxBasis\": 250,\n            \"whsCode\": \"01\",\n            \"-comments\": \"\"\n        }\n    ],\n    \"totals\": {\n        \"orderTotal\": {\n            \"netValue\": 670,\n            \"grossValue\": 670,\n            \"baseValue\": 670,\n            \"taxValue\": 0\n        },\n        \"merchandizeTotal\": {\n            \"netValue\": 650,\n            \"grossValue\": 650,\n            \"baseValue\": 650,\n            \"taxValue\": 0\n        },\n        \"shippingTotal\": {\n            \"netValue\": 20,\n            \"grossValue\": 20,\n            \"baseValue\": 20,\n            \"taxValue\": 0\n        }\n    }\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/quotations"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"package\": \"salesAPI\",\r\n    \"process\": \"Quotations\",\r\n    \"system\": \"totvsProtheus\",\r\n    \"target\": \"quotations\",\r\n    \"user\": \"intergate\",\r\n    \"host\": \"192.168.0.107\",\r\n    \"effectiveTimestamp\": \"2022-06-01T16:16:10\",\r\n    \"code\": \"200\",\r\n    \"success\": true,\r\n    \"values\": [\r\n        {\r\n            \"object\": \"23\",\r\n            \"table\": \"SCJ\",\r\n            \"action\": \"Update\",\r\n            \"erpKey\": \"000005\"\r\n        }\r\n    ]\r\n}"}],"_postman_id":"73a7c5c3-5f6b-4939-9a44-7520b6994ad3"},{"name":"Sale Quotation","id":"bfa96163-b39b-4f70-b3a5-1b5e4f514a97","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"01\",\n    \"_erpKey\": \"000006\",\n    \"orderNum\": \"1015\",\n    \"_docStatus\": \"C\"\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/quotations","description":"<h4 id=\"insert-sales-quotation-in-erp\">Insert sales quotation in ERP</h4>\n<p><em>(sapBusinessOne=23/OQUT, totvsProtheus=SCJ)</em></p>\n<p>This service allows to insert a new sales quotation 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 sales quotation will be added if the sales quotation is not found on the ERP by branch + orderNum:</p>\n<ul>\n<li>SAP B1: OQUT.BPLId + OQUT.NumAtCard</li>\n<li>TOTVS Protheus: CJ_FILIAL + CJ_PEDECOM</li>\n</ul>\n<p>The key to finding the partner is through taxNumber. If the partner is located by taxNumber, 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: A1_CGC (customer / lead) or A2_CGC (supplier)</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.CodeBars = codeBars or OITM.ItemCode = productKey</li>\n<li>TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>Customer: [1] customer/type: C = customer, S = supplier, L = lead, [2] customer/taxType: P = person, C = company, G = government, E = employee. Each PN will have 2 registered addresses (CRD1, CRD7), namely: ShipToCode (S) = /customer/fullName OR /shipment/shippingAddress/firstName + \"\" + /shipment/shippingAddress/lastName, BillToCode (B) = /customer/fullName OR /customer/billingAddress/firstName + \"\" + /customer/billingAddress/lastName. Each PN will have 3 tax identification numbers (CRD12), namely: ShipToCode, BillToCode, empty.</li>\n<li>Seller: sellerKey</li>\n<li>Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus</li>\n<li>items: Duplication of items on more than 1 order line is not accepted, basePrice: base/gross price, taxBasis: total value of the item (quantity * price), calculation date for tax</li>\n<li>shipment: shipment data, as shipping address, carrier primary key in ERP, shipping method and carrier message</li>\n<li>totals: netValue: net value with discounts applied, grossValue: gross value with discounts and taxes applied, baseValue: base value for tax calculation, taxValue: taxes that increase order value (IPI, ICMS-ST, ...)</li>\n</ul>\n<p>For the use of user fields (UDF) created in the sales order table (SAPB1: OQUT, TOTVS: SCJ), 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>brand</td>\n<td>string</td>\n<td>Brand</td>\n</tr>\n<tr>\n<td>sellerKey</td>\n<td>string</td>\n<td>Seller Primary Key in ERP</td>\n</tr>\n<tr>\n<td>salesAgentKey</td>\n<td>string</td>\n<td>Sales Agent Primary Key in ERP</td>\n</tr>\n<tr>\n<td>customer</td>\n<td>object</td>\n<td>Customer</td>\n</tr>\n<tr>\n<td>customer.type</td>\n<td>string</td>\n<td>C=customer, S=supplier, L=lead</td>\n</tr>\n<tr>\n<td>customer.taxType</td>\n<td>string</td>\n<td>P=person, C=company, G=government, E=employee</td>\n</tr>\n<tr>\n<td>customer.partnerId</td>\n<td>string</td>\n<td>Id partner</td>\n</tr>\n<tr>\n<td>customer.fullName</td>\n<td>string</td>\n<td>Customer full name</td>\n</tr>\n<tr>\n<td>customer.aliasName</td>\n<td>string</td>\n<td>Customer alias name</td>\n</tr>\n<tr>\n<td>customer.email</td>\n<td>string</td>\n<td>Customer emai</td>\n</tr>\n<tr>\n<td>customer.phone</td>\n<td>string</td>\n<td>Customer phone Number</td>\n</tr>\n<tr>\n<td>customer.phoneSecondary</td>\n<td>string</td>\n<td>Customer secondary phone number</td>\n</tr>\n<tr>\n<td>customer.cellular</td>\n<td>string</td>\n<td>cell Customer phone number</td>\n</tr>\n<tr>\n<td>customer.taxNumber</td>\n<td>string</td>\n<td>Customer identification number</td>\n</tr>\n<tr>\n<td>customer.stateTaxNumber</td>\n<td>string</td>\n<td>State customer identification number</td>\n</tr>\n<tr>\n<td>customer.cityTaxNumber</td>\n<td>string</td>\n<td>City customer identification number</td>\n</tr>\n<tr>\n<td>customer.billingAddress</td>\n<td>object</td>\n<td>Customer billing addresses</td>\n</tr>\n<tr>\n<td>customer.billingAddress.address1</td>\n<td>string</td>\n<td>Customer billing address1</td>\n</tr>\n<tr>\n<td>customer.billingAddress.address2</td>\n<td>string</td>\n<td>Customer billing address2</td>\n</tr>\n<tr>\n<td>customer.billingAddress.city</td>\n<td>string</td>\n<td>Customer billing city</td>\n</tr>\n<tr>\n<td>customer.billingAddress.postalCode</td>\n<td>string</td>\n<td>Customer billing postal Code</td>\n</tr>\n<tr>\n<td>customer.billingAddress.stateCode</td>\n<td>string</td>\n<td>Customer billing state Code</td>\n</tr>\n<tr>\n<td>customer.billingAddress.community</td>\n<td>string</td>\n<td>Customer billing community</td>\n</tr>\n<tr>\n<td>customer.billingAddress.exteriorNumber</td>\n<td>string</td>\n<td>Customer billing exterior number</td>\n</tr>\n<tr>\n<td>customer.billingAddress.streetType</td>\n<td>string</td>\n<td>Customer billing type street</td>\n</tr>\n<tr>\n<td>customer.billingAddress.countryCode</td>\n<td>string</td>\n<td>Customer 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>productKey</td>\n<td>string</td>\n<td>Product key</td>\n</tr>\n<tr>\n<td>productName</td>\n<td>string</td>\n<td>Product Name</td>\n</tr>\n<tr>\n<td>quantity</td>\n<td>number</td>\n<td>Quantity</td>\n</tr>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Unit</td>\n</tr>\n<tr>\n<td>unitPrice</td>\n<td>number</td>\n<td>Unit price</td>\n</tr>\n<tr>\n<td>taxBasis</td>\n<td>number</td>\n<td>Tax Basis</td>\n</tr>\n<tr>\n<td>shipment</td>\n<td>object</td>\n<td>Shipment</td>\n</tr>\n<tr>\n<td>shipment.carrierKey</td>\n<td>string</td>\n<td>Carrier Primary Key in ERP</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</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["quotations"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"74573933-77a9-4a7f-8b38-17592dd4ccda","name":"Sale Quotation - TOTVS PROTHEUS","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"01\",\n    \"erpKey\": \"000002\",\n    \"_orderNum\": \"1013\"\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/quotations"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"package\": \"salesAPI\",\r\n    \"process\": \"Quotations\",\r\n    \"system\": \"totvsProtheus\",\r\n    \"target\": \"quotations\",\r\n    \"user\": \"intergate\",\r\n    \"host\": \"192.168.0.107\",\r\n    \"effectiveTimestamp\": \"2022-06-01T12:36:16\",\r\n    \"code\": \"200\",\r\n    \"success\": true,\r\n    \"values\": [\r\n        {\r\n            \"object\": \"23\",\r\n            \"table\": \"SCJ\",\r\n            \"action\": \"Delete\",\r\n            \"erpKey\": \"000002\"\r\n        }\r\n    ]\r\n}"},{"id":"3b58ec59-3667-4287-ac41-a755df94ee59","name":"Sale Quotation - TOTVS PROTHEUS Cancel","originalRequest":{"method":"DELETE","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"01\",\n    \"erpKey\": \"000003\",\n    \"_orderNum\": \"1013\",\n    \"docStatus\": \"X\"\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/quotations"},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"package\": \"salesAPI\",\r\n    \"process\": \"Quotations\",\r\n    \"system\": \"totvsProtheus\",\r\n    \"target\": \"quotations\",\r\n    \"user\": \"intergate\",\r\n    \"host\": \"192.168.0.107\",\r\n    \"effectiveTimestamp\": \"2022-06-01T15:18:50\",\r\n    \"code\": \"200\",\r\n    \"success\": true,\r\n    \"values\": [\r\n        {\r\n            \"object\": \"23\",\r\n            \"table\": \"SCJ\",\r\n            \"action\": \"Cancel\",\r\n            \"erpKey\": \"000003\"\r\n        }\r\n    ]\r\n}"}],"_postman_id":"bfa96163-b39b-4f70-b3a5-1b5e4f514a97"}],"id":"50945263-9419-4d02-800b-6f2902bb2669","_postman_id":"50945263-9419-4d02-800b-6f2902bb2669","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Sale Orders","item":[{"name":"Sale Orders","id":"d83a70da-0c30-4886-b2c9-98a6d3f3891f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/orders?createdFrom=2021-02-24&createdTo=2021-02-24&branch=1&partnerKey=C001&sellerKey=22&salesAgentKey=Intergate&carrierKey=T002&docStatus=O&customStatus=2&customStatusNotify=NEW&customShipMethod=NEW&customShipType=NEW&erpKey=149231&docNum=122608&orderNum=1074052740415-01&customOrderKey=NEW&pageNum=2&updatedAt=2018-11-03T18:00:00","description":"<h4 id=\"search-sales-orders-in-erp\">Search sales orders in ERP</h4>\n<p><em>(sapBusinessOne=17/ORDR, totvsProtheus=SC5)</em></p>\n<p>This service will allow you to search sales orders on the ERP.</p>\n<p>Searching sales 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>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 informed in request.</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 (PROTHEUS = all itens with C6_BLQ=R), X = canceled, B = billed, P = paid, R = returned, L = released (only PROTHEUS = with SC9)</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<li><code>carrierKey</code>, <code>brand</code>, <code>packDescription</code>: sales order details</li>\n</ul>\n<p>Data returned in response: Order data, Partner data, Items (+ taxes), Totals, Payments, Taxes, Sales Invoices</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 sales order list in two situations:</p>\n<ul>\n<li>Full Search: will result in all sales orders, according to filters.</li>\n<li>Incremental Search: will result in all sales 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 (ORDR.CreateDate, ORDR.UpdateDate, ORDR.CreateTS, ORDR.UpdateTS), [2] TOTVS Protheus: fields C5_USERLGI and C5_USERLGA</li>\n</ul>\n<p>For the use of user fields (UDF) created in the sales order table (SAPB1: ORDR, TOTVS: SC5), 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["orders"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter sales orders (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2021-02-24"},{"description":{"content":"<p>Final create date to filter sales orders (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2021-02-24"},{"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>Seller Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"22"},{"description":{"content":"<p>Sales Agent Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"salesAgentKey","value":"Intergate"},{"description":{"content":"<p>Carrier Primary Key in ERP to filter sales order (optional in list search - depends on UDF in API setup - NEW)</p>\n","type":"text/plain"},"key":"carrierKey","value":"T002"},{"description":{"content":"<p>Default Order Status to filter sales order (optional in list search - NEW)</p>\n","type":"text/plain"},"key":"docStatus","value":"O"},{"description":{"content":"<p>Custom 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 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 sales order (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 sales order (optional in list search - depends on UDF in API setup - NEW)</p>\n","type":"text/plain"},"key":"customShipType","value":"NEW"},{"description":{"content":"<p>Order Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"149231"},{"description":{"content":"<p>Order Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"122608"},{"description":{"content":"<p>Partner Order Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1074052740415-01"},{"description":{"content":"<p>Custom Order Key to filter sales 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":"2"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2018-11-03T18:00:00"}],"variable":[]}},"response":[{"id":"75c99bb4-df7c-4d38-9b95-85577e5d9d79","name":"Sale Orders - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/orders?branch=1&createdFrom=2020-01-24&createdTo=2020-01-24&updatedAt=2020-01-24T12:00:00","host":["{{endpoint}}"],"path":["orders"],"query":[{"key":"branch","value":"1","description":"Branch (required if not unit query)"},{"key":"createdFrom","value":"2020-01-24","description":"Initial create date to filter sales orders (required if not unit query)"},{"key":"createdTo","value":"2020-01-24","description":"Final create date to filter invoices (required if not unit query)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in full query)","disabled":true},{"key":"erpKey","value":"121313","description":"Primary Key in ERP (optional)","disabled":true},{"key":"orderNo","value":"FM-2001026731","description":"Order Partner Number in ERP (optional)","disabled":true},{"key":"docNum","value":"121313","description":"Doc Num in ERP (optional)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-24T12:00:00","description":"Date to filter sales order changes - incremental query (optional)"},{"key":"action","value":"orders","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":"Mon, 03 Feb 2020 15:46:02 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Orders\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"orders\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-02-03T12:45:59\",\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-MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"252\",\n            \"orderNum\": \"FM-2001026731\",\n            \"docNum\": \"252\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-01-24\",\n            \"docDueDate\": \"2020-01-24\",\n            \"taxDate\": \"2020-01-24\",\n            \"docValue\": 158.64,\n            \"lojaWeb\": \"DIRETA\",\n            \"createdAt\": \"2020-01-24T12:05:29\",\n            \"updatedAt\": \"2020-01-24T12:05:30\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"P\",\n                \"partnerKey\": \"C000004\",\n                \"docEntry\": \"73\",\n                \"fullName\": \"Rafael Ogeda\",\n                \"aliasName\": \"Rafael Ogeda\",\n                \"email\": \"rafael.ogeda.ro@gmail.com\",\n                \"phone\": \"(47) 98849-3101\",\n                \"phoneSecondary\": \"\",\n                \"cellular\": \"\",\n                \"taxNumber\": \"055.467.686-90\",\n                \"stateTaxNumber\": \"\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Luiz Walendowsky\",\n                    \"address2\": \"\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"4614\",\n                    \"postalCode\": \"88210000\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Pereque\",\n                    \"exteriorNumber\": \"218\",\n                    \"streetType\": \"\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"Luiz Walendowsky\",\n                    \"address2\": \"\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"4614\",\n                    \"postalCode\": \"88210000\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Pereque\",\n                    \"exteriorNumber\": \"218\",\n                    \"streetType\": \"\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I006\",\n                    \"codeBars\": \"I006\",\n                    \"productName\": \"Bola Adidas Torpedo X-Lite\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 110.26,\n                    \"taxBasis\": 110.26,\n                    \"usage\": \"5\",\n                    \"cfop\": \"6102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 24.08,\n                    \"freightValue\": 24.3,\n                    \"grossValue\": 157.67,\n                    \"unitCost\": 83.39,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 110.26,\n                            \"taxRate\": 18,\n                            \"taxValue\": 19.85\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 110.26,\n                            \"taxRate\": 7,\n                            \"taxValue\": 7.72\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 176.97,\n                            \"taxRate\": 18,\n                            \"taxValue\": 12.01\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 24.3,\n                            \"taxRate\": 18,\n                            \"taxValue\": 4.37\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 24.3,\n                            \"taxRate\": 7,\n                            \"taxValue\": 1.7\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 39,\n                            \"taxRate\": 18,\n                            \"taxValue\": 2.65\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"orderTotal\": {\n                    \"netValue\": 134.56,\n                    \"grossValue\": 158.64,\n                    \"baseValue\": 134.56,\n                    \"taxValue\": 24.08\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 110.26,\n                    \"grossValue\": 129.99,\n                    \"baseValue\": 110.26,\n                    \"taxValue\": 19.73,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 24.3,\n                    \"grossValue\": 28.65,\n                    \"baseValue\": 24.3,\n                    \"taxValue\": 4.35,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"payments\": [\n                {\n                    \"paymentMethod\": \"deposit\",\n                    \"amount\": 134.56,\n                    \"installments\": 1,\n                    \"status\": \"O\"\n                }\n            ],\n            \"taxes\": [\n                {\n                    \"taxCode\": \"ICMSBI00\",\n                    \"taxBasis\": 134.56,\n                    \"taxValue\": 24.22\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 134.56,\n                    \"taxValue\": 9.42\n                },\n                {\n                    \"taxCode\": \"STA1850\",\n                    \"taxBasis\": 215.97,\n                    \"taxValue\": 14.66\n                }\n            ],\n            \"invoices\": [\n                {\n                    \"docNum\": \"137\",\n                    \"docEntry\": \"137\",\n                    \"docStatus\": \"O\",\n                    \"docDate\": \"2020-01-24\",\n                    \"docDueDate\": \"2020-01-24\",\n                    \"taxDate\": \"2020-01-24\",\n                    \"docValue\": 158.64,\n                    \"nfeSeries\": \"1\",\n                    \"nfeNum\": \"90\",\n                    \"nfeType\": \"NFe\",\n                    \"nfeModel\": \"55\",\n                    \"nfeKey\": \"\",\n                    \"nfeValue\": 158.64,\n                    \"createdAt\": \"2020-01-24T15:34:24\",\n                    \"updatedAt\": \"2020-01-24T15:34:25\",\n                    \"canceledAt\": null\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"d83a70da-0c30-4886-b2c9-98a6d3f3891f"},{"name":"Sale Order","id":"0b2c0d52-b7fc-4ee7-9192-87c75e560c4f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"23\",\n    \"orderNum\": \"1013\",\n    \"dueDate\": \"\",\n    \"sellerKey\": \"\",\n    \"salesAgentKey\": \"\",\n    \"mainUsage\": \"\",\n    \"mainCostCenter\": \"\",\n    \"whsCode\": \"\",\n    \"paymentCondition***\": \"\",\n    \"paymentMethod***\": \"\",\n    \"carrierKey\": \"\",\n    \"packDescription\": \"\",\n    \"brand\": \"\",\n    \"customOrderStatus\": \"\",\n    \"customOrderStatusNotify\": \"\",\n    \"customShipType\": \"\",\n    \"customShipMethod\": \"\",\n    \"insMktDoc\": \"false/invoice/delivery/downPayment\",\n    \"comments\": \"\",\n    \"remarksFooter\": \"\",\n    \"customer\": {\n        \"type\": \"C\",\n        \"taxType\": \"C\",\n        \"partnerId\": \"C001\",\n        \"fullName\": \"Sport Club Corinthians Paulista\",\n        \"aliasName\": \"Timão\",\n        \"email\": \"campeão@corinthians.com.br\",\n        \"phone\": \"2095-3000\",\n        \"phoneSecondary\": \"11\",\n        \"cellular\": \"11-9595-2000\",\n        \"taxNumber\": \"61.902.722/0001-26\",\n        \"stateTaxNumber\": \"113.440.120.113\",\n        \"cityTaxNumber\": \"\",\n        \"billingAddress\": {\n            \"address1\": \"São Jorge\",\n            \"address2\": \"\",\n            \"city\": \"São Paulo\",\n            \"postalCode\": \"03087-000\",\n            \"stateCode\": \"SP\",\n            \"community\": \"Tatuapé\",\n            \"exteriorNumber\": \"777\",\n            \"streetType\": \"Rua\",\n            \"countryCode\": \"BR\"\n        }\n    },\n    \"items\": [\n        {\n            \"codeBars\": \"\",\n            \"productKey\": \"900.000.003\",\n            \"productName\": \"Camisa Nike Flamengo I 09/10\",\n            \"quantity\": 1,\n            \"unit\": \"PAR\",\n            \"unitPrice\": 49.9,\n            \"taxBasis\": 49.9,\n            \"comments\": \"\"\n        }\n    ],\n    \"shipment\": {\n        \"shippingAddress\": {\n            \"receiverName *\": null,\n            \"isMain *\": null,\n            \"address1\": \"São Jorge 2\",\n            \"address2\": \"\",\n            \"city\": \"São Paulo\",\n            \"postalCode\": \"03087-000\",\n            \"stateCode\": \"SP\",\n            \"community\": \"Tatuapé\",\n            \"exteriorNumber\": \"777\",\n            \"streetType\": \"Rua\",\n            \"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            \"priceAdjustValue\": 0,\n            \"priceAdjustType\": \"\",\n            \"priceAdjustPromotionId\": \"\",\n            \"priceAdjustCouponId\": \"\"\n        },\n        \"shippingTotal\": {\n            \"netValue\": 9.81,\n            \"grossValue\": 9.81,\n            \"baseValue\": 9.81,\n            \"taxValue\": 0,\n            \"shipAdjustValue\": 0,\n            \"shipAdjustType\": \"\",\n            \"shipAdjustPromotionId\": \"\",\n            \"shipAdjustCouponId\": \"\"\n        }\n    },\n    \"payments\": [\n        {\n            \"paymentMethod\": \"creditCard\",\n            \"installments\": 3,\n            \"amount\": 49.71,\n            \"details\": {\n                \"tid\": \"a1a33b4e-92a0-4e78-9ea7-6cd4cbe40146\",\n                \"cardName\": \"Visa\",\n                \"acquirer\": null,\n                \"authid\": \"11176253608FGC0S3U0B\",\n                \"nsu\": \"025479\"\n            },\n            \"gateway\": {\n                \"gatewayName\": \"\",\n                \"gatewayOrderId\": \"\",\n                \"gatewayPayId\": \"\"\n            }\n        },\n        {\n            \"paymentMethod\": \"transfer\",\n            \"installments\": 1,\n            \"amount\": 10.00\n        }\n    ],\n    \"installments\": [\n        {\n            \"dueDate\": \"2021-07-16\",\n            \"amount\": 10.00\n        },\n        {\n            \"dueDate\": \"2021-08-01\",\n            \"amount\": 20.00\n        },\n        {\n            \"dueDate\": \"2021-08-10\",\n            \"amount\": 20.00\n        },\n        {\n            \"dueDate\": \"2021-08-30\",\n            \"amount\": 9.71\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/orders","description":"<h4 id=\"insert-sales-order-in-erp\">Insert sales order in ERP</h4>\n<p><em>(sapBusinessOne=17/ORDR, totvsProtheus=SC5)</em></p>\n<p>This service allows to insert a new sales order in the ERP, with treatment for new and existing partner, physical separation of products, sales invoice and incoming payments.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new sales order will be added if the sales order is not found on the ERP by branch + orderNum:</p>\n<ul>\n<li>SAP B1: ORDR.BPLId + ORDR.NumAtCard</li>\n<li>TOTVS Protheus: C5_FILIAL + C5_PEDECOM (note: field C5_PEDECOM is only 10 characters long and cannot be increased)</li>\n</ul>\n<p>The key to finding the partner is through taxNumber. If the partner is located by taxNumber, 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: A1_CGC (customer / lead) or A2_CGC (supplier)</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.CodeBars = codeBars or OITM.ItemCode = productKey</li>\n<li>TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey</li>\n</ul>\n<p>The following processes can be carried out after the inclusion of the sales order in the ERP:</p>\n<ul>\n<li>Marketing Document insert: if GlobalProperty SalesOrderInsMktDoc|IG_USEMKTD=invoice|downPayment|delivery in API Setup, or if insMktDoc=invoice|downPayment|delivery in JSON request (delivery only SAPB1). If the process insert invoice or downPayment, the payments array is required in JSON request, and will be inserted Incoming Payment(s) for invoice or downPayment. PROTHEUS = downPayment not yet available...</li>\n<li>Custom Payments Table insert: if there is payments in JSON request, the payments are inserted in the Payments Custom Table (for further use)</li>\n<li>Picklist insert (SAPB1 only): if the GlobalProperty SalesOrderInsPicklist=true in API Setup, or if insPickist=true in JSON request</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>Customer: [1] customer/type: C = customer, S = supplier, L = lead, [2] customer/taxType: P = person, C = company, G = government, E = employee. Each PN will have 2 registered addresses (CRD1, CRD7), namely: ShipToCode (S) = /customer/fullName OR /shipment/shippingAddress/firstName + \"\" + /shipment/shippingAddress/lastName, BillToCode (B) = /customer/fullName OR /customer/billingAddress/firstName + \"\" + /customer/billingAddress/lastName. Each PN will have 3 tax identification numbers (CRD12), namely: ShipToCode, BillToCode, empty.</li>\n<li>Seller: sellerKey</li>\n<li>Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus</li>\n<li>items: Duplication of items on more than 1 order line is not accepted, basePrice: base/gross price, taxBasis: total value of the item (quantity * price), calculation date for tax</li>\n<li>shipment: shipment data, as shipping address, carrier primary key in ERP, shipping method and carrier message</li>\n<li>totals: netValue: net value with discounts applied, grossValue: gross value with discounts and taxes applied, baseValue: base value for tax calculation, taxValue: taxes that increase order value (IPI, ICMS-ST, ...)</li>\n<li><code>customStatus</code>: sales order custom field definied in API Setup</li>\n<li><code>customStatusNotify</code>: sales order custom field definied in API Setup</li>\n<li><code>customShipMethod</code>: sales order custom field definied in API Setup</li>\n<li><code>customShipType</code>: sales order custom field  definied in API Setup</li>\n</ul>\n<p>Payments:\npaymentCondition: ERP payment condition key in ERP</p>\n<ul>\n<li>paymentMethod: not working for SAP Business One and TOTVS Protheus</li>\n<li>array payments: 5 payment methods are accepted (paymentMethod): transfer, boe, creditCard (mandatory fields: cardName and authid), cash, check</li>\n<li>The ERP payment method code for TOTVS Protheus can be entered in the paymentMethodKey field</li>\n<li>for payment with paymentMethod=creditCard you will need to inform details object (cardName, authid and nsu are required) - only SAP Business One</li>\n<li>for paymentCondition of type 9 in TOTVS Protheus, you will need to inform installments array in first level with the pairs dueDate/amount (API dows not support maturities in percent, only in values)</li>\n</ul>\n<p>For the use of user fields (UDF) created in the sales order table (SAPB1: ORDR / RDR1, TOTVS: SC5 / SC6), 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>brand</td>\n<td>string</td>\n<td>Brand</td>\n</tr>\n<tr>\n<td>sellerKey</td>\n<td>string</td>\n<td>Seller Primary Key in ERP</td>\n</tr>\n<tr>\n<td>salesAgentKey</td>\n<td>string</td>\n<td>Sales Agent Primary Key in ERP</td>\n</tr>\n<tr>\n<td>carrierKey</td>\n<td>string</td>\n<td>Carrier Primary Key in ERP</td>\n</tr>\n<tr>\n<td>mainUsage</td>\n<td>string</td>\n<td>Usage Primary Key in ERP</td>\n</tr>\n<tr>\n<td>mainCostCenter</td>\n<td>string</td>\n<td>Cost Center Primary Key in ERP</td>\n</tr>\n<tr>\n<td>whsCode</td>\n<td>string</td>\n<td>Warehouse Primary Key in ERP</td>\n</tr>\n<tr>\n<td>comments</td>\n<td>string</td>\n<td>Comments in ERP</td>\n</tr>\n<tr>\n<td>customer</td>\n<td>object</td>\n<td>Customer</td>\n</tr>\n<tr>\n<td>customer.type</td>\n<td>string</td>\n<td>C=customer, S=supplier, L=lead</td>\n</tr>\n<tr>\n<td>customer.taxType</td>\n<td>string</td>\n<td>P=person, C=company, G=government, E=employee</td>\n</tr>\n<tr>\n<td>customer.partnerId</td>\n<td>string</td>\n<td>Id partner</td>\n</tr>\n<tr>\n<td>customer.fullName</td>\n<td>string</td>\n<td>Customer full name</td>\n</tr>\n<tr>\n<td>customer.aliasName</td>\n<td>string</td>\n<td>Customer alias name</td>\n</tr>\n<tr>\n<td>customer.email</td>\n<td>string</td>\n<td>Customer emai</td>\n</tr>\n<tr>\n<td>customer.phone</td>\n<td>string</td>\n<td>Customer phone Number</td>\n</tr>\n<tr>\n<td>customer.phoneSecondary</td>\n<td>string</td>\n<td>Customer secondary phone number</td>\n</tr>\n<tr>\n<td>customer.cellular</td>\n<td>string</td>\n<td>cell Customer phone number</td>\n</tr>\n<tr>\n<td>customer.taxNumber</td>\n<td>string</td>\n<td>Customer identification number</td>\n</tr>\n<tr>\n<td>customer.stateTaxNumber</td>\n<td>string</td>\n<td>State customer identification number</td>\n</tr>\n<tr>\n<td>customer.cityTaxNumber</td>\n<td>string</td>\n<td>City customer identification number</td>\n</tr>\n<tr>\n<td>customer.billingAddress</td>\n<td>object</td>\n<td>Customer billing addresses</td>\n</tr>\n<tr>\n<td>customer.billingAddress.address1</td>\n<td>string</td>\n<td>Customer billing address1</td>\n</tr>\n<tr>\n<td>customer.billingAddress.address2</td>\n<td>string</td>\n<td>Customer billing address2</td>\n</tr>\n<tr>\n<td>customer.billingAddress.city</td>\n<td>string</td>\n<td>Customer billing city</td>\n</tr>\n<tr>\n<td>customer.billingAddress.postalCode</td>\n<td>string</td>\n<td>Customer billing postal Code</td>\n</tr>\n<tr>\n<td>customer.billingAddress.stateCode</td>\n<td>string</td>\n<td>Customer billing state Code</td>\n</tr>\n<tr>\n<td>customer.billingAddress.community</td>\n<td>string</td>\n<td>Customer billing community</td>\n</tr>\n<tr>\n<td>customer.billingAddress.exteriorNumber</td>\n<td>string</td>\n<td>Customer billing exterior number</td>\n</tr>\n<tr>\n<td>customer.billingAddress.streetType</td>\n<td>string</td>\n<td>Customer billing type street</td>\n</tr>\n<tr>\n<td>customer.billingAddress.countryCode</td>\n<td>string</td>\n<td>Customer 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>productKey</td>\n<td>string</td>\n<td>Product key</td>\n</tr>\n<tr>\n<td>productName</td>\n<td>string</td>\n<td>Product Name</td>\n</tr>\n<tr>\n<td>quantity</td>\n<td>number</td>\n<td>Quantity</td>\n</tr>\n<tr>\n<td>unit</td>\n<td>string</td>\n<td>Unit</td>\n</tr>\n<tr>\n<td>unitPrice</td>\n<td>number</td>\n<td>Unit price</td>\n</tr>\n<tr>\n<td>taxBasis</td>\n<td>number</td>\n<td>Tax Basis</td>\n</tr>\n<tr>\n<td>shipment</td>\n<td>object</td>\n<td>Shipment</td>\n</tr>\n<tr>\n<td>shipment.carrierKey</td>\n<td>string</td>\n<td>Carrier Primary Key in ERP</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<tr>\n<td>installments</td>\n<td>array</td>\n<td>maturities for paymentCondition of type 9 (only TOTVS Protheus)</td>\n</tr>\n<tr>\n<td>installments.dueDate</td>\n<td>string</td>\n<td>maturity date</td>\n</tr>\n<tr>\n<td>installments.amount</td>\n<td>number</td>\n<td>maturity 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["orders"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"60904a1e-e8af-44e9-8af1-f225f56eb5b5","name":"Sale Order - SAP Business One","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"1\",\n    \"orderNum\": \"1010\",\n    \"brand\": \"3\",\n    \"customer\": {\n\t\t\"type\": \"C\",\n\t\t\"taxType\": \"C\",\n\t\t\"partnerId\": \"C001\",\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            \"codeBars\": \"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    \"shipment\": {\n            \"shippingMethod\": \"BR-Standard-Shipping\",\n            \"carrierMessage\": \"\",\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            \"priceAdjustValue\": 0,\n            \"priceAdjustType\": \"\",\n            \"priceAdjustPromotionId\": \"\",\n            \"priceAdjustCouponId\": \"\"\n        },\n        \"shippingTotal\": {\n            \"netValue\": 9.81,\n            \"grossValue\": 9.81,\n            \"baseValue\": 9.81,\n            \"taxValue\": 0,\n            \"shipAdjustValue\": 0,\n            \"shipAdjustType\": \"\",\n            \"shipAdjustPromotionId\": \"\",\n            \"shipAdjustCouponId\": \"\"\n        }\n    },\n    \"payments\": [\n        {\n            \"paymentMethod\": \"creditCard\",\n            \"installments\": 3,\n            \"amount\": 49.71,\n            \"details\": {\n            \t\"tid\": \"a1a33b4e-92a0-4e78-9ea7-6cd4cbe40146\",\n            \t\"cardName\": \"Visa\",\n            \t\"acquirer\": null,\n            \t\"authid\": \"11176253608FGC0S3U0B\",\n            \t\"nsu\": \"025479\"\n            },\n            \"gateway\": {\n            \t\"gatewayName\": \"\",\n            \t\"gatewayOrderId\": \"\",\n            \t\"gatewayPayId\": \"\"\n            }\n        },\n        {\n            \"paymentMethod\": \"transfer\",\n            \"installments\": 1,\n            \"amount\": 10.00\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/orders"},"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, 24 Mar 2020 01:03:51 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Orders\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"orders\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-03-23T22:03:27\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"useCustom\": \"true\",\n    \"values\": [\n        {\n            \"object\": \"2\",\n            \"table\": \"OCRD\",\n            \"action\": \"Update\",\n            \"erpKey\": \"C001\"\n        },\n        {\n            \"object\": \"17\",\n            \"table\": \"ORDR\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"273\"\n        },\n        {\n            \"object\": \"13\",\n            \"table\": \"OINV\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"171\"\n        },\n        {\n            \"object\": \"24\",\n            \"table\": \"ORCT\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"216\"\n        },\n        {\n            \"object\": \"24\",\n            \"table\": \"ORCT\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"217\"\n        }\n    ]\n}"},{"id":"652e7797-3129-4403-b36a-44085bda86f8","name":"Sale Order - TOTVS Protheus","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"branch\": \"1\",\n    \"orderNum\": \"1024\",\n    \"customer\": {\n\t\t\"type\": \"C\",\n\t\t\"taxType\": \"C\",\n\t\t\"partnerId\": \"C001\",\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\": \"900.000.003\",\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    \"shipment\": {\n            \"shippingMethod\": \"BR-Standard-Shipping\",\n            \"carrierMessage\": \"\",\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            \"priceAdjustValue\": 0,\n            \"priceAdjustType\": \"\",\n            \"priceAdjustPromotionId\": \"\",\n            \"priceAdjustCouponId\": \"\"\n        },\n        \"shippingTotal\": {\n            \"netValue\": 9.81,\n            \"grossValue\": 9.81,\n            \"baseValue\": 9.81,\n            \"taxValue\": 0,\n            \"shipAdjustValue\": 0,\n            \"shipAdjustType\": \"\",\n            \"shipAdjustPromotionId\": \"\",\n            \"shipAdjustCouponId\": \"\"\n        }\n    },\n    \"payments\": [\n        {\n            \"paymentMethod\": \"creditCard\",\n            \"installments\": 3,\n            \"amount\": 49.71,\n            \"details\": {\n            \t\"tid\": \"a1a33b4e-92a0-4e78-9ea7-6cd4cbe40146\",\n            \t\"cardName\": \"Visa\",\n            \t\"acquirer\": null,\n            \t\"authid\": \"11176253608FGC0S3U0B\",\n            \t\"nsu\": \"025479\"\n            },\n            \"gateway\": {\n            \t\"gatewayName\": \"\",\n            \t\"gatewayOrderId\": \"\",\n            \t\"gatewayPayId\": \"\"\n            }\n        },\n        {\n            \"paymentMethod\": \"transfer\",\n            \"installments\": 1,\n            \"amount\": 10.00\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/orders"},"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-Length","value":"593"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=15"}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Orders\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"orders\",\n    \"user\": \"intergate\",\n    \"host\": \"127.0.0.1\",\n    \"effectiveTimestamp\": \"2020-04-01T18:26:14\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"2\",\n            \"table\": \"SA1\",\n            \"action\": \"Update\",\n            \"erpKey\": \"00003601\"\n        },\n        {\n            \"object\": \"17\",\n            \"table\": \"SC5\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"000032\"\n        },\n        {\n            \"object\": \"13\",\n            \"table\": \"SF2\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"1/000030\"\n        },\n        {\n            \"object\": \"24\",\n            \"table\": \"FK1\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"89ca0b2836b0437481AL\"\n        },\n        {\n            \"object\": \"24\",\n            \"table\": \"FK1\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"89ca0b2836b0437481AM\"\n        }\n    ]\n}"}],"_postman_id":"0b2c0d52-b7fc-4ee7-9192-87c75e560c4f"},{"name":"Order Status","id":"78ff8d56-7623-4119-9dce-1e5021760e4c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/orderStatus?createdFrom=2020-01-01&createdTo=2020-12-31&branch=1&partnerKey=NEW&sellerKey=NEW&salesAgentKey=NEW&carrierKey=NEW&docStatus=NEW&erpKey=NEW&docNum=NEW&orderNum=NEW&customStatus=2&customStatusNotify=NEW&customShipMethod=NEW&customShipType=NEW&customOrderKey=NEW&pageNum=1&updatedAt=2021-06-07T10: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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["orderStatus"],"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":"2020-01-01"},{"description":{"content":"<p>Final create date to filter sales 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":"NEW"},{"description":{"content":"<p>Seller Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"NEW"},{"description":{"content":"<p>Sales Agent Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"salesAgentKey","value":"NEW"},{"description":{"content":"<p>Carrier Primary Key in ERP to filter sales order (optional in list search - depends on UDF in API setup - NEW)</p>\n","type":"text/plain"},"key":"carrierKey","value":"NEW"},{"description":{"content":"<p>Default Order Status to filter sales order (optional in list search - NEW)</p>\n","type":"text/plain"},"key":"docStatus","value":"NEW"},{"description":{"content":"<p>Order Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"NEW"},{"description":{"content":"<p>Order Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"NEW"},{"description":{"content":"<p>Partner Order Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"NEW"},{"description":{"content":"<p>Custom 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 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 sales order (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 sales order (optional in list search - depends on UDF in API setup - NEW)</p>\n","type":"text/plain"},"key":"customShipType","value":"NEW"},{"description":{"content":"<p>Custom Order Key to filter sales 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":"2021-06-07T10:00:00"}],"variable":[]}},"response":[{"id":"e6161027-3353-4b7e-9001-bd4d1c7ab7af","name":"Order Status - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/orderStatus?createdFrom=2020-01-01&createdTo=2020-12-31","host":["{{endpoint}}"],"path":["orderStatus"],"query":[{"key":"createdFrom","value":"2020-01-01","description":"Initial create date to filter change sales orders (required if not unitary search)"},{"key":"createdTo","value":"2020-12-31","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":"sellerKey","value":"NEW","description":"Seller Primary Key in ERP (optional in list search)","disabled":true},{"key":"salesAgentKey","value":"NEW","description":"Sales Agent Primary Key in ERP (optional in list search)","disabled":true},{"key":"carrierKey","value":"NEW","description":"Carrier Primary Key in ERP to filter sales order (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"customStatus","value":"2","description":"Custom 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 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 sales order (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"customShipType","value":"NEW","description":"Custom Shipping Type  to filter sales order (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"erpKey","value":"NEW","description":"Order Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"NEW","description":"Order Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"NEW","description":"Partner Order Number in ERP (optional - unitary search)","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},{"key":"docStatus","value":"NEW","description":"Default Order Status to filter sales order (optional in list search - NEW)","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, 25 Feb 2021 22:39:56 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"OrderStatus\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"orderStatus\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2021-02-25T19:39:06\",\n    \"createdFrom\": \"2020-01-01\",\n    \"createdTo\": \"2020-12-31\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 100,\n    \"pageNum\": 1,\n    \"pageTotal\": 1,\n    \"hasNext\": false,\n    \"count\": 36,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C000002\",\n            \"sellerKey\": \"-1\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"247\",\n            \"orderNum\": \"\",\n            \"docNum\": \"247\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-01-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-01-23T16:10:29\",\n            \"updatedAt\": \"2020-01-23T17:42:32\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C000003\",\n            \"sellerKey\": \"-1\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"248\",\n            \"orderNum\": \"\",\n            \"docNum\": \"248\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-01-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-01-23T16:16:02\",\n            \"updatedAt\": \"2020-01-23T17:42:38\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C000003\",\n            \"sellerKey\": \"-1\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"249\",\n            \"orderNum\": \"FM-2001425199\",\n            \"docNum\": \"249\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-01-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-01-23T17:50:43\",\n            \"updatedAt\": \"2020-01-23T17:50:44\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C000002\",\n            \"sellerKey\": \"-1\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"250\",\n            \"orderNum\": \"FM-2001181793\",\n            \"docNum\": \"250\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-01-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-01-23T18:09:32\",\n            \"updatedAt\": \"2020-01-23T18:10:00\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C000003\",\n            \"sellerKey\": \"-1\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"251\",\n            \"orderNum\": \"FM-2001070359\",\n            \"docNum\": \"251\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-01-24\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-01-24T11:16:09\",\n            \"updatedAt\": \"2020-01-24T11:16:11\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C000004\",\n            \"sellerKey\": \"-1\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"252\",\n            \"orderNum\": \"FM-2001026731\",\n            \"docNum\": \"252\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-01-24\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-01-24T12:05:29\",\n            \"updatedAt\": \"2020-01-24T12:05:30\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"253\",\n            \"orderNum\": \"\",\n            \"docNum\": \"253\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-02-03\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-03T17:44:01\",\n            \"updatedAt\": \"2020-02-03T18:14:09\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"254\",\n            \"orderNum\": \"\",\n            \"docNum\": \"254\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-02-03\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-03T20:23:10\",\n            \"updatedAt\": \"2020-02-03T20:34:33\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"255\",\n            \"orderNum\": \"\",\n            \"docNum\": \"255\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-02-03\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-03T20:34:58\",\n            \"updatedAt\": \"2020-02-03T20:47:58\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"256\",\n            \"orderNum\": \"AZ-VT-978911906676-05\",\n            \"docNum\": \"256\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-02-03\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-03T21:32:28\",\n            \"updatedAt\": \"2020-02-03T21:32:28\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"257\",\n            \"orderNum\": \"AZ-VT-978911906676-06\",\n            \"docNum\": \"257\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-02-03\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-03T21:42:59\",\n            \"updatedAt\": \"2020-02-03T21:43:01\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"258\",\n            \"orderNum\": \"AZ-VT-978911906676-07\",\n            \"docNum\": \"258\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-02-04\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-04T12:34:29\",\n            \"updatedAt\": \"2020-02-04T12:34:31\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"259\",\n            \"orderNum\": \"AZ-VT-978911906676-08\",\n            \"docNum\": \"259\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-02-04\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-04T12:49:15\",\n            \"updatedAt\": \"2020-03-17T18:51:29\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"260\",\n            \"orderNum\": \"AZ-VT-978911906676-09\",\n            \"docNum\": \"260\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-02-04\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-04T14:53:51\",\n            \"updatedAt\": \"2020-02-04T14:53:55\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"261\",\n            \"orderNum\": \"AZ-VT-978911906676-10\",\n            \"docNum\": \"261\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-02-04\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-04T14:57:07\",\n            \"updatedAt\": \"2020-02-04T14:57:07\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C000004\",\n            \"sellerKey\": \"-1\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"262\",\n            \"orderNum\": \"FM-2002030397\",\n            \"docNum\": \"262\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-02-05\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-02-05T12:26:31\",\n            \"updatedAt\": \"2020-02-05T12:26:50\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"Intergate\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"263\",\n            \"orderNum\": \"1001\",\n            \"docNum\": \"263\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-03-17\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-17T19:43:46\",\n            \"updatedAt\": \"2020-03-17T19:43:47\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"Intergate\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"264\",\n            \"orderNum\": \"1002\",\n            \"docNum\": \"264\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-03-20\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-20T12:25:51\",\n            \"updatedAt\": \"2020-03-20T12:25:52\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"265\",\n            \"orderNum\": \"1003\",\n            \"docNum\": \"265\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-20\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-20T18:54:31\",\n            \"updatedAt\": \"2020-03-20T18:54:52\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"266\",\n            \"orderNum\": \"1004\",\n            \"docNum\": \"266\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-20\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-20T20:31:23\",\n            \"updatedAt\": \"2020-03-20T20:31:26\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"267\",\n            \"orderNum\": \"\",\n            \"docNum\": \"267\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-03-20\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-20T21:51:18\",\n            \"updatedAt\": \"2020-03-20T22:09:06\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"268\",\n            \"orderNum\": \"1005\",\n            \"docNum\": \"268\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-23T19:43:48\",\n            \"updatedAt\": \"2020-03-23T19:44:08\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"269\",\n            \"orderNum\": \"1006\",\n            \"docNum\": \"269\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-23T20:30:31\",\n            \"updatedAt\": \"2020-03-23T20:30:34\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"270\",\n            \"orderNum\": \"1007\",\n            \"docNum\": \"270\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-23T21:44:35\",\n            \"updatedAt\": \"2020-03-23T21:44:36\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"271\",\n            \"orderNum\": \"1008\",\n            \"docNum\": \"271\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-23T21:51:07\",\n            \"updatedAt\": \"2020-03-23T21:51:08\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"272\",\n            \"orderNum\": \"1009\",\n            \"docNum\": \"272\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-23T21:59:26\",\n            \"updatedAt\": \"2020-03-23T21:59:27\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"273\",\n            \"orderNum\": \"1010\",\n            \"docNum\": \"273\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-23\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-23T22:03:28\",\n            \"updatedAt\": \"2020-03-23T22:03:29\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C000002\",\n            \"sellerKey\": \"-1\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"274\",\n            \"orderNum\": \"FM-2003668889\",\n            \"docNum\": \"274\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-24\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-24T11:32:55\",\n            \"updatedAt\": \"2020-03-24T11:33:04\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C000002\",\n            \"sellerKey\": \"-1\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"275\",\n            \"orderNum\": \"FM-2003655776\",\n            \"docNum\": \"275\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-03-24\",\n            \"customStatus\": \"1\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-03-24T12:48:11\",\n            \"updatedAt\": \"2020-03-24T12:48:15\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"Intergate\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"276\",\n            \"orderNum\": \"1013\",\n            \"docNum\": \"276\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-05-28\",\n            \"customStatus\": \"2\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-05-28T19:00:08\",\n            \"updatedAt\": \"2020-05-28T19:00:12\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"Intergate\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"277\",\n            \"orderNum\": \"1014\",\n            \"docNum\": \"277\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-06-19\",\n            \"customStatus\": \"3\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-06-19T17:23:42\",\n            \"updatedAt\": \"2020-06-19T17:24:05\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"Intergate\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"278\",\n            \"orderNum\": \"1015\",\n            \"docNum\": \"278\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-06-19\",\n            \"customStatus\": \"3\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-06-19T17:55:23\",\n            \"updatedAt\": \"2020-06-19T17:56:16\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"Intergate\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"279\",\n            \"orderNum\": \"1016\",\n            \"docNum\": \"279\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-06-19\",\n            \"customStatus\": \"4\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-06-19T18:43:22\",\n            \"updatedAt\": \"2020-06-19T18:43:26\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"Intergate\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"280\",\n            \"orderNum\": \"1017\",\n            \"docNum\": \"280\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-06-19\",\n            \"customStatus\": \"4\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-06-19T18:47:35\",\n            \"updatedAt\": \"2020-06-19T18:47:37\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"Intergate\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"281\",\n            \"orderNum\": \"1018\",\n            \"docNum\": \"281\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-06-26\",\n            \"customStatus\": \"4\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-06-26T13:23:46\",\n            \"updatedAt\": \"2020-06-26T13:23:48\",\n            \"canceledAt\": null\n        },\n        {\n            \"branch\": \"1\",\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"salesAgentKey\": \"Intergate\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"282\",\n            \"orderNum\": \"1019\",\n            \"docNum\": \"282\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-07-02\",\n            \"customStatus\": \"4\",\n            \"customStatusNotify\": \"0.000000\",\n            \"createdAt\": \"2020-07-02T14:06:50\",\n            \"updatedAt\": \"2020-07-02T14:07:17\",\n            \"canceledAt\": null\n        }\n    ]\n}"},{"id":"656c67a2-9120-4cd8-a100-0e5173838222","name":"Order Status - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/orderStatus?updatedAt=2021-06-07T10:00:00","host":["{{endpoint}}"],"path":["orderStatus"],"query":[{"key":"createdFrom","value":"2020-01-01","description":"Initial create date to filter change sales orders (required if not unitary search)","disabled":true},{"key":"createdTo","value":"2020-12-31","description":"Final create date to filter sales orders (required if not unitary search)","disabled":true},{"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":"sellerKey","value":"NEW","description":"Seller Primary Key in ERP (optional in list search)","disabled":true},{"key":"salesAgentKey","value":"NEW","description":"Sales Agent Primary Key in ERP (optional in list search)","disabled":true},{"key":"carrierKey","value":"NEW","description":"Carrier Primary Key in ERP to filter sales order (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"docStatus","value":"NEW","description":"Default Order Status to filter sales order (optional in list search - NEW)","disabled":true},{"key":"customStatus","value":"2","description":"Custom 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 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 sales order (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"customShipType","value":"NEW","description":"Custom Shipping Type  to filter sales order (optional in list search - depends on UDF in API setup - NEW)","disabled":true},{"key":"erpKey","value":"NEW","description":"Order Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"NEW","description":"Order Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"NEW","description":"Partner Order Number in ERP (optional - unitary search)","disabled":true},{"key":"customOrderKey","value":"NEW","description":"Custom Order Key to filter sales 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":"2021-06-07T10:00: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\": \"salesAPI\",\n    \"process\": \"OrderStatus\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"orderStatus\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.103\",\n    \"effectiveTimestamp\": \"2021-06-07T16:03:29\",\n    \"updatedAt\": \"2021-06-07T10:00:00\",\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            \"partnerKey\": \"001022_01\",\n            \"sellerKey\": \"000001\",\n            \"salesAgentKey\": \"\",\n            \"carrierKey\": \"\",\n            \"erpKey\": \"000032\",\n            \"orderNum\": \"2949A\",\n            \"docNum\": \"40\",\n            \"docStatus\": \"P\",\n            \"docDate\": \"2021-06-07\",\n            \"customOrderKey\": \"382\",\n            \"customStatus\": \"11\",\n            \"createdAt\": \"2021-06-07\",\n            \"updatedAt\": \"2021-06-07\",\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"78ff8d56-7623-4119-9dce-1e5021760e4c"},{"name":"Order Status - Options","id":"ac23c3d0-dc51-4267-988b-88555120328e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/orderStatus/options","description":"<h4 id=\"search-custom-sales-order-status-options-in-erp\">Search custom sales order status options in ERP</h4>\n<p><em>(sapBusinessOne=UFD1)</em></p>\n<p>This service will allow you to search custom sales orders 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["orderStatus","options"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"d55384af-94f4-4b92-bd8a-54f470194f7b","name":"Order Status - Options - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/orderStatus/options"},"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":"Fri, 26 Feb 2021 15:14:46 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"OrderStatus\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"orderStatus/options\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2021-02-26T12:14:41\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"count\": 6,\n    \"values\": [\n        {\n            \"erpKey\": \"1\",\n            \"description\": \"Novo\"\n        },\n        {\n            \"erpKey\": \"3\",\n            \"description\": \"Validado na Triagem\"\n        },\n        {\n            \"erpKey\": \"4\",\n            \"description\": \"Servico Liberado Fat\"\n        },\n        {\n            \"erpKey\": \"7\",\n            \"description\": \"Liberado Fat Materiais\"\n        },\n        {\n            \"erpKey\": \"8\",\n            \"description\": \"Aguardando Impressao\"\n        },\n        {\n            \"erpKey\": \"9\",\n            \"description\": \"Finalizado\"\n        }\n    ]\n}"}],"_postman_id":"ac23c3d0-dc51-4267-988b-88555120328e"},{"name":"Order Status","id":"38b41ce4-a337-4050-9c52-e68b1d28bebd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"erpKey\": \"000019\",\n    \"docNum\": \"\",\n    \"orderNum\": \"\",\n    \"docStatus\": \"C\",\n    \"carrierKey\": \"\",\n    \"customOrderKey\": \"\",\n    \"customStatus\": \"\",\n    \"customStatusNotify\": \"\",\n    \"customShipMethod\": \"\",\n    \"customShipType\": \"\",\n    \"customTrackingKey\": \"\",\n    \"customTrackingUrl\": \"\"\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/orderStatus","description":"<h4 id=\"update-sales-order-status-in-erp\">Update sales order status in ERP</h4>\n<p><em>(sapBusinessOne=17/ORDR, totvsProtheus=SC5)</em></p>\n<p>This service allows to update a sales order status in ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>Sales order status will be updated if the sales 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 sales order (<code>docStatus</code>=\"C\")</li>\n<li>change any of five custom fields in sales order definied in API Setup (including sales 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 (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>: 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>Sales Order Primary Key in ERP</td>\n</tr>\n<tr>\n<td>docNum *</td>\n<td>string</td>\n<td>Sales Order Number in ERP</td>\n</tr>\n<tr>\n<td>orderNum *</td>\n<td>string</td>\n<td>Sales Order Partner Number in ERP</td>\n</tr>\n<tr>\n<td>carrierKey</td>\n<td>string</td>\n<td>Carrier Primary Key in ERP</td>\n</tr>\n<tr>\n<td>docStatus</td>\n<td>string</td>\n<td>Sales 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 Sales 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 Sales Order Status in ERP (UDF definied in Setup API)</td>\n</tr>\n<tr>\n<td>customStatusNotify</td>\n<td>string</td>\n<td>Sales 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["orderStatus"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"882988f0-48f2-4b3f-818a-2645a9788f43","name":"Order Status - TOTVS PROTHEUS","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"erpKey\": \"000019\",\n    \"docStatus\": \"C\"\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/orderStatus"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Version","value":"1.1"},{"key":"FWRESTBUILD","value":"1.15.0717"},{"key":"Content-Type","value":"application/json"},{"key":"Status","value":"201 Created"},{"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\": \"salesAPI\",\n    \"process\": \"OrderStatus\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"orderStatus\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.103\",\n    \"effectiveTimestamp\": \"2021-06-10T17:58:58\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"17\",\n            \"table\": \"SC5\",\n            \"action\": \"Close\",\n            \"erpKey\": \"000019\"\n        }\n    ]\n}"}],"_postman_id":"38b41ce4-a337-4050-9c52-e68b1d28bebd"}],"id":"3ef3d62a-78b7-4338-9515-15c32b5c6dc8","event":[{"listen":"prerequest","script":{"id":"3863c4f4-2297-4a03-9e44-f024b4ab4460","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"c29b84b2-12d3-4b1c-af10-e0de756fd402","type":"text/javascript","exec":[""]}}],"_postman_id":"3ef3d62a-78b7-4338-9515-15c32b5c6dc8","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Sale Picklists","item":[{"name":"Sales Picklists","id":"52436982-b769-4c5a-979b-47cf5152ca79","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/picklists?createdFrom=2020-01-01&createdTo=2020-03-31&branch=1&docStatus=R&erpKey=121313&baseNum=244&orderNum=2001026731&pageNum=1&updatedAt=2020-01-13T10:00:00","description":"<h4 id=\"search-picklist-in-erp\">Search picklist in ERP</h4>\n<p><em>(sapBusinessOne=156/OPKL)</em></p>\n<p>The picklist search allows you to filter the ERP by:</p>\n<ul>\n<li>List Search: by branch and createdFrom + createdTo, by objectErp {optional} (17* = sales order, 1250000001 = transfer request), by docStatus {optional}</li>\n<li>Unitary Search: by erpKey or orderNum or docNum</li>\n</ul>\n<p>If no field for unitary search (erpKey or orderNum or docNum) is informed in the request, the picklists search is performed by branch and creation date from/to (which become mandatory).</p>\n<p>The picklists service will consider valid picklists with:</p>\n<ul>\n<li>SAP Business One: [1] OPKL.Canceled = N and OPKL.Status! = C + PKL1.PickStatus! = C and PKL1.ObjType = 17 or 1250000001 or 13 = Reserve Invoice or 202 = Production Order</li>\n<li>TOTVS Protheus: not available</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>branch: SAP Business One (ORDR.BPLId), TOTVS Protheus (not available)</li>\n<li>objectErp = SAP Business One (PKL1.BaseObject equal to 17 = ORDR or 1250000001 = OWTQ), TOTVS Protheus (??? equal to 17 = SC5 or 1250000001 = ???)</li>\n<li>partnerKey: SAP Business One (ORDR.CardCode), TOTVS Protheus (C5_CLIENTE + C5_LOJACLI)</li>\n<li>erpKey: SAP Business One (OPKL.AbsEntry), TOTVS Protheus (CB7 _ ???)</li>\n<li>orderNum: SAP Business One (ORDR.NumAtCard), TOTVS Protheus (C5_PEDECOM)</li>\n<li>baseKey: SAP Business One (ORDR.DocEntry), TOTVS Protheus (R_E_C_N_O_)</li>\n<li>baseNum: SAP Business One (ORDR.DocNum), TOTVS Protheus (R_E_C_N_O_)</li>\n<li>docStatus / lineStatus: C = closed, R = released, Y = picked, P = partially picked, D = partially delivered, X = canceled</li>\n</ul>\n<p>Data presented by picklist: Picklist and sales order data, Partner, Items</p>\n<p>The service will search the ERP database and return the picklists located. The response will inform:</p>\n<ul>\n<li>The total number of picklists in the “count” field</li>\n</ul>\n<p>For picklist 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>“pageSize” = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response</li>\n<li>“pageNum” = 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>“pageTotal” = total pages, reported in the response</li>\n<li>“hasNext” = if there are more pages (true / false), informed in the response</li>\n</ul>\n<p>This service will allow you to search the picklists list in two situations:</p>\n<ul>\n<li>Full Search: will result in all picklists, according to filters.</li>\n<li>Incremental Search: will result in all picklists, according to filters, that have been included and / or changed in the main register after a certain date / time provided in the request. In the Incremental Serch, the updatedAt field of the body request (format YYYY-MM-DDTHH:MM:SS) will be used to determine which picklists 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 (OPKL.CreateDate, OPKL.UpdateDate, OPKL.CreateTS, OPKL.UpdateTS), TOTVS Protheus: not available</li>\n</ul>\n<p>For the use of user fields (UDF) created in the sales order table (SAPB1: OPKL / PKL1, TOTVS: CB7), the respective registration must be performed in the Custom Table.\n \nLimitations:</p>\n<ul>\n<li>The picklists service does not support batch handling</li>\n<li>The picklists service does not support Serial Numbers handling (SerialNumber)</li>\n</ul>\n","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["picklists"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter change picklists  (required if not unit query)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2020-01-01"},{"description":{"content":"<p>Final create date to filter picklists (required if not unit query)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-03-31"},{"description":{"content":"<p>Branch (optional in list search)</p>\n","type":"text/plain"},"key":"branch","value":"1"},{"description":{"content":"<p>Status to filter picklists: R=released, Y=picked, P=partially picked, D=partially delivered (optional)</p>\n","type":"text/plain"},"key":"docStatus","value":"R"},{"description":{"content":"<p>Picklist Primary Key in ERP (optional)</p>\n","type":"text/plain"},"key":"erpKey","value":"121313"},{"description":{"content":"<p>Picklist Document Number in ERP (optional)</p>\n","type":"text/plain"},"key":"baseNum","value":"244"},{"description":{"content":"<p>Partner Picklist Number in ERP (optional)</p>\n","type":"text/plain"},"key":"orderNum","value":"2001026731"},{"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":"24d977ef-f77e-4895-8530-a0b66923a917","name":"picklists","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":{"raw":"{{endpoint}}/picklists?branch=1&createdFrom=2020-02-26&createdTo=2020-02-26","host":["{{endpoint}}"],"path":["picklists"],"query":[{"key":"branch","value":"1","description":"Branch (required if not unit query)"},{"key":"createdFrom","value":"2020-02-26","description":"Initial create date to filter change sales orders (required if not unit query)"},{"key":"createdTo","value":"2020-02-26","description":"Final create date to filter sales orders (required if not unit query)"},{"key":"docStatus","value":"R","description":"Status to filter picklists: R=released, Y=picked, P=partially picked, D=partially delivered (optional)","disabled":true},{"key":"erpKey","value":"121313","description":"Order Primary Key in ERP (optional)","disabled":true},{"key":"orderNum","value":"2001026731","description":"Partner Order Number in ERP (optional)","disabled":true},{"key":"docNum","value":"121313","description":"Order Document Number in ERP (optional)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-13T10:00:00","description":"Date to filter sales order status changes - incremental query (optional)","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=F9403FCF238D1AA2ADCDD4810956A809; 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":"Wed, 26 Feb 2020 19:40:42 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"PickLists\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"picklists\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-02-26T16:40:40\",\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-MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"24\",\n            \"docStatus\": \"Y\",\n            \"docDate\": \"2020-02-26\",\n            \"baseKey\": \"99\",\n            \"baseNum\": \"99\",\n            \"orderNum\": \"\",\n            \"createdAt\": \"2020-02-26T::\",\n            \"updatedAt\": \"2020-02-26T::\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C003\",\n                \"fullName\": \"SAP do Brasil LTDA\",\n                \"aliasName\": \"\",\n                \"email\": \"contato@sap.com.br\",\n                \"phone\": \"5503-3290\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"\",\n                \"taxNumber\": \"33000167000101\",\n                \"formattedTaxNumber\": \"33.000.167/0001-01\",\n                \"stateTaxNumber\": \"Isento\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Vieira Souto\",\n                    \"address2\": \"15° andar\",\n                    \"city\": \"Rio de Janeiro\",\n                    \"county\": \"3656\",\n                    \"postalCode\": \"43289-000\",\n                    \"stateCode\": \"RJ\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Ipanema\",\n                    \"exteriorNumber\": \"234\",\n                    \"streetType\": \"Av.\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"Vieira Souto\",\n                    \"address2\": \"15° andar\",\n                    \"city\": \"Rio de Janeiro\",\n                    \"county\": \"3656\",\n                    \"postalCode\": \"03249-000\",\n                    \"stateCode\": \"RJ\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Ipanema\",\n                    \"exteriorNumber\": \"324\",\n                    \"streetType\": \"Av.\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"1\",\n                    \"productKey\": \"I005\",\n                    \"codeBars\": \"I005\",\n                    \"productName\": \"Bola Adidas TG 2 Olympics\",\n                    \"quantity\": 4,\n                    \"releasedQty\": 0,\n                    \"pickedQty\": 4,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 69.9,\n                    \"lineStatus\": \"Y\"\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"52436982-b769-4c5a-979b-47cf5152ca79"},{"name":"Sales Picklist","id":"afeef50c-de29-4459-bcfd-147174f622b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\r\n\t\"baseKey\": \"264\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/picklists","description":"<h4 id=\"insert-sales-order-in-erp\">Insert sales order in ERP</h4>\n<p><em>(sapBusinessOne=17/ORDR, totvsProtheus=SC5)</em></p>\n<p>This service allows to insert a new sales order in the ERP, with treatment for new and existing partner, physical separation of products, sales invoice and incoming payments.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new sales order will be added if the sales order is not found on the ERP by branch + orderNum:</p>\n<ul>\n<li>SAP B1: ORDR.BPLId + ORDR.NumAtCard</li>\n<li>TOTVS Protheus: C5_FILIAL + C5_PEDECOM (note: field C5_PEDECOM is only 10 characters long and cannot be increased)</li>\n</ul>\n<p>The key to finding the partner is through taxNumber. If the partner is located by taxNumber, 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: A1_CGC (customer / lead) or A2_CGC (supplier)</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.CodeBars = codeBars or OITM.ItemCode = productKey</li>\n<li>TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey</li>\n</ul>\n<p>The following processes can be carried out after the inclusion of the sales order in the ERP:</p>\n<ul>\n<li>If the process goes through physical separation of products (API Setup: UseWms = true): [1] Picklist insert (if there is stock in all items), [2] payments insert in the Payments Table.</li>\n<li>If the process does not undergo physical separation of products (API Setup: UseWms = false): [1] Sales Invoice insert (if there is stock in all items), [2] Account Receivables insert</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li>Customer: [1] customer/type: C = customer, S = supplier, L = lead, [2] customer/taxType: P = person, C = company, G = government, E = employee. Each PN will have 2 registered addresses (CRD1, CRD7), namely: ShipToCode (S) = /customer/fullName OR /shipment/shippingAddress/firstName + \"\" + /shipment/shippingAddress/lastName, BillToCode (B) = /customer/fullName OR /customer/billingAddress/firstName + \"\" + /customer/billingAddress/lastName. Each PN will have 3 tax identification numbers (CRD12), namely: ShipToCode, BillToCode, empty.</li>\n<li>Seller: sellerKey</li>\n<li>Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus</li>\n<li>items: Duplication of items on more than 1 order line is not accepted, basePrice: base/gross price, taxBasis: total value of the item (quantity * price), calculation date for tax</li>\n<li>totals: netValue: net value with discounts applied, grossValue: gross value with discounts and taxes applied, baseValue: base value for tax calculation, taxValue: taxes that increase order value (IPI, ICMS-ST, ...)</li>\n<li>payments: 5 payment methods are accepted (paymentMethod): transfer, boe, creditCard (mandatory fields: cardName and authid), cash, check</li>\n<li>The ERP payment method code can be entered in the paymentMethodKey field</li>\n</ul>\n<p>For the use of user fields (UDF) created in the sales order table (SAPB1: ORDR / RDR1, TOTVS: SC5 / SC6), 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>baseKey</td>\n<td>string</td>\n<td>Access key</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["picklists"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"e39d8242-519d-48e2-bd47-663cb3f14b43","name":"picklists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"},{"key":"Content-Type","type":"text","value":"application/json","disabled":true}],"body":{"mode":"raw","raw":"{\r\n\t\"baseKey\": \"179768\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/picklists"},"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":"Mon, 25 Nov 2019 21:54:58 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"PickLists\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"picklists\",\n    \"user\": \"intergate\",\n    \"host\": \"170.81.220.186\",\n    \"effectiveTimestamp\": \"2019-11-25T19:54:55\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"156\",\n            \"table\": \"OPKL\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"176397\"\n        }\n    ]\n}"}],"_postman_id":"afeef50c-de29-4459-bcfd-147174f622b7"},{"name":"Sales Picklist","id":"b52d9f29-355e-4ab4-811a-8b89bfd2ce60","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"erpKey\": \"28\",\r\n\t\"baseNum\": \"264\",\r\n\t\"items\": [\r\n\t\t{\r\n\t\t\t\"lineNum\": \"0\",\r\n\t\t\t\"productKey\": \"I004\",\r\n\t\t\t\"codeBars\": \"I014\",\r\n\t\t\t\"quantity\": 1\r\n\t\t}\r\n\t]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/picklists","description":"<h4 id=\"update-picklist-in-erp\">Update picklist in ERP</h4>\n<p><em>(sapBusinessOne=156/OPKL)</em></p>\n<p>This service will allow to update picklist for sales order existing in the ERP.</p>\n<p>The key to picklist location is by erpKey and the sales order by orderNum or baseNum or baseKey. If the picklist is found by erpKey and the sales order by orderNum or baseNum or baseKey, the data is updated, changing the status of the items received to Y = picked.</p>\n<ul>\n<li>SAP Business One: OPKL / PKL1.AbsEntry</li>\n<li>TOTVS Protheus: ???</li>\n</ul>\n<p>The picklists service will consider picklists with:</p>\n<ul>\n<li>SAP Business One: [1] OPKL.Canceled = N and OPKL.Status! = C + PKL1.PickStatus! = C and PKL1.ObjType = 17</li>\n<li>TOTVS Protheus: not available</li>\n</ul>\n<p>Picklists can have the following statuses in ERP:</p>\n<ul>\n<li>docStatus / lineStatus: C = closed, R = released, Y = picked, P = partially picked, D = partially delivered</li>\n</ul>\n<p>The following processes are performed after updating the picklist to picked (Y) in the ERP:</p>\n<ul>\n<li>Insert of Sales Invoice</li>\n<li>Insert of accounts receivables (if recorded in Payments Table)</li>\n</ul>\n<p>Limitations:</p>\n<ul>\n<li>The picklists service does not support batch handling</li>\n<li>The picklists service does not support Serial Numbers handling (SerialNumber)</li>\n</ul>\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>Erp key</td>\n</tr>\n<tr>\n<td>docNum</td>\n<td>string</td>\n<td>Doc Numbers</td>\n</tr>\n<tr>\n<td>items</td>\n<td>array</td>\n<td>items</td>\n</tr>\n<tr>\n<td>items.lineNum</td>\n<td>string</td>\n<td>Line Numbers</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 codeBars</td>\n</tr>\n<tr>\n<td>items.quantity</td>\n<td>number</td>\n<td>quantity</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>erpKey</td>\n<td>string</td>\n<td>Erp baseKey</td>\n</tr>\n<tr>\n<td>docNum</td>\n<td>string</td>\n<td>Doc number</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>error</td>\n<td>object</td>\n<td>Error</td>\n</tr>\n<tr>\n<td>error.code</td>\n<td>string</td>\n<td>Code</td>\n</tr>\n<tr>\n<td>error.message</td>\n<td>string</td>\n<td>message</td>\n</tr>\n<tr>\n<td>error.detais</td>\n<td>string</td>\n<td>Details</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["picklists"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"5e1afa96-c70c-47ca-8272-ce54eecf9a3b","name":"picklists","originalRequest":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"erpKey\": \"22\",\r\n\t\"docNum\": \"261\",\r\n\t\"items\": [\r\n\t\t{\r\n\t\t\t\"lineNum\": \"0\",\r\n\t\t\t\"productKey\": \"I004\",\r\n\t\t\t\"codeBars\": \"I004\",\r\n\t\t\t\"quantity\": 1\r\n\t\t}\r\n\t]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/picklists"},"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, 26 Feb 2020 20:15:09 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"PickLists\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"picklists\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-02-26T17:12:43\",\n    \"erpKey\": \"22\",\n    \"docNum\": \"261\",\n    \"code\": \"400\",\n    \"success\": false,\n    \"error\": {\n        \"code\": \"400\",\n        \"message\": \"Picklist is already picked\",\n        \"details\": \"Sales Order picklist is already picked\"\n    }\n}"}],"_postman_id":"b52d9f29-355e-4ab4-811a-8b89bfd2ce60"}],"id":"3c90aad4-533f-431b-b8a1-d0bbdd8ff600","event":[{"listen":"prerequest","script":{"id":"ea507466-c3d8-4b3a-ba8e-8d42bf483f0a","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"30828020-b45d-429f-b15d-89c521d1c63e","type":"text/javascript","exec":[""]}}],"_postman_id":"3c90aad4-533f-431b-b8a1-d0bbdd8ff600","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Sale Invoices","item":[{"name":"Sale Invoices","id":"48d73f5c-67eb-45ad-b49a-ef5220f82f15","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/invoices?createdFrom=2020-11-10&createdTo=2020-11-10&branch=1&partnerKey=C001&sellerKey=22&nfeAuthCode=100&erpKey=157025&docNum=142595&orderNum=1074403543750-01&pageNum=100&updatedAt=2020-10-30T14:00:00","description":"<h4 id=\"search-sales-invoices-in-erp\">Search sales invoices in ERP</h4>\n<p><em>(sapBusinessOne=13/OINV, totvsProtheus=SF2)</em></p>\n<p>This service will allow to search sales invoices in the ERP.</p>\n<p>The search of sales invoices 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>, <code>sellerKey</code>, <code>nfeAuthCode</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 sales invoices is carried out by date of creation from/to (which become mandatory).</p>\n<p>The invoices service will consider sales invoices with:</p>\n<ul>\n<li>SAP Business One: OINV.ObjType = 13</li>\n<li>TOTVS Protheus: F2_TIPO IN 'N', 'C', 'I', 'P'</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (OINV.BPLId), TOTVS Protheus (F2_FILIAL)</li>\n<li><code>partnerKey</code>: SAP Business One (OINV.CardCode), TOTVS Protheus (F2_CLIENTE+'_'+F2_LOJA)</li>\n<li><code>sellerKey</code>: SAP Business One (OINV.SlpCode), TOTVS Protheus (F2_VEND1)</li>\n<li><code>nfeAuthCode</code>: SAP Business One (OINV.[GP UdfInvoiceNfeAuth]), TOTVS Protheus (F3_CODRSEF)</li>\n<li><code>erpKey</code>: SAP Business One (OINV.DocEntry), TOTVS Protheus (F2_SERIE+'_'+F2_NUM)</li>\n<li><code>orderNum</code>: SAP Business One (OINV.NumAtCard), TOTVS Protheus (C5_PEDECOM)</li>\n<li><code>docNum</code>: SAP Business One (OINV.DocNum), TOTVS Protheus (R_E_C_N_O_)</li>\n<li><code>docStatus</code>: O = open, C = closed, X = canceled, P = paid, R = returned, XC = cancelation invoice (SAP Business One: cancelation of invoice changes <code>docStatus</code> to X and generate a new invoice with <code>docStatus</code>=XC and same <code>nfeNum</code>)</li>\n<li><code>baseObject</code> and <code>baseKey</code>: object and erpKey which invoice is based</li>\n</ul>\n<p>Data returned in response: 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 <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 sales invoices list in two situations:</p>\n<ul>\n<li>Full Search: will result in all sales invoices, according to filters.</li>\n<li>Incremental Search: will result in all sales 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 sales invoices 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 sales invoices (SAPB1: OINV, 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["invoices"],"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":"2020-11-10"},{"description":{"content":"<p>Final create date to filter invoices (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-11-10"},{"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>Seller Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"22"},{"description":{"content":"<p>Authorization NFe code (optional in list search - depends on UDF in GP API setup)</p>\n","type":"text/plain"},"key":"nfeAuthCode","value":"100"},{"description":{"content":"<p>Sales Invoice Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"157025"},{"description":{"content":"<p>Sales Invoice Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"142595"},{"description":{"content":"<p>Partner Order Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1074403543750-01"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"100"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-10-30T14:00:00"},{"disabled":true,"description":{"content":"<p>#Not implemented#</p>\n","type":"text/plain"},"key":"shippingMethod","value":"LOGGI"}],"variable":[]}},"response":[{"id":"cd707b9e-b6c8-427a-9c47-5122aa3d747b","name":"Sale Invoices - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/invoices?branch=1&createdFrom=2020-01-24&createdTo=2020-04-24&pageNum=1","host":["{{endpoint}}"],"path":["invoices"],"query":[{"key":"branch","value":"1","description":"Branch (required if not unitary search)"},{"key":"createdFrom","value":"2020-01-24","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2020-04-24","description":"Final create date to filter invoices (required if not unitary search)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)","disabled":true},{"key":"erpKey","value":"120","description":"Invoice Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"120","description":"Invoice Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"FM-2001070359","description":"Partner Order Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date to filter 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":"Fri, 24 Apr 2020 17:04:43 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"Invoices\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"invoices\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.100\",\n    \"effectiveTimestamp\": \"2020-04-24T14:04:39\",\n    \"branch\": \"1\",\n    \"createdFrom\": \"2020-01-24\",\n    \"createdTo\": \"2020-04-24\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"pageSize\": 10,\n    \"pageNum\": 1,\n    \"pageTotal\": 4,\n    \"hasNext\": true,\n    \"count\": 10,\n    \"values\": [\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"136\",\n            \"docNum\": \"136\",\n            \"orderNum\": \"FM-2001070359\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-01-24\",\n            \"docDueDate\": \"2020-01-24\",\n            \"taxDate\": \"2020-01-24\",\n            \"docValue\": 505.44,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"89\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 505.44,\n            \"createdAt\": \"2020-01-24T15:33:56\",\n            \"updatedAt\": \"2020-01-24T15:33:59\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"P\",\n                \"partnerKey\": \"C000003\",\n                \"docEntry\": \"72\",\n                \"fullName\": \"Rafael Ogeda\",\n                \"aliasName\": \"Rafael Ogeda\",\n                \"email\": \"rafael.ogeda@intergate.net.br\",\n                \"phone\": \"(47) 98849-3101\",\n                \"phoneSecondary\": \"\",\n                \"cellular\": \"\",\n                \"taxNumber\": \"891.751.749-87\",\n                \"stateTaxNumber\": \"\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Luiz Walendowsky\",\n                    \"address2\": \"\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"4614\",\n                    \"postalCode\": \"88210000\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Pereque\",\n                    \"exteriorNumber\": \"218\",\n                    \"streetType\": \"\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"Luiz Walendowsky\",\n                    \"address2\": \"\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"4614\",\n                    \"postalCode\": \"88210000\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Pereque\",\n                    \"exteriorNumber\": \"218\",\n                    \"streetType\": \"\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I019\",\n                    \"codeBars\": \"I019\",\n                    \"productName\": \"Camisa Adidas Real Madrid I 09/10 s/nº\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 262.06,\n                    \"taxBasis\": 262.06,\n                    \"usage\": \"5\",\n                    \"cfop\": \"6102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 50.81999999999999,\n                    \"freightValue\": 22,\n                    \"grossValue\": 374.75,\n                    \"unitCost\": 194.86,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 262.06,\n                            \"taxRate\": 18,\n                            \"taxValue\": 47.17\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 262.06,\n                            \"taxRate\": 7,\n                            \"taxValue\": 18.34\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 420.6,\n                            \"taxRate\": 18,\n                            \"taxValue\": 28.54\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 22,\n                            \"taxRate\": 18,\n                            \"taxValue\": 3.96\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 22,\n                            \"taxRate\": 7,\n                            \"taxValue\": 1.54\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 35.31,\n                            \"taxRate\": 18,\n                            \"taxValue\": 2.4\n                        }\n                    ]\n                },\n                {\n                    \"lineNum\": \"1\",\n                    \"productKey\": \"I004\",\n                    \"codeBars\": \"I004\",\n                    \"productName\": \"Bola Adidas Finale Sportivo\",\n                    \"quantity\": 2,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 66.74,\n                    \"taxBasis\": 133.48,\n                    \"usage\": \"5\",\n                    \"cfop\": \"6102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 25.88,\n                    \"freightValue\": 11.2,\n                    \"grossValue\": 190.88,\n                    \"unitCost\": 62.36,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 133.48,\n                            \"taxRate\": 18,\n                            \"taxValue\": 24.03\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 133.48,\n                            \"taxRate\": 7,\n                            \"taxValue\": 9.34\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 214.23,\n                            \"taxRate\": 18,\n                            \"taxValue\": 14.54\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 11.2,\n                            \"taxRate\": 18,\n                            \"taxValue\": 2.02\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 11.2,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0.78\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 17.97,\n                            \"taxRate\": 18,\n                            \"taxValue\": 1.22\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 428.73999999999995,\n                    \"grossValue\": 505.44,\n                    \"baseValue\": 428.73999999999995,\n                    \"taxValue\": 76.7\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 395.53999999999996,\n                    \"grossValue\": 466.29999999999995,\n                    \"baseValue\": 395.53999999999996,\n                    \"taxValue\": 70.76,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 33.2,\n                    \"grossValue\": 39.14,\n                    \"baseValue\": 33.2,\n                    \"taxValue\": 5.94,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"ICMSBI00\",\n                    \"taxBasis\": 428.74,\n                    \"taxValue\": 77.18\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 428.74,\n                    \"taxValue\": 30\n                },\n                {\n                    \"taxCode\": \"STA1850\",\n                    \"taxBasis\": 688.11,\n                    \"taxValue\": 46.7\n                }\n            ]\n        },\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"137\",\n            \"docNum\": \"137\",\n            \"orderNum\": \"FM-2001026731\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-01-24\",\n            \"docDueDate\": \"2020-01-24\",\n            \"taxDate\": \"2020-01-24\",\n            \"docValue\": 158.64,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"90\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 158.64,\n            \"createdAt\": \"2020-01-24T15:34:24\",\n            \"updatedAt\": \"2020-01-24T15:34:25\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"P\",\n                \"partnerKey\": \"C000004\",\n                \"docEntry\": \"73\",\n                \"fullName\": \"Rafael Ogeda\",\n                \"aliasName\": \"Rafael Ogeda\",\n                \"email\": \"rafael.ogeda.ro@gmail.com\",\n                \"phone\": \"(47) 98849-3101\",\n                \"phoneSecondary\": \"\",\n                \"cellular\": \"\",\n                \"taxNumber\": \"055.467.686-90\",\n                \"stateTaxNumber\": \"\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Luiz Walendowsky\",\n                    \"address2\": \"\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"4614\",\n                    \"postalCode\": \"88210000\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Pereque\",\n                    \"exteriorNumber\": \"218\",\n                    \"streetType\": \"\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"Luiz Walendowsky\",\n                    \"address2\": \"\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"4614\",\n                    \"postalCode\": \"88210000\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Pereque\",\n                    \"exteriorNumber\": \"218\",\n                    \"streetType\": \"\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I006\",\n                    \"codeBars\": \"I006\",\n                    \"productName\": \"Bola Adidas Torpedo X-Lite\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 110.26,\n                    \"taxBasis\": 110.26,\n                    \"usage\": \"5\",\n                    \"cfop\": \"6102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 24.08,\n                    \"freightValue\": 24.3,\n                    \"grossValue\": 157.67,\n                    \"unitCost\": 83.39,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 110.26,\n                            \"taxRate\": 18,\n                            \"taxValue\": 19.85\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 110.26,\n                            \"taxRate\": 7,\n                            \"taxValue\": 7.72\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 176.97,\n                            \"taxRate\": 18,\n                            \"taxValue\": 12.01\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 24.3,\n                            \"taxRate\": 18,\n                            \"taxValue\": 4.37\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 24.3,\n                            \"taxRate\": 7,\n                            \"taxValue\": 1.7\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 39,\n                            \"taxRate\": 18,\n                            \"taxValue\": 2.65\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 134.56,\n                    \"grossValue\": 158.64,\n                    \"baseValue\": 134.56,\n                    \"taxValue\": 24.08\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 110.26,\n                    \"grossValue\": 129.99,\n                    \"baseValue\": 110.26,\n                    \"taxValue\": 19.73,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 24.3,\n                    \"grossValue\": 28.65,\n                    \"baseValue\": 24.3,\n                    \"taxValue\": 4.35,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"ICMSBI00\",\n                    \"taxBasis\": 134.56,\n                    \"taxValue\": 24.22\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 134.56,\n                    \"taxValue\": 9.42\n                },\n                {\n                    \"taxCode\": \"STA1850\",\n                    \"taxBasis\": 215.97,\n                    \"taxValue\": 14.66\n                }\n            ]\n        },\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"138\",\n            \"docNum\": \"138\",\n            \"orderNum\": \"FM-2002030397\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-02-05\",\n            \"docDueDate\": \"2020-02-05\",\n            \"taxDate\": \"2020-02-05\",\n            \"docValue\": 535.06,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"91\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 535.06,\n            \"createdAt\": \"2020-02-05T12:39:55\",\n            \"updatedAt\": \"2020-02-05T12:40:00\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"P\",\n                \"partnerKey\": \"C000004\",\n                \"docEntry\": \"73\",\n                \"fullName\": \"Rafael Ogeda\",\n                \"aliasName\": \"Rafael Ogeda\",\n                \"email\": \"rafael.ogeda.ro@gmail.com\",\n                \"phone\": \"(47) 98849-3101\",\n                \"phoneSecondary\": \"\",\n                \"cellular\": \"\",\n                \"taxNumber\": \"055.467.686-90\",\n                \"stateTaxNumber\": \"\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Luiz Walendowsky\",\n                    \"address2\": \"\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"4614\",\n                    \"postalCode\": \"88210000\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Pereque\",\n                    \"exteriorNumber\": \"218\",\n                    \"streetType\": \"\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"Luiz Walendowsky\",\n                    \"address2\": \"\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"4614\",\n                    \"postalCode\": \"88210000\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Pereque\",\n                    \"exteriorNumber\": \"218\",\n                    \"streetType\": \"\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I021\",\n                    \"codeBars\": \"I021\",\n                    \"productName\": \"Camisa Adidas Alemanha I 09/10 s/nº\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 262.06,\n                    \"taxBasis\": 262.06,\n                    \"usage\": \"5\",\n                    \"cfop\": \"6102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 50.17999999999999,\n                    \"freightValue\": 18.42,\n                    \"grossValue\": 374.75,\n                    \"unitCost\": 186.71,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 262.06,\n                            \"taxRate\": 18,\n                            \"taxValue\": 47.17\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 262.06,\n                            \"taxRate\": 7,\n                            \"taxValue\": 18.34\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 420.6,\n                            \"taxRate\": 18,\n                            \"taxValue\": 28.54\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 18.42,\n                            \"taxRate\": 18,\n                            \"taxValue\": 3.32\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 18.42,\n                            \"taxRate\": 7,\n                            \"taxValue\": 1.29\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 29.57,\n                            \"taxRate\": 18,\n                            \"taxValue\": 2.01\n                        }\n                    ]\n                },\n                {\n                    \"lineNum\": \"1\",\n                    \"productKey\": \"I005\",\n                    \"codeBars\": \"I005\",\n                    \"productName\": \"Bola Adidas TG 2 Olympics\",\n                    \"quantity\": 2,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 81,\n                    \"taxBasis\": 162,\n                    \"usage\": \"5\",\n                    \"cfop\": \"6102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 31.02,\n                    \"freightValue\": 11.38,\n                    \"grossValue\": 231.66,\n                    \"unitCost\": 67.15,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 162,\n                            \"taxRate\": 18,\n                            \"taxValue\": 29.16\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 162,\n                            \"taxRate\": 7,\n                            \"taxValue\": 11.34\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 260.01,\n                            \"taxRate\": 18,\n                            \"taxValue\": 17.64\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 11.38,\n                            \"taxRate\": 18,\n                            \"taxValue\": 2.05\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 11.38,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0.8\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"STA1850\",\n                            \"taxBasis\": 18.27,\n                            \"taxRate\": 18,\n                            \"taxValue\": 1.24\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 453.86,\n                    \"grossValue\": 535.06,\n                    \"baseValue\": 453.86,\n                    \"taxValue\": 81.2\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 424.06,\n                    \"grossValue\": 499.92,\n                    \"baseValue\": 424.06,\n                    \"taxValue\": 75.86,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 29.8,\n                    \"grossValue\": 35.14,\n                    \"baseValue\": 29.8,\n                    \"taxValue\": 5.34,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"ICMSBI00\",\n                    \"taxBasis\": 453.86,\n                    \"taxValue\": 81.7\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 453.86,\n                    \"taxValue\": 31.77\n                },\n                {\n                    \"taxCode\": \"STA1850\",\n                    \"taxBasis\": 728.45,\n                    \"taxValue\": 49.43\n                }\n            ]\n        },\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"139\",\n            \"docNum\": \"139\",\n            \"orderNum\": \"AZ-VT-978911906676-10\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-02-26\",\n            \"docDueDate\": \"2020-02-26\",\n            \"taxDate\": \"2020-02-26\",\n            \"docValue\": 63.89,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"92\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 63.89,\n            \"createdAt\": \"2020-02-26T19:44:27\",\n            \"updatedAt\": \"2020-02-26T19:44:32\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2000\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge 2\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I004\",\n                    \"codeBars\": \"I004\",\n                    \"productName\": \"Bola Adidas Finale Sportivo\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 49.9,\n                    \"taxBasis\": 49.9,\n                    \"usage\": \"5\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 4.18,\n                    \"freightValue\": 9.81,\n                    \"grossValue\": 64.2,\n                    \"unitCost\": 62.35,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 3,\n                            \"taxValue\": 1.5\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 18,\n                            \"taxValue\": 8.98\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 7,\n                            \"taxValue\": 3.49\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.32\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0.29\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 18,\n                            \"taxValue\": 1.77\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0.69\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.06\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 59.71,\n                    \"grossValue\": 63.89,\n                    \"baseValue\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 49.9,\n                    \"grossValue\": 53.39,\n                    \"baseValue\": 49.9,\n                    \"taxValue\": 3.49,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 9.81,\n                    \"grossValue\": 10.5,\n                    \"baseValue\": 9.81,\n                    \"taxValue\": 0.69,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"COFINS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 1.79\n                },\n                {\n                    \"taxCode\": \"ICMSBx00\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 10.75\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                {\n                    \"taxCode\": \"PIS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 0.38\n                }\n            ]\n        },\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"140\",\n            \"docNum\": \"140\",\n            \"orderNum\": \"AZ-VT-978911906676-09\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-02-26\",\n            \"docDueDate\": \"2020-02-26\",\n            \"taxDate\": \"2020-02-26\",\n            \"docValue\": 63.89,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"93\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 63.89,\n            \"createdAt\": \"2020-02-26T21:32:34\",\n            \"updatedAt\": \"2020-03-10T21:36:50\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2000\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge 2\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I004\",\n                    \"codeBars\": \"I004\",\n                    \"productName\": \"Bola Adidas Finale Sportivo\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 49.9,\n                    \"taxBasis\": 49.9,\n                    \"usage\": \"5\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 4.18,\n                    \"freightValue\": 9.81,\n                    \"grossValue\": 64.2,\n                    \"unitCost\": 62.35,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 3,\n                            \"taxValue\": 1.5\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 18,\n                            \"taxValue\": 8.98\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 7,\n                            \"taxValue\": 3.49\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.32\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0.29\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 18,\n                            \"taxValue\": 1.77\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0.69\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.06\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 59.71,\n                    \"grossValue\": 63.89,\n                    \"baseValue\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 49.9,\n                    \"grossValue\": 53.39,\n                    \"baseValue\": 49.9,\n                    \"taxValue\": 3.49,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 9.81,\n                    \"grossValue\": 10.5,\n                    \"baseValue\": 9.81,\n                    \"taxValue\": 0.69,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"COFINS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 1.79\n                },\n                {\n                    \"taxCode\": \"ICMSBx00\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 10.75\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                {\n                    \"taxCode\": \"PIS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 0.38\n                }\n            ]\n        },\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"141\",\n            \"docNum\": \"141\",\n            \"orderNum\": \"AZ-VT-978911906676-08\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-03-10\",\n            \"docDueDate\": \"2020-03-10\",\n            \"taxDate\": \"2020-03-10\",\n            \"docValue\": 63.89,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"94\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 63.89,\n            \"createdAt\": \"2020-03-10T23:32:15\",\n            \"updatedAt\": \"2020-03-10T23:32:19\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2000\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge 2\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I004\",\n                    \"codeBars\": \"I004\",\n                    \"productName\": \"Bola Adidas Finale Sportivo\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 49.9,\n                    \"taxBasis\": 49.9,\n                    \"usage\": \"5\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 4.18,\n                    \"freightValue\": 9.81,\n                    \"grossValue\": 64.2,\n                    \"unitCost\": 62.35,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 3,\n                            \"taxValue\": 1.5\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 18,\n                            \"taxValue\": 8.98\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 7,\n                            \"taxValue\": 3.49\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.32\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0.29\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 18,\n                            \"taxValue\": 1.77\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0.69\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.06\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 59.71,\n                    \"grossValue\": 63.89,\n                    \"baseValue\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 49.9,\n                    \"grossValue\": 53.39,\n                    \"baseValue\": 49.9,\n                    \"taxValue\": 3.49,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 9.81,\n                    \"grossValue\": 10.5,\n                    \"baseValue\": 9.81,\n                    \"taxValue\": 0.69,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"COFINS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 1.79\n                },\n                {\n                    \"taxCode\": \"ICMSBx00\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 10.75\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                {\n                    \"taxCode\": \"PIS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 0.38\n                }\n            ]\n        },\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"142\",\n            \"docNum\": \"142\",\n            \"orderNum\": \"AZ-VT-978911906676-08\",\n            \"docStatus\": \"X\",\n            \"docDate\": \"2020-03-10\",\n            \"docDueDate\": \"2020-03-10\",\n            \"taxDate\": \"2020-03-10\",\n            \"docValue\": 63.89,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"94\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 63.89,\n            \"createdAt\": \"2020-03-10T23:46:21\",\n            \"updatedAt\": \"2020-03-10T23:46:52\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2000\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge 2\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I004\",\n                    \"codeBars\": \"I004\",\n                    \"productName\": \"Bola Adidas Finale Sportivo\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 49.9,\n                    \"taxBasis\": 49.9,\n                    \"usage\": \"5\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 4.18,\n                    \"freightValue\": 9.81,\n                    \"grossValue\": 64.2,\n                    \"unitCost\": 62.35,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 3,\n                            \"taxValue\": 1.5\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 18,\n                            \"taxValue\": 8.98\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 7,\n                            \"taxValue\": 3.49\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.32\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0.29\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 18,\n                            \"taxValue\": 1.77\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0.69\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.06\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 59.71,\n                    \"grossValue\": 63.89,\n                    \"baseValue\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 49.9,\n                    \"grossValue\": 53.39,\n                    \"baseValue\": 49.9,\n                    \"taxValue\": 3.49,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 9.81,\n                    \"grossValue\": 10.5,\n                    \"baseValue\": 9.81,\n                    \"taxValue\": 0.69,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"COFINS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 1.79\n                },\n                {\n                    \"taxCode\": \"ICMSBx00\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 10.75\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                {\n                    \"taxCode\": \"PIS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 0.38\n                }\n            ]\n        },\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"143\",\n            \"docNum\": \"143\",\n            \"orderNum\": \"AZ-VT-978911906676-08\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-03-11\",\n            \"docDueDate\": \"2020-03-11\",\n            \"taxDate\": \"2020-03-11\",\n            \"docValue\": 63.89,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"95\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 63.89,\n            \"createdAt\": \"2020-03-11T00:08:15\",\n            \"updatedAt\": \"2020-03-11T00:08:18\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2000\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge 2\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I004\",\n                    \"codeBars\": \"I004\",\n                    \"productName\": \"Bola Adidas Finale Sportivo\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 49.9,\n                    \"taxBasis\": 49.9,\n                    \"usage\": \"5\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 4.18,\n                    \"freightValue\": 9.81,\n                    \"grossValue\": 64.2,\n                    \"unitCost\": 62.35,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 3,\n                            \"taxValue\": 1.5\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 18,\n                            \"taxValue\": 8.98\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 7,\n                            \"taxValue\": 3.49\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.32\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0.29\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 18,\n                            \"taxValue\": 1.77\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0.69\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.06\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 59.71,\n                    \"grossValue\": 63.89,\n                    \"baseValue\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 49.9,\n                    \"grossValue\": 53.39,\n                    \"baseValue\": 49.9,\n                    \"taxValue\": 3.49,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 9.81,\n                    \"grossValue\": 10.5,\n                    \"baseValue\": 9.81,\n                    \"taxValue\": 0.69,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"COFINS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 1.79\n                },\n                {\n                    \"taxCode\": \"ICMSBx00\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 10.75\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                {\n                    \"taxCode\": \"PIS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 0.38\n                }\n            ]\n        },\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"144\",\n            \"docNum\": \"144\",\n            \"orderNum\": \"AZ-VT-978911906676-08\",\n            \"docStatus\": \"X\",\n            \"docDate\": \"2020-03-11\",\n            \"docDueDate\": \"2020-03-11\",\n            \"taxDate\": \"2020-03-11\",\n            \"docValue\": 63.89,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"95\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 63.89,\n            \"createdAt\": \"2020-03-11T00:10:32\",\n            \"updatedAt\": \"2020-03-11T00:10:33\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2000\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge 2\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I004\",\n                    \"codeBars\": \"I004\",\n                    \"productName\": \"Bola Adidas Finale Sportivo\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 49.9,\n                    \"taxBasis\": 49.9,\n                    \"usage\": \"5\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 4.18,\n                    \"freightValue\": 9.81,\n                    \"grossValue\": 64.2,\n                    \"unitCost\": 62.35,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 3,\n                            \"taxValue\": 1.5\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 18,\n                            \"taxValue\": 8.98\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 7,\n                            \"taxValue\": 3.49\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.32\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0.29\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 18,\n                            \"taxValue\": 1.77\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0.69\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.06\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 59.71,\n                    \"grossValue\": 63.89,\n                    \"baseValue\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 49.9,\n                    \"grossValue\": 53.39,\n                    \"baseValue\": 49.9,\n                    \"taxValue\": 3.49,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 9.81,\n                    \"grossValue\": 10.5,\n                    \"baseValue\": 9.81,\n                    \"taxValue\": 0.69,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"COFINS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 1.79\n                },\n                {\n                    \"taxCode\": \"ICMSBx00\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 10.75\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                {\n                    \"taxCode\": \"PIS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 0.38\n                }\n            ]\n        },\n        {\n            \"branch\": \"1\",\n            \"branchName\": \"MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"145\",\n            \"docNum\": \"145\",\n            \"orderNum\": \"AZ-VT-978911906676-08\",\n            \"docStatus\": \"C\",\n            \"docDate\": \"2020-03-11\",\n            \"docDueDate\": \"2020-03-11\",\n            \"taxDate\": \"2020-03-11\",\n            \"docValue\": 63.89,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"96\",\n            \"nfeType\": \"NFe\",\n            \"nfeModel\": \"55\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 63.89,\n            \"createdAt\": \"2020-03-11T01:30:24\",\n            \"updatedAt\": \"2020-03-11T01:30:24\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2000\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge 2\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I004\",\n                    \"codeBars\": \"I004\",\n                    \"productName\": \"Bola Adidas Finale Sportivo\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 49.9,\n                    \"taxBasis\": 49.9,\n                    \"usage\": \"5\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 4.18,\n                    \"freightValue\": 9.81,\n                    \"grossValue\": 64.2,\n                    \"unitCost\": 62.35,\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 3,\n                            \"taxValue\": 1.5\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 18,\n                            \"taxValue\": 8.98\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 7,\n                            \"taxValue\": 3.49\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 49.9,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.32\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0.29\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 18,\n                            \"taxValue\": 1.77\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0.69\n                        },\n                        {\n                            \"taxRelate\": \"freight\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 9.81,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0.06\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 59.71,\n                    \"grossValue\": 63.89,\n                    \"baseValue\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 49.9,\n                    \"grossValue\": 53.39,\n                    \"baseValue\": 49.9,\n                    \"taxValue\": 3.49,\n                    \"priceAdjustValue\": 0,\n                    \"priceAdjustType\": \"\",\n                    \"priceAdjustPromotionId\": \"\",\n                    \"priceAdjustCouponId\": \"\"\n                },\n                \"shippingTotal\": {\n                    \"netValue\": 9.81,\n                    \"grossValue\": 10.5,\n                    \"baseValue\": 9.81,\n                    \"taxValue\": 0.69,\n                    \"shipAdjustValue\": 0,\n                    \"shipAdjustType\": \"\",\n                    \"shipAdjustPromotionId\": \"\",\n                    \"shipAdjustCouponId\": \"\"\n                }\n            },\n            \"taxes\": [\n                {\n                    \"taxCode\": \"COFINS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 1.79\n                },\n                {\n                    \"taxCode\": \"ICMSBx00\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 10.75\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 4.18\n                },\n                {\n                    \"taxCode\": \"PIS\",\n                    \"taxBasis\": 59.71,\n                    \"taxValue\": 0.38\n                }\n            ]\n        }\n    ]\n}"},{"id":"7a8ec373-d627-45b0-867c-270ab8a75113","name":"Sale Invoices - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/invoices?createdFrom=2020-01-01&createdTo=2020-11-03","host":["{{endpoint}}"],"path":["invoices"],"query":[{"key":"createdFrom","value":"2020-01-01","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2020-11-03","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":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional in list search)","disabled":true},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional in list search - depends on UDF in GP API setup)","disabled":true},{"key":"erpKey","value":"154175","description":"Sales Invoice Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"142595","description":"Sales Invoice Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1074403543750-01","description":"Partner Order Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"100","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-10-30T14:00:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true},{"key":"shippingMethod","value":"LOGGI","description":"#Not implemented#","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\": \"salesAPI\",\n    \"process\": \"Invoices\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"invoices\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-09T17:00:10\",\n    \"createdFrom\": \"2020-01-01\",\n    \"createdTo\": \"2020-11-03\",\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            \"sellerKey\": \"000001\",\n            \"erpKey\": \"1/000000001\",\n            \"erpId\": \"1\",\n            \"orderNum\": \"\",\n            \"docNum\": \"000000001\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-09-03\",\n            \"docDueDate\": \"2020-09-03\",\n            \"taxDate\": \"2020-09-03\",\n            \"docValue\": 45,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"000000001\",\n            \"nfeType\": \"\",\n            \"nfeModel\": \"01\",\n            \"nfeKeyAccess\": \"\",\n            \"nfeValue\": 0,\n            \"nfeAuthCode\": \"\",\n            \"nfeAuthDesc\": \"\",\n            \"nfeProtocol\": \"\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"P\",\n                \"partnerKey\": \"00003801\",\n                \"fullName\": \"Rafael Ogeda\",\n                \"aliasName\": \"Rafael Ogeda\",\n                \"email\": \"rafael.ogeda@intergate.net.br\",\n                \"phone\": \"(47) 98849-3101\",\n                \"phoneSecundary\": \"\",\n                \"cellular\": null,\n                \"taxNumber\": \"89175174987\",\n                \"stateTaxNumber\": \"ISENTO\",\n                \"cityTaxNumber\": \"\",\n                \"contactPerson\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Luiz Walendowsky, 218\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"\",\n                    \"community\": \"Pereque\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"13500\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"88210-000\",\n                    \"streetType\": null\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"Luiz Walendowsky, 218\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"\",\n                    \"community\": \"Pereque\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"88210-000\",\n                    \"streetType\": null\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"01\",\n                    \"productKey\": \"PA000001\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"TENIS TOPPER STYLUS 35\",\n                    \"quantity\": 1,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 45,\n                    \"taxBasis\": 45,\n                    \"usage\": \"501\",\n                    \"cfop\": \"6107\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 45,\n                    \"unitCost\": 10\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 45,\n                    \"grossValue\": 45,\n                    \"baseValue\": 45,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 45,\n                    \"grossValue\": 45,\n                    \"baseValue\": 45,\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":"48d73f5c-67eb-45ad-b49a-ef5220f82f15"},{"name":"Sale Invoice","id":"1968128a-8d0a-40ab-aa61-48983ffa79fa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"1\",\r\n    \"baseKey\": \"000020\",\r\n    \"whsCode *\": \"\",\r\n    \"mainUsage *\": \"\",\r\n    \"orderNum *\": \"\",\r\n    \"totalWeight\": 10.0,\r\n    \"totalVolume\": 3.0,\r\n    \"totalCubage\": 0.0,\r\n    \"items\": [\r\n        {\r\n            \"productKey\": \"900.000.003\",\r\n            \"quantity\": 1,\r\n            \"whsCode *\": \"\",\r\n            \"usage *\": \"\",\r\n            \"unitPrice *\": \"\",\r\n            \"baseKey *\": \"\",\r\n            \"baseLineNum\": \"01\",\r\n            \"batchNumbers\": [\r\n                {\r\n                    \"batchCode\": \"01\",\r\n                    \"productionDate\": \"2020-06-30\",\r\n                    \"expirationDate\": \"2021-06-24\",\r\n                    \"quantity\": 1\r\n                }\r\n            ]\r\n        }\r\n    ],\r\n    \"shipment\": {\r\n            \"carrierKey\": \"\"\r\n    },\r\n    \"payments\": [\r\n        {\r\n            \"paymentMethod\": \"cash\",\r\n            \"amount\": 10.00,\r\n            \"installments\": 1\r\n        },\r\n        {\r\n            \"paymentMethod\": \"creditCard\",\r\n            \"amount\": 49.71,\r\n            \"installments\": 3,\r\n            \"details\": {\r\n                \"cardName\": \"Visa\",\r\n                \"acquirer\": \"\",\r\n                \"tid\": \"12125\",\r\n                \"authid\": \"12121872612918721\",\r\n                \"nsu\": \"023567\"\r\n            }\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/invoices","description":"<h4 id=\"insert-sales-invoice-in-erp\">Insert sales invoice in ERP</h4>\n<p><em>(sapBusinessOne=13/OINV, totvsProtheus=SF2)</em></p>\n<p>This service will allow to insert a new sales invoice in the ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new sales invoice will be insert if the informed sales order is located and validated on the ERP. The key for locating the sales order on the ERP can be:</p>\n<ul>\n<li>SAP Business One: ORDR.DocEntry = baseKey or ORDR.DocNum = baseNum or ORDR.NumAtCard = orderNum</li>\n<li>TOTVS Protheus: C5_NUM = baseKey or R_E_C_N_O_ = baseNum or C5_PEDECOM = orderNum (note: field C5_PEDECOM is only 10 characters long and cannot be increased)</li>\n</ul>\n<p>Products sent to the service will be validated for the search key, order line number and quantity. Products can be identified in the ERP in 2 ways:</p>\n<ul>\n<li>SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey</li>\n<li>TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey</li>\n</ul>\n<p>In addition to the sales invoice, the service may or may not include incoming payments. Incoming Paymnets can have 2 sources:</p>\n<ul>\n<li>If the process goes through physical separation of products (picklist): from records in an Payments Table</li>\n<li>If the process does not go through physical separation of products (picklist): from the data received in the request in the payments block.</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of sales invoices (SAPB1: OINV / INV1, TOTVS: SF2 / SD2), 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>baseObject</td>\n<td>string</td>\n<td>Base Object (default = 17)</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.baseLineNum</td>\n<td>string</td>\n<td>Base line number</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["invoices"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"7405a906-27e5-42ed-88c0-32f6398dc8a1","name":"Sale Invoice - SAP Business One","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\t\"baseNum\": \"263\",\r\n\t\"totalWeight\": 10.0,\r\n\t\"totalVolume\": 3.0,\r\n\t\"totalCubage\": 0.0,\r\n\t\"items\": [\r\n\t\t{\r\n\t\t\t\"lineNum\": \"0\",\r\n\t\t\t\"productKey\": \"I004\",\r\n\t\t\t\"codeBars\": \"I004\",\r\n\t\t\t\"quantity\": 1\r\n\t\t}\r\n\t],\r\n\t\"payments\": [\r\n\t\t{\r\n\t\t\t\"paymentMethod\": \"cash\",\r\n\t\t\t\"amount\": 10.00,\r\n\t\t\t\"installments\": 1\r\n\t\t},\r\n\t\t{\r\n\t\t\t\"paymentMethod\": \"creditCard\",\r\n\t\t\t\"amount\": 54.09,\r\n\t\t\t\"installments\": 3,\r\n\t\t\t\"details\": {\r\n\t\t\t\t\"cardName\": \"Visa\",\r\n\t\t\t\t\"acquirer\": \"\",\r\n\t\t\t\t\"tid\": \"12125\",\r\n\t\t\t\t\"authid\": \"12121872612918721\",\r\n\t\t\t\t\"nsu\": \"023567\"\r\n\t\t\t}\r\n\t\t}\r\n\t]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/invoices"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=DB47500F24E46FB8A8F5BB9527AA4ECA; 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, 20 Mar 2020 15:05:09 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"Invoices\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"invoices\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-03-20T11:54:05\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"13\",\n            \"table\": \"OINV\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"165\"\n        },\n        {\n            \"object\": \"24\",\n            \"table\": \"ORCT\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"211\"\n        },\n        {\n            \"object\": \"24\",\n            \"table\": \"ORCT\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"212\"\n        }\n    ]\n}"}],"_postman_id":"1968128a-8d0a-40ab-aa61-48983ffa79fa"},{"name":"Sales Invoices-XML","id":"58159125-dcf0-42ed-86b5-250e79b2c00e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{endpoint}}/invoices/xml?erpKey=426829&docNum=78369&orderNum=353687&nfeNum=34828&nfeKeyAccess=35210323244006000100550010000428031123256800","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["invoices","xml"],"host":["{{endpoint}}"],"query":[{"key":"erpKey","value":"426829"},{"key":"docNum","value":"78369"},{"key":"orderNum","value":"353687"},{"key":"nfeNum","value":"34828"},{"key":"nfeKeyAccess","value":"35210323244006000100550010000428031123256800"}],"variable":[]}},"response":[],"_postman_id":"58159125-dcf0-42ed-86b5-250e79b2c00e"},{"name":"Sales Invoices-Cancellation","id":"12956143-ba11-4e32-8c08-fe4b5bafdc9a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{endpoint}}/invoices/xml?createdFrom=2001-01-01&createdTo=2023-07-25&branch=0102&partnerKey=001010_01&nfeAuthCode=100&erpKey=2_000003766&docNum=000003766&pageNum=1&updatedAt=2022-06-22T00:00:00&nfeType=SPED","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["invoices","xml"],"host":["{{endpoint}}"],"query":[{"key":"createdFrom","value":"2001-01-01"},{"key":"createdTo","value":"2023-07-25"},{"key":"branch","value":"0102"},{"key":"partnerKey","value":"001010_01"},{"key":"nfeAuthCode","value":"100"},{"key":"erpKey","value":"2_000003766"},{"key":"docNum","value":"000003766"},{"key":"pageNum","value":"1"},{"key":"updatedAt","value":"2022-06-22T00:00:00"},{"key":"nfeType","value":"SPED"}],"variable":[]}},"response":[],"_postman_id":"12956143-ba11-4e32-8c08-fe4b5bafdc9a"},{"name":"Sales Invoices-Unusability","id":"567805bb-d0ef-4ef1-b444-371eac91330c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{endpoint}}/invoices/xml?createdFrom=2001-01-01&createdTo=2023-07-25&branch=0102&partnerKey=001010_01&nfeAuthCode=100&erpKey=2_000003766&docNum=000003766&pageNum=1&updatedAt=2022-06-22T00:00:00&nfeType=SPED","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["invoices","xml"],"host":["{{endpoint}}"],"query":[{"key":"createdFrom","value":"2001-01-01"},{"key":"createdTo","value":"2023-07-25"},{"key":"branch","value":"0102"},{"key":"partnerKey","value":"001010_01"},{"key":"nfeAuthCode","value":"100"},{"key":"erpKey","value":"2_000003766"},{"key":"docNum","value":"000003766"},{"key":"pageNum","value":"1"},{"key":"updatedAt","value":"2022-06-22T00:00:00"},{"key":"nfeType","value":"SPED"}],"variable":[]}},"response":[],"_postman_id":"567805bb-d0ef-4ef1-b444-371eac91330c"},{"name":"Sale Deliveries","id":"139350a3-3d54-4865-b43f-c409e66f7999","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/deliveries?createdFrom=2010-01-01&createdTo=2020-09-29&branch=1&partnerKey=C001&sellerKey=22&nfeAuthCode=100&erpKey=120&docNum=49084&orderNum=1049210322364-01&pageNum=100&updatedAt=2020-09-21T00:00:00&shippingMethod=LOGGI","description":"<h4 id=\"search-sales-deliveries-in-erp\">Search sales deliveries in ERP</h4>\n<p><em>(sapBusinessOne=15/ODLN)</em></p>\n<p>This service will allow to search sales deliveries in the ERP.</p>\n<p>The search of sales deliveries 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>, <code>sellerKey</code>, <code>nfeAuthCode</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 sales deliveries is carried out by date of creation from/to (which become mandatory).</p>\n<p>The deliveries service will consider sales deliveries with:</p>\n<ul>\n<li>SAP Business One: ODLN.ObjType = 15</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (ODLN.BPLId), TOTVS Protheus (F2_FILIAL)</li>\n<li><code>partnerKey</code>: SAP Business One (ODLN.CardCode), TOTVS Protheus (F2_CLIENTE+'_'+F2_LOJA)</li>\n<li><code>sellerKey</code>: SAP Business One (ODLN.SlpCode), TOTVS Protheus (F2_VEND1)</li>\n<li><code>nfeAuthCode</code>: SAP Business One (ODLN.[GP UdfInvoiceNfeAuth]), TOTVS Protheus (F3_CODRSEF)</li>\n<li><code>erpKey</code>: SAP Business One (ODLN.DocEntry), TOTVS Protheus (F2_NUM)</li>\n<li><code>orderNum</code>: SAP Business One (ODLN.NumAtCard), TOTVS Protheus (C5_PEDECOM)</li>\n<li><code>docNum</code>: SAP Business One (ODLN.DocNum), TOTVS Protheus (R_E_C_N_O_)</li>\n<li><code>docStatus</code>: O = open, C = closed, X = canceled, P = paid, R = returned, XC = cancelation delivery (SAP Business One: cancelation of delivery changes <code>docStatus</code> to X and generate a new delivery with <code>docStatus</code>=XC and same <code>nfeNum</code>)</li>\n<li><code>baseObject</code> and <code>baseKey</code>: object and erpKey which delivery is based</li>\n</ul>\n<p>Data returned in response: delivery data, partner data, items (+ taxes), totals, taxes</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>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 sales deliveries list in two situations:</p>\n<ul>\n<li>Full Search: will result in all sales deliveries, according to filters.</li>\n<li>Incremental Search: will result in all sales deliveries, 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 sales deliveries 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)</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of sales deliveries (SAPB1: ODLN), 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["deliveries"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter deliveries (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2010-01-01"},{"description":{"content":"<p>Final create date to filter deliveries (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-09-29"},{"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>Seller Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"22"},{"description":{"content":"<p>Authorization NFe code (optional in list search - depends on UDF in GP API setup)</p>\n","type":"text/plain"},"key":"nfeAuthCode","value":"100"},{"description":{"content":"<p>Sales Delivery Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"120"},{"description":{"content":"<p>Sales Delivery Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"49084"},{"description":{"content":"<p>Partner Order Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1049210322364-01"},{"description":{"content":"<p>Number of page - pagination (optional)</p>\n","type":"text/plain"},"key":"pageNum","value":"100"},{"description":{"content":"<p>Date do filter modified registers - incremental search (optional)</p>\n","type":"text/plain"},"key":"updatedAt","value":"2020-09-21T00:00:00"},{"description":{"content":"<p>#Not implemented#</p>\n","type":"text/plain"},"key":"shippingMethod","value":"LOGGI"}],"variable":[]}},"response":[{"id":"14d12012-9136-4b3a-9bb8-9115cdc09a75","name":"Sales Deliveries - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/deliveries?createdFrom=2010-01-01&createdTo=2020-09-29","host":["{{endpoint}}"],"path":["deliveries"],"query":[{"key":"createdFrom","value":"2010-01-01","description":"Initial create date to filter deliveries (required if not unitary search)"},{"key":"createdTo","value":"2020-09-29","description":"Final create date to filter deliveries (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":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional in list search)","disabled":true},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional in list search - depends on UDF in GP API setup)","disabled":true},{"key":"erpKey","value":"120","description":"Sales Delivery Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"49084","description":"Sales Delivery Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1049210322364-01","description":"Partner Order Number in ERP (optional - unitary search)","disabled":true},{"key":"pageNum","value":"100","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-09-21T00:00:00","description":"Date do filter modified registers - incremental search (optional)","disabled":true},{"key":"shippingMethod","value":"LOGGI","description":"#Not implemented#","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=8CDE1C13E13BF1866967884846754F6D; 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, 09 Oct 2020 21:25:50 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"Deliveries\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"deliveries\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-10-09T18:23:02\",\n    \"createdFrom\": \"2010-01-01\",\n    \"createdTo\": \"2020-09-29\",\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            \"sellerKey\": \"3\",\n            \"erpKey\": \"8\",\n            \"docNum\": \"8\",\n            \"orderNum\": \"\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2014-02-19\",\n            \"docDueDate\": \"2014-02-19\",\n            \"taxDate\": \"2014-02-19\",\n            \"docValue\": 107,\n            \"nfeSeries\": \"1\",\n            \"nfeNum\": \"21\",\n            \"nfeType\": \"Modelo 1\",\n            \"nfeModel\": \"1\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 0,\n            \"baseObject\": \"17\",\n            \"baseKey\": \"12\",\n            \"comments\": \"Baseado em Pedidos de venda 12.\",\n            \"createdAt\": \"2014-02-19T00:01:04\",\n            \"updatedAt\": \"2014-02-19T00:01:05\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2001\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I001\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Bola Nike Total 90 Pitch CBF\",\n                    \"quantity\": 1,\n                    \"unit\": \"UNidade\",\n                    \"unitPrice\": 100,\n                    \"taxBasis\": 100,\n                    \"usage\": \"5\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 7,\n                    \"freightValue\": 0,\n                    \"grossValue\": 125,\n                    \"unitCost\": 60.35,\n                    \"comments\": \"\",\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 107,\n                            \"taxRate\": 18,\n                            \"taxValue\": 19.26\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 100,\n                            \"taxRate\": 7,\n                            \"taxValue\": 7\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 100,\n                    \"grossValue\": 107,\n                    \"baseValue\": 100,\n                    \"taxValue\": 7\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 100,\n                    \"grossValue\": 107,\n                    \"baseValue\": 100,\n                    \"taxValue\": 7,\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            \"taxes\": [\n                {\n                    \"taxCode\": \"ICMSBI00\",\n                    \"taxBasis\": 107,\n                    \"taxValue\": 19.26\n                },\n                {\n                    \"taxCode\": \"IPIBI000\",\n                    \"taxBasis\": 100,\n                    \"taxValue\": 7\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"139350a3-3d54-4865-b43f-c409e66f7999"},{"name":"Sale Delivery","id":"9f54d726-1349-4916-bfe8-04a435eb1889","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"1\",\r\n    \"baseKey\": \"108336\",\r\n    \"items\": [\r\n        {\r\n            \"productKey\": \"I004\",\r\n            \"quantity\": 1.000000,\r\n            \"orderLineNum\": \"0\",\r\n            \"priceStore\": 14.000000\r\n        }\r\n    ],\r\n    \"shipment\": {\r\n            \"carrierKey\": \"\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/deliveries","description":"<h4 id=\"insert-sales-delivery-in-erp\">Insert sales delivery in ERP</h4>\n<p><em>(sapBusinessOne=15/ODLN, totvsProtheus=x)</em></p>\n<p>This service will allow to insert a new sales delivery in the ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new sales delivery will be insert if the informed sales order is located and validated on the ERP. The key for locating the sales order on the ERP can be:</p>\n<ul>\n<li>SAP Business One: ORDR.DocEntry = baseKey or ORDR.DocNum = baseNum or ORDR.NumAtCard = orderNum</li>\n<li>TOTVS Protheus: C5_NUM = baseKey or R_E_C_N_O_ = baseNum or C5_PEDECOM = orderNum (note: field C5_PEDECOM is only 10 characters long and cannot be increased)</li>\n</ul>\n<p>Products sent to the service will be validated for the search key, order line number and quantity. Products can be identified in the ERP in 2 ways:</p>\n<ul>\n<li>SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey</li>\n<li>TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of sales invoices (SAPB1: ODLN, 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>number</td>\n<td>Branch</td>\n</tr>\n<tr>\n<td>baseObject</td>\n<td>string</td>\n<td>Base Object (default = 17)</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.baseLineNum</td>\n<td>string</td>\n<td>Base line number</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["deliveries"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"e7544445-5764-42de-9212-cd3e354bd4d6","name":"Sale Delivery - SAP Business One","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\t\"baseNum\": \"259\",\r\n\t\"totalWeight\": 10.0,\r\n\t\"totalVolume\": 3.0,\r\n\t\"totalCubage\": 0.0,\r\n\t\"items\": [\r\n\t\t{\r\n\t\t\t\"lineNum\": \"0\",\r\n\t\t\t\"productKey\": \"I004\",\r\n\t\t\t\"codeBars\": \"I004\",\r\n\t\t\t\"quantity\": 1\r\n\t\t}\r\n\t],\r\n\t\"payments\": [\r\n\t\t{\r\n\t\t\t\"paymentMethod\": \"cash\",\r\n\t\t\t\"amount\": 63.89,\r\n\t\t\t\"installments\": 1,\r\n\t\t\t\"details\": {}\r\n\t\t}\r\n\t]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/deliveries"},"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\": \"salesAPI\",\n    \"process\": \"Deliviries\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"deliveries\",\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\": \"13\",\n            \"table\": \"ODLN\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"145\"\n        }\n    ]\n}"}],"_postman_id":"9f54d726-1349-4916-bfe8-04a435eb1889"},{"name":"Sales Delivery-partnerKey","id":"6468fa69-0c10-4b36-ae06-810db73ba94c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"1\",\r\n    \"orderNum\": \"175\",\r\n    \"_docDueDate\": \"2023-02-20\",\r\n    \"sellerKey\": \"3\",\r\n    \"comments\": \"Nf Cupom Fiscal 118\",\r\n    \"whsCode\": \"101\",\r\n    \"mainUsage\": \"12\",\r\n    \"_customXXX\": \"\",\r\n    \"partnerKey\": \"C001\",\r\n    \"_taxNumber\": \"39381262000189\",\r\n    \"items\": [\r\n        {\r\n            \"productKey\": \"I004\",\r\n            \"productName\": \"Bola Adidas Finale Sportivo\",\r\n            \"quantity\": 1,\r\n            \"unitPrice\": 49.9,\r\n            \"taxBasis\": 49.9,\r\n            \"discountRate\": 0,\r\n            \"comments\": \"\"\r\n        }\r\n    ],\r\n    \"_totals\": {\r\n        \"orderTotal\": {\r\n            \"netValue\": 851.38,\r\n            \"grossValue\": 911.38,\r\n            \"baseValue\": 823.22,\r\n            \"taxValue\": 60\r\n        },\r\n        \"merchandizeTotal\": {\r\n            \"netValue\": 823.22,\r\n            \"grossValue\": 883.22,\r\n            \"baseValue\": 823.22,\r\n            \"taxValue\": 60\r\n        },\r\n        \"shippingTotal\": {\r\n            \"netValue\": 28.16,\r\n            \"grossValue\": 28.16,\r\n            \"baseValue\": 0,\r\n            \"taxValue\": 0\r\n        }\r\n    },\r\n    \"_payments\": [\r\n        {\r\n            \"paymentMethod\": \"cash\",\r\n            \"installments\": 1,\r\n            \"amount\": 49.9\r\n        }\r\n    ],\r\n    \"documentReferences\": [\r\n        {\r\n            \"baseKey\": \"175\",\r\n            \"baseObject\": \"13\",\r\n            \"comments\": \"Ref Cupom Fiscal 118\"\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/deliveries","description":"<h4 id=\"insert-sales-delivery-in-erp\">Insert sales delivery in ERP</h4>\n<p><em>(sapBusinessOne=15/ODLN, totvsProtheus=x)</em></p>\n<p>This service will allow to insert a new sales delivery in the ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new sales delivery will be insert if the informed sales order is located and validated on the ERP. The key for locating the sales order on the ERP can be:</p>\n<ul>\n<li>SAP Business One: ORDR.DocEntry = baseKey or ORDR.DocNum = baseNum or ORDR.NumAtCard = orderNum</li>\n<li>TOTVS Protheus: C5_NUM = baseKey or R_E_C_N_O_ = baseNum or C5_PEDECOM = orderNum (note: field C5_PEDECOM is only 10 characters long and cannot be increased)</li>\n</ul>\n<p>Products sent to the service will be validated for the search key, order line number and quantity. Products can be identified in the ERP in 2 ways:</p>\n<ul>\n<li>SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey</li>\n<li>TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of sales invoices (SAPB1: ODLN, 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>number</td>\n<td>Branch</td>\n</tr>\n<tr>\n<td>baseObject</td>\n<td>string</td>\n<td>Base Object (default = 17)</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.baseLineNum</td>\n<td>string</td>\n<td>Base line number</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["deliveries"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"6468fa69-0c10-4b36-ae06-810db73ba94c"}],"id":"57b6370d-eb56-4acc-96e2-8b36528cb505","_postman_id":"57b6370d-eb56-4acc-96e2-8b36528cb505","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Receivables","item":[{"name":"Receivables","id":"02618244-53e2-4d05-82ca-b7e192a4491b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/receivables?createdFrom=2020-01-24&createdTo=2020-01-24&branch=1&dueFrom=2020-01-24&dueTo=2020-01-24&partnerKey=C000004&sellerKey=120&erpKey=120&pageNum=1&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-account-receivables-in-erp\">Search account receivables in ERP</h4>\n<p><em>(sapBusinessOne=30/OJDT, totvsProtheus=SE1)</em></p>\n<p>Search of receivables is carried out by branch.</p>\n<p>The search of receivables 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>sellerKey</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 receivables is performed as a list.</p>\n<p>The receivables service will consider receivables:</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: E1_SALDO&gt; 0</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (JDT1.BPLId), TOTVS Protheus (E1_FILIAL)</li>\n<li><code>createdFrom</code> and <code>createdTo</code>: SAP Business One (JDT1.RefDate), TOTVS Protheus (E1_EMISSAO)</li>\n<li><code>dueFrom</code> and <code>dueTo</code>: SAP Business One (JDT1.DueDate, TOTVS Protheus (E1_VENCREA)</li>\n<li><code>erpKey</code>: SAP Business One (JDT1.TransIf), TOTVS Protheus (E1_PREFIXO+'_'+E1_NUM)</li>\n</ul>\n<p>This service will allow you to search the receivables 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. 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 <em>not available</em>, [2] TOTVS Protheus: E1_USERLGI and E1_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> = 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","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["receivables"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter receivables (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2020-01-24"},{"description":{"content":"<p>Final create date to filter receivables(required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-01-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 receivables (optional in list search)</p>\n","type":"text/plain"},"key":"dueFrom","value":"2020-01-24"},{"description":{"content":"<p>Final due date to filter receivables (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"},{"description":{"content":"<p>Seller Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"120"},{"description":{"content":"<p>Receivable 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":"35770cee-85f6-49c5-b8d0-d6653e6ee839","name":"receivables","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/receivables?branch=1&createdFrom=2020-01-24&createdTo=2020-01-24&dueFrom=2020-01-24&dueTo=2020-01-24&partnerKey=C000004&sellerKey=120&erpKey=120&pageNum=1","host":["{{endpoint}}"],"path":["receivables"],"query":[{"key":"branch","value":"1","description":"Branch (required if not unit query)"},{"key":"createdFrom","value":"2020-01-24","description":"Initial create date to filter receivables (required if not unit query)"},{"key":"createdTo","value":"2020-01-24","description":"Final create date to filter receivables(required if not unit query)"},{"key":"dueFrom","value":"2020-01-24","description":"Initial due date to filter receivables (required if not unit query)"},{"key":"dueTo","value":"2020-01-24","description":"Final due date to filter receivables (required if not unit query)"},{"key":"partnerKey","value":"C000004","description":"Partner Primary Key in ERP (optional in full query)"},{"key":"sellerKey","value":"120","description":"Seller Primary Key in ERP (optional in full query)"},{"key":"erpKey","value":"120","description":"Receivable Primary Key in ERP (optional for unit query)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date to filter receivables changes - incremental query (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":"Tue, 03 Mar 2020 20:39:59 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"Receivables\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"receivables\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-03-03T17:39:56\",\n    \"branch\": \"1\",\n    \"createdFrom\": \"2020-01-24\",\n    \"createdTo\": \"2020-01-24\",\n    \"dueFrom\": \"2020-01-24\",\n    \"dueTo\": \"2020-01-24\",\n    \"partnerKey\": \"C000004\",\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-MATRIZ\",\n            \"branchTaxNumber\": \"\",\n            \"erpKey\": \"1306\",\n            \"lineNum\": \"0\",\n            \"docDate\": \"2020-01-24\",\n            \"docDueDate\": \"2020-01-24\",\n            \"docValue\": 158.64,\n            \"partnerKey\": \"C000004\",\n            \"sellerKey\": \"-1\",\n            \"baseObject\": \"13\",\n            \"baseOKey\": \"131\",\n            \"nfeNum\": \"90\",\n            \"paymentMethod\": \"Boleto receber\",\n            \"remarks\": \"Notas Fiscais de Saída - C000004\",\n            \"createdAt\": \"2020-01-24T15:34:00\",\n            \"updatedAt\": \"2020-01-24T00:00:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"02618244-53e2-4d05-82ca-b7e192a4491b"},{"name":"Receivables - Cancellation","id":"1a4cdb53-ead9-4bd6-b5c4-8f997db794d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","value":"application/json"}],"url":"{{endpoint}}/receivables/cancellation?createdFrom=2020-01-24&createdTo=2020-01-24&branch=1&dueFrom=2020-01-24&dueTo=2020-01-24&partnerKey=C000004&sellerKey=120&erpKey=120&pageNum=1&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-account-receivables-in-erp\">Search account receivables in ERP</h4>\n<p><em>(sapBusinessOne=30/OJDT, totvsProtheus=SE1)</em></p>\n<p>Search of receivables is carried out by branch.</p>\n<p>The search of receivables 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>sellerKey</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 receivables is performed as a list.</p>\n<p>The receivables service will consider receivables:</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: E1_SALDO&gt; 0</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (JDT1.BPLId), TOTVS Protheus (E1_FILIAL)</li>\n<li><code>createdFrom</code> and <code>createdTo</code>: SAP Business One (JDT1.RefDate), TOTVS Protheus (E1_EMISSAO)</li>\n<li><code>dueFrom</code> and <code>dueTo</code>: SAP Business One (JDT1.DueDate, TOTVS Protheus (E1_VENCREA)</li>\n<li><code>erpKey</code>: SAP Business One (JDT1.TransIf), TOTVS Protheus (E1_PREFIXO+'_'+E1_NUM)</li>\n</ul>\n<p>This service will allow you to search the receivables 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. 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 <em>not available</em>, [2] TOTVS Protheus: E1_USERLGI and E1_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> = 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","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["receivables","cancellation"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial create date to filter receivables (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdFrom","value":"2020-01-24"},{"description":{"content":"<p>Final create date to filter receivables(required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-01-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 receivables (optional in list search)</p>\n","type":"text/plain"},"key":"dueFrom","value":"2020-01-24"},{"description":{"content":"<p>Final due date to filter receivables (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"},{"description":{"content":"<p>Seller Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"120"},{"description":{"content":"<p>Receivable 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":[],"_postman_id":"1a4cdb53-ead9-4bd6-b5c4-8f997db794d4"},{"name":"Receivable [PROTHEUS]","id":"c90f22d1-3da5-44b2-8427-0c37874ea963","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"01\",\r\n    \"docType\": \"BOL\",\r\n    \"financialNature\": \"5000000001\",\r\n    \"erpKey\": \"BOL_000000001\",\r\n    \"lineNum_\": \"0\",\r\n    \"docDate\": \"2021-06-04\",\r\n    \"docDueDate\": \"2021-06-04\",\r\n    \"docValue\": 10.00,\r\n    \"docSituation_\": \"0\",\r\n    \"partnerKey\": \"001022_01\",\r\n    \"sellerKey\": \"000001\",\r\n    \"bankCode_\": \"CX1\",\r\n    \"bankBranch_\": \"00001\",\r\n    \"bankAccount_\": \"0000000001\",\r\n    \"comments\": \"Teste Postman\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/receivables","description":"<h4 id=\"insert-sales-dowm-payment-in-erp\">Insert sales dowm payment in ERP</h4>\n<p><em>(sapBusinessOne=203/ODPI)</em></p>\n<p>This service will allow to insert a new sales dowm payment in the ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new sales dowm payment will be insert if the informed sales order is located and validated on the ERP. The key for locating the sales order on the ERP can be:</p>\n<ul>\n<li>SAP Business One: ORDR.DocEntry = <code>baseKey</code> or ORDR.DocNum = <code>baseNum</code> or ORDR.NumAtCard = <code>orderNum</code></li>\n</ul>\n<p>Products sent to the service will be validated for the search key, order line number and quantity. Products can be identified in the ERP in 2 ways:</p>\n<ul>\n<li>SAP B1: OITM.CodeBars = <code>codeBars</code> or OITM.ItemCode = <code>productKey</code></li>\n</ul>\n<p>In addition to the sales dowm payment, the service may or may not include incoming payments. Incoming Paymnets have sources 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 sales invoices (SAPB1: ODPI), 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>baseObject</td>\n<td>string</td>\n<td>Base Object (default = 17)</td>\n</tr>\n<tr>\n<td>baseKey</td>\n<td>string</td>\n<td>Base Key</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.baseLineNum</td>\n<td>string</td>\n<td>Base line number</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["receivables"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"c4d2c79f-377a-46c1-b473-e43f7bb935a7","name":"Receivable - TOTVS Protheus","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"01\",\r\n    \"docType\": \"BOL\",\r\n    \"financialNature\": \"5000000001\",\r\n    \"erpKey\": \"BOL_000000001\",\r\n    \"lineNum_\": \"0\",\r\n    \"docDate\": \"2021-06-04\",\r\n    \"docDueDate\": \"2021-06-04\",\r\n    \"docValue\": 10.00,\r\n    \"partnerKey\": \"001022_01\",\r\n    \"sellerKey\": \"000001\",\r\n    \"comments\": \"Teste Postman\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/receivables"},"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\": \"salesAPI\",\n    \"process\": \"Receivables\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"receivables\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.103\",\n    \"effectiveTimestamp\": \"2021-06-07T19:41:00\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"24_0\",\n            \"table\": \"SE1\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"BOL_000000001\"\n        }\n    ]\n}"}],"_postman_id":"c90f22d1-3da5-44b2-8427-0c37874ea963"},{"name":"Receivable - Transfer [PROTHEUS]","id":"9fa3c115-0446-47d1-932a-95a2f44bd71c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"01\",\r\n    \"docType\": \"BOL\",\r\n    \"erpKey\": \"BOL_000000002\",\r\n    \"lineNum\": \"01\",\r\n    \"docSituation\": \"1\",\r\n    \"bankCode\": \"341\",\r\n    \"bankBranch\": \"0132\",\r\n    \"bankAccount\": \"08654\",\r\n    \r\n    \"_partnerKey\": \"001010_01\",\r\n    \"_contractKey\": \"\",\r\n    \"_carrierNumber\": \"\",\r\n\r\n    \"_comments\": \"\",\r\n    \"_creditDate\": \"\",\r\n    \"_discountTax\": \"\",\r\n    \"_finacialNature\": \"\",\r\n    \"_formulKey\": \"\",\r\n    \"_creditValue\": \"\",\r\n    \"_iofTax\": \"\"\r\n}","options":{"raw":{"language":"json"}}},"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"5cc20ac6-6549-453e-b465-cf2631d82917","name":"Transfer Receivable - PROTHEUS - docSituation=1","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"01\",\r\n    \"docType\": \"BOL\",\r\n    \"erpKey\": \"BOL_000000002\",\r\n    \"lineNum\": \"01\",\r\n    \"docSituation\": \"1\",\r\n    \"bankCode\": \"341\",\r\n    \"bankBranch\": \"0132\",\r\n    \"bankAccount\": \"08654\",\r\n    \r\n    \"_partnerKey\": \"001010_01\",\r\n    \"_contractKey\": \"\",\r\n    \"_carrierNumber\": \"\",\r\n\r\n    \"_comments\": \"\",\r\n    \"_creditDate\": \"\",\r\n    \"_discountTax\": \"\",\r\n    \"_finacialNature\": \"\",\r\n    \"_formulKey\": \"\",\r\n    \"_creditValue\": \"\",\r\n    \"_iofTax\": \"\"\r\n}","options":{"raw":{"language":"json"}}}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"package\": \"salesAPI\",\r\n    \"process\": \"Receivables\",\r\n    \"system\": \"totvsProtheus\",\r\n    \"target\": \"receivables/transfer\",\r\n    \"user\": \"intergate\",\r\n    \"host\": \"\",\r\n    \"effectiveTimestamp\": \"2022-10-29T13:41:30\",\r\n    \"code\": \"200\",\r\n    \"success\": true,\r\n    \"values\": [\r\n        {\r\n            \"object\": \"24_0\",\r\n            \"table\": \"SE1\",\r\n            \"action\": \"Update\",\r\n            \"erpKey\": \"BOL_000000002\"\r\n        }\r\n    ]\r\n}"},{"id":"2fe95721-c5b4-40b9-8987-64572593f09f","name":"Transfer Receivable - PROTHEUS - docSituation=0","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"01\",\r\n    \"docType\": \"BOL\",\r\n    \"erpKey\": \"BOL_000000002\",\r\n    \"lineNum\": \"01\",\r\n    \"docSituation\": \"0\",\r\n    \"_bankCode\": \"341\",\r\n    \"_bankBranch\": \"0132\",\r\n    \"_bankAccount\": \"08654\",\r\n\r\n    \"_partnerKey\": \"001010_01\",\r\n    \"_contractKey\": \"\",\r\n    \"_carrierNumber\": \"\",\r\n\r\n    \"_comments\": \"\",\r\n    \"_creditDate\": \"\",\r\n    \"_discountTax\": \"\",\r\n    \"_finacialNature\": \"\",\r\n    \"_formulKey\": \"\",\r\n    \"_creditValue\": \"\",\r\n    \"_iofTax\": \"\"\r\n}","options":{"raw":{"language":"json"}}}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\r\n    \"package\": \"salesAPI\",\r\n    \"process\": \"Receivables\",\r\n    \"system\": \"totvsProtheus\",\r\n    \"target\": \"receivables/transfer\",\r\n    \"user\": \"intergate\",\r\n    \"host\": \"\",\r\n    \"effectiveTimestamp\": \"2022-10-29T13:42:06\",\r\n    \"code\": \"200\",\r\n    \"success\": true,\r\n    \"values\": [\r\n        {\r\n            \"object\": \"24_0\",\r\n            \"table\": \"SE1\",\r\n            \"action\": \"Update\",\r\n            \"erpKey\": \"BOL_000000002\"\r\n        }\r\n    ]\r\n}"}],"_postman_id":"9fa3c115-0446-47d1-932a-95a2f44bd71c"},{"name":"Receivable [PROTHEUS]","id":"60029390-8af8-4cce-acb1-c6761500bedc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"01\",\r\n    \"erpKey\": \"\",\r\n    \"lineNum\": \"\",\r\n    \"docType\": \"\",\r\n    \"partnerKey\": \"\"\r\n}","options":{"raw":{"language":"json"}}},"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"60029390-8af8-4cce-acb1-c6761500bedc"}],"id":"21911b11-0be1-44ec-8fb6-ccfe7104e209","_postman_id":"21911b11-0be1-44ec-8fb6-ccfe7104e209","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Incoming Payments","item":[{"name":"Incoming Payments","id":"7094f041-787a-4290-b8be-f004f8a0c607","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/incPayments?paidFrom=2020-01-24&paidTo=2020-01-24&branch=1&dueFrom=2020-01-24&dueTo=2020-01-24&partnerKey=C001&sellerKey=120&erpKey=120&pageNum=1&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-incoming-payments-in-erp\">Search incoming payments in ERP</h4>\n<p><em>(sapBusinessOne=24/ORCT, totvsProtheus=SE5)</em></p>\n<p>Search of incoming payments is carried out by branch.</p>\n<p>The search of incoming 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>sellerKey</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 incoming payments is performed as a list.</p>\n<p>The incPayments service will consider valid receipts for receivables:</p>\n<ul>\n<li>SAP Business One: [1] Not canceled (ORCT.Canceled = 'N'), [2]  If boleto, only paid (OBOE.BoeStatus = 'P')</li>\n<li>TOTVS Protheus: [1] With positive value: FK1_VALUE&gt; 0</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (ORCT.BPLId), TOTVS Protheus (FK1_FILIAL)</li>\n<li><code>paidFrom</code> and <code>paidTo</code>: SAP Business One (ORCT.DocDate, ORCT.TrsfrDate, OBOE.PmntDate or BOT1. TranDate *), TOTVS Protheus (FK1_DATA)</li>\n<li><code>dueFrom</code> and <code>dueTo</code>: SAP Business One (ORCR.DocDueDate, INV6.DueDate or OBOE.DueDate), TOTVS Protheus (FK1_VENCTO)</li>\n<li><code>erpKey</code>: SAP Business One (ORCT.DocEntry), TOTVS Protheus (FK1_IDFK1)</li>\n<li><code>baseObject</code>: 13 (invoice), 30 (journalEntry), 203 (creditNote)</li>\n<li><code>baseKey</code>: SAP Business One (OINV.DocEntry, JDT1.AbsEntry, ORIN.DocEntry), TOTVS Protheus (E1_PREFIXO+'_'+E1_NUM)</li>\n<li><code>lineNum</code>: parcel</li>\n<li><code>paymentMethod</code>: cash, transfer, boe, check, creditCard</li>\n</ul>\n<p>This service will allow you to search the receipt 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 had a status change in the createdFrom / createdTo period and after a certain date / time provided in the request. For the Incremental query, 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 (not available), [2] TOTVS Protheus: FK1_USERLGI and FK1_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> = 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","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["incPayments"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial payment date to filter incoming payments (required if not unitary search)</p>\n","type":"text/plain"},"key":"paidFrom","value":"2020-01-24"},{"description":{"content":"<p>Final payment date to filter incoming payments (required if not unitary search)</p>\n","type":"text/plain"},"key":"paidTo","value":"2020-01-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 incoming payments (optional in list search)</p>\n","type":"text/plain"},"key":"dueFrom","value":"2020-01-24"},{"description":{"content":"<p>Final due date to filter incoming payments (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":"C001"},{"description":{"content":"<p>Seller Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"120"},{"description":{"content":"<p>Incoming 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":"c714e5a5-c69d-4eea-b868-0468939a188e","name":"SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/incPayments?branch=1&paidFrom=2018-07-26&paidTo=2018-07-26","host":["{{endpoint}}"],"path":["incPayments"],"query":[{"key":"branch","value":"1","description":"Branch (required if not unit query)"},{"key":"paidFrom","value":"2018-07-26","description":"Initial payment date to filter incoming payments (required if not unit query)"},{"key":"paidTo","value":"2018-07-26","description":"Final payment date to filter incoming payments (required if not unit query)"},{"key":"dueFrom","value":"2020-01-24","description":"Initial due date to filter incoming payments (required if not unit query)","disabled":true},{"key":"dueTo","value":"2020-01-24","description":"Final due date to filter incoming payments (required if not unit query)","disabled":true},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in full query)","disabled":true},{"key":"sellerKey","value":"120","description":"Seller Primary Key in ERP (optional in full query)","disabled":true},{"key":"erpKey","value":"120","description":"Incoming Payment Primary Key in ERP (optional for unit query)","disabled":true},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)","disabled":true},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date to filter receivables changes - incremental query (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, 04 Mar 2020 12:02:44 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"b2cAPI\",\n    \"process\": \"IncPayments\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"incPayments\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2020-03-04T09:01:54\",\n    \"branch\": \"1\",\n    \"paidFrom\": \"2018-07-26\",\n    \"paidTo\": \"2018-07-26\",\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-MATRIZ\",\n            \"branchTaxNumber\": \"98.899.922/0001-87\",\n            \"erpKey\": \"183\",\n            \"lineNum\": \"1\",\n            \"paymentDate\": \"2018-07-26\",\n            \"docDate\": \"2018-07-26\",\n            \"docDueDate\": \"2018-07-26\",\n            \"paidValue\": 4280,\n            \"partnerKey\": \"C001\",\n            \"sellerKey\": \"3\",\n            \"baseObject\": \"13\",\n            \"baseKey\": \"86\",\n            \"baseNum\": \"86\",\n            \"nfeNum\": \"86\",\n            \"paymentMethod\": \"transfer\",\n            \"remarks\": \"Contas a receber - C001\",\n            \"details\": {},\n            \"createdAt\": \"2018-07-26T00:00:00\",\n            \"updatedAt\": \"2018-07-26T00:00:00\",\n            \"canceledAt\": null\n        }\n    ]\n}"}],"_postman_id":"7094f041-787a-4290-b8be-f004f8a0c607"},{"name":"Incoming Payments - Cancellation [PROTHEUS]","id":"b436370c-5eb3-4fb0-9c8d-9a27b1d8183a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/incPayments?paidFrom=2020-01-24&paidTo=2020-01-24&branch=1&dueFrom=2020-01-24&dueTo=2020-01-24&partnerKey=C001&sellerKey=120&erpKey=120&pageNum=1&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-incoming-payments-in-erp\">Search incoming payments in ERP</h4>\n<p><em>(sapBusinessOne=24/ORCT, totvsProtheus=SE5)</em></p>\n<p>Search of incoming payments is carried out by branch.</p>\n<p>The search of incoming 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>sellerKey</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 incoming payments is performed as a list.</p>\n<p>The incPayments service will consider valid receipts for receivables:</p>\n<ul>\n<li>SAP Business One: [1] Not canceled (ORCT.Canceled = 'N'), [2]  If boleto, only paid (OBOE.BoeStatus = 'P')</li>\n<li>TOTVS Protheus: [1] With positive value: FK1_VALUE&gt; 0</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (ORCT.BPLId), TOTVS Protheus (FK1_FILIAL)</li>\n<li><code>paidFrom</code> and <code>paidTo</code>: SAP Business One (ORCT.DocDate, ORCT.TrsfrDate, OBOE.PmntDate or BOT1. TranDate *), TOTVS Protheus (FK1_DATA)</li>\n<li><code>dueFrom</code> and <code>dueTo</code>: SAP Business One (ORCR.DocDueDate, INV6.DueDate or OBOE.DueDate), TOTVS Protheus (FK1_VENCTO)</li>\n<li><code>erpKey</code>: SAP Business One (ORCT.DocEntry), TOTVS Protheus (FK1_IDFK1)</li>\n<li><code>baseObject</code>: 13 (invoice), 30 (journalEntry), 203 (creditNote)</li>\n<li><code>baseKey</code>: SAP Business One (OINV.DocEntry, JDT1.AbsEntry, ORIN.DocEntry), TOTVS Protheus (E1_PREFIXO+'_'+E1_NUM)</li>\n<li><code>lineNum</code>: parcel</li>\n<li><code>paymentMethod</code>: cash, transfer, boe, check, creditCard</li>\n</ul>\n<p>This service will allow you to search the receipt 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 had a status change in the createdFrom / createdTo period and after a certain date / time provided in the request. For the Incremental query, 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 (not available), [2] TOTVS Protheus: FK1_USERLGI and FK1_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> = 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","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["incPayments"],"host":["{{endpoint}}"],"query":[{"description":{"content":"<p>Initial payment date to filter incoming payments (required if not unitary search)</p>\n","type":"text/plain"},"key":"paidFrom","value":"2020-01-24"},{"description":{"content":"<p>Final payment date to filter incoming payments (required if not unitary search)</p>\n","type":"text/plain"},"key":"paidTo","value":"2020-01-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 incoming payments (optional in list search)</p>\n","type":"text/plain"},"key":"dueFrom","value":"2020-01-24"},{"description":{"content":"<p>Final due date to filter incoming payments (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":"C001"},{"description":{"content":"<p>Seller Primary Key in ERP (optional in list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"120"},{"description":{"content":"<p>Incoming 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":[],"_postman_id":"b436370c-5eb3-4fb0-9c8d-9a27b1d8183a"},{"name":"Incoming Payment","id":"388e86e8-523a-4d97-aa45-a12fc5d69d74","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    \"paymentConditionCode\": \"\",\r\n    \"comments\": \"\",\r\n    \"journalComments\": \"\",\r\n\t\"details\": {\r\n\t\t\"transferAccount\": \"1.1.1.2.2\",\r\n\r\n\t\t\"boeAccount\": \"1.1.1.2.2\",\r\n\r\n        \"cashAccount\": \"1.1.1.2.2\",\r\n        \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}}/incPayments","description":"<h4 id=\"insert-incoming-payments-in-erp\">Insert incoming payments in ERP</h4>\n<p>This service will allow to insert a new incoming 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 incoming payments will be insert if the informed sales invoice is located and validated on the ERP. The key for locating the sale invoice on the ERP can be:</p>\n<ul>\n<li>SAP Business One: OINV.DocEntry = baseKey or OINV.DocNum = baseNum (or OINV.NumAtCard = orderNum)</li>\n<li>TOTVS Protheus: F2_DOC = baseKey or R_E_C_N_O_ = baseNum or D2_PEDIDO = orderNum</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of outcoming payments (SAPB1: XXXX, TOTVS: XXX, 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["incPayments"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"badc9ff7-cd49-4e88-8b8f-5e6f710de95f","name":"SAP Business One","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}}/incPayments"},"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\": \"b2cAPI\",\n    \"process\": \"IncPayments\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"incPayments\",\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\": \"24\",\n            \"table\": \"ORCT\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"190\"\n        }\n    ]\n}"},{"id":"474661a6-f135-4e9f-87e3-11bec7988df5","name":"TOTVS PROTHEUS","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"baseErpKey\": \"1_000000025\",\r\n    \"baseLineNum\": \"  \",\r\n    \"comments\": \"teste API\",\r\n\r\n\t\"_partnerKey\": \"001010_01\",\r\n\r\n\t\"paymentMethod\": \"cash\",\r\n\t\"paymentDate\": \"2022-11-17\",\r\n\t\"amount\": 59.71,\r\n\t\"_installments\": 1,\r\n\r\n    \"paymentBankCode\": \"CX1\",\r\n    \"paymentBankBranch\": \"00001\",\r\n    \"paymentBankAccount\": \"0000000001\",\r\n\r\n    \"customCobmaisPagamentoId\": \"2958371326\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/incPayments"},"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\": \"salesAPI\",\n    \"process\": \"IncPayments\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"incPayments\",\n    \"user\": \"intergate\",\n    \"host\": \"\",\n    \"effectiveTimestamp\": \"2022-11-20T17:51:33\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"24\",\n            \"table\": \"FK1\",\n            \"action\": \"Insert\",\n            \"erpKey\": \"66d06d7fe6d540008B25816a41a25250\"\n        }\n    ]\n}"}],"_postman_id":"388e86e8-523a-4d97-aa45-a12fc5d69d74"},{"name":"Incoming Payments","id":"9f86359a-e956-42cc-b29d-d58d629d7d02","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"01\",\r\n    \"erpKey\": \"e7cc452a0909400097C6a09bbb509aad\",\r\n    \"_baseKey\": \"XXX_000000000\",\r\n    \"_baseLineNum\": \"1\",\r\n    \"_partnerKey\": \"000000_00\",\r\n    \"_sequence_\": 0\r\n}","options":{"raw":{"language":"json"}}},"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"937279bd-cf6e-45ce-a27b-fffdd7c58f58","name":"TOTVS PROTHEUS","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"01\",\r\n    \"erpKey\": \"66d06d7fe6d540008B25816a41a25250\",\r\n    \"_baseKey\": \"XXX_000000000\",\r\n    \"_baseLineNum\": \"1\",\r\n    \"_partnerKey\": \"000000_00\",\r\n    \"_sequence_\": 0\r\n}","options":{"raw":{"language":"json"}}}},"_postman_previewlanguage":"json","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","description":"","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"finAPI\",\n    \"process\": \"IncPayments\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"incPayments\",\n    \"user\": \"intergate\",\n    \"host\": \"\",\n    \"effectiveTimestamp\": \"2022-11-20T17:58:38\",\n    \"branch\": \"01\",\n    \"erpKey\": \"66d06d7fe6d540008B25816a41a25250\",\n    \"code\": \"200\",\n    \"success\": true,\n    \"values\": [\n        {\n            \"object\": \"24\",\n            \"table\": \"FK1\",\n            \"action\": \"Delete\",\n            \"erpKey\": \"66d06d7fe6d540008B25816a41a25250\"\n        }\n    ]\n}"}],"_postman_id":"9f86359a-e956-42cc-b29d-d58d629d7d02"}],"id":"7f8673f1-5601-4f3f-ac36-1e0adf90d767","_postman_id":"7f8673f1-5601-4f3f-ac36-1e0adf90d767","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Credit Notes","item":[{"name":"Credit Notes","id":"59c41893-d2ff-4d95-ab37-acbf550302d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/creditNotes?createdFrom=2010-08-27&createdTo=2020-12-27&branch=1&partnerKey=C001&sellerKey=22&nfeAuthCode=100&erpKey=120&docNum=49084&orderNum=1049210322364-01&pageNum=2&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-credit-notes-in-erp\">Search Credit Notes in ERP</h4>\n<p><em>(sapBusinessOne=14/ORIN, totvsProtheus=SF1)</em></p>\n<p>This service will allow to search Credit Notes in the ERP.</p>\n<p>The search of 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 sales invoices is carried out by date of creation from/to (which become mandatory).</p>\n<p>The Credit Notes service will consider Credit Notes with:</p>\n<ul>\n<li>SAP Business One: ORIN.ObjType = 14</li>\n<li>TOTVS Protheus: F1_TIPO IN 'D', 'B'</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (ORIN.BPLId), TOTVS Protheus (F1_FILIAL)</li>\n<li><code>partnerKey</code>: SAP Business One (ORIN.CardCode), TOTVS Protheus (F1_FORNECE+'_'+F1_LOJA)</li>\n<li><code>erpKey</code>: SAP Business One (ORIN.DocEntry), TOTVS Protheus (F1_SERIE+'_'+F1_DOC)</li>\n<li><code>orderNum</code>: SAP Business One (ORIN.NumAtCard), TOTVS Protheus (D1_PEDIDO)</li>\n<li><code>docNum</code>: SAP Business One (ORIN.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</ul>\n<p>Data returned in response: 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 “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 Credit Notes list in two situations:</p>\n<ul>\n<li>Full Search: will result in all Credit Notes, according to filters.</li>\n<li>Incremental Search: will result in all 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 (ORIN.CreateDate, ORIN.UpdateDate, ORIN.CreateTS, ORIN.UpdateTS), [2] TOTVS Protheus: the F1_USERLGI and F1_USERLGA fields</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of Credit Notes (SAPB1: ORIN, 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["creditNotes"],"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":"2010-08-27"},{"description":{"content":"<p>Final create date to filter invoices (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2020-12-27"},{"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"},{"key":"sellerKey","value":"22"},{"description":{"content":"<p>Authorization NFe code (optional)</p>\n","type":"text/plain"},"key":"nfeAuthCode","value":"100"},{"description":{"content":"<p>Credit Note Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"120"},{"description":{"content":"<p>Credit Note Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"49084"},{"description":{"content":"<p>Partner Credit Note Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1049210322364-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-01-24T15:34:00"}],"variable":[]}},"response":[{"id":"27ed8c02-9095-4846-ab08-a9c69f50ad3a","name":"Credit Notes - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/creditNotes?createdFrom=2010-08-27&createdTo=2020-12-27","host":["{{endpoint}}"],"path":["creditNotes"],"query":[{"key":"createdFrom","value":"2010-08-27","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2020-12-27","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":"sellerKey","value":"22","disabled":true},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional)","disabled":true},{"key":"erpKey","value":"120","description":"Credit Note Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"49084","description":"Credit Note Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1049210322364-01","description":"Partner Credit Note 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\": \"salesAPI\",\n    \"process\": \"CreditNotes\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"creditNotes\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-13T21:19:37\",\n    \"createdFrom\": \"2010-08-27\",\n    \"createdTo\": \"2020-12-27\",\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            \"sellerKey\": \"000001\",\n            \"erpKey\": \"1_100000001\",\n            \"erpId\": \"2\",\n            \"docNum\": \"100000001\",\n            \"docSeries\": \"1\",\n            \"orderNum\": \"\",\n            \"docStatus\": \"O\",\n            \"docDate\": \"2020-10-10\",\n            \"docDueDate\": \"2020-10-10\",\n            \"taxDate\": \"2020-11-09\",\n            \"docValue\": 45,\n            \"nfeNum\": \"100000001\",\n            \"nfeSeries\": \"1\",\n            \"nfeType\": \"SPED\",\n            \"nfeModel\": \"55\",\n            \"nfeKeyAccess\": \"\",\n            \"nfeValue\": 0,\n            \"nfeAuthCode\": \"\",\n            \"nfeAuthProtocol\": \"\",\n            \"createdAt\": \"2020-10-10\",\n            \"updatedAt\": null,\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"P\",\n                \"partnerKey\": \"00003801\",\n                \"fullName\": \"Rafael Ogeda\",\n                \"aliasName\": \"Rafael Ogeda\",\n                \"email\": \"rafael.ogeda@intergate.net.br\",\n                \"phone\": \"(47) 98849-3101\",\n                \"phoneSecundary\": \"\",\n                \"cellular\": null,\n                \"taxNumber\": \"89175174987\",\n                \"stateTaxNumber\": \"ISENTO\",\n                \"cityTaxNumber\": \"\",\n                \"contactPerson\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"Luiz Walendowsky, 218\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"\",\n                    \"community\": \"Pereque\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"13500\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"88210-000\",\n                    \"streetType\": null\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"Luiz Walendowsky, 218\",\n                    \"exteriorNumber\": null,\n                    \"address2\": \"\",\n                    \"community\": \"Pereque\",\n                    \"city\": \"Porto Belo\",\n                    \"county\": \"\",\n                    \"stateCode\": \"SC\",\n                    \"countryCode\": \"\",\n                    \"postalCode\": \"88210-000\",\n                    \"streetType\": null\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0001\",\n                    \"productKey\": \"PA000001\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"TENIS TOPPER STYLUS 35\",\n                    \"quantity\": 1,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 45,\n                    \"taxBasis\": 45,\n                    \"usage\": \"001\",\n                    \"cfop\": \"2101\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 45,\n                    \"unitCost\": 5.05,\n                    \"baseObject\": \"13\",\n                    \"baseKey\": \"1_000000001\",\n                    \"baseItem\": \"01\"\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 45,\n                    \"grossValue\": 45,\n                    \"baseValue\": 45,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 45,\n                    \"grossValue\": 45,\n                    \"baseValue\": 45,\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":"d9b241a9-516e-43b5-bdee-3c53a5f729b7","name":"Credit Notes - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/creditNotes?createdFrom=2010-08-27&createdTo=2020-08-27","host":["{{endpoint}}"],"path":["creditNotes"],"query":[{"key":"createdFrom","value":"2010-08-27","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2020-08-27","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":"sellerKey","value":"22","disabled":true},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional)","disabled":true},{"key":"erpKey","value":"120","description":"Credit Note Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"49084","description":"Credit Note Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1049210322364-01","description":"Partner Credit Note 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":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=5729989C92D0F570661845B99E266D45; 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 15:05:01 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"CreditNotes\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"creditNotes\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-05T13:04:53\",\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            \"sellerKey\": \"3\",\n            \"erpKey\": \"1\",\n            \"docNum\": \"1\",\n            \"orderNum\": \"\",\n            \"docStatus\": \"P\",\n            \"docDate\": \"2014-10-24\",\n            \"docDueDate\": \"2014-10-24\",\n            \"taxDate\": \"2014-10-24\",\n            \"docValue\": 0,\n            \"nfeSeries\": \"\",\n            \"nfeNum\": \"565656\",\n            \"nfeType\": \"\",\n            \"nfeModel\": \"\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 0,\n            \"baseObject\": \"17\",\n            \"baseKey\": \"1\",\n            \"comments\": \"Baseado em Notas Fiscais de Saída 51.\",\n            \"createdAt\": \"2014-10-24T15:06:52\",\n            \"updatedAt\": \"2014-10-24T15:06:53\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2001\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"ZZZ\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I001\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Bola Nike Total 90 Pitch CBF\",\n                    \"quantity\": 1,\n                    \"unit\": \"UN\",\n                    \"unitPrice\": 100,\n                    \"taxBasis\": 100,\n                    \"usage\": \"7\",\n                    \"cfop\": \"1101\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 0,\n                    \"unitCost\": 0,\n                    \"comments\": \"\",\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBI00\",\n                            \"taxBasis\": 100,\n                            \"taxRate\": 18,\n                            \"taxValue\": 18\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 100,\n                    \"grossValue\": 0,\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            \"taxes\": [\n                {\n                    \"taxCode\": \"ICMSBI00\",\n                    \"taxBasis\": 100,\n                    \"taxValue\": 18\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"59c41893-d2ff-4d95-ab37-acbf550302d3"},{"name":"Credit Note","id":"0ce3b958-44ec-489f-b6d3-cbb4ee8c87a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"1\",\r\n    \"baseKey\": \"175\",\r\n    \"whsCode *\": \"\",\r\n    \"mainUsage\": \"\",\r\n    \"orderNum *\": \"2134\",\r\n    \"totalWeight\": 10.0,\r\n    \"totalVolume\": 3.0,\r\n    \"totalCubage\": 0.0,\r\n    \"items\": [\r\n        {\r\n            \"baseLineNum\": \"0\",\r\n            \"baseKey *\": \"\",\r\n            \"productKey\": \"I004\",\r\n            \"quantity\": 1,\r\n            \"whsCode *\": \"\",\r\n            \"usage *\": \"\",\r\n            \"unitPrice *\": \"\",\r\n            \"batchNumbers *\": [\r\n                {\r\n                    \"batchCode\": \"01\",\r\n                    \"productionDate\": \"2020-06-30\",\r\n                    \"expirationDate\": \"2021-06-24\",\r\n                    \"quantity\": 1\r\n                }\r\n            ]\r\n        }\r\n    ],\r\n    \"payments *\": [\r\n        {\r\n            \"paymentMethod\": \"cash\",\r\n            \"amount\": 59.71,\r\n            \"installments\": 1\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/creditNotes","description":"<h4 id=\"insert-sales-invoice-in-erp\">Insert sales invoice in ERP</h4>\n<p><em>(sapBusinessOne=13/OINV, totvsProtheus=SF2)</em></p>\n<p>This service will allow to insert a new sales invoice in the ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new sales invoice will be insert if the informed sales order is located and validated on the ERP. The key for locating the sales order on the ERP can be:</p>\n<ul>\n<li>SAP Business One: ORDR.DocEntry = baseKey or ORDR.DocNum = baseNum or ORDR.NumAtCard = orderNum</li>\n<li>TOTVS Protheus: C5_NUM = baseKey or R_E_C_N_O_ = baseNum or C5_PEDECOM = orderNum (note: field C5_PEDECOM is only 10 characters long and cannot be increased)</li>\n</ul>\n<p>Products sent to the service will be validated for the search key, order line number and quantity. Products can be identified in the ERP in 2 ways:</p>\n<ul>\n<li>SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey</li>\n<li>TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey</li>\n</ul>\n<p>In addition to the sales invoice, the service may or may not include incoming payments. Incoming Paymnets can have 2 sources:</p>\n<ul>\n<li>If the process goes through physical separation of products (picklist): from records in an Payments Table</li>\n<li>If the process does not go through physical separation of products (picklist): from the data received in the request in the payments block.</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of sales invoices (SAPB1: OINV / INV1, TOTVS: SF2 / SD2), 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>baseObject</td>\n<td>string</td>\n<td>Base Object (default = 17)</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.baseLineNum</td>\n<td>string</td>\n<td>Base line number</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["creditNotes"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[{"id":"c1800ce7-1f22-4b66-85a6-a6494493b192","name":"Credit Note","originalRequest":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"1\",\r\n    \"baseKey\": \"175\",\r\n    \"items\": [\r\n        {\r\n            \"baseLineNum\": \"0\",\r\n            \"productKey\": \"I004\",\r\n            \"quantity\": 1\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/creditNotes"},"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, 24 Aug 2021 22:26:50 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"CreditNotes\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"creditNotes\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.104\",\n    \"effectiveTimestamp\": \"2021-08-24T19:26:44\",\n    \"code\": \"500\",\n    \"success\": false,\n    \"error\": {\n        \"code\": \"500\",\n        \"message\": \"Failure to insert Sales Invoice\",\n        \"details\": \"\"\n    }\n}"}],"_postman_id":"0ce3b958-44ec-489f-b6d3-cbb4ee8c87a9"}],"id":"24c0fc86-10f7-4772-bdd8-3429e1f54c57","event":[{"listen":"prerequest","script":{"id":"e4dcaa63-0365-4d8c-92d8-64b4ceac7761","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"8e1f82b1-4640-4b01-a391-5863f645f75b","type":"text/javascript","exec":[""]}}],"_postman_id":"24c0fc86-10f7-4772-bdd8-3429e1f54c57","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Down Payments","item":[{"name":"Down Payments","id":"93ce75e0-7700-44ae-82b1-1771b61bd067","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":"{{endpoint}}/downPayments?createdFrom=2021-06-08&createdTo=2021-06-08&branch=1&partnerKey=C001&sellerKey=22&nfeAuthCode=100&erpKey=120&docNum=49084&orderNum=1049210322364-01&pageNum=2&updatedAt=2020-01-24T15:34:00","description":"<h4 id=\"search-down-payments-in-erp\">Search down payments in ERP</h4>\n<p><em>(sapBusinessOne=10000206/ODPI, totvsProtheus=SE1)</em></p>\n<p>This service will allow to search down payments in the ERP.</p>\n<p>The search of 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>  (SAPB1) or <code>docNum</code> (SAPB1)</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 down payments is carried out by branch and date of creation from/to (which become mandatory).</p>\n<p>The down payments service will consider down payments with:</p>\n<ul>\n<li>SAP Business One: ODPI.ObjType = 203</li>\n<li>TOTVS Protheus: E1_TIPO=RA</li>\n</ul>\n<p>Comments:</p>\n<ul>\n<li><code>branch</code>: SAP Business One (ODPI.BPLId), TOTVS Protheus (E1_FILIAL)</li>\n<li><code>partnerKey</code>: SAP Business One (ODPI.CardCode), TOTVS Protheus (E1_CLIENTE+\"_\"+E1_LOJA)</li>\n<li><code>erpKey</code>: SAP Business One (ODPI.DocEntry), TOTVS Protheus (E1_PREFIXO+\"_\"+E1_NUM)</li>\n<li><code>orderNum</code>: SAP Business One (ODPI.NumAtCard)</li>\n<li><code>docNum</code>: SAP Business One (ODPI.DocNum)</li>\n<li><code>docStatus</code>: O = open, C = closed, X = canceled (SAPB1)</li>\n<li><code>docSituation</code>: E1_SITUACA (PROTHEUS)</li>\n<li><code>bankCode</code> + <code>bankBranch</code> + <code>bancAccount</code>: E1_PORTADO + E1_AGEDEP + E1_CONTA (PROTHEUS)</li>\n<li><code>paymentMethod</code>: E1_TIPO (PROTHEUS)</li>\n</ul>\n<p>Data returned in response:</p>\n<ul>\n<li>SAP Business One: down payments data, partner data, items (+ taxes), totals, payments, taxes</li>\n<li>TOTVS Protheus: down payments data</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> = 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 down payments list in two situations:</p>\n<ul>\n<li>Full Search: will result in all down payments, according to filters.</li>\n<li>Incremental Search: will result in all 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 (ODPI.CreateDate, ODPI.UpdateDate, ODPI.CreateTS, ODPI.UpdateTS)</li>\n</ul>\n<p>For the use of user fields (UDF) created in the table of down payments (SAPB1: ODPI, PROTHEUS: SE1), 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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["downPayments"],"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":"2021-06-08"},{"description":{"content":"<p>Final create date to filter invoices (required if not unitary search)</p>\n","type":"text/plain"},"key":"createdTo","value":"2021-06-08"},{"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>Seller Primary Key in ERP (optional - list search)</p>\n","type":"text/plain"},"key":"sellerKey","value":"22"},{"description":{"content":"<p>Authorization NFe code (optional)</p>\n","type":"text/plain"},"key":"nfeAuthCode","value":"100"},{"description":{"content":"<p>Down Payment Primary Key in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"erpKey","value":"120"},{"description":{"content":"<p>Down Payment Document Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"docNum","value":"49084"},{"description":{"content":"<p>Partner Down Payment Number in ERP (optional - unitary search)</p>\n","type":"text/plain"},"key":"orderNum","value":"1049210322364-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-01-24T15:34:00"}],"variable":[]}},"response":[{"id":"c0389c03-b987-4de7-8fb7-f9094c795712","name":"Down Payments - SAP Business One","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/downPayments?createdFrom=2018-07-20&createdTo=2020-08-27","host":["{{endpoint}}"],"path":["downPayments"],"query":[{"key":"createdFrom","value":"2018-07-20","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2020-08-27","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":"sellerKey","value":"22","disabled":true},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional)","disabled":true},{"key":"erpKey","value":"120","description":"Down Payment Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"49084","description":"Down Payment Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1049210322364-01","description":"Partner Down Payment 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":"X-FRAME-OPTIONS","value":"SAMEORIGIN"},{"key":"Set-Cookie","value":"JSESSIONID=645571DA4CE60BEC7C886F81ECEEAE59; 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 15:20:49 GMT"},{"key":"Server","value":""}],"cookie":[],"responseTime":null,"body":"{\n    \"package\": \"salesAPI\",\n    \"process\": \"DownPayments\",\n    \"system\": \"sapBusinessOne\",\n    \"target\": \"downPayments\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.108\",\n    \"effectiveTimestamp\": \"2020-11-05T13:20:42\",\n    \"createdFrom\": \"2018-07-20\",\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            \"sellerKey\": \"1\",\n            \"erpKey\": \"46\",\n            \"docNum\": \"46\",\n            \"orderNum\": \"\",\n            \"docStatus\": \"P\",\n            \"docDate\": \"2018-07-20\",\n            \"docDueDate\": \"2018-07-20\",\n            \"taxDate\": \"2018-07-20\",\n            \"docValue\": 593.9,\n            \"nfeSeries\": \"\",\n            \"nfeNum\": \"\",\n            \"nfeType\": \"\",\n            \"nfeModel\": \"\",\n            \"nfeKey\": \"\",\n            \"nfeValue\": 0,\n            \"baseObject\": \"17\",\n            \"baseKey\": \"237\",\n            \"comments\": \"Based On Sales Orders 237.\",\n            \"createdAt\": \"2018-07-20T17:23:53\",\n            \"updatedAt\": \"2018-07-20T17:23:56\",\n            \"canceledAt\": null,\n            \"customer\": {\n                \"type\": \"C\",\n                \"taxType\": \"C\",\n                \"partnerKey\": \"C001\",\n                \"docEntry\": \"8\",\n                \"fullName\": \"Sport Club Corinthians Paulista\",\n                \"aliasName\": \"Timão\",\n                \"email\": \"campeão@corinthians.com.br\",\n                \"phone\": \"2095-3000\",\n                \"phoneSecondary\": \"11\",\n                \"cellular\": \"11-9595-2001\",\n                \"taxNumber\": \"61.902.722/0001-26\",\n                \"stateTaxNumber\": \"113.440.120.113\",\n                \"cityTaxNumber\": \"\",\n                \"billingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                },\n                \"shippingAddress\": {\n                    \"address1\": \"São Jorge\",\n                    \"address2\": \"ZZZ\",\n                    \"city\": \"São Paulo\",\n                    \"county\": \"5344\",\n                    \"postalCode\": \"03087-000\",\n                    \"stateCode\": \"SP\",\n                    \"countryCode\": \"BR\",\n                    \"community\": \"Tatuapé\",\n                    \"exteriorNumber\": \"777\",\n                    \"streetType\": \"Rua\"\n                }\n            },\n            \"items\": [\n                {\n                    \"lineNum\": \"0\",\n                    \"productKey\": \"I017\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Camisa Nike Flamengo I 09/10 s/nº\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 10,\n                    \"taxBasis\": 10,\n                    \"usage\": \"5\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 10,\n                    \"unitCost\": 143.41,\n                    \"comments\": \"\",\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 10,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 10,\n                            \"taxRate\": 18,\n                            \"taxValue\": 0\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 10,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 10,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0\n                        }\n                    ]\n                },\n                {\n                    \"lineNum\": \"1\",\n                    \"productKey\": \"I018\",\n                    \"codeBars\": \"\",\n                    \"productName\": \"Camisa Nike Brasil I 09/10 s/nº\",\n                    \"quantity\": 1,\n                    \"unit\": \"Un\",\n                    \"unitPrice\": 583.9,\n                    \"taxBasis\": 583.9,\n                    \"usage\": \"10\",\n                    \"cfop\": \"5102\",\n                    \"discountRate\": 0,\n                    \"taxValue\": 0,\n                    \"freightValue\": 0,\n                    \"grossValue\": 583.9,\n                    \"unitCost\": 142.42,\n                    \"comments\": \"\",\n                    \"itemTaxes\": [\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"COFINS\",\n                            \"taxBasis\": 583.9,\n                            \"taxRate\": 3,\n                            \"taxValue\": 0\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"ICMSBx00\",\n                            \"taxBasis\": 583.9,\n                            \"taxRate\": 18,\n                            \"taxValue\": 0\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"IPIBI000\",\n                            \"taxBasis\": 583.9,\n                            \"taxRate\": 7,\n                            \"taxValue\": 0\n                        },\n                        {\n                            \"taxRelate\": \"product\",\n                            \"taxCode\": \"PIS\",\n                            \"taxBasis\": 583.9,\n                            \"taxRate\": 0.65,\n                            \"taxValue\": 0\n                        }\n                    ]\n                }\n            ],\n            \"totals\": {\n                \"invoiceTotal\": {\n                    \"netValue\": 593.9,\n                    \"grossValue\": 593.9,\n                    \"baseValue\": 593.9,\n                    \"taxValue\": 0\n                },\n                \"merchandizeTotal\": {\n                    \"netValue\": 593.9,\n                    \"grossValue\": 593.9,\n                    \"baseValue\": 593.9,\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":"ceea7254-bc7a-4e00-b989-f0c361fec319","name":"Down Payments - TOTVS Protheus","originalRequest":{"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"url":{"raw":"{{endpoint}}/downPayments?createdFrom=2020-12-27&createdTo=2021-08-27","host":["{{endpoint}}"],"path":["downPayments"],"query":[{"key":"createdFrom","value":"2020-12-27","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2021-08-27","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":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional - list search)","disabled":true},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional)","disabled":true},{"key":"erpKey","value":"120","description":"Down Payment Primary Key in ERP (optional - unitary search)","disabled":true},{"key":"docNum","value":"49084","description":"Down Payment Document Number in ERP (optional - unitary search)","disabled":true},{"key":"orderNum","value":"1049210322364-01","description":"Partner Down Payment 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\": \"salesAPI\",\n    \"process\": \"DownPayments\",\n    \"system\": \"totvsProtheus\",\n    \"target\": \"downPayments\",\n    \"user\": \"intergate\",\n    \"host\": \"192.168.0.103\",\n    \"effectiveTimestamp\": \"2021-06-07T16:19:21\",\n    \"createdFrom\": \"2020-08-27\",\n    \"createdTo\": \"2021-08-27\",\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\": \"ECM_2929\",\n            \"lineNum\": \"\",\n            \"docDate\": \"2021-06-04\",\n            \"docDueDate\": \"2021-06-04\",\n            \"docValue\": 259.03,\n            \"docStatus\": \"O\",\n            \"docSituation\": \"0\",\n            \"partnerKey\": \"001022_01\",\n            \"sellerKey\": \"000001\",\n            \"baseObject\": \"17\",\n            \"baseKey\": \"000034\",\n            \"baseOrderNum\": \"2949C\",\n            \"paymentMethod\": \"RA\",\n            \"bankCode\": \"CX1\",\n            \"bankBranch\": \"00001\",\n            \"bankAccount\": \"0000000001\",\n            \"remarks\": \"PGTO ECOMMERCE\",\n            \"createdAt\": null,\n            \"updatedAt\": null,\n            \"canceledAt\": null\n        }\n    ],\n    \"count\": 1\n}"}],"_postman_id":"93ce75e0-7700-44ae-82b1-1771b61bd067"},{"name":"Down Payment - SAP Business One","id":"4c55fa42-e4d5-4149-87d4-cff8d86af485","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"1\",\r\n    \"baseKey\": \"000020\",\r\n    \"baseNum *\": null,\r\n    \"orderNum *\": null,\r\n    \"whsCode *\": null,\r\n    \"mainUsage *\": null,\r\n    \"docDueDate\": null,\r\n    \"comments\": \"\",\r\n    \"items\": [\r\n        {\r\n            \"baseKey *\": null,\r\n            \"baseNum *\": null,\r\n            \"orderNum *\": null,\r\n            \"baseLineNum\": \"01\",\r\n            \"productKey *\": null,\r\n            \"quantity *\": null,\r\n            \"unitPrice *\": null,\r\n            \"whsCode *\": null,\r\n            \"project *\": null,\r\n            \"usage *\": null\r\n        }\r\n    ],\r\n    \"payments\": [\r\n        {\r\n            \"paymentMethod\": \"cash\",\r\n            \"amount\": 10.00,\r\n            \"installments\": 1\r\n        }\r\n    ]\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/downPayments","description":"<h4 id=\"insert-sales-dowm-payment-in-erp\">Insert sales dowm payment in ERP</h4>\n<p><em>(sapBusinessOne=203/ODPI)</em></p>\n<p>This service will allow to insert a new sales dowm payment in the ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new sales dowm payment will be insert if the informed sales order is located and validated on the ERP. The key for locating the sales order on the ERP can be:</p>\n<ul>\n<li>SAP Business One: ORDR.DocEntry = <code>baseKey</code> or ORDR.DocNum = <code>baseNum</code> or ORDR.NumAtCard = <code>orderNum</code></li>\n</ul>\n<p>Products sent to the service will be validated for the search key, order line number and quantity. Products can be identified in the ERP in 2 ways:</p>\n<ul>\n<li>SAP B1: OITM.CodeBars = <code>codeBars</code> or OITM.ItemCode = <code>productKey</code></li>\n</ul>\n<p>In addition to the sales dowm payment, the service may or may not include incoming payments. Incoming Paymnets have sources 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 sales invoices (SAPB1: ODPI), 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>baseObject</td>\n<td>string</td>\n<td>Base Object (default = 17)</td>\n</tr>\n<tr>\n<td>baseKey</td>\n<td>string</td>\n<td>Base Key</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.baseLineNum</td>\n<td>string</td>\n<td>Base line number</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["downPayments"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c55fa42-e4d5-4149-87d4-cff8d86af485"},{"name":"Down Payment - TOTVS Protheus","id":"7c1d777f-ebfa-45e8-9bec-bda492a42d80","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"01\",\r\n    \"financialNature\": \"5000000001\",\r\n    \"erpKey\": \"BOL_000000001\",\r\n    \"lineNum\": \"01\",\r\n    \"docDate\": \"2021-06-08\",\r\n    \"docDueDate\": \"2021-06-08\",\r\n    \"docValue\": 10.00,\r\n    \"partnerKey\": \"001022_01\",\r\n    \"sellerKey\": \"000001\",\r\n    \"bankCode\": \"341\",\r\n    \"bankBranch\": \"0132\",\r\n    \"bankAccount\": \"08654\",\r\n    \"baseObject_\": \"17\",\r\n    \"baseKey_\": \"000034\",\r\n    \"baseOrderNum_\": \"2949C\",\r\n    \"comments\": \"Teste Postman\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/downPayments","description":"<h4 id=\"insert-sales-dowm-payment-in-erp\">Insert sales dowm payment in ERP</h4>\n<p><em>(sapBusinessOne=203/ODPI)</em></p>\n<p>This service will allow to insert a new sales dowm payment in the ERP.</p>\n<p>The scenario will validate the data received, making selects in the ERP database.</p>\n<p>A new sales dowm payment will be insert if the informed sales order is located and validated on the ERP. The key for locating the sales order on the ERP can be:</p>\n<ul>\n<li>SAP Business One: ORDR.DocEntry = <code>baseKey</code> or ORDR.DocNum = <code>baseNum</code> or ORDR.NumAtCard = <code>orderNum</code></li>\n</ul>\n<p>Products sent to the service will be validated for the search key, order line number and quantity. Products can be identified in the ERP in 2 ways:</p>\n<ul>\n<li>SAP B1: OITM.CodeBars = <code>codeBars</code> or OITM.ItemCode = <code>productKey</code></li>\n</ul>\n<p>In addition to the sales dowm payment, the service may or may not include incoming payments. Incoming Paymnets have sources 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 sales invoices (SAPB1: ODPI), 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>baseObject</td>\n<td>string</td>\n<td>Base Object (default = 17)</td>\n</tr>\n<tr>\n<td>baseKey</td>\n<td>string</td>\n<td>Base Key</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.baseLineNum</td>\n<td>string</td>\n<td>Base line number</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":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["downPayments"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7c1d777f-ebfa-45e8-9bec-bda492a42d80"}],"id":"e219fe13-296a-48ce-9be8-f8bf34e19e20","_postman_id":"e219fe13-296a-48ce-9be8-f8bf34e19e20","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}},{"name":"Sale Returns","item":[{"name":"Sale Returns","id":"9f1ae1f1-dba1-426b-b5d9-13afaae65fac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{endpoint}}/saleReturns?createdFrom=2022-09-30&createdTo=2022-09-30&erpKey=118356&orderNum=118556&partnerKey&salesAgentKey&status&docNum&pageNum&carrierKey&updatedAt=2023-04-06T00:00:00&branch","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["saleReturns"],"host":["{{endpoint}}"],"query":[{"key":"createdFrom","value":"2022-09-30"},{"key":"createdTo","value":"2022-09-30"},{"key":"erpKey","value":"118356"},{"key":"orderNum","value":"118556"},{"key":"partnerKey","value":null},{"key":"salesAgentKey","value":null},{"key":"status","value":null},{"key":"docNum","value":null},{"key":"pageNum","value":null},{"key":"carrierKey","value":null},{"key":"updatedAt","value":"2023-04-06T00:00:00"},{"key":"branch","value":null}],"variable":[]}},"response":[],"_postman_id":"9f1ae1f1-dba1-426b-b5d9-13afaae65fac"},{"name":"Sale Return","id":"ecd7cb10-9001-4ae8-85e2-2de5feb715be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"branch\": \"1\",\r\n    \"sellerKey\": \"11\",\r\n    \"orderNum\": \"97018\",\r\n    \"dueDate\": \"2022-06-30\",\r\n    \"docDueDate\": \"2022-06-30\",\r\n    \"nfeNum\": \"97018\",\r\n    \"nfeSeries\": \"2\",\r\n    \"_nfeModel\": \"55\",\r\n    \"paymentCondition\": \"-1\",\r\n    \"_paymentMethod\": \"\",\r\n    \"mainUsage\": \"39\",\r\n    \"whsCode\": \"SM\",\r\n    \"_mainCostCenter\": \"\",\r\n    \"incoterms\": \"0\",\r\n    \"packDescription\": \"VOLUME\",\r\n    \"packQuantity\": 1,\r\n    \"netWeight\": 1.000,\r\n    \"grossWeight\": 1.000,\r\n    \"comments\": \"REF NFO 55812 Importador de arquivos digitais. Data:01/07/2022 11:24:42\",\r\n    \"closingRemarks\": \"NF VENDA 55812/ REF. OS 55812\",\r\n    \"customChaveAcesso\": \"5220617438997000169550020000970181000972006\",\r\n    \"updatePartner\": false,\r\n    \"customer\": {\r\n        \"type\": \"C\",\r\n        \"taxType\": \"C\",\r\n        \"fullName\": \"PRATIKA LOGISTICA LTDA\",\r\n        \"_aliasName\": \"\",\r\n        \"_email\": \"agrosonhoverde@gmail.com\",\r\n        \"phone\": \"1124243200\",\r\n        \"_phoneSecondary\": \"\",\r\n        \"_cellular\": \"\",\r\n        \"taxNumber\": \"17438997000169\",\r\n        \"stateTaxNumber\": \"623063885113\",\r\n        \"_cityTaxNumber\": \"\",\r\n        \"_cnaeCode\": \"\",\r\n        \"_contactPerson\": \"\",\r\n        \"sellerKey\": \"11\",\r\n        \"_priceListKey\": \"2\",\r\n        \"partnerPaymentCondition\": \"-1\",\r\n        \"_partnerPaymentMethod\": \"\",\r\n        \"_groupCode\": \"100\",\r\n        \"billingAddress\": {\r\n            \"address1\": \"RUA MADALENA DILEO\",\r\n            \"exteriorNumber\": \"79\",\r\n            \"community\": \"CHACARAS SAO LUIS\",\r\n            \"city\": \"SANTANA DE PARNAIBA\",\r\n            \"stateCode\": \"SP\",\r\n            \"postalCode\": \"06504008\",\r\n            \"countryCode\": \"BR\"\r\n        },\r\n        \"shippingAddress\": {\r\n            \"address1\": \"RUA MADALENA DILEO\",\r\n            \"exteriorNumber\": \"79\",\r\n            \"community\": \"CHACARAS SAO LUIS\",\r\n            \"city\": \"SANTANA DE PARNAIBA\",\r\n            \"stateCode\": \"SP\",\r\n            \"postalCode\": \"06504008\",\r\n            \"countryCode\": \"BR\"\r\n        }\r\n    },\r\n    \"items\": [\r\n        {\r\n            \"productKey\": \"200562\",\r\n            \"_codeBars\": \"\",\r\n            \"productName\": \"OMEGA 3 EPA 1000 MG 30 S\",\r\n            \"quantity\": 1,\r\n            \"unitPrice\": 48.09,\r\n            \"taxBasis\": 48.09,\r\n            \"usage\": \"39\",\r\n            \"whsCode\": \"SM\",\r\n            \"_costCenter\": \"\",\r\n            \"_financialProject\": \"\",\r\n            \"comments\": \"Lote: 9111192 / Fabricacao: 13/06/2022 / Validade: 30/11/2022\",\r\n            \"ncmCode\": \"21069030\",\r\n            \"customSkillItem\": \"1\"\r\n        }\r\n    ],\r\n    \"totals\": {\r\n        \"orderTotal\": {\r\n            \"netValue\": 48.09,\r\n            \"grossValue\": 48.09,\r\n            \"baseValue\": 48.09,\r\n            \"taxValue\": 0\r\n        },\r\n        \"merchandizeTotal\": {\r\n            \"netValue\": 48.09,\r\n            \"grossValue\": 48.09,\r\n            \"baseValue\": 48.09,\r\n            \"taxValue\": 0\r\n        },\r\n        \"shippingTotal\": {\r\n            \"netValue\": 0,\r\n            \"grossValue\": 0,\r\n            \"baseValue\": 0,\r\n            \"taxValue\": 0\r\n        }\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"{{endpoint}}/saleReturns","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}},"urlObject":{"path":["saleReturns"],"host":["{{endpoint}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"ecd7cb10-9001-4ae8-85e2-2de5feb715be"}],"id":"abdda5dc-f84d-4374-8132-892a2d0fff8d","_postman_id":"abdda5dc-f84d-4374-8132-892a2d0fff8d","description":"","auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]},"isInherited":true,"source":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","type":"collection"}}}],"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{user}}"},{"key":"password","value":"{{pass}}"}]}},"event":[{"listen":"prerequest","script":{"id":"8939f0e5-6289-46ec-884f-bcb68ad869dc","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"bdf2ecf6-ecd5-43bc-b476-a4f9fb613f56","type":"text/javascript","exec":[""]}}]}