{"info":{"_postman_id":"11834bc6-bff3-4272-b68a-24430df885aa","name":"salesAPI - Sales API for ERP (v2)","description":"This document contains the necessary data and requirements for integration with the **salesAPI conector**, a passive API to connect **Sales systems (E-commerce B2C, B2B, CRM, POS and WMS systems)** with ERP systems, as SAP Business One or TOTVS Protheus.\n\n__salesAPI conector currently has the following HTTP REST Plain services - version 2 (v2.3):\n\n- branches: search branches in ERP\n- warehouses: search warehouses in ERP\n- binLocations: search bin locations in ERP\n- usages: search usages in ERP\n- carriers: search carriers in ERP\n- itemGroups: search product groups in ERP\n- products: search products (with or without Partnumber) and prices in ERP\n- stocks: search inventory in ERP\n- pricelists: search pricelists in ERP\n- prices: search prices in ERP\n- partners: search and insert business partners in ERP\n- contacts: search and insert partner contacts in ERP\n- saleContracts: search sale contracts in ERP\n- quotations: search and insert sale quotations in ERP\n- orders: search and insert sale orders in ERP\n- orderStatus: seach for changes in the status of sale orders in ERP (only SAP Business One)\n- picklists: insert sale picklists in ERP\n- invoices: search and insert sale invoices in ERP\n- deliveries: search and insert sale deliveries in ERP (only SAP Business One)\n- creditNotes: search sale credit notes in ERP\n- downPayments: search sale down payments in ERP (only SAP Business One)\n- receivables: search receivables in ERP\n- incPayments: search incoming payments in ERP\n    \n\n---\n\n**Content Type**: all salesAPI services use the “content-type” application/json for Parameters (body request) and Responses.\n\n**Authentication**: salesAPI uses Basic Authentication (user/password)\n\n**Characteristics**: pagination, incremental query, default fields, objects and processes, use of custom fields (limited use), API usage and ERP transactions monitoring","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json"},"item":[{"name":"Attachments","item":[{"name":"Attachments","id":"75aaac2b-41cb-4c9e-9378-43efbcb5def2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":{"raw":"{{endpoint}}/attachments?erpKey=30180&linkedObject=23&linkedErpKey=22&pageNum&updatedAt=NOT IMPLEMENTED","host":["{{endpoint}}"],"path":["attachments"],"query":[{"key":"erpKey","value":"30180","type":"text"},{"key":"linkedObject","value":"23","type":"text"},{"key":"linkedErpKey","value":"22","type":"text"},{"key":"pageNum","value":null,"type":"text"},{"key":"updatedAt","value":"NOT IMPLEMENTED","type":"text"}]}},"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"},"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"},"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":{"raw":"{{endpoint}}/attachments?erpKey=22937","host":["{{endpoint}}"],"path":["attachments"],"query":[{"key":"erpKey","value":"22937","type":"text"}]}},"response":[],"_postman_id":"e3610ce2-18c2-49ea-9ff6-dfada5ff34ad"}],"id":"335060ba-a001-4ded-ade2-1feed01bdb6e","_postman_id":"335060ba-a001-4ded-ade2-1feed01bdb6e"},{"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":{"raw":"{{endpoint}}/branches?erpKey=1","host":["{{endpoint}}"],"path":["branches"],"query":[{"key":"erpKey","value":"1","description":"Branch Primary Key in ERP (optional)"}]},"description":"#### Search branches in ERP\n*(sapBusinessOne=247/OBPL, totvsProtheus=SM0)*\n\n###### ATENTION: for TOTVS Protheus use /igt_branches (conflict with TOTVS standard API)\n\nThe search of branches allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe branches service will consider as valid branch:\n- SAP Business One: [1] Enabled: OBPL.Disabled=N\n- TOTVS Protheus: [1] \n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service does not have pagination or incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/warehouses?branch=1&erpKey=01","host":["{{endpoint}}"],"path":["warehouses"],"query":[{"key":"branch","value":"1","description":"Branch Primary Key in ERP (optional for list search)","type":"text"},{"key":"erpKey","value":"01","description":"Wharehouse Primary Key in ERP (optional for unitary search)"}]},"description":"#### Search warehouses in ERP\n*(sapBusinessOne=64/OWHS, totvsProtheus=NNR)*\n\nThe search of warehouses allows you to filter the ERP by:\n- List Search: by `branch` \n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search is performed as a list.\n\nThe warehouses service will consider as valid warehouse:\n- SAP Business One: [1] Not blocked: OWHS.Locked NOT Y\n- TOTVS Protheus: \n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service does not have pagination or incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/binLocations?erpKey=1","host":["{{endpoint}}"],"path":["binLocations"],"query":[{"key":"erpKey","value":"1","description":"Bin Location Primary Key in ERP (optional)"}]},"description":"#### Search bin locations in ERP\n*(sapBusinessOne=10000206/OBIN, totvsProtheus=SBE)*\n\nThe search of bin locations allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe bin locations service will consider as valid bin location:\n- SAP Business One: [1] \n- TOTVS Protheus: [1] \n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service does not have pagination or incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/usages?erpKey=9","host":["{{endpoint}}"],"path":["usages"],"query":[{"key":"erpKey","value":"9","description":"Usage Primary Key in ERP (optional)"}]},"description":"#### Search usages in ERP\n*(sapBusinessOne=260/OUSG, totvsProtheus=SF4)*\n\nThe search of usages allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe usages service will consider as valid usage:\n- SAP Business One: [1] \n- TOTVS Protheus: [1] \n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service does not have pagination or incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/carriers?taxType=C&erpKey=ASV1000&taxNumber=59.546.515/0001-34&pageNum=2","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)"},{"key":"erpKey","value":"ASV1000","description":"Carrier Primary Key in ERP (optional - unitary search)"},{"key":"taxNumber","value":"59.546.515/0001-34","description":"Carrier Tax Number (optional - unitary search)"},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)"}]},"description":"#### Search carriers in ERP\n#*(sapBusinessOne=2/OCRD, totvsProtheus=SA4)*\n\nThe search of carriers allows you to filter the ERP by:\n- List Search: by taxType (C = company, P = person) {optional}\n- Unitary Search: by erpKey or taxNumber (with or without punctuation)\n\nIf 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).\n\nThe carriers service will consider as valid objects:\n- SAP Business One: Valid and not canceled (OCRD.validFor = Y AND OCRD.Canceled = N) + OCRD.GroupCode=GP CarrierGroup (if definied)\n- TOTVS Protheus: \n\nComments:\n- taxType: SAP Business One (according to CRD7.TaxId0 or CRD7.TaxId4), TOTVS Protheus (A1_PESSOA + A1_TPESSOA = 'EP')\n- erpKey: SAP Business One (OCRD.CardCode), TOTVS Protheus (A4_COD)\n- taxNumber: SAP Business One (CRD7.TaxId0 or CRD7.TaxId4), TOTVS Protheus (A4_CGC)\n\nThe response will inform:\n- The number of returned objects in the “count” field\n\nFor carriers list the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- “pageSize” = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- “pageNum” = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- “pageTotal” = total pages, reported in the response\n- “hasNext” = if there are more pages (true / false), informed in the response\n\nThis service does not have incremental treatment.\n\nThis service does not have user field treatment (UDF)."},"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":{"raw":"{{endpoint}}/costCentres?erpKey=1&pageNum","host":["{{endpoint}}"],"path":["costCentres"],"query":[{"key":"erpKey","value":"1","description":"Cost Centre Primary Key in ERP (optional)"},{"key":"pageNum","value":null,"description":"Number of page - pagination (optional)"}]},"description":"#### Search Cost Centres in ERP\n*(sapBusinessOne=61/OPRC, totvsProtheus=CTT)*\n\nThe search Cost Centres allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe Cost Centres service will consider as valid cost center:\n- SAP Business One: [1] OPRC.Active=Y\n- TOTVS Protheus: [1] \n\nComments:\n- `type`:SAP Business One (OCCT.CctCode), TOTVS Protheus (R=revenue, E=expense)\n- `dimension`: SAP Business One (ODIM.DimCode), TOTVS Protheus (1)\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service does not have incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/financialProjects?erpKey=FX&pageNum","host":["{{endpoint}}"],"path":["financialProjects"],"query":[{"key":"erpKey","value":"FX","description":"Project Primary Key in ERP (optional)"},{"key":"pageNum","value":null,"description":"Number of page - pagination (optional)"}]},"description":"#### Search Financial Projects in ERP\n*(sapBusinessOne=63/OPRJ, totvsProtheus=CTD)*\n\nThe search Financial Projects allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe projects service will consider as valid financial projects:\n- SAP Business One: [1] OPRJ.Active=Y\n- TOTVS Protheus: \n\nComments:\n- `type`: TOTVS Protheus (R=revenue, E=expense)\n- `dimension`: TOTVS Protheus (2)\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service does not have incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/payConditions?erpKey=1&pageNum","host":["{{endpoint}}"],"path":["payConditions"],"query":[{"key":"erpKey","value":"1","description":"Payment Condition Primary Key in ERP (optional)"},{"key":"pageNum","value":null,"description":"Number of page - pagination (optional)"}]},"description":"#### Search payment conditions in ERP\n*(sapBusinessOne=40/OCTG, totvsProtheus=SE4)*\n\nThe search of payment conditions allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe payment conditions service will consider as valid payment conditions:\n- SAP Business One: \n- TOTVS Protheus:  E4_MSQLBL not 1\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service does not have incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/payMethods?erpKey=Transf Bancária&pageNum","host":["{{endpoint}}"],"path":["payMethods"],"query":[{"key":"erpKey","value":"Transf Bancária","description":"Payment Method Primary Key in ERP (optional)"},{"key":"pageNum","value":null,"description":"Number of page - pagination (optional)"}]},"description":"#### Search payment methods in ERP\n*(sapBusinessOne=147/OPYM, totvsProtheus=SX5)*\n\nThe search of payment methods allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe payment methods service will consider as valid payment methods:\n- SAP Business One: [1] OPYM.Active=Y\n- TOTVS Protheus: [1] X5_TABELA=24\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service does not have incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/creditCards?erpKey=1&pageNum","host":["{{endpoint}}"],"path":["creditCards"],"query":[{"key":"erpKey","value":"1","description":"Credit Card Primary Key in ERP (optional)"},{"key":"pageNum","value":null,"description":"Number of page - pagination (optional)"}]},"description":"#### Search credit cards in ERP\n*(sapBusinessOne=36/OCRC, totvsProtheus=SAE)*\n\nThe search of credit cards allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe credit cards service will consider as valid credit cards:\n- SAP Business One: [1] \n- TOTVS Protheus: [1] AE_TIPO=CC\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service does not have incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"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}]},"description":"#### Search numering series in ERP\n*(sapBusinessOne=35/ONNM)*\n\nThe search of numering series allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe numering series service will consider all numering series as valid.\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service does not have incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":"Branches, Warehouses, Carriers","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"},{"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":{"raw":"{{endpoint}}/itemGroups?erpKey=100","host":["{{endpoint}}"],"path":["itemGroups"],"query":[{"key":"erpKey","value":"100","description":"Item Group Primary Key in ERP (optional - unitary search)"}]},"description":"#### Search product groups in ERP\n*(sapBusinessOne=52/OITB, totvsProtheus=SBM)*\n\nThe service will search the ERP database and return the product groups, linked with valid products.\n\nThe search can also be unitary, informing the desired `erpKey` in the request.\n- SAP Business One: OITB.ItmsGrpCod\n- TOTVS Protheus: BM_GRUPO\n\nThe itemGroups service will consider as valid products:\n- SAP Business One: [1] Sale Item (OITM.SellItem = Y), [2] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)\n- 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)\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service does not have pagination or incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/products?itemType=4&itemGroup=103&brand=2&erpKey=PA00244&codeBars=I004&pageNum=1&updatedAt=2020-08-20T00:00:00&usePartnumber=false&showComplement=false","host":["{{endpoint}}"],"path":["products"],"query":[{"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)"},{"key":"erpKey","value":"PA00244","description":"Product Primary Key in ERP (optional - unitary search)"},{"key":"codeBars","value":"I004","description":"Product Code Bars in ERP (optional - unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-08-20T00:00:00","description":"Date do filter modified register - incremental search (optional)"},{"key":"usePartnumber","value":"false","description":"Define if show response in partnumber format to sellItems"},{"key":"showComplement","value":"false","description":"Define if show response with complement object (PROTHEUS only=SB5)","type":"text"}]},"description":"#### Search products in ERP\n*(sapBusinessOne=4/OITM, totvsProtheus=SB1)*\n\nThe service will search the ERP database and return the items located (skus), grouped or not by `partnumber` (Configurable Product).\n\nThe search of products allows filtering the ERP by:\n- List Search: by `itemType`, by `itemGroup` and/or by `brand` {optional}\n- Unitary Search: by `erpKey` or `codeBars`\n\nIf no field for unitary search (`erpKey` or `codeBars`) is informed in the request, the search returns all valid products. The list search can be optionally filtered by `itemType`, by `itemGroup` and/or by `brand`.\n\nComments:\n- Item Type: [1] SAP Business One: OITM.MatType (table OMTP), [2] TOTVS Protheus: B1_TIPO (table SX5/02)\n- Item Group: [1] SAP Business One: OITM.ItmsGrpCod (table OITB), [2] TOTVS Protheus: B1_GRUPO (table SBM)\n- Brand (or Manufacturer): [1] SAP Business One: OITM.FirmCode (table OMRC), [2] TOTVS Protheus: B1_FABRIC\n- 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\n\nThe products service will consider as valid products:\n- SAP Business One: [1] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)\n- TOTVS Protheus: [1] active product (B1_MSBLQL other than 1)\n- optionally you can define in Setup API to return only products with valid `codeBars`\n\nBy 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.\n\nThe service will return two prices for each product: `price` (normal price) and `pricePromo` (promotional price). The table price used for normal and promotional prices are definied in API Setup.\n\nPrice list:\n- SAP Business One: OITM.PriceList\n- 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\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page.\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true/false), informed in the response\n\nThis service will allow you search the products list in two situations:\n- Full Search: will result in all partnumber/SKU (optionally by brand).\n- 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 `updatedAt` 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.\n\nThe response will inform:\n- The total number of skus or partnumbers in the `count` field\n- The total number of SKUs per partnumber in the `countSKU` field\n\nFor use of user fields (UDF) created in the product table (SAPB1: OITM, TOTVS: SB1) the respective registration must be performed in the Custom Table."},"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":{"raw":"{{endpoint}}/billOfMaterials?itemType=4&itemGroup=&brand=&treeType=&productKey=&codeBars=&pageNum=&updatedAt=","host":["{{endpoint}}"],"path":["billOfMaterials"],"query":[{"key":"itemType","value":"4","description":"Type of products (optional in list search)"},{"key":"itemGroup","value":"","description":"Group of products (optional in list search)"},{"key":"brand","value":"","description":"Brand of products (optional in list search)"},{"key":"treeType","value":"","description":"Type of Tree: P=production, S=sales, T=template,  A=assembly (optional - list search)"},{"key":"productKey","value":"","description":"Product Primary Key in ERP (optional - unitary search)"},{"key":"codeBars","value":"","description":"Product Code Bars in ERP (optional - unitary search)"},{"key":"pageNum","value":"","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"","description":"Date to filter bill of materials changes - incremental search (optional)"}]},"description":"#### Search bill of materials in ERP\n*(sapBusinessOne=66/OITT, totvsProtheus=SG1)*\n\nThis service will allow you to search bill of materials on the ERP.\n\nProducts 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). \n\nThe search of bill of materials allows filtering the ERP by:\n- List Search: by `itemType`, by `itemGroup` and/or by `brand` {optional}\n- Unitary Search: by `erpKey` or `codeBars`\n\nIf no field for unitary search (`erpKey` or `codeBars`) is informed in the request, the search returns all valid bill of materials. The list search can be optionally filtered by `itemType`, by `itemGroup` and/or by `brand`.\n\nComments:\n- `itemType`: [1] SAP Business One: OITM.MatType (table OMTP), [2] TOTVS Protheus: B1_TIPO (table SX5/02)\n- `item Group`: [1] SAP Business One: OITM.ItmsGrpCod (table OITB), [2] TOTVS Protheus: B1_GRUPO (table SBM)\n- `brand` (or Manufacturer): [1] SAP Business One: OITM.FirmCode (table OMRC), [2] TOTVS Protheus: B1_FABRIC\n\nThe bill of materiais service will consider as valid bill of materials:\n- SAP Business One: \n- TOTVS Protheus: \n\nThe bill of materiais service will consider as valid products:\n- SAP Business One: [1] Sale Item (OITM.SellItem = Y), [2] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)\n- TOTVS Protheus: [1] active product (B1_MSBLQL other than 1)\n- optionally you can define in Setup API to return only products with valid codeBars\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service will allow you to search the bill of materials list in two situations:\n- Full Search: will result in all bill of materials, according to filters.\n- 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 `updatedAt` 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\n\nFor 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."},"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"},{"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":{"raw":"{{endpoint}}/priceLists?erpKey=1","host":["{{endpoint}}"],"path":["priceLists"],"query":[{"key":"erpKey","value":"1","description":"PriceList Primary Key in ERP (optional - unitary search)"}]},"description":"#### Search priceLists in ERP\n*(sapBusinessOne=6/OPLN, totvsProtheus=DA0)*\n\nThe priceList search allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary search (`erpKey`) is informed in the request, the search will return all valid priceLists.\n\nThe priceLists service will consider as valid priceList:\n- SAP Business One: [1] Valid (OPLN.validFor = Y)\n- TOTVS Protheus: [1] active (DA0_ATIVO=1), [2] initial validity (DA0_DATDE<=dDataBase)\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service does not have pagination or incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"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":"erpKey","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}]},"description":"#### Search prices in ERP\n\n*(sapBusinessOne=ITM1, totvsProtheus=DA1)*\n\nThe prices search allows you to filter the ERP by:\n\n*   List Search: by `priceListKey` or `brand` or `itemType` or `itemGroup` {optional}\n*   Unitary Search: by `productKey` or `codeBars`\n    \n\nIf no field for unitary search (`productKey` or `codeBars`) is informed in the request, the search will return the price of all valid products. The list search can be filtered by `priceListKey` or by `brand` or by `itemType` or by `itemGroup`.\n\nPriceList:\n\n*   SAP Business One: ITM1.PriceList=OPLN.LineNum. The service does not treat Special Prices (OSPP), Special Prices for Groups (OSPG), Interest Prices (OIRT).\n*   TOTVS Protheus: DA1_CODTAB=DA0_CODTAB\n    \n\nComments:\n\n*   Item Type: \\[1\\] SAP Business One: OITM.MatType (table OMTP), \\[2\\] TOTVS Protheus: B1_TIPO (table SX5/02 - ToDo)\n*   Item Group: \\[1\\] SAP Business One: OITM.ItmsGrpCod (table OITB), \\[2\\] TOTVS Protheus: B1_GRUPO (table SBM - ToDo)\n*   Brand (or Manufacturer): \\[1\\] SAP Business One: OITM.FirmCode (table OMRC), \\[2\\] TOTVS Protheus: B1_FABRIC\n    \n\nThe prices service will consider as valid price:\n\n*   SAP Business One:\n*   TOTVS Protheus: \\[1\\] active (DA1_ATIVO=1), \\[2\\] initial validity (DA1_DATVIG<=dDataBase)\n    \n\nThe prices service will consider as valid priceList:\n\n*   SAP Business One: \\[1\\] Valid (OPLN.validFor = Y)\n*   TOTVS Protheus: \\[1\\] active (DA0_ATIVO=1), \\[2\\] initial validity (DA0_DATDE<=dDataBase)\n    \n\nThe prices service will consider as valid products:\n\n*   SAP Business One: \\[1\\] Sale Item (OITM.SellItem = Y), \\[2\\] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)\n*   TOTVS Protheus: \\[1\\] active product (B1_MSBLQL other than 1)\n    \n\nIf `priceListKey` is not informed, the price in all priceLists will be searched.\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n\n*   `pageSize` = number of records on each page (eg 100), defined in the API configuration and informed in the response\n*   `pageNum` = desired page, provided in the request and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page.\n*   `pageTotal` = total pages, informed in the response\n*   `hasNext` = if there are more pages (true / false), informed in the response\n    \n\nThe response will inform:\n\n*   The number of returned objects in the `count` field\n    \n\nThis service will allow you to search the list in two situations:\n\n*   Full Search: will result in all items with the price, optionally by priceList.\n*   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 `updatedAt` 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\n    \n\nThis service does not have user field (UDF) treatment.\n\nObservation: products/GET service can consider two prices in response:\n\n*   `price` = normal price (API Setup > GP PriceList or IGT_PRICEL)\n*   `pricePromo` = promotional price (API Setup > GP PriceListPromo or IGT_PRICELP)"},"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["stocks"],"query":[{"key":"whsCode","value":"01","description":"Wharehouse code (optional in list and unitary search)"},{"key":"binCode","value":"001-07","description":"Bin Location code (optional in list and unitary search)"},{"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)"},{"key":"erpKey","value":"PA00244","description":"Product Primary Key in ERP (optional - unitary search)"},{"key":"codeBars","value":"78968064001054","description":"Product Code Bars in ERP (optional - unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-01T00:00:00","description":"Date do filter modified registers - incremental search (optional)"},{"key":"showBatchNumbers","value":"true","description":"Show details by batch numbers? true to show (optional)"},{"key":"showPositiveOnly","value":"true","description":"Show only positive stocks? true to show only positive (optional)","type":"text"}]},"description":"#### Search stocks in ERP\n\n*(sapBusinessOne=OITW-OIBQ, totvsProtheus=SB2-x)*\n\nThe inventory search allows you to filter the ERP by:\n\n*   List Search: by `itemType` or `itemGroup` or `brand` or `whsCode` or `binCode` {optional only for sapBusinessOne}\n*   Unitary Search: by `erpKey` or `codeBars`\n    \n\nIf no field for unitary search (`erpKey` or `codeBars`) is informed in the request, the search will return the stock of all valid products. The list search can be filtered by `itemType` or `itemGroup` or `brand` or `whsCode` or `binCode` (only sapBusinessOne).\n\nFields in response:\n\n*   `erpKey`, `codeBars`, `partNumber` (if UdfPartNumber is enabled in API Setup)\n*   `whsCode`, `binCode` (if UseBin is enabled in API Setup - only sapBusinessOne)\n*   `stock` (quantity), `stockValue` (currency), `availableStock`\n*   `batchNumbers`: array of batch numbers with stock (if `showBatchNumbers`\\=true and product has batch stock control)\n    \n\nComments:\n\n*   Item Type: \\[1\\] SAP Business One: OITM.MatType (table OMTP), \\[2\\] TOTVS Protheus: B1_TIPO (table SX5/02 - ToDo)\n*   Item Group: \\[1\\] SAP Business One: OITM.ItmsGrpCod (table OITB), \\[2\\] TOTVS Protheus: B1_GRUPO (table SBM - ToDo)\n*   `brand` (or Manufacturer): \\[1\\] SAP Business One: OITM.FirmCode (table OMRC), \\[2\\] TOTVS Protheus: B1_FABRIC\n*   `showPositiveOnly`: if true the response will show only positive stocks (default=false)\n*   `showBatchNumbers`: if true the response will show the batchNumbers array for each stock register (default=false)\n    \n\nThe stocks service will consider as valid products:\n\n*   SAP Business One: \\[1\\] Sale Item (OITM.SellItem = Y), \\[2\\] Valid and not canceled (OITM.validFor = Y AND OITM.Canceled = N)\n*   TOTVS Protheus: \\[1\\] active product (B1_MSBLQL other than 1)\n    \n\nIf `whsCode` is not informed, the stock in all warehouses will be searched. If `binCode` is not informed, the stock in all bin locations will be searched (if UseBin=true in API Setup).\n\nTreatment for `batchNumbers` {only SAP Business One}:\n\n*   If `showBatchNumbers` is not informed or not true, only total stock is returned.\n*   To show batch numbers details, do the request with `showBatchNumbers`\\=true.\n    \n\nTreatment for `availableStock`:\n\n*   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\n*   TOTVS Protheus: According to parameter MV_TPSALDO, TOTVS documentation at [https://centraldeatendimento.totvs.com/hc/pt-br/articles/360013215531-MP-SIGAEST-Utilização-do-parâmetro-SX6-MV-TPSALDO](https://centraldeatendimento.totvs.com/hc/pt-br/articles/360013215531-MP-SIGAEST-Utilização-do-parâmetro-SX6-MV-TPSALDO)\n    \n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n\n*   `pageSize` = number of records on each page (eg 100), defined in the API configuration and informed in the response\n*   `pageNum` = desired page, provided in the request and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page.\n*   `pageTotal` = total pages, informed in the response\n*   `hasNext` = if there are more pages (true / false), informed in the response\n    \n\nThe response will inform:\n\n*   The number of returned objects in the `count` field\n    \n\nThis service will allow you to search the stocks list in two situations:\n\n*   Full Search: will result in all items with an inventory balance greater than zero, optionally by brand and by warehouse.\n*   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 `updatedAt` 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\n    \n\nFor use of user fields (UDF) created in the product table (SAPB1: -, TOTVS: SB2) the respective registration must be performed in the Custom Table."},"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"},{"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":{"raw":"{{endpoint}}/partners?type=S&taxType=P&sellerKey=000001&erpKey=C001&taxNumber=89175174987&pageNum=1&updatedAt=2020-01-30T15:00:00","host":["{{endpoint}}"],"path":["partners"],"query":[{"key":"type","value":"S","description":"Partner Type: C=customer, S=supplier, L=lead (required if not unitary search)"},{"key":"taxType","value":"P","description":"Partner Tax Type: P=person, C=company, G=government, E=employer (optional in list search)"},{"key":"sellerKey","value":"000001","description":"Seller Primary Key in ERP (optional in list search)"},{"key":"erpKey","value":"C001","description":"Partner Primary Key in ERP (optional - unitary search)"},{"key":"taxNumber","value":"89175174987","description":"Partner Tax Number (optional - unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-30T15:00:00","description":"Date do filter modified register - incremental search (optional)"}]},"description":"#### Search partners in ERP\n*(sapBusinessOne=2/OCRD, totvsProtheus=SA1|SA2|SUS)*\n\nThe search of partners allows filtering the ERP by:\n- List Search: by `type` (C = customer, S = supplier, L = lead) {required}, by `taxType` (C = company, P = person, G = government, E = employee) or `sellerKey` {optional}\n- Unitary Search: by `erpKey` or `taxNumber` (with or without punctuation)\n\nIf no fields for unitary search (erpKey or taxNumber) are informed in the request, the partner search is performed by `type` (which becomes required), and it is also possible to filter partners by `taxType` and/or `sellerKey`.\n\nThe partners service will consider partners:\n- SAP Business One: Valid and not canceled (OCRD.validFor = Y AND OCRD.Canceled = N)\n- TOTVS Protheus: Active (A1_MSBLQL other than 1)\n\nComments:\n- `type`: SAP Business One (OCRD.CardType), TOTVS Protheus (tables SA1, SA2 and SUS)\n- `taxType`: SAP Business One (CRD7.TaxId0 or CRD7.TaxId4), TOTVS Protheus (A1_PESSOA + A1_TPESSOA=EP)\n- `sellerKey`: SAP Business One (OCRD.SlpCode), TOTVS Protheus (A1_VEND)\n- `erpKey`: SAP Business One (OCRD.CardCode), TOTVS Protheus (A1_COD+'_'+A1_LOJA)\n- `taxNumber`: SAP Business One (CRD7.TaxId0 or CRD7.TaxId4), TOTVS Protheus (A1_CGC)\n- `balanceValue` and `openOrdersValue`: for TOTVS Protheus refer https://tdn.totvs.com/pages/releaseview.action?pageId=253989073\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = number of records on each page (eg 100), defined in the API configuration and informed in the response\n- `pageNum` = desired page, provided in the request and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page.\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service will allow you to search partners list in two situations:\n- Full Search: will result in all partners, according to filters.\n- 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 `updatedAt` 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\n\nFor 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."},"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":"#### Insert/update partner in ERP\n*(sapBusinessOne=2/OCRD, totvsProtheus=SA1|SA2|SUS)*\n\nThis service will allow to insert a new partner in the ERP, or to update an existing partner.\n\nPartners are classified in the ERP as:\n- `type`: C = customer, S = supplier, L = lead\n- `taxType`: P = person, C = company, G = government, E = employee\n\nThe key to finding the partner is through `taxNumber`. If the partner is located by `taxNumber`, the data is updated, otherwise the new partner is included in the ERP.\n- SAP Business One: CRD7.TaxId0 (company/government) or CRD7.TaxId4 (person/employee)\n- TOTVS Protheus: A1_CGC (customer) or A2_CGC (supplier) or US_CGC (lead)\n\n`sellerKey`:\n- SAP BusinessOne: sellerKey=OCRD.SlpCode (OSLP)\n- TOTVS Protheus: sellerKey=A1_VEND (SA3)\n\n`phone`/`phoneSecundary`/`cellular` (format recommended: +XXYYNNNNNNNNN):\n- SAP BusinessOne: OCRD.Phone1/OCRD.Phone2/OCRD.Cellular\n- TOTVS Protheus: A1_FONE/A1_FAX/not used (note.: the value informed in field `phone`is splitted in fields A1_DDI/A1_DDD/A1_FONE)\n\n`Adresses`:\n- `shippingAddress` and `billingAddress`: shipping and billing address are required blocks\n- 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\n- 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.\n\n`bankData`:\n- partner bank data is optional\n\n#### Request object has the following properties\nField | Type | Description \n:--- | :--- | :--- \ntype * | string | Type of partner (C=customer, S=supplier, L=lead)\ntaxType * | string | Tax Type of partner (P=person, C=company, G=government, E=employee)\npartnerId | string | ID Partner \nfullName * | string | Partner full name\naliasName | string | Partner alias name\nemail | string | Email \nphone | string | Phone number (try to use in format +XXYYPPPPPPPP)\nphoneSecondary | string | Secondary phone number (try to use in format +XXYYPPPPPPPP)\ncellular | string | Cellular number (try to use in format +XXYYPPPPPPPP - SAPB1 only)\ntaxNumber * | string | Partner Tax Number\nstateTaxNumber | string | State Tax Number\ncityTaxNumber | string | City Tax Number\ninssTaxNumber | string | INSS Tax Number {new}\nsellerKey | string | Seller Primary Key in ERP\npaymentCondition | string | Payment Condition Key {new}\npaymentMethod | string | Payment Method Key {new}\nbillingAddress * | object | Billing Address\nbillingAddress.fullName | string | Full address name (example: BILLING or COBRANCA)\nbillingAddress.adress1 * | string | First address\nbillingAddress.adress2 | string | Second address\nbillingAddress.city * | string | City\nbillingAddress.postalCode * | string | Postal Code\nbillingAddress.stateCode * | string | State Code\nbillingAddress.countryCode | string | Country Code (example: BR)\nbillingAddress.community | string | Community\nbillingAddress.county | string | City County\nbillingAddress.exteriorNumber | string | Exterior number\nbillingAddress.streetType | string | Street type\nshippingAddress | object | Shipping Address\nshippingAddress.fullName | string | Full address name (example: SHIPPING or ENTREGA)\nshippingAddress.adress1 * | string | First address\nshippingAddress.adress2 | string | Second address\nshippingAddress.city * | string | City\nshippingAddress.postalCode * | string | Postal Code\nshippingAddress.stateCode * | string | State Code\nshippingAddress.countryCode | string | Country Code\nshippingAddress.community | string | Community\nshippingAddress.county | string | County\nshippingAddress.exteriorNumber | string | Exterior Number\nshippingAddress.streetType | string | Street type\nbankData.bankCountry | string | Bank Country (ex: BR) {new}\nbankData.bankName | string | Bank Name {new}\nbankData.bankCode | string | Bank Code {new}\nbankData.bankBranch | string | Bank Branch {new}\nbankData.bankAccount | string | Bank Account {new}\nbankData.bankBranchKey | string | Bank Branch Key {new}\nbankData.bankAccountKey | string | Bank Account Key {new}\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | API Package\nprocess | string | API Process\nsystem | string | ERP System\ntarget | string | API Target\nuser | string | User of request\nhost | string | Host of request\neffectiveTimestamp | string | Effective Timestamp of processing\ncode | string | Return Code (200, 400, 401, 403, 404, 500, ...)\nsuccess | booleano | Success in processing? (true/false)\nvalues | array | Values resulting of processing\nvalues.Object | string | Object in ERP\nvalues.Table | string | Table in ERP\nvalues.Action | string | Action (insert, update, ...)\nvalues.DocEntry | string |  Primary Key in ERP"},"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":{"raw":"{{endpoint}}/contacts?partnerType=C&partnerKey=C001&erpKey=1&pageNum=1&updatedAt=2010-01-30T15:00:00","host":["{{endpoint}}"],"path":["contacts"],"query":[{"key":"partnerType","value":"C","description":"Partner Type: C=customer, S=supplier, L=lead (optional in list search)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"erpKey","value":"1","description":"Contact Primary Key in ERP (optional - unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2010-01-30T15:00:00","description":"Date do filter modified register - incremental search (optional)"}]},"description":"#### Search contacts in ERP\n*(sapBusinessOne=11/OCPR, totvsProtheus=SU5)*\n\nThe search of contacts allows filtering the ERP by:\n- List Search: by `partnerKey` or `partnerType` (C = customer, S = supplier, L = lead) {optional}\n- Unitary Search: by `erpKey`\n\nIf no fields for unitary search (`erpKey`) are informed in the request, the partner search is performed by `partnerKey` or `partnerType`.\n\nThe contacts service will consider contacts:\n- SAP Business One: Active (OCPR.Active=Y)\n- TOTVS Protheus: Active (SU5.U5_MSBLQL!='1')\n\nComments:\n- `partnerKey`: SAP Business One (OCPR.CardCode), TOTVS Protheus (AC8.AC8_CODENT)\n- `partnerType`: SAP Business One (OCRD.CardType), TOTVS Protheus (AC8.AC8_ENTIDA)\n- `erpKey`: SAP Business One (OCPR.CntctCode), TOTVS Protheus (SU5.U5_CODCONT)\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = number of records on each page (eg 100), defined in the API configuration and informed in the response\n- `pageNum` = desired page, provided in the request and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page.\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service will allow you to search partners list in two situations:\n- Full Search: will result in all partners, according to filters.\n- 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 `updatedAt` 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\n\nFor 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."},"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"},{"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":{"raw":"{{endpoint}}/saleAgents?erpKey=Intergate","host":["{{endpoint}}"],"path":["saleAgents"],"query":[{"key":"erpKey","value":"Intergate","description":"SalesAgent Primary Key in ERP (optional)"}]},"description":"#### Search salesAgents in ERP\n*(sapBusinessOne=177/OAGP, totvsProtheus=ADK)*\n\nThe search of salesAgents (PROTHEUS=Business Units) allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search returns as a list.\n\nThe salesAgents service will consider as valid salesAgent:\n- SAP Business One: [1] Not blocked: OAGP.Locked NOT Y\n- TOTVS Protheus: [1] Not blocked: ADK_MSBLQL NOT 1\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nThis service does not have pagination or incremental treatment.\n\nThis service does not have user field (UDF) treatment."},"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":{"raw":"{{endpoint}}/sellers?erpKey=12&pageNum=1","host":["{{endpoint}}"],"path":["sellers"],"query":[{"key":"erpKey","value":"12","description":"Seller Primary Key in ERP (optional)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"}]},"description":"#### Search sellers in ERP\n*(sapBusinessOne=53/OSLP, totvsProtheus=SA3)*\n\n###### ATENTION: for TOTVS Protheus use /igt_sellers (conflict with TOTVS standard API)\n\nThe search of sellers allows you to filter the ERP by:\n- List Search\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the seller search is performed as a list.\n\nThe sellers service will consider as valid sellers:\n- SAP Business One: [1] Active and not blocked: OSLP.Active = Y AND OSLP.Locked = N\n- TOTVS Protheus: [1] Active: A3_MSBLQL other than 1\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = number of records on each page (eg 100), defined in the API configuration and informed in the response\n- `pageNum` = desired page, provided in the request and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum` > `pageTotal` = last page.\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor 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."},"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":"#### Insert/update seller in ERP\n*(sapBusinessOne=53/OSLP, totvsProtheus=SA3)*\n\nThis service will allow to insert a new seller in the ERP.\n\nThe 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.\n- SAP Business One: OSLP.SlpCode\n- TOTVS Protheus: A3_CODE\n\n*Note: TOTVS Protheus does not allow 2 sellers with the same fullName.*\n\n#### Request object has the following properties\n\n| Field | Type | Description |\n|:---:|:---:|:---:|\nerpKey | string | Erp key\nfullName | string | Full name\nemail | string | email\nphone | string | Number phone\nphoneSecondary | string | Number phone Secondary\ncellular | string | Number cellular\ncommissionRate | number | Comission rate\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | process\nsystem | string | System\ntarget | string | target\nuser | string | user \nhost | string | host\neffectiveTimestamp | string | Effective Time stamp\ncode | string | code\nsuccess | booleano | Success\nuseCustom | booleano | Use Custom\nvalues | array | Values"},"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"},{"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":{"raw":"{{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","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)"},{"key":"docStatus","value":"O/A","description":"Contract Status to filter sales quotations (optional in list search)"},{"key":"erpKey","value":"149231","description":"Contract Primary Key in ERP (optional - unitary search)"},{"key":"docNum","value":"122608","description":"Contract Document Number in ERP (optional - unitary search)"},{"key":"orderNum","value":"1074052740415-01","description":"Partner Contract Number in ERP (optional - unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2021-05-01T00:00:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search sale contracts in ERP\n*(sapBusinessOne=1250000025/OOAT, totvsProtheus=<<TODO>>)*\n\nThis service will allow you to search sale contracts on the ERP.\n\nSearching sales contracts allows you to filter the ERP by:\n- List search: by `createdFrom` + `createdTo` {required}, by `partnerKey` or `docStatus` {optional}\n- Unitary search: by `erpKey` or `orderNum` or `docNum`\n\nIf no field for unitary query is provided in the request (`erpKey` or `orderNum` or `docNum`), the query for sale contracts is done by creation date from/to (which become mandatory).\n\nThe contracts service will consider sale contracts with:\n- SAP Business One: OOAT.ObjType = 1250000025 + OOAT.BpType=C\n- TOTVS Protheus: \n\nComments:\n- `branch`: SAP Business One (x), TOTVS Protheus (x)\n- `partnerKey`: SAP Business One (OOAT.CardCode), TOTVS Protheus (x)\n- `sellerKey`: SAP Business One (x)\n- `salesAgentKey`: SAP Business One (x)\n- `erpKey`: SAP Business One (OOAT.AbsID), TOTVS Protheus (x)\n- `orderNum`: SAP Business One (OOAT.NumAtCard), TOTVS Protheus (x)\n- `docNum`: SAP Business One (OOAT.Number), TOTVS Protheus (x)\n- `docStatus`: O = open/draft, X = cancelled, A = approved\n\nData returned in response: Sale Contract data, Partner data, Items (+ taxes), Totals (Payments, Taxes, Sales Orders = roadmap)\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service will allow you to search the sale contracts list in two situations:\n- Full Search: will result in all sales contracts, according to filters.\n- 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 `updatedAt` 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\n\nFor 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."},"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"},{"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":{"raw":"{{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","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)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional in list search - SAPB1 only)"},{"key":"salesAgentKey","value":"Intergate","description":"Sales Agent Primary Key in ERP (optional in list search - SAPB1 only)"},{"key":"docStatus","value":"","description":"Quotation Status to filter sales quotations (optional in list search - depends on UDF in GP API setup)"},{"key":"erpKey","value":"149231","description":"Quotation Primary Key in ERP (optional - unitary search)"},{"key":"docNum","value":"122608","description":"Quotation Document Number in ERP (optional - unitary search)"},{"key":"orderNum","value":"1074052740415-01","description":"Partner Quotation Number in ERP (optional - unitary search)"},{"key":"pageNum","value":"3","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-11-03T18:00:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search sales quotations in ERP\n*(sapBusinessOne=23/OQUT, totvsProtheus=SCJ)*\n\nThis service will allow you to search sales quotations on the ERP.\n\nSearching sales quotations allows you to filter the ERP by:\n- List search: by `createdFrom` + `createdTo` {required}, by `branch`, `partnerKey`, `sellerKey` (SAPB1 only), `salesAgentKey` (SAPB1 only) or `docStatus` \n {optional}\n- Unitary search: by `erpKey` or `orderNum` or `docNum`\n\nIf no field for unitary query is provided in the request (`erpKey` or `orderNum` or `docNum`), the query for sales quotations is done by creation date from/to (which become mandatory).\n\nThe quotations service will consider sales quotations with:\n- SAP Business One: ORDR.ObjType = 23\n- TOTVS Protheus: \n\nComments:\n- `branch`: SAP Business One (OQUT.BPLId), TOTVS Protheus (CJ_FILIAL)\n- `partnerKey`: SAP Business One (OQUT.CardCode), TOTVS Protheus (CJ_CLIENTE+'_'+CJ_LOJA ou CJ_PROSPE+'_'+CJ_LOJPRO)\n- `sellerKey`: SAP Business One (OQUT.SlpCode)\n- `salesAgentKey`: SAP Business One (OQUT.AgentCode)\n- `erpKey`: SAP Business One (OQUT.DocEntry), TOTVS Protheus (CJ_NUM)\n- `orderNum`: SAP Business One (OQUT.NumAtCard), TOTVS Protheus (CJ_COTCLI)\n- `docNum`: SAP Business One (OQUT.DocNum), TOTVS Protheus (R_E_C_N_O_)\n- `docStatus`: O = open, X = cancelled, A = approved (only PROTHEUS), N = not budgeted (only PROTHEUS), P = paid (only SAPB1)\n\nData returned in response: Quotation data, Partner data, Items (+ taxes), Totals (Payments, Taxes, Sales Orders = roadmap)\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service will allow you to search the sales quotation list in two situations:\n- Full Search: will result in all sales quotations, according to filters.\n- 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 `updatedAt` 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\n\nFor 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."},"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":"#### Insert sales quotation in ERP\n*(sapBusinessOne=23/OQUT, totvsProtheus=SCJ)*\n\nThis service allows to insert a new sales quotation in the ERP, with treatment for new and existing partner.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA new sales quotation will be added if the sales quotation is not found on the ERP by branch + orderNum:\n- SAP B1: OQUT.BPLId + OQUT.NumAtCard\n- TOTVS Protheus: CJ_FILIAL + CJ_PEDECOM\n\nThe 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.\n- SAP Business One: CRD7.TaxId0 (company / government) or CRD7.TaxId4 (person / employee)\n- TOTVS Protheus: A1_CGC (customer / lead) or A2_CGC (supplier)\n\nThe products sent for the service will be identified in the ERP:\n- SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey\n- TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey\n\nComments:\n- 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.\n- Seller: sellerKey\n- Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus\n- 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\n- shipment: shipment data, as shipping address, carrier primary key in ERP, shipping method and carrier message\n- 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, ...)\n\nFor 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.\n\n#### Request object has the following properties\nField | Type | Description |\n:---:|:---:|:---:|\nbranch | string | Number branch\norderNum | string | Number Sales Order\nbrand | string | Brand\nsellerKey | string | Seller Primary Key in ERP \nsalesAgentKey| string | Sales Agent Primary Key in ERP\ncustomer | object | Customer\ncustomer.type | string | C=customer, S=supplier, L=lead \ncustomer.taxType | string |  P=person, C=company, G=government, E=employee\ncustomer.partnerId | string | Id partner\ncustomer.fullName | string | Customer full name\ncustomer.aliasName | string | Customer alias name\ncustomer.email | string |  Customer emai\ncustomer.phone | string | Customer phone Number \ncustomer.phoneSecondary | string | Customer secondary phone number\ncustomer.cellular | string | cell Customer phone number\ncustomer.taxNumber | string  | Customer identification number\ncustomer.stateTaxNumber | string | State customer identification number\ncustomer.cityTaxNumber| string | City customer identification number\ncustomer.billingAddress | object | Customer billing addresses\ncustomer.billingAddress.address1 | string |  Customer billing address1\ncustomer.billingAddress.address2 | string | Customer billing address2\ncustomer.billingAddress.city | string | Customer billing city\ncustomer.billingAddress.postalCode | string | Customer billing postal Code\ncustomer.billingAddress.stateCode | string | Customer billing state Code\ncustomer.billingAddress.community | string | Customer billing community\ncustomer.billingAddress.exteriorNumber | string | Customer billing exterior number\ncustomer.billingAddress.streetType | string | Customer billing type street\ncustomer.billingAddress.countryCode | string | Customer billing country code\nitems | array | Order Items Object\nproductKey | string | Product key\nproductName | string | Product Name\nquantity | number | Quantity\nunit | string | Unit\nunitPrice | number | Unit price\ntaxBasis | number | Tax Basis\nshipment | object | Shipment\nshipment.carrierKey | string | Carrier Primary Key in ERP\nshipment.shippingMethod | string | Shipping method\nshipment.carrierMessage| string | Carrier message\nshipment.shippingAddress | array | Shipping adress\nshippingAdress.address1 | string | Shipping first adress\nshippingAdress.address2 | string | Shipping second adress\nshippingAdress.city | string | Shipping city\nshippingAdress.postalCode | string | Shipping postal Code\nshippingAdress.stateCode | string | Shipping state Code\nshippingAdress.community| string | Shipping community\nshippingAdress.exteriorNumber | string| Shipping exterior number\nshippingAdress.streetType | string | Shipping type street\nshippingAdress.countryCode | string | Shipping country Code\ntotals | object | Totals\ntotals.orderTotal | object | Order totals\ntotals.orderTotal.netValue | number | Totals net value\ntotals.orderTotal.grossValue | number | Totals gross value\ntotals.orderTotal.baseValue |number | Totals base value \ntotals.orderTotal.taxValue | number | Totals taxes that increase the value \ntotals.merchandizeTotal | object | Merchandize Totals\ntotals.merchandizeTotal.netValue | number | Net value merchandize\ntotals.merchandizeTotal.grossValue | number | Gross value merchandize \ntotals.merchandizeTotal.baseValue |number | Base value merchandize\ntotals.merchandizeTotal.taxValue | number | Taxes that increase the value merchandizeTotal\ntotals.merchandizeTotal.priceAdjustValue | number | Discounts in total items\ntotals.merchandizeTotal.priceAdjustType | string | Price adjustment type \ntotals.merchandizeTotal.priceAdjustPromotionId | string | Price adjustment Id promotion\ntotals.merchandizeTotal.priceAdjustCouponId | string | Price adjustment Id coupon\ntotals.shippingTotal | object | Shipping totals\ntotals.shippingTotal.netValue | number | Shipping total Net value\ntotals.shippingTotal.grossValue | number | Shipping total Gross value \ntotals.shippingTotal.baseValue |number | Shipping totals base value\ntotals.shippingTotal.taxValue | number | Shipping total Tax value\ntotals.shippingTotal.priceAdjustValue | number | Discounts on total shipping\ntotals.shippingTotal.priceAdjustType | string | Price adjust type\ntotals.shippingTotal.priceAdjustPromotionId | string | Price adjust Id promotion\ntotals.shippingTotal.priceAdjustCouponId | string | Price adjust Id coupon\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | process\nsystem | string | System\ntarget | string | Target\nuser | string | user\nhost | string | host\neffectiveTimestamp | string | Effective Time stamp \ncode | string | Code\nsuccess | booleano | Success\nvalues | array | Values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erpkey"},"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":"#### Insert sales quotation in ERP\n*(sapBusinessOne=23/OQUT, totvsProtheus=SCJ)*\n\nThis service allows to insert a new sales quotation in the ERP, with treatment for new and existing partner.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA new sales quotation will be added if the sales quotation is not found on the ERP by branch + orderNum:\n- SAP B1: OQUT.BPLId + OQUT.NumAtCard\n- TOTVS Protheus: CJ_FILIAL + CJ_PEDECOM\n\nThe 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.\n- SAP Business One: CRD7.TaxId0 (company / government) or CRD7.TaxId4 (person / employee)\n- TOTVS Protheus: A1_CGC (customer / lead) or A2_CGC (supplier)\n\nThe products sent for the service will be identified in the ERP:\n- SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey\n- TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey\n\nComments:\n- 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.\n- Seller: sellerKey\n- Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus\n- 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\n- shipment: shipment data, as shipping address, carrier primary key in ERP, shipping method and carrier message\n- 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, ...)\n\nFor 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.\n\n#### Request object has the following properties\nField | Type | Description |\n:---:|:---:|:---:|\nbranch | string | Number branch\norderNum | string | Number Sales Order\nbrand | string | Brand\nsellerKey | string | Seller Primary Key in ERP \nsalesAgentKey| string | Sales Agent Primary Key in ERP\ncustomer | object | Customer\ncustomer.type | string | C=customer, S=supplier, L=lead \ncustomer.taxType | string |  P=person, C=company, G=government, E=employee\ncustomer.partnerId | string | Id partner\ncustomer.fullName | string | Customer full name\ncustomer.aliasName | string | Customer alias name\ncustomer.email | string |  Customer emai\ncustomer.phone | string | Customer phone Number \ncustomer.phoneSecondary | string | Customer secondary phone number\ncustomer.cellular | string | cell Customer phone number\ncustomer.taxNumber | string  | Customer identification number\ncustomer.stateTaxNumber | string | State customer identification number\ncustomer.cityTaxNumber| string | City customer identification number\ncustomer.billingAddress | object | Customer billing addresses\ncustomer.billingAddress.address1 | string |  Customer billing address1\ncustomer.billingAddress.address2 | string | Customer billing address2\ncustomer.billingAddress.city | string | Customer billing city\ncustomer.billingAddress.postalCode | string | Customer billing postal Code\ncustomer.billingAddress.stateCode | string | Customer billing state Code\ncustomer.billingAddress.community | string | Customer billing community\ncustomer.billingAddress.exteriorNumber | string | Customer billing exterior number\ncustomer.billingAddress.streetType | string | Customer billing type street\ncustomer.billingAddress.countryCode | string | Customer billing country code\nitems | array | Order Items Object\nproductKey | string | Product key\nproductName | string | Product Name\nquantity | number | Quantity\nunit | string | Unit\nunitPrice | number | Unit price\ntaxBasis | number | Tax Basis\nshipment | object | Shipment\nshipment.carrierKey | string | Carrier Primary Key in ERP\nshipment.shippingMethod | string | Shipping method\nshipment.carrierMessage| string | Carrier message\nshipment.shippingAddress | array | Shipping adress\nshippingAdress.address1 | string | Shipping first adress\nshippingAdress.address2 | string | Shipping second adress\nshippingAdress.city | string | Shipping city\nshippingAdress.postalCode | string | Shipping postal Code\nshippingAdress.stateCode | string | Shipping state Code\nshippingAdress.community| string | Shipping community\nshippingAdress.exteriorNumber | string| Shipping exterior number\nshippingAdress.streetType | string | Shipping type street\nshippingAdress.countryCode | string | Shipping country Code\ntotals | object | Totals\ntotals.orderTotal | object | Order totals\ntotals.orderTotal.netValue | number | Totals net value\ntotals.orderTotal.grossValue | number | Totals gross value\ntotals.orderTotal.baseValue |number | Totals base value \ntotals.orderTotal.taxValue | number | Totals taxes that increase the value \ntotals.merchandizeTotal | object | Merchandize Totals\ntotals.merchandizeTotal.netValue | number | Net value merchandize\ntotals.merchandizeTotal.grossValue | number | Gross value merchandize \ntotals.merchandizeTotal.baseValue |number | Base value merchandize\ntotals.merchandizeTotal.taxValue | number | Taxes that increase the value merchandizeTotal\ntotals.merchandizeTotal.priceAdjustValue | number | Discounts in total items\ntotals.merchandizeTotal.priceAdjustType | string | Price adjustment type \ntotals.merchandizeTotal.priceAdjustPromotionId | string | Price adjustment Id promotion\ntotals.merchandizeTotal.priceAdjustCouponId | string | Price adjustment Id coupon\ntotals.shippingTotal | object | Shipping totals\ntotals.shippingTotal.netValue | number | Shipping total Net value\ntotals.shippingTotal.grossValue | number | Shipping total Gross value \ntotals.shippingTotal.baseValue |number | Shipping totals base value\ntotals.shippingTotal.taxValue | number | Shipping total Tax value\ntotals.shippingTotal.priceAdjustValue | number | Discounts on total shipping\ntotals.shippingTotal.priceAdjustType | string | Price adjust type\ntotals.shippingTotal.priceAdjustPromotionId | string | Price adjust Id promotion\ntotals.shippingTotal.priceAdjustCouponId | string | Price adjust Id coupon\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | process\nsystem | string | System\ntarget | string | Target\nuser | string | user\nhost | string | host\neffectiveTimestamp | string | Effective Time stamp \ncode | string | Code\nsuccess | booleano | Success\nvalues | array | Values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erpkey"},"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":"#### Insert sales quotation in ERP\n*(sapBusinessOne=23/OQUT, totvsProtheus=SCJ)*\n\nThis service allows to insert a new sales quotation in the ERP, with treatment for new and existing partner.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA new sales quotation will be added if the sales quotation is not found on the ERP by branch + orderNum:\n- SAP B1: OQUT.BPLId + OQUT.NumAtCard\n- TOTVS Protheus: CJ_FILIAL + CJ_PEDECOM\n\nThe 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.\n- SAP Business One: CRD7.TaxId0 (company / government) or CRD7.TaxId4 (person / employee)\n- TOTVS Protheus: A1_CGC (customer / lead) or A2_CGC (supplier)\n\nThe products sent for the service will be identified in the ERP:\n- SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey\n- TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey\n\nComments:\n- 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.\n- Seller: sellerKey\n- Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus\n- 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\n- shipment: shipment data, as shipping address, carrier primary key in ERP, shipping method and carrier message\n- 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, ...)\n\nFor 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.\n\n#### Request object has the following properties\nField | Type | Description |\n:---:|:---:|:---:|\nbranch | string | Number branch\norderNum | string | Number Sales Order\nbrand | string | Brand\nsellerKey | string | Seller Primary Key in ERP \nsalesAgentKey| string | Sales Agent Primary Key in ERP\ncustomer | object | Customer\ncustomer.type | string | C=customer, S=supplier, L=lead \ncustomer.taxType | string |  P=person, C=company, G=government, E=employee\ncustomer.partnerId | string | Id partner\ncustomer.fullName | string | Customer full name\ncustomer.aliasName | string | Customer alias name\ncustomer.email | string |  Customer emai\ncustomer.phone | string | Customer phone Number \ncustomer.phoneSecondary | string | Customer secondary phone number\ncustomer.cellular | string | cell Customer phone number\ncustomer.taxNumber | string  | Customer identification number\ncustomer.stateTaxNumber | string | State customer identification number\ncustomer.cityTaxNumber| string | City customer identification number\ncustomer.billingAddress | object | Customer billing addresses\ncustomer.billingAddress.address1 | string |  Customer billing address1\ncustomer.billingAddress.address2 | string | Customer billing address2\ncustomer.billingAddress.city | string | Customer billing city\ncustomer.billingAddress.postalCode | string | Customer billing postal Code\ncustomer.billingAddress.stateCode | string | Customer billing state Code\ncustomer.billingAddress.community | string | Customer billing community\ncustomer.billingAddress.exteriorNumber | string | Customer billing exterior number\ncustomer.billingAddress.streetType | string | Customer billing type street\ncustomer.billingAddress.countryCode | string | Customer billing country code\nitems | array | Order Items Object\nproductKey | string | Product key\nproductName | string | Product Name\nquantity | number | Quantity\nunit | string | Unit\nunitPrice | number | Unit price\ntaxBasis | number | Tax Basis\nshipment | object | Shipment\nshipment.carrierKey | string | Carrier Primary Key in ERP\nshipment.shippingMethod | string | Shipping method\nshipment.carrierMessage| string | Carrier message\nshipment.shippingAddress | array | Shipping adress\nshippingAdress.address1 | string | Shipping first adress\nshippingAdress.address2 | string | Shipping second adress\nshippingAdress.city | string | Shipping city\nshippingAdress.postalCode | string | Shipping postal Code\nshippingAdress.stateCode | string | Shipping state Code\nshippingAdress.community| string | Shipping community\nshippingAdress.exteriorNumber | string| Shipping exterior number\nshippingAdress.streetType | string | Shipping type street\nshippingAdress.countryCode | string | Shipping country Code\ntotals | object | Totals\ntotals.orderTotal | object | Order totals\ntotals.orderTotal.netValue | number | Totals net value\ntotals.orderTotal.grossValue | number | Totals gross value\ntotals.orderTotal.baseValue |number | Totals base value \ntotals.orderTotal.taxValue | number | Totals taxes that increase the value \ntotals.merchandizeTotal | object | Merchandize Totals\ntotals.merchandizeTotal.netValue | number | Net value merchandize\ntotals.merchandizeTotal.grossValue | number | Gross value merchandize \ntotals.merchandizeTotal.baseValue |number | Base value merchandize\ntotals.merchandizeTotal.taxValue | number | Taxes that increase the value merchandizeTotal\ntotals.merchandizeTotal.priceAdjustValue | number | Discounts in total items\ntotals.merchandizeTotal.priceAdjustType | string | Price adjustment type \ntotals.merchandizeTotal.priceAdjustPromotionId | string | Price adjustment Id promotion\ntotals.merchandizeTotal.priceAdjustCouponId | string | Price adjustment Id coupon\ntotals.shippingTotal | object | Shipping totals\ntotals.shippingTotal.netValue | number | Shipping total Net value\ntotals.shippingTotal.grossValue | number | Shipping total Gross value \ntotals.shippingTotal.baseValue |number | Shipping totals base value\ntotals.shippingTotal.taxValue | number | Shipping total Tax value\ntotals.shippingTotal.priceAdjustValue | number | Discounts on total shipping\ntotals.shippingTotal.priceAdjustType | string | Price adjust type\ntotals.shippingTotal.priceAdjustPromotionId | string | Price adjust Id promotion\ntotals.shippingTotal.priceAdjustCouponId | string | Price adjust Id coupon\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | process\nsystem | string | System\ntarget | string | Target\nuser | string | user\nhost | string | host\neffectiveTimestamp | string | Effective Time stamp \ncode | string | Code\nsuccess | booleano | Success\nvalues | array | Values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erpkey"},"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"},{"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["orders"],"query":[{"key":"createdFrom","value":"2021-02-24","description":"Initial create date to filter sales orders (required if not unitary search)"},{"key":"createdTo","value":"2021-02-24","description":"Final create date to filter sales orders (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional in list search)"},{"key":"salesAgentKey","value":"Intergate","description":"Sales Agent Primary Key in ERP (optional in list search)"},{"key":"carrierKey","value":"T002","description":"Carrier Primary Key in ERP to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"docStatus","value":"O","description":"Default Order Status to filter sales order (optional in list search - NEW)"},{"key":"customStatus","value":"2","description":"Custom Order Status to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"customStatusNotify","value":"NEW","description":"Custom Order Status Notify to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"customShipMethod","value":"NEW","description":"Custom Shipping Method to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"customShipType","value":"NEW","description":"Custom Shipping Type  to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"erpKey","value":"149231","description":"Order Primary Key in ERP (optional - unitary search)"},{"key":"docNum","value":"122608","description":"Order Document Number in ERP (optional - unitary search)"},{"key":"orderNum","value":"1074052740415-01","description":"Partner Order Number in ERP (optional - unitary search)"},{"key":"customOrderKey","value":"NEW","description":"Custom Order Key to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2018-11-03T18:00:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search sales orders in ERP\n*(sapBusinessOne=17/ORDR, totvsProtheus=SC5)*\n\nThis service will allow you to search sales orders on the ERP.\n\nSearching sales orders allows you to filter the ERP by:\n- List search: by `createdFrom` + `createdTo` {required}, by `branch`, `partnerKey` {optional}\n- Unitary search: by `erpKey` or `orderNum` or `docNum` or `customOrderKey`\n\nIf no field for unitary query is provided in the request (`erpKey` or `orderNum` or `docNum` or `customOrderKey`), the query for sales orders is carried out by creation date from/to (which become mandatory) and any other filter informed in request.\n\nThe orders service will consider sales orders with:\n- SAP Business One: ORDR.ObjType = 17\n- TOTVS Protheus: C5_TIPO IN 'N', 'C', 'I', 'P'\n\nComments:\n- `branch`: SAP Business One (ORDR.BPLId), TOTVS Protheus (C5_FILIAL)\n- `partnerKey`: SAP Business One (ORDR.CardCode), TOTVS Protheus (C5_CLIENTE+'_'+C5_LOJACLI)\n- `sellerKey`: SAP Business One (ORDR.SlpCode), TOTVS Protheus (C5_VEND1)\n- `salesAgentKey`: SAP Business One (ORDR.AgentCode), TOTVS Protheus (A3_UNIDAD)\n- `erpKey`: SAP Business One (ORDR.DocEntry), TOTVS Protheus (C5_NUM)\n- `orderNum`: SAP Business One (ORDR.NumAtCard), TOTVS Protheus (C5_PEDECOM)\n- `docNum`: SAP Business One (ORDR.DocNum), TOTVS Protheus (R_E_C_N_O_)\n- `docStatus`: 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)\n- `customOrderKey`: sales order custom field definied in API Setup, and present in filter and response\n- `customStatus`: sales order custom field definied in API Setup, and present in filter and response\n- `customStatusNotify`: sales order custom field definied in API Setup, and present in filter and response\n- `customShipMethod`: sales order custom field definied in API Setup, and present in filter and response\n- `customShipType`: sales order custom field  definied in API Setup, and present in filter and response\n- `customTrackingKey`: sales order custom field definied in API Setup, and present in response\n- `customTrackingUrl`: sales order custom field definied in API Setup, and present in response\n- `carrierKey`, `brand`, `packDescription`: sales order details\n\nData returned in response: Order data, Partner data, Items (+ taxes), Totals, Payments, Taxes, Sales Invoices\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service will allow you to search the sales order list in two situations:\n- Full Search: will result in all sales orders, according to filters.\n- 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 `updatedAt` 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\n\nFor 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."},"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":"#### Insert sales order in ERP\n*(sapBusinessOne=17/ORDR, totvsProtheus=SC5)*\n\nThis 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.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA new sales order will be added if the sales order is not found on the ERP by branch + orderNum:\n- SAP B1: ORDR.BPLId + ORDR.NumAtCard\n- TOTVS Protheus: C5_FILIAL + C5_PEDECOM (note: field C5_PEDECOM is only 10 characters long and cannot be increased)\n\nThe 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.\n- SAP Business One: CRD7.TaxId0 (company / government) or CRD7.TaxId4 (person / employee)\n- TOTVS Protheus: A1_CGC (customer / lead) or A2_CGC (supplier)\n\nThe products sent for the service will be identified in the ERP:\n- SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey\n- TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey\n\nThe following processes can be carried out after the inclusion of the sales order in the ERP:\n- 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...\n- Custom Payments Table insert: if there is payments in JSON request, the payments are inserted in the Payments Custom Table (for further use)\n- Picklist insert (SAPB1 only): if the GlobalProperty SalesOrderInsPicklist=true in API Setup, or if insPickist=true in JSON request\n\nComments:\n- 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.\n- Seller: sellerKey\n- Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus\n- 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\n- shipment: shipment data, as shipping address, carrier primary key in ERP, shipping method and carrier message\n- 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, ...)\n- `customStatus`: sales order custom field definied in API Setup\n- `customStatusNotify`: sales order custom field definied in API Setup\n- `customShipMethod`: sales order custom field definied in API Setup\n- `customShipType`: sales order custom field  definied in API Setup\n\nPayments:\npaymentCondition: ERP payment condition key in ERP\n- paymentMethod: not working for SAP Business One and TOTVS Protheus\n- array payments: 5 payment methods are accepted (paymentMethod): transfer, boe, creditCard (mandatory fields: cardName and authid), cash, check\n- The ERP payment method code for TOTVS Protheus can be entered in the paymentMethodKey field\n- for payment with paymentMethod=creditCard you will need to inform details object (cardName, authid and nsu are required) - only SAP Business One\n- 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)\n\nFor 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.\n#### Request object has the following properties\nField | Type | Description |\n:---:|:---:|:---:|\nbranch | string | Number branch\norderNum | string | Number Sales Order\nbrand | string | Brand\nsellerKey | string | Seller Primary Key in ERP \nsalesAgentKey| string | Sales Agent Primary Key in ERP\ncarrierKey| string | Carrier Primary Key in ERP\nmainUsage| string | Usage Primary Key in ERP\nmainCostCenter| string | Cost Center Primary Key in ERP\nwhsCode| string | Warehouse Primary Key in ERP\ncomments| string | Comments in ERP\ncustomer | object | Customer\ncustomer.type | string | C=customer, S=supplier, L=lead \ncustomer.taxType | string |  P=person, C=company, G=government, E=employee\ncustomer.partnerId | string | Id partner\ncustomer.fullName | string | Customer full name\ncustomer.aliasName | string | Customer alias name\ncustomer.email | string |  Customer emai\ncustomer.phone | string | Customer phone Number \ncustomer.phoneSecondary | string | Customer secondary phone number\ncustomer.cellular | string | cell Customer phone number\ncustomer.taxNumber | string  | Customer identification number\ncustomer.stateTaxNumber | string | State customer identification number\ncustomer.cityTaxNumber| string | City customer identification number\ncustomer.billingAddress | object | Customer billing addresses\ncustomer.billingAddress.address1 | string |  Customer billing address1\ncustomer.billingAddress.address2 | string | Customer billing address2\ncustomer.billingAddress.city | string | Customer billing city\ncustomer.billingAddress.postalCode | string | Customer billing postal Code\ncustomer.billingAddress.stateCode | string | Customer billing state Code\ncustomer.billingAddress.community | string | Customer billing community\ncustomer.billingAddress.exteriorNumber | string | Customer billing exterior number\ncustomer.billingAddress.streetType | string | Customer billing type street\ncustomer.billingAddress.countryCode | string | Customer billing country code\nitems | array | Order Items Object\nproductKey | string | Product key\nproductName | string | Product Name\nquantity | number | Quantity\nunit | string | Unit\nunitPrice | number | Unit price\ntaxBasis | number | Tax Basis\nshipment | object | Shipment\nshipment.carrierKey | string | Carrier Primary Key in ERP\nshipment.shippingMethod | string | Shipping method\nshipment.carrierMessage| string | Carrier message\nshipment.shippingAddress | array | Shipping adress\nshippingAdress.address1 | string | Shipping first adress\nshippingAdress.address2 | string | Shipping second adress\nshippingAdress.city | string | Shipping city\nshippingAdress.postalCode | string | Shipping postal Code\nshippingAdress.stateCode | string | Shipping state Code\nshippingAdress.community| string | Shipping community\nshippingAdress.exteriorNumber | string| Shipping exterior number\nshippingAdress.streetType | string | Shipping type street\nshippingAdress.countryCode | string | Shipping country Code\ntotals | object | Totals\ntotals.orderTotal | object | Order totals\ntotals.orderTotal.netValue | number | Totals net value\ntotals.orderTotal.grossValue | number | Totals gross value\ntotals.orderTotal.baseValue |number | Totals base value \ntotals.orderTotal.taxValue | number | Totals taxes that increase the value \ntotals.merchandizeTotal | object | Merchandize Totals\ntotals.merchandizeTotal.netValue | number | Net value merchandize\ntotals.merchandizeTotal.grossValue | number | Gross value merchandize \ntotals.merchandizeTotal.baseValue |number | Base value merchandize\ntotals.merchandizeTotal.taxValue | number | Taxes that increase the value merchandizeTotal\ntotals.merchandizeTotal.priceAdjustValue | number | Discounts in total items\ntotals.merchandizeTotal.priceAdjustType | string | Price adjustment type \ntotals.merchandizeTotal.priceAdjustPromotionId | string | Price adjustment Id promotion\ntotals.merchandizeTotal.priceAdjustCouponId | string | Price adjustment Id coupon\ntotals.shippingTotal | object | Shipping totals\ntotals.shippingTotal.netValue | number | Shipping total Net value\ntotals.shippingTotal.grossValue | number | Shipping total Gross value \ntotals.shippingTotal.baseValue |number | Shipping totals base value\ntotals.shippingTotal.taxValue | number | Shipping total Tax value\ntotals.shippingTotal.priceAdjustValue | number | Discounts on total shipping\ntotals.shippingTotal.priceAdjustType | string | Price adjust type\ntotals.shippingTotal.priceAdjustPromotionId | string | Price adjust Id promotion\ntotals.shippingTotal.priceAdjustCouponId | string | Price adjust Id coupon\npayments | array | Payments\npayments.paymentMethod | string | Payment Method\npayments.installments | number| Installments\npayments.amount | number | Amount\npayments.details | object | Details\npayments.details.tid | string | Tid\npayments.details.cardName | string | Card name\npayments.details.acquirer | booleano | Acquirer\npayments.details.authid | string | Authid\npayments.details.nsu | string | nsu\npayments.gateway | object | gateway\npayments.gateway.gatewayName | string | Gateway name \npayments.gateway.gatewayOrderId | string | Gateway Id order \npayments.gateway.gatewayPayId | string | Gateway Id payment\npayments.paymentMethod | string | Payment Method\npayments.installments | number | Installments\npayments.amount | number | Amount\ninstallments | array| maturities for paymentCondition of type 9 (only TOTVS Protheus)\ninstallments.dueDate | string | maturity date\ninstallments.amount | number | maturity amount\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | process\nsystem | string | System\ntarget | string | Target\nuser | string | user\nhost | string | host\neffectiveTimestamp | string | Effective Time stamp \ncode | string | Code\nsuccess | booleano | Success\nvalues | array | Values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erpkey"},"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":{"raw":"{{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","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)"},{"key":"partnerKey","value":"NEW","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"NEW","description":"Seller Primary Key in ERP (optional in list search)"},{"key":"salesAgentKey","value":"NEW","description":"Sales Agent Primary Key in ERP (optional in list search)"},{"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)"},{"key":"docStatus","value":"NEW","description":"Default Order Status to filter sales order (optional in list search - NEW)"},{"key":"erpKey","value":"NEW","description":"Order Primary Key in ERP (optional - unitary search)"},{"key":"docNum","value":"NEW","description":"Order Document Number in ERP (optional - unitary search)"},{"key":"orderNum","value":"NEW","description":"Partner Order Number in ERP (optional - unitary search)"},{"key":"customStatus","value":"2","description":"Custom Order Status to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"customStatusNotify","value":"NEW","description":"Custom Order Status Notify to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"customShipMethod","value":"NEW","description":"Custom Shipping Method to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"customShipType","value":"NEW","description":"Custom Shipping Type  to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"customOrderKey","value":"NEW","description":"Custom Order Key to filter sales order (optional in list search - depends on UDF in API setup - NEW)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2021-06-07T10:00:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search sales order status changes in ERP \n*(sapBusinessOne=17/ORDR)*\n\nThis service will allow you to search sales orders status on the ERP.\n\nSearching sales orders status allows you to filter the ERP by:\n- List search: by `createdFrom` + `createdTo` {required}, by `branch`, `partnerKey`, `sellerKey`, `salesAgentKey`, `carrierKey`, `docStatus` or any of four custom fields definied in this service {optional}\n- Unitary search: by `erpKey` or `orderNum` or `docNum` or `customOrderKey`\n\nIf no field for unitary query is provided in the request (`erpKey` or `orderNum` or `docNum` or `customOrderKey`), the query for sales orders is carried out by creation date from/to (which become mandatory) and any other filter applied.\n\nThe orders service will consider sales orders with:\n- SAP Business One: ORDR.ObjType = 17\n- TOTVS Protheus: C5_TIPO IN 'N', 'C', 'I', 'P'\n\nComments:\n- `branch`: SAP Business One (ORDR.BPLId), TOTVS Protheus (C5_FILIAL)\n- `partnerKey`: SAP Business One (ORDR.CardCode), TOTVS Protheus (C5_CLIENTE+'_'+C5_LOJACLI)\n- `sellerKey`: SAP Business One (ORDR.SlpCode), TOTVS Protheus (C5_VEND1)\n- `salesAgentKey`: SAP Business One (ORDR.AgentCode), TOTVS Protheus (A3_UNIDAD)\n- `erpKey`: SAP Business One (ORDR.DocEntry), TOTVS Protheus (C5_NUM)\n- `orderNum`: SAP Business One (ORDR.NumAtCard), TOTVS Protheus (C5_PEDECOM)\n- `docNum`: SAP Business One (ORDR.DocNum), TOTVS Protheus (R_E_C_N_O_)\n- `docStatus`: O=open, C=closed, X=canceled, B=billed, P=paid, R=returned\n- `customOrderKey`: sales order custom field definied in API Setup, and present in filter and response\n- `customStatus`: sales order custom field definied in API Setup, and present in filter and response\n- `customStatusNotify`: sales order custom field definied in API Setup, and present in filter and response\n- `customShipMethod`: sales order custom field definied in API Setup, and present in filter and response\n- `customShipType`: sales order custom field  definied in API Setup, and present in filter and response\n- `customTrackingKey`: sales order custom field definied in API Setup, and present in response\n- `customTrackingUrl`: sales order custom field definied in API Setup, and present in response\n\nThis service will allow you to search the sales order status list in two situations:\n- Full Search: will result in all orders from a specific branch that had a status change in the createdFrom/createdTo period. \n- 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 `updatedAt` 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\n\nThe response will inform:\n- The number of returned objects in `count` field\n\nFor list search the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum`> `pageTotal` = last page\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service does not have user field (UDF) treatment."},"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":"#### Search custom sales order status options in ERP \n*(sapBusinessOne=UFD1)*\n\nThis service will allow you to search custom sales orders status options on the ERP.\n\nThe response will inform:\n- The number of returned objects in `count` field\n\nThis service does not have user field (UDF) treatment."},"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":"#### Update sales order status in ERP\n*(sapBusinessOne=17/ORDR, totvsProtheus=SC5)*\n\nThis service allows to update a sales order status in ERP.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nSales order status will be updated if the sales order is found on the ERP by the key informed: erpKey or docNum or orderNum.\n\nIn this service you can:\n- close a sales order (`docStatus`=\"C\")\n- change any of five custom fields in sales order definied in API Setup (including sales order closed or canceled): `custosOrderKey`, `custosStatus`, `customStatusNotify`, `customShipMethod`, `customShipType`, `customTrackingKey`, `customTrackingUrl`\n\nComments:\n- `erpKey`: SAP Business One (ORDR.DocEntry), TOTVS Protheus (C5_NUM)\n- `orderNum`: SAP Business One (ORDR.NumAtCard), TOTVS Protheus (C5_PEDECOM)\n- `docNum`: SAP Business One (ORDR.DocNum), TOTVS Protheus (R_E_C_N_O_)\n- `docStatus`: C=closed\n- `customOrderKey`: custom field in order definied in API Setup, and present in body\n- `customStatus`: custom field in order definied in API Setup, and present in body\n- `customStatusNotify`: custom field in order definied in API Setup, and present body\n- `customShipMethod`: custom field in order definied in API Setup, and present in body\n- `customShipType`: custom field in order definied in API Setup, and present in body\n- `customTrackingKey`: custom field in order definied in API Setup, and present in body\n- `customTrackingUrl`: custom field in order definied in API Setup, and present in body\n\nThis service does not have user field (UDF) treatment.\n\n#### Request object has the following properties\nField | Type | Description |\n:---:|:---:|:---:|\nerpKey * | string | Sales Order Primary Key in ERP\ndocNum * | string | Sales Order Number in ERP\norderNum * | string | Sales Order Partner Number in ERP\ncarrierKey | string | Carrier Primary Key in ERP \ndocStatus| string | Sales Order Status in ERP (accepts only C to close sales order)\ncustomOrderKey| string | Custom Sales Order Key in external system in ERP (UDF definied in Setup API)\ncustomStatus| string | Custom Sales Order Status in ERP (UDF definied in Setup API)\ncustomStatusNotify| string | Sales Order Custom Status Notify in ERP (UDF definied in Setup API)\ncustomShipMethod| string | Custom Shipping Method in ERP (UDF definied in Setup API)\ncustomShipType| string | Custom Shipping Type in ERP (UDF definied in Setup API)\ncustomTrackingKey| string | Custom Tracking Key in ERP (UDF definied in Setup API)\ncustomTrackingUrl| string | Custom Tracking URL in ERP (UDF definied in Setup API)\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | process\nsystem | string | System\ntarget | string | Target\nuser | string | user\nhost | string | host\neffectiveTimestamp | string | Effective Time stamp \ncode | string | Code\nsuccess | booleano | Success\nvalues | array | Values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erpkey"},"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"},{"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["picklists"],"query":[{"key":"createdFrom","value":"2020-01-01","description":"Initial create date to filter change picklists  (required if not unit query)"},{"key":"createdTo","value":"2020-03-31","description":"Final create date to filter picklists (required if not unit query)"},{"key":"branch","value":"1","description":"Branch (optional in list search)"},{"key":"docStatus","value":"R","description":"Status to filter picklists: R=released, Y=picked, P=partially picked, D=partially delivered (optional)"},{"key":"erpKey","value":"121313","description":"Picklist Primary Key in ERP (optional)"},{"key":"baseNum","value":"244","description":"Picklist Document Number in ERP (optional)"},{"key":"orderNum","value":"2001026731","description":"Partner Picklist Number in ERP (optional)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-13T10:00:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search picklist in ERP\n*(sapBusinessOne=156/OPKL)*\n\nThe picklist search allows you to filter the ERP by:\n- List Search: by branch and createdFrom + createdTo, by objectErp {optional} (17* = sales order, 1250000001 = transfer request), by docStatus {optional}\n- Unitary Search: by erpKey or orderNum or docNum\n\nIf 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).\n\nThe picklists service will consider valid picklists with:\n- 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\n- TOTVS Protheus: not available\n\nComments:\n- branch: SAP Business One (ORDR.BPLId), TOTVS Protheus (not available)\n- objectErp = SAP Business One (PKL1.BaseObject equal to 17 = ORDR or 1250000001 = OWTQ), TOTVS Protheus (??? equal to 17 = SC5 or 1250000001 = ???)\n- partnerKey: SAP Business One (ORDR.CardCode), TOTVS Protheus (C5_CLIENTE + C5_LOJACLI)\n- erpKey: SAP Business One (OPKL.AbsEntry), TOTVS Protheus (CB7 _ ???)\n- orderNum: SAP Business One (ORDR.NumAtCard), TOTVS Protheus (C5_PEDECOM)\n- baseKey: SAP Business One (ORDR.DocEntry), TOTVS Protheus (R_E_C_N_O_)\n- baseNum: SAP Business One (ORDR.DocNum), TOTVS Protheus (R_E_C_N_O_)\n- docStatus / lineStatus: C = closed, R = released, Y = picked, P = partially picked, D = partially delivered, X = canceled\n\nData presented by picklist: Picklist and sales order data, Partner, Items\n\nThe service will search the ERP database and return the picklists located. The response will inform:\n- The total number of picklists in the “count” field\n\nFor picklist list the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- “pageSize” = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- “pageNum” = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- “pageTotal” = total pages, reported in the response\n- “hasNext” = if there are more pages (true / false), informed in the response\n\nThis service will allow you to search the picklists list in two situations:\n- Full Search: will result in all picklists, according to filters.\n- 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\n\nFor 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:\n- The picklists service does not support batch handling\n- The picklists service does not support Serial Numbers handling (SerialNumber)"},"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":"#### Insert sales order in ERP\n*(sapBusinessOne=17/ORDR, totvsProtheus=SC5)*\n\nThis 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.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA new sales order will be added if the sales order is not found on the ERP by branch + orderNum:\n- SAP B1: ORDR.BPLId + ORDR.NumAtCard\n- TOTVS Protheus: C5_FILIAL + C5_PEDECOM (note: field C5_PEDECOM is only 10 characters long and cannot be increased)\n\nThe 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.\n- SAP Business One: CRD7.TaxId0 (company / government) or CRD7.TaxId4 (person / employee)\n- TOTVS Protheus: A1_CGC (customer / lead) or A2_CGC (supplier)\n\nThe products sent for the service will be identified in the ERP:\n- SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey\n- TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey\n\nThe following processes can be carried out after the inclusion of the sales order in the ERP:\n- 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.\n- 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\n\nComments:\n- 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.\n- Seller: sellerKey\n- Discounts: in total items (priceAdjustValue), in total freight (shipAdjustValue). shipAdjustType = minus or plus\n- 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\n- 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, ...)\n- payments: 5 payment methods are accepted (paymentMethod): transfer, boe, creditCard (mandatory fields: cardName and authid), cash, check\n- The ERP payment method code can be entered in the paymentMethodKey field\n\nFor 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.\n#### Request object has the following properties\n| Field | Type | Description |\n|:---:|:---:|:---:|\n|baseKey | string | Access key\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | Package\nprocess | string | Process\nsystem | string | system\ntarget | string | target\nuser | string | user\nhost | string | host\neffectiveTimestamp | string | Effective Time stamp\ncode | string | code\nsuccess | booleano | success\nvalues | array | Values\nvalues.object | string | object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erp key"},"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":"#### Update picklist in ERP\n*(sapBusinessOne=156/OPKL)*\n \nThis service will allow to update picklist for sales order existing in the ERP.\n\nThe 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.\n- SAP Business One: OPKL / PKL1.AbsEntry\n- TOTVS Protheus: ???\n\nThe picklists service will consider picklists with:\n- SAP Business One: [1] OPKL.Canceled = N and OPKL.Status! = C + PKL1.PickStatus! = C and PKL1.ObjType = 17\n- TOTVS Protheus: not available\n\nPicklists can have the following statuses in ERP:\n- docStatus / lineStatus: C = closed, R = released, Y = picked, P = partially picked, D = partially delivered\n\nThe following processes are performed after updating the picklist to picked (Y) in the ERP:\n- Insert of Sales Invoice\n- Insert of accounts receivables (if recorded in Payments Table)\n\nLimitations:\n- The picklists service does not support batch handling\n- The picklists service does not support Serial Numbers handling (SerialNumber)\n\n#### Request object has the following properties\nField | Type | Description \n:--- | :--- | :--- \nerpKey | string| Erp key\ndocNum | string | Doc Numbers\nitems | array | items\nitems.lineNum | string | Line Numbers\nitems.productKey | string | Product key\nitems.codeBars | string | Code codeBars\nitems.quantity | number | quantity\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | Package\nprocess | string | process\nsystem | string | System\ntarget | string | Target\nuser | string | User\nhost | string | Host\neffectiveTimestamp | string | Effective Time stamp\nerpKey | string | Erp baseKey\ndocNum | string | Doc number\ncode | string | Code\nsuccess | booleano | Success\nerror | object | Error\nerror.code | string | Code\nerror.message | string | message\nerror.detais | string | Details"},"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"},{"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["invoices"],"query":[{"key":"createdFrom","value":"2020-11-10","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2020-11-10","description":"Final create date to filter invoices (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional in list search)"},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional in list search - depends on UDF in GP API setup)"},{"key":"erpKey","value":"157025","description":"Sales Invoice Primary Key in ERP (optional - unitary search)"},{"key":"docNum","value":"142595","description":"Sales Invoice Document Number in ERP (optional - unitary search)"},{"key":"orderNum","value":"1074403543750-01","description":"Partner Order Number in ERP (optional - unitary search)"},{"key":"pageNum","value":"100","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-10-30T14:00:00","description":"Date do filter modified registers - incremental search (optional)"},{"key":"shippingMethod","value":"LOGGI","description":"#Not implemented#","disabled":true}]},"description":"#### Search sales invoices in ERP\n*(sapBusinessOne=13/OINV, totvsProtheus=SF2)*\n\nThis service will allow to search sales invoices in the ERP.\n\nThe search of sales invoices allows filtering the ERP by:\n- List Search: by `createdFrom` + `createdTo` {required}, by `branch`, `partnerKey`, `sellerKey`, `nfeAuthCode` {optional}\n- Unitary Search: `erpKey` or `orderNum` or `docNum`\n\nIf no field for unitary search (`erpKey` or `orderNum` or `docNum`) is informed in the request, the search for sales invoices is carried out by date of creation from/to (which become mandatory).\n\nThe invoices service will consider sales invoices with:\n- SAP Business One: OINV.ObjType = 13\n- TOTVS Protheus: F2_TIPO IN 'N', 'C', 'I', 'P'\n\nComments:\n- `branch`: SAP Business One (OINV.BPLId), TOTVS Protheus (F2_FILIAL)\n- `partnerKey`: SAP Business One (OINV.CardCode), TOTVS Protheus (F2_CLIENTE+'_'+F2_LOJA)\n- `sellerKey`: SAP Business One (OINV.SlpCode), TOTVS Protheus (F2_VEND1)\n- `nfeAuthCode`: SAP Business One (OINV.[GP UdfInvoiceNfeAuth]), TOTVS Protheus (F3_CODRSEF)\n- `erpKey`: SAP Business One (OINV.DocEntry), TOTVS Protheus (F2_SERIE+'_'+F2_NUM)\n- `orderNum`: SAP Business One (OINV.NumAtCard), TOTVS Protheus (C5_PEDECOM)\n- `docNum`: SAP Business One (OINV.DocNum), TOTVS Protheus (R_E_C_N_O_)\n- `docStatus`: O = open, C = closed, X = canceled, P = paid, R = returned, XC = cancelation invoice (SAP Business One: cancelation of invoice changes `docStatus` to X and generate a new invoice with `docStatus`=XC and same `nfeNum`)\n- `baseObject` and `baseKey`: object and erpKey which invoice is based\n\nData returned in response: invoice data, partner data, items (+ taxes), totals, payments, taxes\n\nThe response will inform:\n- The number of returned objects in `count` field\n\nFor list search the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum`> `pageTotal` = last page\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service will allow you to search the sales invoices list in two situations:\n- Full Search: will result in all sales invoices, according to filters.\n- 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 `updatedAt` 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\n\nFor 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."},"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":"#### Insert sales invoice in ERP\n*(sapBusinessOne=13/OINV, totvsProtheus=SF2)*\n\nThis service will allow to insert a new sales invoice in the ERP.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA 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:\n- SAP Business One: ORDR.DocEntry = baseKey or ORDR.DocNum = baseNum or ORDR.NumAtCard = orderNum\n- 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)\n\nProducts 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:\n- SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey\n- TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey\n\nIn addition to the sales invoice, the service may or may not include incoming payments. Incoming Paymnets can have 2 sources:\n- If the process goes through physical separation of products (picklist): from records in an Payments Table\n- If the process does not go through physical separation of products (picklist): from the data received in the request in the payments block.\n\nFor 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.\n#### Request object has the following properties\n| Field | Type | Description |\n|:---:|:---:|:---:|\n|branch | number | Branch \nbaseObject | string | Base Object (default = 17)\nbaseKey | string | Base Key\ntotalWeight | number | Total Weight\ntotalVolume | number | Total Volume\ntotalCubage | number | Total cubage\nitems | array | invoice Items Object\nitems.baseLineNum | string | Base line number\nitems.productKey | string | Product key\nitems.codeBars | string | Code bars\nitems.quantity | number | quantity\npayments | array |  Method\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.details | object | details\npayments.details.cardName | string | Card name\npayments.details.acquirer | string | Acquire\npayments.details.tid | string | tid\npayments.details.authid | string | Authid\npayments.details.nsu | string | nsu\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | Process\nsystem | string | System\ntarget | string | Target\nuser | string | User\nhost | string | Host\neffectiveTimestamp | string | Effective Time stamp\ncode | string | Code\nsuccess | booleano | success\nvalues | array | values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erp key"},"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":{"raw":"{{endpoint}}/invoices/xml?erpKey=426829&docNum=78369&orderNum=353687&nfeNum=34828&nfeKeyAccess=35210323244006000100550010000428031123256800","host":["{{endpoint}}"],"path":["invoices","xml"],"query":[{"key":"erpKey","value":"426829","type":"text"},{"key":"docNum","value":"78369","type":"text"},{"key":"orderNum","value":"353687","type":"text"},{"key":"nfeNum","value":"34828","type":"text"},{"key":"nfeKeyAccess","value":"35210323244006000100550010000428031123256800","type":"text"}]}},"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["invoices","xml"],"query":[{"key":"createdFrom","value":"2001-01-01","type":"text"},{"key":"createdTo","value":"2023-07-25","type":"text"},{"key":"branch","value":"0102","type":"text"},{"key":"partnerKey","value":"001010_01","type":"text"},{"key":"nfeAuthCode","value":"100","type":"text"},{"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"}]}},"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["invoices","xml"],"query":[{"key":"createdFrom","value":"2001-01-01","type":"text"},{"key":"createdTo","value":"2023-07-25","type":"text"},{"key":"branch","value":"0102","type":"text"},{"key":"partnerKey","value":"001010_01","type":"text"},{"key":"nfeAuthCode","value":"100","type":"text"},{"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"}]}},"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":{"raw":"{{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","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)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional in list search)"},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional in list search - depends on UDF in GP API setup)"},{"key":"erpKey","value":"120","description":"Sales Delivery Primary Key in ERP (optional - unitary search)"},{"key":"docNum","value":"49084","description":"Sales Delivery Document Number in ERP (optional - unitary search)"},{"key":"orderNum","value":"1049210322364-01","description":"Partner Order Number in ERP (optional - unitary search)"},{"key":"pageNum","value":"100","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-09-21T00:00:00","description":"Date do filter modified registers - incremental search (optional)"},{"key":"shippingMethod","value":"LOGGI","description":"#Not implemented#"}]},"description":"#### Search sales deliveries in ERP\n*(sapBusinessOne=15/ODLN)*\n\nThis service will allow to search sales deliveries in the ERP.\n\nThe search of sales deliveries allows filtering the ERP by:\n- List Search: by `createdFrom` + `createdTo` {required}, by `branch`, `partnerKey`, `sellerKey`, `nfeAuthCode` {optional}\n- Unitary Search: `erpKey` or `orderNum` or `docNum`\n\nIf no field for unitary search (`erpKey` or `orderNum` or `docNum`) is informed in the request, the search for sales deliveries is carried out by date of creation from/to (which become mandatory).\n\nThe deliveries service will consider sales deliveries with:\n- SAP Business One: ODLN.ObjType = 15\n\nComments:\n- `branch`: SAP Business One (ODLN.BPLId), TOTVS Protheus (F2_FILIAL)\n- `partnerKey`: SAP Business One (ODLN.CardCode), TOTVS Protheus (F2_CLIENTE+'_'+F2_LOJA)\n- `sellerKey`: SAP Business One (ODLN.SlpCode), TOTVS Protheus (F2_VEND1)\n- `nfeAuthCode`: SAP Business One (ODLN.[GP UdfInvoiceNfeAuth]), TOTVS Protheus (F3_CODRSEF)\n- `erpKey`: SAP Business One (ODLN.DocEntry), TOTVS Protheus (F2_NUM)\n- `orderNum`: SAP Business One (ODLN.NumAtCard), TOTVS Protheus (C5_PEDECOM)\n- `docNum`: SAP Business One (ODLN.DocNum), TOTVS Protheus (R_E_C_N_O_)\n- `docStatus`: O = open, C = closed, X = canceled, P = paid, R = returned, XC = cancelation delivery (SAP Business One: cancelation of delivery changes `docStatus` to X and generate a new delivery with `docStatus`=XC and same `nfeNum`)\n- `baseObject` and `baseKey`: object and erpKey which delivery is based\n\nData returned in response: delivery data, partner data, items (+ taxes), totals, taxes\n\nThe response will inform:\n- The number of returned objects in `count` field\n\nFor list search the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If `pageNum` not informed = 1, If `pageNum` <=0 = 1, If `pageNum`> `pageTotal` = last page\n- `pageTotal` = total pages, informed in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service will allow you to search the sales deliveries list in two situations:\n- Full Search: will result in all sales deliveries, according to filters.\n- 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 `updatedAt` 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)\n\nFor 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."},"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":"#### Insert sales delivery in ERP\n*(sapBusinessOne=15/ODLN, totvsProtheus=x)*\n\nThis service will allow to insert a new sales delivery in the ERP.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA 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:\n- SAP Business One: ORDR.DocEntry = baseKey or ORDR.DocNum = baseNum or ORDR.NumAtCard = orderNum\n- 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)\n\nProducts 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:\n- SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey\n- TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey\n\nFor 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.\n#### Request object has the following properties\n| Field | Type | Description |\n|:---:|:---:|:---:|\n|branch | number | Branch \nbaseObject | string | Base Object (default = 17)\nbaseKey | string | Base Key\ntotalWeight | number | Total Weight\ntotalVolume | number | Total Volume\ntotalCubage | number | Total cubage\nitems | array | invoice Items Object\nitems.baseLineNum | string | Base line number\nitems.productKey | string | Product key\nitems.codeBars | string | Code bars\nitems.quantity | number | quantity\npayments | array |  Method\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.details | object | details\npayments.details.cardName | string | Card name\npayments.details.acquirer | string | Acquire\npayments.details.tid | string | tid\npayments.details.authid | string | Authid\npayments.details.nsu | string | nsu\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | Process\nsystem | string | System\ntarget | string | Target\nuser | string | User\nhost | string | Host\neffectiveTimestamp | string | Effective Time stamp\ncode | string | Code\nsuccess | booleano | success\nvalues | array | values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erp key"},"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":"#### Insert sales delivery in ERP\n*(sapBusinessOne=15/ODLN, totvsProtheus=x)*\n\nThis service will allow to insert a new sales delivery in the ERP.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA 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:\n- SAP Business One: ORDR.DocEntry = baseKey or ORDR.DocNum = baseNum or ORDR.NumAtCard = orderNum\n- 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)\n\nProducts 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:\n- SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey\n- TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey\n\nFor 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.\n#### Request object has the following properties\n| Field | Type | Description |\n|:---:|:---:|:---:|\n|branch | number | Branch \nbaseObject | string | Base Object (default = 17)\nbaseKey | string | Base Key\ntotalWeight | number | Total Weight\ntotalVolume | number | Total Volume\ntotalCubage | number | Total cubage\nitems | array | invoice Items Object\nitems.baseLineNum | string | Base line number\nitems.productKey | string | Product key\nitems.codeBars | string | Code bars\nitems.quantity | number | quantity\npayments | array |  Method\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.details | object | details\npayments.details.cardName | string | Card name\npayments.details.acquirer | string | Acquire\npayments.details.tid | string | tid\npayments.details.authid | string | Authid\npayments.details.nsu | string | nsu\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | Process\nsystem | string | System\ntarget | string | Target\nuser | string | User\nhost | string | Host\neffectiveTimestamp | string | Effective Time stamp\ncode | string | Code\nsuccess | booleano | success\nvalues | array | values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erp key"},"response":[],"_postman_id":"6468fa69-0c10-4b36-ae06-810db73ba94c"}],"id":"57b6370d-eb56-4acc-96e2-8b36528cb505","_postman_id":"57b6370d-eb56-4acc-96e2-8b36528cb505"},{"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["receivables"],"query":[{"key":"createdFrom","value":"2020-01-24","description":"Initial create date to filter receivables (required if not unitary search)"},{"key":"createdTo","value":"2020-01-24","description":"Final create date to filter receivables(required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)"},{"key":"dueFrom","value":"2020-01-24","description":"Initial due date to filter receivables (optional in list search)"},{"key":"dueTo","value":"2020-01-24","description":"Final due date to filter receivables (optional in list search)"},{"key":"partnerKey","value":"C000004","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"120","description":"Seller Primary Key in ERP (optional in list search)"},{"key":"erpKey","value":"120","description":"Receivable Primary Key in ERP (optional for unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search account receivables in ERP\n*(sapBusinessOne=30/OJDT, totvsProtheus=SE1)*\n\nSearch of receivables is carried out by branch.\n\nThe search of receivables allows you to filter the ERP by:\n- List Search: by `createdFrom` + `createdTo` {required}, by `dueFrom` + `dueTo`, `branch`, `partnerKey`, `sellerKey` {optional}\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search for receivables is performed as a list.\n\nThe receivables service will consider receivables:\n- SAP Business One: [1] Linked to partners who have a balance, [2] Reconciled (OITR / ITR1)\n- TOTVS Protheus: [1] With balance: E1_SALDO> 0\n\nComments:\n- `branch`: SAP Business One (JDT1.BPLId), TOTVS Protheus (E1_FILIAL)\n- `createdFrom` and `createdTo`: SAP Business One (JDT1.RefDate), TOTVS Protheus (E1_EMISSAO)\n- `dueFrom` and `dueTo`: SAP Business One (JDT1.DueDate, TOTVS Protheus (E1_VENCREA)\n- `erpKey`: SAP Business One (JDT1.TransIf), TOTVS Protheus (E1_PREFIXO+'_'+E1_NUM)\n\nThis service will allow you to search the receivables list in two situations:\n- Full Search: will result in all orders from a specific branch that had a status change in the createdFrom / createdTo period. \n- 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 `updatedAt` 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: E1_USERLGI and E1_USERLGA\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true / false), informed in the response"},"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["receivables","cancellation"],"query":[{"key":"createdFrom","value":"2020-01-24","description":"Initial create date to filter receivables (required if not unitary search)"},{"key":"createdTo","value":"2020-01-24","description":"Final create date to filter receivables(required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)"},{"key":"dueFrom","value":"2020-01-24","description":"Initial due date to filter receivables (optional in list search)"},{"key":"dueTo","value":"2020-01-24","description":"Final due date to filter receivables (optional in list search)"},{"key":"partnerKey","value":"C000004","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"120","description":"Seller Primary Key in ERP (optional in list search)"},{"key":"erpKey","value":"120","description":"Receivable Primary Key in ERP (optional for unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search account receivables in ERP\n*(sapBusinessOne=30/OJDT, totvsProtheus=SE1)*\n\nSearch of receivables is carried out by branch.\n\nThe search of receivables allows you to filter the ERP by:\n- List Search: by `createdFrom` + `createdTo` {required}, by `dueFrom` + `dueTo`, `branch`, `partnerKey`, `sellerKey` {optional}\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the search for receivables is performed as a list.\n\nThe receivables service will consider receivables:\n- SAP Business One: [1] Linked to partners who have a balance, [2] Reconciled (OITR / ITR1)\n- TOTVS Protheus: [1] With balance: E1_SALDO> 0\n\nComments:\n- `branch`: SAP Business One (JDT1.BPLId), TOTVS Protheus (E1_FILIAL)\n- `createdFrom` and `createdTo`: SAP Business One (JDT1.RefDate), TOTVS Protheus (E1_EMISSAO)\n- `dueFrom` and `dueTo`: SAP Business One (JDT1.DueDate, TOTVS Protheus (E1_VENCREA)\n- `erpKey`: SAP Business One (JDT1.TransIf), TOTVS Protheus (E1_PREFIXO+'_'+E1_NUM)\n\nThis service will allow you to search the receivables list in two situations:\n- Full Search: will result in all orders from a specific branch that had a status change in the createdFrom / createdTo period. \n- 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 `updatedAt` 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: E1_USERLGI and E1_USERLGA\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true / false), informed in the response"},"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":"#### Insert sales dowm payment in ERP\n*(sapBusinessOne=203/ODPI)*\n\nThis service will allow to insert a new sales dowm payment in the ERP.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA 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:\n- SAP Business One: ORDR.DocEntry = `baseKey` or ORDR.DocNum = `baseNum` or ORDR.NumAtCard = `orderNum`\n\nProducts 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:\n- SAP B1: OITM.CodeBars = `codeBars` or OITM.ItemCode = `productKey`\n\nIn 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 `payments` block.\n\nFor 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.\n\n#### Request object has the following properties\n| Field | Type | Description |\n|:---:|:---:|:---:|\n|branch | number | Branch \nbaseObject | string | Base Object (default = 17)\nbaseKey | string | Base Key\nitems | array | invoice Items Object\nitems.baseLineNum | string | Base line number\nitems.productKey | string | Product key\nitems.codeBars | string | Code bars\nitems.quantity | number | quantity\npayments | array |  Method\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.details | object | details\npayments.details.cardName | string | Card name\npayments.details.acquirer | string | Acquire\npayments.details.tid | string | tid\npayments.details.authid | string | Authid\npayments.details.nsu | string | nsu\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | Process\nsystem | string | System\ntarget | string | Target\nuser | string | User\nhost | string | Host\neffectiveTimestamp | string | Effective Time stamp\ncode | string | Code\nsuccess | booleano | success\nvalues | array | values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erp key"},"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"}}}},"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"}}}},"response":[],"_postman_id":"60029390-8af8-4cce-acb1-c6761500bedc"}],"id":"21911b11-0be1-44ec-8fb6-ccfe7104e209","_postman_id":"21911b11-0be1-44ec-8fb6-ccfe7104e209"},{"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["incPayments"],"query":[{"key":"paidFrom","value":"2020-01-24","description":"Initial payment date to filter incoming payments (required if not unitary search)"},{"key":"paidTo","value":"2020-01-24","description":"Final payment date to filter incoming payments (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)"},{"key":"dueFrom","value":"2020-01-24","description":"Initial due date to filter incoming payments (optional in list search)"},{"key":"dueTo","value":"2020-01-24","description":"Final due date to filter incoming payments (optional in list search)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"120","description":"Seller Primary Key in ERP (optional in list search)"},{"key":"erpKey","value":"120","description":"Incoming Payment Primary Key in ERP (optional for unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search incoming payments in ERP\n\n_(sapBusinessOne=24/ORCT, totvsProtheus=SE5)_\n\nSearch of incoming payments is carried out by branch.\n\nThe search of incoming payments allows filtering the ERP by:\n\n- List Search: by `paidFrom` + `paidTo` {required}, by `dueFrom` + `dueTo`, `branch`, `partnerKey`, `sellerKey` {optional}\n    \n- Unitary Search: by `erpKey`\n    \n\nIf no field for unitary query (`erpKey`) is informed in the request, the query for incoming payments is performed as a list.\n\nThe incPayments service will consider valid receipts for receivables:\n\n- SAP Business One: \\[1\\] Not canceled (ORCT.Canceled = 'N'), \\[2\\] If boleto, only paid (OBOE.BoeStatus = 'P')\n    \n- TOTVS Protheus: \\[1\\] With positive value: FK1_VALUE> 0\n    \n\nComments:\n\n- `branch`: SAP Business One (ORCT.BPLId), TOTVS Protheus (FK1_FILIAL)\n    \n- `paidFrom` and `paidTo`: SAP Business One (ORCT.DocDate, ORCT.TrsfrDate, OBOE.PmntDate or BOT1. TranDate \\*), TOTVS Protheus (FK1_DATA)\n    \n- `dueFrom` and `dueTo`: SAP Business One (ORCR.DocDueDate, INV6.DueDate or OBOE.DueDate), TOTVS Protheus (FK1_VENCTO)\n    \n- `erpKey`: SAP Business One (ORCT.DocEntry), TOTVS Protheus (FK1_IDFK1)\n    \n- `baseObject`: 13 (invoice), 30 (journalEntry), 203 (creditNote)\n    \n- `baseKey`: SAP Business One (OINV.DocEntry, JDT1.AbsEntry, ORIN.DocEntry), TOTVS Protheus (E1_PREFIXO+'_'+E1_NUM)\n    \n- `lineNum`: parcel\n    \n- `paymentMethod`: cash, transfer, boe, check, creditCard\n    \n\nThis service will allow you to search the receipt list in two situations:\n\n- Full Search: will result in all orders from a specific branch that had a status change in the createdFrom / createdTo period.\n    \n- 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 `updatedAt` 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\n    \n\nThe response will inform:\n\n- The number of returned objects in the `count` field\n    \n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n    \n- `pageNum` = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n    \n- `pageTotal` = total pages, reported in the response\n    \n- `hasNext` = if there are more pages (true / false), informed in the response"},"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["incPayments"],"query":[{"key":"paidFrom","value":"2020-01-24","description":"Initial payment date to filter incoming payments (required if not unitary search)"},{"key":"paidTo","value":"2020-01-24","description":"Final payment date to filter incoming payments (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)"},{"key":"dueFrom","value":"2020-01-24","description":"Initial due date to filter incoming payments (optional in list search)"},{"key":"dueTo","value":"2020-01-24","description":"Final due date to filter incoming payments (optional in list search)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"120","description":"Seller Primary Key in ERP (optional in list search)"},{"key":"erpKey","value":"120","description":"Incoming Payment Primary Key in ERP (optional for unitary search)"},{"key":"pageNum","value":"1","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search incoming payments in ERP\n*(sapBusinessOne=24/ORCT, totvsProtheus=SE5)*\n\nSearch of incoming payments is carried out by branch.\n\nThe search of incoming payments allows filtering the ERP by:\n- List Search: by `paidFrom` + `paidTo` {required}, by `dueFrom` + `dueTo`, `branch`, `partnerKey`, `sellerKey` {optional}\n- Unitary Search: by `erpKey`\n\nIf no field for unitary query (`erpKey`) is informed in the request, the query for incoming payments is performed as a list.\n\nThe incPayments service will consider valid receipts for receivables:\n- SAP Business One: [1] Not canceled (ORCT.Canceled = 'N'), [2]  If boleto, only paid (OBOE.BoeStatus = 'P')\n- TOTVS Protheus: [1] With positive value: FK1_VALUE> 0\n\nComments:\n- `branch`: SAP Business One (ORCT.BPLId), TOTVS Protheus (FK1_FILIAL)\n- `paidFrom` and `paidTo`: SAP Business One (ORCT.DocDate, ORCT.TrsfrDate, OBOE.PmntDate or BOT1. TranDate *), TOTVS Protheus (FK1_DATA)\n- `dueFrom` and `dueTo`: SAP Business One (ORCR.DocDueDate, INV6.DueDate or OBOE.DueDate), TOTVS Protheus (FK1_VENCTO)\n- `erpKey`: SAP Business One (ORCT.DocEntry), TOTVS Protheus (FK1_IDFK1)\n- `baseObject`: 13 (invoice), 30 (journalEntry), 203 (creditNote)\n- `baseKey`: SAP Business One (OINV.DocEntry, JDT1.AbsEntry, ORIN.DocEntry), TOTVS Protheus (E1_PREFIXO+'_'+E1_NUM)\n- `lineNum`: parcel\n- `paymentMethod`: cash, transfer, boe, check, creditCard\n\nThis service will allow you to search the receipt list in two situations:\n- Full Search: will result in all orders from a specific branch that had a status change in the createdFrom / createdTo period.\n- 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 `updatedAt` 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\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true / false), informed in the response"},"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":"#### Insert incoming payments in ERP\n\nThis service will allow to insert a new incoming payments in the ERP.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA 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:\n\n- SAP Business One: OINV.DocEntry = baseKey or OINV.DocNum = baseNum (or OINV.NumAtCard = orderNum)\n    \n- TOTVS Protheus: F2_DOC = baseKey or R_E_C_N_O_ = baseNum or D2_PEDIDO = orderNum\n    \n\nFor 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.\n\n#### Request object has the following properties\n\n| Field | Type | Description |\n| --- | --- | --- |\n| baseObject | string | Base Object |\n| baseKey | string | Base Key |\n| paymentMethod | number | Payment method |\n| amount | number | Amount |\n| installments | number | Installments |\n| details | object | details |\n| details.cardName | string | Card name |\n| details.acquirer | string | Acquire |\n| details.tid | string | tid |\n| details.authid | string | Authid |\n| details.nsu | string | nsu |\n\n\\* = _Required field_\n\n#### Response object has the following properties\n\n| Field | Type | Description |\n| --- | --- | --- |\n| package | string | package |\n| process | string | process |\n| system | string | system |\n| target | string | target |\n| user | string | user |\n| host | string | host |\n| effectiveTimestamp | string | Effective Time stamp |\n| code | string | CodeBars |\n| success | booleano | success |\n| values | array | values |\n| values.object | string | Object |\n| values.table | string | table |\n| values.action | string | action |\n| values.erpKey | string | Erp key |"},"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"}}}},"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"},{"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":{"raw":"{{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","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)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"22"},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional)"},{"key":"erpKey","value":"120","description":"Credit Note Primary Key in ERP (optional - unitary search)"},{"key":"docNum","value":"49084","description":"Credit Note Document Number in ERP (optional - unitary search)"},{"key":"orderNum","value":"1049210322364-01","description":"Partner Credit Note Number in ERP (optional - unitary search)"},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search Credit Notes in ERP\n*(sapBusinessOne=14/ORIN, totvsProtheus=SF1)*\n\nThis service will allow to search Credit Notes in the ERP.\n\nThe search of Credit Notes allows filtering the ERP by:\n- List Search: by `createdFrom` + `createdTo` {required}; by `branch`, `partnerKey` {optional}\n- Unitary Search: `erpKey` or `orderNum` or `docNum`\n\nIf no field for unitary search (`erpKey` or `orderNum` or `docNum`) is informed in the request, the search for sales invoices is carried out by date of creation from/to (which become mandatory).\n\nThe Credit Notes service will consider Credit Notes with:\n- SAP Business One: ORIN.ObjType = 14\n- TOTVS Protheus: F1_TIPO IN 'D', 'B'\n\nComments:\n- `branch`: SAP Business One (ORIN.BPLId), TOTVS Protheus (F1_FILIAL)\n- `partnerKey`: SAP Business One (ORIN.CardCode), TOTVS Protheus (F1_FORNECE+'_'+F1_LOJA)\n- `erpKey`: SAP Business One (ORIN.DocEntry), TOTVS Protheus (F1_SERIE+'_'+F1_DOC)\n- `orderNum`: SAP Business One (ORIN.NumAtCard), TOTVS Protheus (D1_PEDIDO)\n- `docNum`: SAP Business One (ORIN.DocNum), TOTVS Protheus (R_E_C_N_O_)\n- `docStatus`: O = open, C = closed, X = canceled, B = billed, P = paid, R = returned\n\nData returned in response: Credit Notes data, partner data, items (+ taxes), totals, payments, taxes\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service will allow you to search the Credit Notes list in two situations:\n- Full Search: will result in all Credit Notes, according to filters.\n- 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 `updatedAt` 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\n\nFor 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."},"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":"#### Insert sales invoice in ERP\n*(sapBusinessOne=13/OINV, totvsProtheus=SF2)*\n\nThis service will allow to insert a new sales invoice in the ERP.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA 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:\n- SAP Business One: ORDR.DocEntry = baseKey or ORDR.DocNum = baseNum or ORDR.NumAtCard = orderNum\n- 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)\n\nProducts 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:\n- SAP B1: OITM.CodeBars = codeBars or OITM.ItemCode = productKey\n- TOTVS Protheus: B1_CODBAR = codeBars or B1_COD = productKey\n\nIn addition to the sales invoice, the service may or may not include incoming payments. Incoming Paymnets can have 2 sources:\n- If the process goes through physical separation of products (picklist): from records in an Payments Table\n- If the process does not go through physical separation of products (picklist): from the data received in the request in the payments block.\n\nFor 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.\n#### Request object has the following properties\n| Field | Type | Description |\n|:---:|:---:|:---:|\n|branch | number | Branch \nbaseObject | string | Base Object (default = 17)\nbaseKey | string | Base Key\ntotalWeight | number | Total Weight\ntotalVolume | number | Total Volume\ntotalCubage | number | Total cubage\nitems | array | invoice Items Object\nitems.baseLineNum | string | Base line number\nitems.productKey | string | Product key\nitems.codeBars | string | Code bars\nitems.quantity | number | quantity\npayments | array |  Method\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.details | object | details\npayments.details.cardName | string | Card name\npayments.details.acquirer | string | Acquire\npayments.details.tid | string | tid\npayments.details.authid | string | Authid\npayments.details.nsu | string | nsu\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | Process\nsystem | string | System\ntarget | string | Target\nuser | string | User\nhost | string | Host\neffectiveTimestamp | string | Effective Time stamp\ncode | string | Code\nsuccess | booleano | success\nvalues | array | values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erp key"},"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"},{"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":{"raw":"{{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","host":["{{endpoint}}"],"path":["downPayments"],"query":[{"key":"createdFrom","value":"2021-06-08","description":"Initial create date to filter invoices (required if not unitary search)"},{"key":"createdTo","value":"2021-06-08","description":"Final create date to filter invoices (required if not unitary search)"},{"key":"branch","value":"1","description":"Branch (optional in list search)"},{"key":"partnerKey","value":"C001","description":"Partner Primary Key in ERP (optional in list search)"},{"key":"sellerKey","value":"22","description":"Seller Primary Key in ERP (optional - list search)"},{"key":"nfeAuthCode","value":"100","description":"Authorization NFe code (optional)"},{"key":"erpKey","value":"120","description":"Down Payment Primary Key in ERP (optional - unitary search)"},{"key":"docNum","value":"49084","description":"Down Payment Document Number in ERP (optional - unitary search)"},{"key":"orderNum","value":"1049210322364-01","description":"Partner Down Payment Number in ERP (optional - unitary search)"},{"key":"pageNum","value":"2","description":"Number of page - pagination (optional)"},{"key":"updatedAt","value":"2020-01-24T15:34:00","description":"Date do filter modified registers - incremental search (optional)"}]},"description":"#### Search down payments in ERP\n*(sapBusinessOne=10000206/ODPI, totvsProtheus=SE1)*\n\nThis service will allow to search down payments in the ERP.\n\nThe search of down payments allows filtering the ERP by:\n- List Search: by `createdFrom` + `createdTo` {required}, by `branch`, `partnerKey` {optional}\n- Unitary Search: `erpKey` or `orderNum`  (SAPB1) or `docNum` (SAPB1)\n\nIf no field for unitary search (`erpKey` or `orderNum` or `docNum`) is informed in the request, the search for down payments is carried out by branch and date of creation from/to (which become mandatory).\n\nThe down payments service will consider down payments with:\n- SAP Business One: ODPI.ObjType = 203\n- TOTVS Protheus: E1_TIPO=RA\n\nComments:\n- `branch`: SAP Business One (ODPI.BPLId), TOTVS Protheus (E1_FILIAL)\n- `partnerKey`: SAP Business One (ODPI.CardCode), TOTVS Protheus (E1_CLIENTE+\"_\"+E1_LOJA)\n- `erpKey`: SAP Business One (ODPI.DocEntry), TOTVS Protheus (E1_PREFIXO+\"_\"+E1_NUM)\n- `orderNum`: SAP Business One (ODPI.NumAtCard)\n- `docNum`: SAP Business One (ODPI.DocNum)\n- `docStatus`: O = open, C = closed, X = canceled (SAPB1)\n- `docSituation`: E1_SITUACA (PROTHEUS)\n- `bankCode` + `bankBranch` + `bancAccount`: E1_PORTADO + E1_AGEDEP + E1_CONTA (PROTHEUS)\n- `paymentMethod`: E1_TIPO (PROTHEUS)\n\nData returned in response:\n- SAP Business One: down payments data, partner data, items (+ taxes), totals, payments, taxes\n- TOTVS Protheus: down payments data\n\nThe response will inform:\n- The number of returned objects in the `count` field\n\nFor list search, the pagination feature in the response will be used, where the following fields are used to control the pagination:\n- `pageSize` = maximum number of records on each page (eg: 100), defined in the API configuration, and informed in the response\n- `pageNum` = desired page, provided in the request, and informed in the response. If “pageNum” not informed = 1, If “pageNum” <=0 = 1, If “pageNum”> ”pageTotal” = last page\n- `pageTotal` = total pages, reported in the response\n- `hasNext` = if there are more pages (true / false), informed in the response\n\nThis service will allow you to search the down payments list in two situations:\n- Full Search: will result in all down payments, according to filters.\n- 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 `updatedAt` 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)\n\nFor 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."},"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":"#### Insert sales dowm payment in ERP\n*(sapBusinessOne=203/ODPI)*\n\nThis service will allow to insert a new sales dowm payment in the ERP.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA 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:\n- SAP Business One: ORDR.DocEntry = `baseKey` or ORDR.DocNum = `baseNum` or ORDR.NumAtCard = `orderNum`\n\nProducts 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:\n- SAP B1: OITM.CodeBars = `codeBars` or OITM.ItemCode = `productKey`\n\nIn 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 `payments` block.\n\nFor 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.\n\n#### Request object has the following properties\n| Field | Type | Description |\n|:---:|:---:|:---:|\n|branch | number | Branch \nbaseObject | string | Base Object (default = 17)\nbaseKey | string | Base Key\nitems | array | invoice Items Object\nitems.baseLineNum | string | Base line number\nitems.productKey | string | Product key\nitems.codeBars | string | Code bars\nitems.quantity | number | quantity\npayments | array |  Method\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.details | object | details\npayments.details.cardName | string | Card name\npayments.details.acquirer | string | Acquire\npayments.details.tid | string | tid\npayments.details.authid | string | Authid\npayments.details.nsu | string | nsu\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | Process\nsystem | string | System\ntarget | string | Target\nuser | string | User\nhost | string | Host\neffectiveTimestamp | string | Effective Time stamp\ncode | string | Code\nsuccess | booleano | success\nvalues | array | values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erp key"},"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":"#### Insert sales dowm payment in ERP\n*(sapBusinessOne=203/ODPI)*\n\nThis service will allow to insert a new sales dowm payment in the ERP.\n\nThe scenario will validate the data received, making selects in the ERP database.\n\nA 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:\n- SAP Business One: ORDR.DocEntry = `baseKey` or ORDR.DocNum = `baseNum` or ORDR.NumAtCard = `orderNum`\n\nProducts 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:\n- SAP B1: OITM.CodeBars = `codeBars` or OITM.ItemCode = `productKey`\n\nIn 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 `payments` block.\n\nFor 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.\n\n#### Request object has the following properties\n| Field | Type | Description |\n|:---:|:---:|:---:|\n|branch | number | Branch \nbaseObject | string | Base Object (default = 17)\nbaseKey | string | Base Key\nitems | array | invoice Items Object\nitems.baseLineNum | string | Base line number\nitems.productKey | string | Product key\nitems.codeBars | string | Code bars\nitems.quantity | number | quantity\npayments | array |  Method\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.paymentMethod | string | Payment Method\npayments.amount | number | Amount\npayments.installments | number | installments\npayments.details | object | details\npayments.details.cardName | string | Card name\npayments.details.acquirer | string | Acquire\npayments.details.tid | string | tid\npayments.details.authid | string | Authid\npayments.details.nsu | string | nsu\n\n\\* = *Required field*\n\n#### Response object has the following properties\nField | Type | Description \n:--- | :--- | :---\npackage | string | package\nprocess | string | Process\nsystem | string | System\ntarget | string | Target\nuser | string | User\nhost | string | Host\neffectiveTimestamp | string | Effective Time stamp\ncode | string | Code\nsuccess | booleano | success\nvalues | array | values\nvalues.object | string | Object\nvalues.table | string | Table\nvalues.action | string | action\nvalues.erpKey | string | Erp key"},"response":[],"_postman_id":"7c1d777f-ebfa-45e8-9bec-bda492a42d80"}],"id":"e219fe13-296a-48ce-9be8-f8bf34e19e20","_postman_id":"e219fe13-296a-48ce-9be8-f8bf34e19e20"},{"name":"Sale Returns","item":[{"name":"Sale Returns","id":"9f1ae1f1-dba1-426b-b5d9-13afaae65fac","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":{"raw":"{{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","host":["{{endpoint}}"],"path":["saleReturns"],"query":[{"key":"createdFrom","value":"2022-09-30","type":"text"},{"key":"createdTo","value":"2022-09-30","type":"text"},{"key":"erpKey","value":"118356","type":"text"},{"key":"orderNum","value":"118556","type":"text"},{"key":"partnerKey","value":null,"type":"text"},{"key":"salesAgentKey","value":null,"type":"text"},{"key":"status","value":null,"type":"text"},{"key":"docNum","value":null,"type":"text"},{"key":"pageNum","value":null,"type":"text"},{"key":"carrierKey","value":null,"type":"text"},{"key":"updatedAt","value":"2023-04-06T00:00:00","type":"text"},{"key":"branch","value":null,"type":"text"}]}},"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"},"response":[],"_postman_id":"ecd7cb10-9001-4ae8-85e2-2de5feb715be"}],"id":"abdda5dc-f84d-4374-8132-892a2d0fff8d","_postman_id":"abdda5dc-f84d-4374-8132-892a2d0fff8d"}],"auth":{"type":"basic","basic":{"password":"{{pass}}","username":"{{user}}"}},"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":[""]}}]}