diff --git a/PostmanCollections/VTEX - Customer Credit API.json b/PostmanCollections/VTEX - Customer Credit API.json index c2d3a1fdd..c777bdbd0 100644 --- a/PostmanCollections/VTEX - Customer Credit API.json +++ b/PostmanCollections/VTEX - Customer Credit API.json @@ -1,10 +1,10 @@ { "_": { - "postman_id": "f81d30fa-cb1e-4092-b37e-4e106131f6b1" + "postman_id": "ca090c7e-4bcc-4f1e-9d87-87af93b0d62c" }, "item": [ { - "id": "d9cd5a3c-b8aa-4c2e-8f7d-ff19e53f4fcf", + "id": "bc596111-479a-46a4-8173-5b8a7fb0da34", "name": "Invoices", "description": { "content": "", @@ -12,7 +12,7 @@ }, "item": [ { - "id": "6c5e82b5-ec38-411b-87ee-012b3c06ee7b", + "id": "365ad576-c304-4d1c-959e-3e7db2b28d7f", "name": "Search all invoices", "request": { "name": "Search all invoices", @@ -130,26 +130,7 @@ "value": "01bce461-9g03-12ds-8217-b3d39271e15b" } ], - "variable": [ - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ { @@ -169,16 +150,21 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "GET" + "method": "GET", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, - "id": "d3ef05b5-21a3-4070-b241-389817c66b0d", + "id": "d4041fac-0a45-47b4-acfa-2bd3fb1669d7", "name": "OK", "originalRequest": { "url": { @@ -192,80 +178,108 @@ ], "query": [ { + "disabled": true, + "description": { + "content": "Indicates the starting position of the invoice to be searched in the invoice list. For example, the value `1` indicates that the first invoice in the list will be returned.", + "type": "text/plain" + }, "key": "from", "value": "1" }, { + "disabled": true, + "description": { + "content": "Indicates the final position of the invoice to be searched in the invoice list. For example, if the value of `from` is equal to `1` and `to` is `300`, information from 300 invoices will be displayed in the response body of the request.", + "type": "text/plain" + }, "key": "to", "value": "300" }, { + "disabled": true, + "description": { + "content": "Indicates the initial creation date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.", + "type": "text/plain" + }, "key": "createdDateFrom", "value": "2023-01-20" }, { + "disabled": true, + "description": { + "content": "Indicates the final creation date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.", + "type": "text/plain" + }, "key": "createdDateTo", "value": "2023-01-25" }, { + "disabled": true, + "description": { + "content": "Indicates the initial due date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.", + "type": "text/plain" + }, "key": "dueDateFrom", "value": "2023-01-20" }, { + "disabled": true, + "description": { + "content": "Indicates the final due date of invoices that should be searched in the invoice list based on their creation date. The dates should be in ISO8601 format.", + "type": "text/plain" + }, "key": "dueDateTo", "value": "2023-01-25" }, { + "disabled": true, + "description": { + "content": "Indicates the value of the invoices to be searched for. It must be completed with a decimal value.", + "type": "text/plain" + }, "key": "value", "value": "101.22" }, { + "disabled": true, + "description": { + "content": "Indicates the status of the invoices to be searched for.", + "type": "text/plain" + }, "key": "status", "value": "Paid" }, { + "disabled": true, + "description": { + "content": "Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice. It consists of an 8-digit random ID (of numbers and letters) and the installment.", + "type": "text/plain" + }, "key": "friendlyId", "value": "u8KFsGDk-1" }, { - "key": "observation", - "value": "Some observation about the invoice" - }, - { - "key": "creditAccountId", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b" - } - ], - "variable": [ - { + "disabled": true, "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Observation notes about the invoice.", "type": "text/plain" }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" + "key": "observation", + "value": "Some observation about the invoice" }, { + "disabled": false, "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", + "content": "(Required) Credit account identification.", "type": "text/plain" }, - "type": "any", - "value": "{{environment}}", - "key": "environment" + "key": "creditAccountId", + "value": "01bce461-9g03-12ds-8217-b3d39271e15b" } - ] + ], + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -287,6 +301,14 @@ { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "GET", @@ -308,7 +330,7 @@ { "listen": "test", "script": { - "id": "8af1c83c-f40f-4e32-a39c-499b35fe8f47", + "id": "f6fee054-fc99-424a-8d0f-34ad612bc0e2", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/creditcontrol/invoices - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -324,7 +346,7 @@ } }, { - "id": "1b2e6195-df0e-486b-8d04-852a0e0c845d", + "id": "09b6cbcf-0aa8-476d-9f5f-3f2b12eeb1d0", "name": "Retrieve invoice by ID", "request": { "name": "Retrieve invoice by ID", @@ -365,24 +387,6 @@ "type": "any", "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -404,16 +408,21 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "GET" + "method": "GET", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, - "id": "cce4717f-7a9b-4bb0-8f54-d5b8ea6e8f10", + "id": "afa10665-1ada-4649-b8a4-50810506f08c", "name": "OK", "originalRequest": { "url": { @@ -429,56 +438,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Invoice identification.", - "type": "text/plain" - }, - "type": "any", - "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", - "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -500,6 +462,14 @@ { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "GET", @@ -521,7 +491,7 @@ { "listen": "test", "script": { - "id": "bb7670e8-65d8-4c21-bcff-d97541d5a049", + "id": "9437f0ca-2937-4418-a97d-ae0ad72a0a57", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -537,7 +507,7 @@ } }, { - "id": "5948b987-18b2-4378-a344-f548a89ab5af", + "id": "d4d0d6eb-1a6c-463a-ae50-df4c5e011d99", "name": "Change invoice", "request": { "name": "Change invoice", @@ -588,24 +558,6 @@ "type": "any", "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -627,6 +579,10 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" } ], "method": "PUT", @@ -635,6 +591,7 @@ "raw": "{\n \"status\": \"Paid\",\n \"observation\": \"BF 2023 customer invoice.\",\n \"paymentLink\": \"https://paymentlink.com\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -645,7 +602,7 @@ "_": { "postman_previewlanguage": "text" }, - "id": "f4a15419-5ad9-4bb4-b918-c9594089a8a8", + "id": "74387063-ef13-417c-9349-e696f1886454", "name": "OK. This endpoint does not return any data in the response body.", "originalRequest": { "url": { @@ -662,60 +619,18 @@ ], "query": [ { - "key": "friendlyId", - "value": "u8KFsGDk-1" - } - ], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Invoice identification.", - "type": "text/plain" - }, - "type": "any", - "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", - "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { + "disabled": true, "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", + "content": "Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice. It consists of an 8-digit random ID (of numbers and letters) and the installment.", "type": "text/plain" }, - "type": "any", - "value": "{{environment}}", - "key": "environment" + "key": "friendlyId", + "value": "u8KFsGDk-1" } - ] + ], + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -733,6 +648,18 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "PUT", @@ -741,6 +668,7 @@ "raw": "{\n \"status\": \"Paid\",\n \"observation\": \"BF 2023 customer invoice.\",\n \"paymentLink\": \"https://paymentlink.com\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -748,13 +676,7 @@ }, "status": "OK", "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "text/plain" - } - ], - "body": "", + "header": [], "cookie": [] } ], @@ -762,7 +684,7 @@ { "listen": "test", "script": { - "id": "d5010e87-c0f0-4e7e-888c-ceed5910e32f", + "id": "a1eef963-72a3-4c3d-b4ef-5a45bb9dfd91", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" @@ -775,7 +697,7 @@ } }, { - "id": "a37ca574-d48b-4929-aacc-e528e29c87fd", + "id": "287f69fc-5dea-4388-bfd4-fe8b4c48e358", "name": "Cancel invoice", "request": { "name": "Cancel invoice", @@ -816,24 +738,6 @@ "type": "any", "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -857,14 +761,15 @@ "value": "application/json" } ], - "method": "DELETE" + "method": "DELETE", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "text" }, - "id": "508c66d9-5dce-4802-bf4f-0f2da8bf4139", + "id": "d4bfd906-0aec-47ce-b81d-167e61dc71a9", "name": "OK. This endpoint does not return any data in the response body.", "originalRequest": { "url": { @@ -880,56 +785,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Invoice identification.", - "type": "text/plain" - }, - "type": "any", - "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", - "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -947,6 +805,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "DELETE", @@ -954,13 +820,7 @@ }, "status": "OK", "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "text/plain" - } - ], - "body": "", + "header": [], "cookie": [] } ], @@ -968,7 +828,7 @@ { "listen": "test", "script": { - "id": "3cae7447-bfbe-4279-be82-0be46515c33f", + "id": "6abfc6a4-9f0b-452e-911a-fcd5bdd9a390", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" @@ -981,7 +841,7 @@ } }, { - "id": "823ac385-4e80-4043-8a45-71bec530f6a3", + "id": "e7fee1ce-a9af-475f-abeb-98e3da4d002e", "name": "Retrieve invoices by Customer Credit account ID", "request": { "name": "Retrieve invoices by Customer Credit account ID", @@ -1011,24 +871,6 @@ "type": "any", "value": "01bce461-9g03-12ds-8217-b3d39271e15b", "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -1050,16 +892,21 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "GET" + "method": "GET", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, - "id": "2fb64b58-a706-4f3c-8247-b9f8b51f2a77", + "id": "4dae1538-9cea-401e-aadc-bb7561018f11", "name": "OK", "originalRequest": { "url": { @@ -1074,46 +921,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -1135,6 +945,14 @@ { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "GET", @@ -1156,7 +974,7 @@ { "listen": "test", "script": { - "id": "ebbab4fa-1967-4cd7-8db7-f585c500f8c1", + "id": "aac79ddd-bb46-4303-8727-908e8db15c11", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -1172,7 +990,7 @@ } }, { - "id": "63b52ca8-e80e-4a7a-abc5-3005f19b4a30", + "id": "81c11137-3767-4b76-88d0-e3d502f0eff0", "name": "Mark an invoice as paid", "request": { "name": "Mark an invoice as paid", @@ -1214,24 +1032,6 @@ "type": "any", "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -1253,16 +1053,21 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "POST" + "method": "POST", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, - "id": "56cb3bef-61a8-48e9-8ffe-9dacff76ca54", + "id": "06837a4b-ac72-4ecb-9870-c3da31100e7f", "name": "OK", "originalRequest": { "url": { @@ -1279,56 +1084,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Invoice identification.", - "type": "text/plain" - }, - "type": "any", - "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", - "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -1350,6 +1108,14 @@ { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "POST", @@ -1371,13 +1137,13 @@ { "listen": "test", "script": { - "id": "b06f0f82-aa90-4f40-b3a6-32005b5307aa", + "id": "c1881865-035a-4f94-8e8b-326acd221714", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/payments - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/payments - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/payments - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"required\":[\"id\",\"friendlyId\",\"status\",\"value\",\"accountId\",\"creditValue\",\"createdAt\",\"updatedAt\",\"originalDueDate\",\"dueDate\",\"installment\",\"orderId\",\"transactionId\",\"numberOfInstallments\",\"creditAccountId\"],\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Invoice identification.\"},\"friendlyId\":{\"type\":\"string\",\"description\":\"Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice. It consists of an 8-digit random ID (of numbers and letters) and the installment.\"},\"status\":{\"type\":\"string\",\"description\":\"Invoice status.\",\"enum\":[\"Open\",\"Paid\",\"Cancelled\"]},\"value\":{\"type\":\"number\",\"description\":\"Invoice value.\"},\"accountId\":{\"type\":\"string\",\"description\":\"Account identification. It is the same `checkingAccountId` parameter used in other Customer Credit API endpoints.\"},\"creditValue\":{\"type\":\"number\",\"description\":\"Credit value.\"},\"createdAt\":{\"type\":\"string\",\"description\":\"Invoice creation date.\"},\"updatedAt\":{\"type\":\"string\",\"description\":\"Date of the last update made to the invoice.\"},\"originalDueDate\":{\"type\":\"string\",\"description\":\"Original invoice expiration date.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Modified invoice expiration date.\"},\"installment\":{\"type\":\"number\",\"description\":\"Identification of installment number.\"},\"orderId\":{\"type\":\"string\",\"description\":\"Identification of the order that generated the invoice.\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Identification of the invoice transaction. This is the same number as the `id` field, removing the last three characters.\"},\"numberOfInstallments\":{\"type\":\"number\",\"description\":\"Number of installments.\"},\"creditAccountId\":{\"type\":\"string\",\"description\":\"Credit account identification. It is the same `accountId` parameter used in other Customer Credit API endpoints.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/payments - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"required\":[\"id\",\"friendlyId\",\"status\",\"value\",\"accountId\",\"creditValue\",\"createdAt\",\"updatedAt\",\"originalDueDate\",\"dueDate\",\"installment\",\"orderId\",\"transactionId\",\"numberOfInstallments\",\"creditAccountId\"],\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Invoice identification.\"},\"friendlyId\":{\"type\":\"string\",\"description\":\"Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice. It consists of an 8-digit random ID (of numbers and letters) and the installment.\"},\"status\":{\"type\":\"string\",\"description\":\"Invoice status.\",\"enum\":[\"Opened\",\"Paid\",\"Cancelled\"]},\"value\":{\"type\":\"number\",\"description\":\"Invoice value.\"},\"accountId\":{\"type\":\"string\",\"description\":\"Account identification. It is the same `checkingAccountId` parameter used in other Customer Credit API endpoints.\"},\"creditValue\":{\"type\":\"number\",\"description\":\"Credit value.\"},\"createdAt\":{\"type\":\"string\",\"description\":\"Invoice creation date.\"},\"updatedAt\":{\"type\":\"string\",\"description\":\"Date of the last update made to the invoice.\"},\"originalDueDate\":{\"type\":\"string\",\"description\":\"Original invoice expiration date.\"},\"dueDate\":{\"type\":\"string\",\"description\":\"Modified invoice expiration date.\"},\"installment\":{\"type\":\"number\",\"description\":\"Identification of installment number.\"},\"orderId\":{\"type\":\"string\",\"description\":\"Identification of the order that generated the invoice.\"},\"transactionId\":{\"type\":\"string\",\"description\":\"Identification of the invoice transaction. This is the same number as the `id` field, removing the last three characters.\"},\"numberOfInstallments\":{\"type\":\"number\",\"description\":\"Number of installments.\"},\"creditAccountId\":{\"type\":\"string\",\"description\":\"Credit account identification. It is the same `accountId` parameter used in other Customer Credit API endpoints.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/payments - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -1387,7 +1153,7 @@ } }, { - "id": "f3eb1747-bdaf-4ff0-8266-edd3f6d4a53b", + "id": "ccea68f9-9c72-45e5-8f3b-c8ab9753c151", "name": "Postpone an invoice", "request": { "name": "Postpone an invoice", @@ -1429,24 +1195,6 @@ "type": "any", "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -1468,6 +1216,10 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" } ], "method": "PUT", @@ -1476,6 +1228,7 @@ "raw": "{\n \"dueDays\": 10\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -1486,7 +1239,7 @@ "_": { "postman_previewlanguage": "text" }, - "id": "7bac68b3-ceca-46e7-8967-e6827c56adbc", + "id": "cd0c9100-79db-4bbb-b5b0-a9cd18a2d203", "name": "OK. This endpoint does not return any data in the response body.", "originalRequest": { "url": { @@ -1503,56 +1256,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Invoice identification.", - "type": "text/plain" - }, - "type": "any", - "value": "A424887D0F2D45028FE5C96E9B0E1A2D-01", - "key": "invoiceId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -1570,6 +1276,18 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "PUT", @@ -1578,6 +1296,7 @@ "raw": "{\n \"dueDays\": 10\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -1585,13 +1304,7 @@ }, "status": "OK", "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "text/plain" - } - ], - "body": "", + "header": [], "cookie": [] } ], @@ -1599,7 +1312,7 @@ { "listen": "test", "script": { - "id": "5c8aa95f-ef34-4319-9974-6550e64e8c36", + "id": "ac89514f-1a55-441c-a91a-54fea11ac5e1", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/postponement - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" @@ -1615,7 +1328,7 @@ "event": [] }, { - "id": "3e2dcac0-6e55-497b-9dc2-9cfa5bd9ffbf", + "id": "7efaa703-e0e6-4aaf-b6fc-ea4413a9f13b", "name": "Account", "description": { "content": "", @@ -1623,7 +1336,7 @@ }, "item": [ { - "id": "17a4bf3d-d467-485c-a13b-c9f6e72edb0a", + "id": "4f1716e5-8796-4b33-b5ab-f10ede1b2f54", "name": "Search all accounts", "request": { "name": "Search all accounts", @@ -1678,26 +1391,7 @@ "value": "test@test.com" } ], - "variable": [ - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ { @@ -1717,16 +1411,21 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "GET" + "method": "GET", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, - "id": "228fcc0b-0da3-4b9f-b5bb-cdc44537b790", + "id": "80149a00-ee30-44aa-9440-1f1d27513a15", "name": "OK", "originalRequest": { "url": { @@ -1740,52 +1439,45 @@ ], "query": [ { + "disabled": true, + "description": { + "content": "Indicates the starting position of the credit customer account to be searched in the account list. Example, value `1` indicates that the first account in the list will be returned.", + "type": "text/plain" + }, "key": "from", "value": "1" }, { + "disabled": true, + "description": { + "content": "Indicates the final position of the credit customer account to be searched in the account list. Example, if the value of `from` is equal to `1` and `to` is `40`, information from 40 accounts will be displayed in the response body of the request.", + "type": "text/plain" + }, "key": "to", "value": "40" }, { - "key": "status", - "value": "Paid" - }, - { - "key": "email", - "value": "test@test.com" - } - ], - "variable": [ - { + "disabled": true, "description": { - "content": "Name of the VTEX account. Used as part of the URL", + "content": "Indicates the status of the accounts to be searched for.", "type": "text/plain" }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" + "key": "status", + "value": "Paid" }, { + "disabled": true, "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", + "content": "Indicates the email registered to the account to be searched.", "type": "text/plain" }, - "type": "any", - "value": "{{environment}}", - "key": "environment" + "key": "email", + "value": "test@test.com" } - ] + ], + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -1807,6 +1499,14 @@ { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "GET", @@ -1820,7 +1520,7 @@ "value": "application/json" } ], - "body": "{\n \"data\": [\n {\n \"id\": \"39f5f920-149f-11ha-b5b0-2vb896d3212f\",\n \"balance\": 0,\n \"document\": \"4354353453454\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 2000,\n \"updatedAt\": \"2020-01-02T15:26:40.3425717Z\",\n \"createdAt\": \"2019-12-04T14:06:02.7905117Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 2000,\n \"preAuthorizedCredit\": 0,\n \"email\": \"wtest@gmail.com\",\n \"tolerance\": 20,\n \"availableBalance\": 2000\n },\n {\n \"id\": \"71d3f4e5-9164-11ea-918f-93b2a93cb9ba\",\n \"balance\": 0,\n \"document\": \"10120312\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 1,\n \"updatedAt\": \"2020-05-08T19:16:40.7202156Z\",\n \"createdAt\": \"2020-05-08T19:16:40.5951631Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 1,\n \"preAuthorizedCredit\": 0,\n \"email\": \"etest@yahoo.com\",\n \"tolerance\": 0,\n \"availableBalance\": 1\n },\n {\n \"id\": \"111111111_CPF\",\n \"balance\": 0,\n \"document\": \"111111111\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 500,\n \"updatedAt\": \"2020-06-30T18:35:25.5793275Z\",\n \"createdAt\": \"2020-06-30T18:35:25.5011788Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 500,\n \"preAuthorizedCredit\": 0,\n \"email\": \"atest@test.com\",\n \"tolerance\": 1,\n \"availableBalance\": 500\n },\n {\n \"id\": \"2222222222_CPF\",\n \"balance\": 0,\n \"document\": \"2222222222\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 100,\n \"updatedAt\": \"2020-07-07T21:08:07.1796362Z\",\n \"createdAt\": \"2020-06-30T19:57:50.4832597Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 100,\n \"preAuthorizedCredit\": 0,\n \"email\": \"dtest@hotmail.com\",\n \"tolerance\": 0,\n \"availableBalance\": 100\n },\n {\n \"id\": \"91d1f2e5-8169-11ea-728f-53b2a03cb8bc\",\n \"balance\": 0,\n \"document\": \"0000000000\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 5000,\n \"updatedAt\": \"2020-07-28T18:50:46.7315579Z\",\n \"createdAt\": \"2020-06-30T18:49:35.424369Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 5000,\n \"preAuthorizedCredit\": 0,\n \"email\": \"test@test.com\",\n \"tolerance\": 0,\n \"availableBalance\": 5000\n }\n ],\n \"summary\": {\n \"count\": 5\n }\n}", + "body": "{\n \"data\": [\n {\n \"id\": \"39f5f920-149f-11ha-b5b0-2vb896d3212f\",\n \"balance\": 0,\n \"document\": \"4354353453454\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 2000,\n \"updatedAt\": \"2020-01-02T15:26:40.3425717Z\",\n \"createdAt\": \"2019-12-04T14:06:02.7905117Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 2000,\n \"preAuthorizedCredit\": 0,\n \"email\": \"wtest@gmail.com\",\n \"tolerance\": 20,\n \"availableBalance\": 2000\n },\n {\n \"id\": \"71d3f4e5-9164-11ea-918f-93b2a93cb9ba\",\n \"balance\": 0,\n \"document\": \"10120312\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 1,\n \"updatedAt\": \"2020-05-08T19:16:40.7202156Z\",\n \"createdAt\": \"2020-05-08T19:16:40.5951631Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 1,\n \"preAuthorizedCredit\": 0,\n \"email\": \"etest@yahoo.com\",\n \"tolerance\": 0,\n \"availableBalance\": 1\n },\n {\n \"id\": \"111111111_CPF\",\n \"balance\": 0,\n \"document\": \"111111111\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 500,\n \"updatedAt\": \"2020-06-30T18:35:25.5793275Z\",\n \"createdAt\": \"2020-06-30T18:35:25.5011788Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 500,\n \"preAuthorizedCredit\": 0,\n \"email\": \"atest@test.com\",\n \"tolerance\": 1,\n \"availableBalance\": 500\n },\n {\n \"id\": \"2222222222_CPF\",\n \"balance\": 0,\n \"document\": \"2222222222\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 100,\n \"updatedAt\": \"2020-07-07T21:08:07.1796362Z\",\n \"createdAt\": \"2020-06-30T19:57:50.4832597Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 100,\n \"preAuthorizedCredit\": 0,\n \"email\": \"dtest@hotmail.com\",\n \"tolerance\": 0,\n \"availableBalance\": 100\n },\n {\n \"id\": \"91d1f2e5-8169-11ea-728f-53b2a03cb8bc\",\n \"balance\": 0,\n \"document\": \"0000000000\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 5000,\n \"updatedAt\": \"2020-07-28T18:50:46.7315579Z\",\n \"createdAt\": \"2020-06-30T18:49:35.424369Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 5000,\n \"preAuthorizedCredit\": 0,\n \"email\": \"test@test.com\",\n \"tolerance\": 0,\n \"availableBalance\": 5000\n }\n ],\n \"summary\": {\n \"count\": 5\n }\n}", "cookie": [] } ], @@ -1828,7 +1528,7 @@ { "listen": "test", "script": { - "id": "ea86a33f-64cd-48c5-a4ca-a0573c0c4b4e", + "id": "237c0539-c713-4f6f-9833-bb97c0dff15a", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/creditcontrol/accounts - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -1844,7 +1544,7 @@ } }, { - "id": "b3c802a5-91a5-4bb5-8962-91a72a5224f3", + "id": "159a343a-5867-4bb5-aa94-dfbb6df86d32", "name": "Open an account", "request": { "name": "Open an account", @@ -1862,26 +1562,7 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ { @@ -1901,6 +1582,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "POST", @@ -1909,6 +1598,7 @@ "raw": "{\n \"document\": \"11111111111\",\n \"documentType\": \"CPF\",\n \"email\": \"test@test.com\",\n \"creditLimit\": \"1100\",\n \"description\": \"Not applicable.\",\n \"tolerance\": \"0.2\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -1919,7 +1609,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "92d7cbd5-46a0-4d7e-ad1c-2f249ad216bf", + "id": "1c8f6439-8ead-407e-aef2-9f22dd47201c", "name": "OK", "originalRequest": { "url": { @@ -1932,38 +1622,11 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, - { - "disabled": false, + "disabled": false, "description": { "content": "(Required) Type of the content being sent.", "type": "text/plain" @@ -1980,9 +1643,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "POST", @@ -1991,6 +1666,7 @@ "raw": "{\n \"document\": \"11111111111\",\n \"documentType\": \"CPF\",\n \"email\": \"test@test.com\",\n \"creditLimit\": \"1100\",\n \"description\": \"Not applicable.\",\n \"tolerance\": \"0.2\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -2004,7 +1680,7 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"11111111111_CPF\",\n \"balance\": 0,\n \"document\": \"11111111111\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 1100,\n \"updatedAt\": \"2023-11-09T13:29:01.2505088Z\",\n \"createdAt\": \"2023-11-09T13:29:01.1567887Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 1100,\n \"preAuthorizedCredit\": 0,\n \"email\": \"ricardo@teste.com.br\",\n \"tolerance\": 0.2,\n \"availableBalance\": 1100\n}", + "body": "{\n \"id\": \"11111111111_CPF\",\n \"balance\": 0,\n \"document\": \"11111111111\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 1100,\n \"updatedAt\": \"2023-11-09T13:29:01.2505088Z\",\n \"createdAt\": \"2023-11-09T13:29:01.1567887Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 1100,\n \"preAuthorizedCredit\": 0,\n \"email\": \"ricardo@teste.com.br\",\n \"tolerance\": 0.2,\n \"availableBalance\": 1100\n}", "cookie": [] } ], @@ -2012,7 +1688,7 @@ { "listen": "test", "script": { - "id": "4a0fc76a-294d-48f5-b618-269d1e23b262", + "id": "2245c64f-1fe0-4777-9aba-4ca2220600f6", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/creditcontrol/accounts - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2028,7 +1704,7 @@ } }, { - "id": "8993ab9c-2680-4178-ab79-d59486aad30c", + "id": "750f559d-1dbb-4c83-8a8f-ed640912e1df", "name": "Retrieve an account by ID", "request": { "name": "Retrieve an account by ID", @@ -2057,24 +1733,6 @@ "type": "any", "value": "01bce461-9g03-12ds-8217-b3d39271e15b", "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -2096,16 +1754,21 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "GET" + "method": "GET", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, - "id": "540d6ca2-6e7b-4870-8b5f-fb11f3bdadbc", + "id": "d3bd7545-fa9d-42fd-8775-9ac751f5ec75", "name": "OK", "originalRequest": { "url": { @@ -2119,46 +1782,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -2180,6 +1806,14 @@ { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "GET", @@ -2193,7 +1827,7 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"11111111111_CPF\",\n \"balance\": 0,\n \"document\": \"11111111111\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 1100,\n \"updatedAt\": \"2023-11-09T13:29:01.2505088Z\",\n \"createdAt\": \"2023-11-09T13:29:01.1567887Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 1100,\n \"preAuthorizedCredit\": 0,\n \"email\": \"ricardo@teste.com.br\",\n \"tolerance\": 0.2,\n \"availableBalance\": 1100\n}", + "body": "{\n \"id\": \"11111111111_CPF\",\n \"balance\": 0,\n \"document\": \"11111111111\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 1100,\n \"updatedAt\": \"2023-11-09T13:29:01.2505088Z\",\n \"createdAt\": \"2023-11-09T13:29:01.1567887Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 1100,\n \"preAuthorizedCredit\": 0,\n \"email\": \"ricardo@teste.com.br\",\n \"tolerance\": 0.2,\n \"availableBalance\": 1100\n}", "cookie": [] } ], @@ -2201,7 +1835,7 @@ { "listen": "test", "script": { - "id": "ce1d4869-cf8d-4517-9b01-fd36b0f4d282", + "id": "39b04a01-22ad-4236-88f8-83850bae201a", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2217,7 +1851,7 @@ } }, { - "id": "015f60bd-768f-4e1e-8d0b-f2d48cdc6775", + "id": "198a8eb5-a6e6-44a5-b0b3-3a3490842cc0", "name": "Close an account", "request": { "name": "Close an account", @@ -2246,24 +1880,6 @@ "type": "any", "value": "01bce461-9g03-12ds-8217-b3d39271e15b", "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -2285,6 +1901,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "DELETE", @@ -2293,6 +1917,7 @@ "raw": "{\n \"document\": \"32222222222\",\n \"documentType\": \"CPF\",\n \"email\": \"email@domain.com\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -2303,7 +1928,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "59a6f456-937c-47b1-b0a2-965633f8f5a5", + "id": "6cb5a0e9-4f8c-4907-9f34-b21118c68197", "name": "OK", "originalRequest": { "url": { @@ -2317,46 +1942,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -2375,9 +1963,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "DELETE", @@ -2386,6 +1986,7 @@ "raw": "{\n \"document\": \"32222222222\",\n \"documentType\": \"CPF\",\n \"email\": \"email@domain.com\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -2399,7 +2000,7 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"32222222222_CPF\",\n \"balance\": 0,\n \"document\": \"32222222222\",\n \"status\": \"Closed\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 500,\n \"updatedAt\": \"2023-11-09T14:36:09.0201326Z\",\n \"createdAt\": \"2023-11-09T14:31:27.0775349Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 500,\n \"preAuthorizedCredit\": 0,\n \"email\": \"test3@teste.com\",\n \"tolerance\": 1,\n \"availableBalance\": 500\n}", + "body": "{\n \"id\": \"32222222222_CPF\",\n \"balance\": 0,\n \"document\": \"32222222222\",\n \"status\": \"Closed\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 500,\n \"updatedAt\": \"2023-11-09T14:36:09.0201326Z\",\n \"createdAt\": \"2023-11-09T14:31:27.0775349Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 500,\n \"preAuthorizedCredit\": 0,\n \"email\": \"test3@teste.com\",\n \"tolerance\": 1,\n \"availableBalance\": 500\n}", "cookie": [] } ], @@ -2407,13 +2008,13 @@ { "listen": "test", "script": { - "id": "b5a907d4-1c4a-4da6-bfd0-15121c13bec0", + "id": "9250b74a-7af4-48b7-a4b8-c62243849ca1", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/creditcontrol/accounts/:creditAccountId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[DELETE]::/api/creditcontrol/accounts/:creditAccountId - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[DELETE]::/api/creditcontrol/accounts/:creditAccountId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"required\":[\"id\",\"balance\",\"document\",\"status\",\"documentType\",\"creditLimit\",\"updatedAt\",\"createdAt\",\"availableCredit\",\"preAuthorizedCredit\",\"email\",\"tolerance\",\"availableBalance\"],\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Credit customer account identification.\"},\"balance\":{\"type\":\"number\",\"description\":\"Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used.\"},\"document\":{\"type\":\"string\",\"description\":\"Account owner document.\"},\"status\":{\"type\":\"string\",\"description\":\"Credit customer account status.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Document type.\",\"enum\":[\"CPF\",\"CNPJ\",\"Other\"]},\"creditLimit\":{\"type\":\"number\",\"description\":\"Maximum credit amount on the account.\"},\"updatedAt\":{\"type\":\"string\",\"description\":\"Date of the last update made to the account.\"},\"createdAt\":{\"type\":\"string\",\"description\":\"Account creation date.\"},\"description\":{\"type\":\"string\",\"description\":\"This field is deprecated.\",\"deprecated\":true},\"availableCredit\":{\"type\":\"number\",\"description\":\"Credit amount available on the account.\"},\"preAuthorizedCredit\":{\"type\":\"number\",\"description\":\"Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction.\"},\"email\":{\"type\":\"string\",\"description\":\"Account owner email.\"},\"tolerance\":{\"type\":\"number\",\"description\":\"Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount.\"},\"availableBalance\":{\"type\":\"number\",\"description\":\"Balance available for use on the account.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[DELETE]::/api/creditcontrol/accounts/:creditAccountId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"required\":[\"id\",\"balance\",\"document\",\"status\",\"documentType\",\"creditLimit\",\"updatedAt\",\"createdAt\",\"availableCredit\",\"preAuthorizedCredit\",\"email\",\"tolerance\",\"availableBalance\"],\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Credit customer account identification.\"},\"balance\":{\"type\":\"number\",\"description\":\"Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used.\"},\"document\":{\"type\":\"string\",\"description\":\"Account owner document.\"},\"status\":{\"type\":\"string\",\"description\":\"Credit customer account status.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Document type.\",\"enum\":[\"CPF\",\"CNPJ\",\"Other\"]},\"creditLimit\":{\"type\":\"number\",\"description\":\"Maximum credit amount on the account.\"},\"updatedAt\":{\"type\":\"string\",\"description\":\"Date of the last update made to the account.\"},\"createdAt\":{\"type\":\"string\",\"description\":\"Account creation date.\"},\"description\":{\"type\":\"string\",\"description\":\"This field is deprecated.\"},\"availableCredit\":{\"type\":\"number\",\"description\":\"Credit amount available on the account.\"},\"preAuthorizedCredit\":{\"type\":\"number\",\"description\":\"Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction.\"},\"email\":{\"type\":\"string\",\"description\":\"Account owner email.\"},\"tolerance\":{\"type\":\"number\",\"description\":\"Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount.\"},\"availableBalance\":{\"type\":\"number\",\"description\":\"Balance available for use on the account.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[DELETE]::/api/creditcontrol/accounts/:creditAccountId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -2423,7 +2024,7 @@ } }, { - "id": "96ec93fa-ec1b-4399-ad6e-67ca0e93052b", + "id": "c2e3e450-c635-40fe-9d49-bcff24c14057", "name": "Update account information", "request": { "name": "Update account information", @@ -2452,24 +2053,6 @@ "type": "any", "value": "01bce461-9g03-12ds-8217-b3d39271e15b", "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -2491,6 +2074,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "PUT", @@ -2499,6 +2090,7 @@ "raw": "{\n \"email\": \"test1@test.com\",\n \"document\": \"111111111111\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 3400,\n \"tolerance\": 0.25\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -2509,7 +2101,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "5b5e5353-79b6-48ac-b5ed-20f0d9199864", + "id": "6a45f775-dcdc-4805-b2fb-7f039781a0f4", "name": "OK", "originalRequest": { "url": { @@ -2523,46 +2115,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -2581,9 +2136,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "PUT", @@ -2592,6 +2159,7 @@ "raw": "{\n \"email\": \"test1@test.com\",\n \"document\": \"111111111111\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 3400,\n \"tolerance\": 0.25\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -2605,7 +2173,7 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"30c59e60-895f-11ee-917a-1117db360d00\",\n \"balance\": 0,\n \"document\": \"111111111111\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 3400,\n \"updatedAt\": \"2023-11-22T19:06:07.4014762Z\",\n \"createdAt\": \"2023-11-22T17:47:22.9450309Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 3400,\n \"preAuthorizedCredit\": 0,\n \"email\": \"test1@test.com\",\n \"tolerance\": 0.25,\n \"availableBalance\": 3400\n}", + "body": "{\n \"id\": \"30c59e60-895f-11ee-917a-1117db360d00\",\n \"balance\": 0,\n \"document\": \"111111111111\",\n \"status\": \"Open\",\n \"documentType\": \"CPF\",\n \"creditLimit\": 3400,\n \"updatedAt\": \"2023-11-22T19:06:07.4014762Z\",\n \"createdAt\": \"2023-11-22T17:47:22.9450309Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 3400,\n \"preAuthorizedCredit\": 0,\n \"email\": \"test1@test.com\",\n \"tolerance\": 0.25,\n \"availableBalance\": 3400\n}", "cookie": [] } ], @@ -2613,7 +2181,7 @@ { "listen": "test", "script": { - "id": "6bbe8bbb-09e3-42c1-998f-6a9b9ff2ac1b", + "id": "88565a84-9b76-4299-a306-101176fba8b8", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2629,7 +2197,7 @@ } }, { - "id": "1b6d90b4-b161-4351-9be6-c9e0d699666e", + "id": "ee9ab9ea-d269-4643-a442-d1463cab195a", "name": "Get account statements", "request": { "name": "Get account statements", @@ -2659,24 +2227,6 @@ "type": "any", "value": "01bce461-9g03-12ds-8217-b3d39271e15b", "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -2698,16 +2248,21 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "GET" + "method": "GET", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, - "id": "49af9935-ba64-48e5-a203-3bba0b2d716e", + "id": "46bc764d-505e-4527-af82-162f10d09477", "name": "OK", "originalRequest": { "url": { @@ -2722,46 +2277,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -2783,6 +2301,14 @@ { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "GET", @@ -2804,7 +2330,7 @@ { "listen": "test", "script": { - "id": "0e32665d-6111-4855-85c2-8d60fe379430", + "id": "d2e5bbf8-b6d3-4d08-b258-885306cfffae", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/statements - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2820,7 +2346,7 @@ } }, { - "id": "76825d17-9c6b-43c2-9d39-98c53b710906", + "id": "7a696a74-42f6-4700-ae7b-4720d7aa88b6", "name": "Change credit limit of an account", "request": { "name": "Change credit limit of an account", @@ -2850,24 +2376,6 @@ "type": "any", "value": "01bce461-9g03-12ds-8217-b3d39271e15b", "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -2889,6 +2397,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "PUT", @@ -2897,6 +2413,7 @@ "raw": "{\n \"value\": 5500\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -2907,7 +2424,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "5dab49eb-f4a7-490b-900d-da529c01cdeb", + "id": "de4f881b-24d7-4a83-b006-06f7ab5e5461", "name": "OK", "originalRequest": { "url": { @@ -2922,46 +2439,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -2980,9 +2460,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "PUT", @@ -2991,6 +2483,7 @@ "raw": "{\n \"value\": 5500\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -3004,7 +2497,7 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"fcba59e0-7f26-11ee-ba3c-511336e1518b\",\n \"balance\": -15,\n \"status\": \"Open\",\n \"creditLimit\": 5500,\n \"updatedAt\": \"2023-11-22T19:35:40.0047136Z\",\n \"createdAt\": \"2023-11-09T17:39:52.151897Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 5500,\n \"preAuthorizedCredit\": 0,\n \"email\": \"test@test.com\",\n \"tolerance\": 0.3,\n \"availableBalance\": 5500\n}", + "body": "{\n \"id\": \"fcba59e0-7f26-11ee-ba3c-511336e1518b\",\n \"balance\": -15,\n \"status\": \"Open\",\n \"creditLimit\": 5500,\n \"updatedAt\": \"2023-11-22T19:35:40.0047136Z\",\n \"createdAt\": \"2023-11-09T17:39:52.151897Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 5500,\n \"preAuthorizedCredit\": 0,\n \"email\": \"test@test.com\",\n \"tolerance\": 0.3,\n \"availableBalance\": 5500\n}", "cookie": [] } ], @@ -3012,7 +2505,7 @@ { "listen": "test", "script": { - "id": "b2f4fb33-dac3-4c25-a488-33b2ae6bb862", + "id": "0e2953c1-f03a-4df0-8777-b7a111857cf1", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/creditlimit - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -3028,7 +2521,7 @@ } }, { - "id": "3ffd9316-e9bc-43ec-9a59-c46e5ade9863", + "id": "386c7791-ef2d-47d5-b3fe-0b1f6028556d", "name": "Decrease balance of an account", "request": { "name": "Decrease balance of an account", @@ -3069,24 +2562,6 @@ "type": "any", "value": "451924c579a6759cf6e112a", "key": "statementId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -3108,6 +2583,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "PUT", @@ -3116,6 +2599,7 @@ "raw": "{\n \"value\": \"-15\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -3126,7 +2610,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "52e05f08-3780-4a73-8e30-f13d8aea61ae", + "id": "ffdefdcb-614a-4eaa-b101-ac3d5a66a15c", "name": "OK", "originalRequest": { "url": { @@ -3142,56 +2626,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Statement identification. This is the same `transactionId` value obtained from the [Account statements](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-) endpoint response body.", - "type": "text/plain" - }, - "type": "any", - "value": "451924c579a6759cf6e112a", - "key": "statementId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -3210,9 +2647,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "PUT", @@ -3221,6 +2670,7 @@ "raw": "{\n \"value\": \"-15\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -3234,7 +2684,7 @@ "value": "application/json" } ], - "body": "{\n \"value\": \"-15.0\"\n}", + "body": "-15.0", "cookie": [] } ], @@ -3242,7 +2692,7 @@ { "listen": "test", "script": { - "id": "70989e8b-9a2c-496e-beff-c59dac25a417", + "id": "42bb8613-f883-49c9-ba06-3b283aa093de", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/statements/:statementId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -3258,7 +2708,7 @@ } }, { - "id": "ed15e6c2-f7c4-477b-a78e-21f8bf2f182f", + "id": "62b6dbed-ee84-4e9c-af1b-f76025e2af20", "name": "Create or update settlement", "request": { "name": "Create or update settlement", @@ -3300,24 +2750,6 @@ "type": "any", "value": "B2E754DCD7304D22866CB6F221CF0FEB", "key": "transactionId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -3339,6 +2771,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "PUT", @@ -3347,6 +2787,7 @@ "raw": "{\n \"value\": 49.95\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -3357,7 +2798,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "b5e0b1d3-e13c-4671-ae0b-e1d4c809dd22", + "id": "23f7bcf0-9f32-4f0e-81bd-0d44cd785aff", "name": "OK", "originalRequest": { "url": { @@ -3374,56 +2815,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Pre-authorization identification.", - "type": "text/plain" - }, - "type": "any", - "value": "B2E754DCD7304D22866CB6F221CF0FEB", - "key": "transactionId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -3442,9 +2836,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "PUT", @@ -3453,6 +2859,7 @@ "raw": "{\n \"value\": 49.95\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -3474,7 +2881,7 @@ { "listen": "test", "script": { - "id": "3752a2c8-d300-471a-828f-57fbe19ddda7", + "id": "cbc493a8-d4a9-4a9e-b056-df280dad758e", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/transactions/:transactionId/settlement - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -3490,7 +2897,7 @@ } }, { - "id": "d4937a8a-492b-4696-9cf3-713d45ac157a", + "id": "70951a4e-fedb-4466-8ed5-ea918b015edf", "name": "Create a pre-authorization", "request": { "name": "Create a pre-authorization", @@ -3520,24 +2927,6 @@ "type": "any", "value": "01bce461-9g03-12ds-8217-b3d39271e15b", "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -3559,6 +2948,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "POST", @@ -3567,6 +2964,7 @@ "raw": "{\n \"value\": 49.7,\n \"settle\": true,\n \"installments\": 1,\n \"expirationDate\": \"2023-11-25\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -3577,7 +2975,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "7d1d845c-2bc1-4dc6-8c01-a72486b12de4", + "id": "c0070623-4245-49fd-84aa-86ebb45a8d3c", "name": "OK", "originalRequest": { "url": { @@ -3592,46 +2990,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -3650,9 +3011,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "POST", @@ -3661,6 +3034,7 @@ "raw": "{\n \"value\": 49.7,\n \"settle\": true,\n \"installments\": 1,\n \"expirationDate\": \"2023-11-25\"\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -3682,7 +3056,7 @@ { "listen": "test", "script": { - "id": "eadc2134-6077-4d31-8742-8e5935adc13d", + "id": "7144b829-f93c-4c3a-acc4-c9800061ed7e", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/transactions - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -3698,7 +3072,7 @@ } }, { - "id": "708dc3f4-c918-4b2e-9be4-c6f49a44907b", + "id": "99d0cfb4-210e-4746-af08-d9475b1f4222", "name": "Update a pre-authorization", "request": { "name": "Update a pre-authorization", @@ -3739,24 +3113,6 @@ "type": "any", "value": "B2E754DCD7304D22866CB6F221CF0FEB", "key": "transactionId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -3778,6 +3134,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "PUT", @@ -3786,6 +3150,7 @@ "raw": "{\n \"value\": 55,\n \"settle\": true,\n \"installments\": 1\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -3796,7 +3161,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "6dca7999-4ca9-4d55-8181-e7194b04e32a", + "id": "836b756a-7080-4799-87b5-7b21a85736ac", "name": "OK", "originalRequest": { "url": { @@ -3812,56 +3177,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Pre-authorization identification.", - "type": "text/plain" - }, - "type": "any", - "value": "B2E754DCD7304D22866CB6F221CF0FEB", - "key": "transactionId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -3880,9 +3198,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "PUT", @@ -3891,6 +3221,7 @@ "raw": "{\n \"value\": 55,\n \"settle\": true,\n \"installments\": 1\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -3912,7 +3243,7 @@ { "listen": "test", "script": { - "id": "aef25c25-4182-4053-b1a8-d4db2aa24106", + "id": "e1024d21-7a02-4730-986d-eae357cad31a", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/transactions/:transactionId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -3928,7 +3259,7 @@ } }, { - "id": "cace4bb2-70c2-4cb6-b9c2-767bb6e2574f", + "id": "cd016899-5fb1-4765-aca0-e321d986070d", "name": "Cancel a pre-authorization", "request": { "name": "Cancel a pre-authorization", @@ -3969,24 +3300,6 @@ "type": "any", "value": "B2E754DCD7304D22866CB6F221CF0FEB", "key": "transactionId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -4010,14 +3323,15 @@ "value": "application/json" } ], - "method": "DELETE" + "method": "DELETE", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "text" }, - "id": "05946141-f6cb-46fa-b494-75a772b66cea", + "id": "bb342ae8-af84-4ade-971f-72457ebef751", "name": "OK. This endpoint does not return any data in the response body.", "originalRequest": { "url": { @@ -4033,56 +3347,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Pre-authorization identification.", - "type": "text/plain" - }, - "type": "any", - "value": "B2E754DCD7304D22866CB6F221CF0FEB", - "key": "transactionId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -4100,6 +3367,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "DELETE", @@ -4107,13 +3382,7 @@ }, "status": "OK", "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "text/plain" - } - ], - "body": "", + "header": [], "cookie": [] } ], @@ -4121,7 +3390,7 @@ { "listen": "test", "script": { - "id": "06939afe-fe18-4df3-8981-db88667f0e59", + "id": "d081dfa6-ec73-43b1-b400-d6ad295d850c", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/creditcontrol/accounts/:creditAccountId/transactions/:transactionId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" @@ -4134,7 +3403,7 @@ } }, { - "id": "92f7b711-a9e7-41c7-814a-6bb6c3ac3a2c", + "id": "ebf350b1-e907-495c-961d-6cc193087181", "name": "Add an account holder", "request": { "name": "Add an account holder", @@ -4164,24 +3433,6 @@ "type": "any", "value": "01bce461-9g03-12ds-8217-b3d39271e15b", "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -4203,6 +3454,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "POST", @@ -4211,6 +3470,7 @@ "raw": "{\n \"claims\": {\n \"email\": \"email@domain.com\"\n }\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -4221,7 +3481,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "4acdf681-8366-4b61-a56a-3ce1bc9db2b6", + "id": "1fd82ed3-628d-4f97-969b-8c092609ce1d", "name": "OK", "originalRequest": { "url": { @@ -4236,46 +3496,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -4294,9 +3517,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "POST", @@ -4305,6 +3540,7 @@ "raw": "{\n \"claims\": {\n \"email\": \"email@domain.com\"\n }\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -4326,7 +3562,7 @@ { "listen": "test", "script": { - "id": "cac091cb-21f1-4921-ac63-a31cff454a6e", + "id": "1dd81ebc-8470-452a-8bee-537abbdbd8cd", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/holders - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -4342,7 +3578,7 @@ } }, { - "id": "4d7ca3a7-0238-4fe3-8c5a-8c5d43905562", + "id": "27cab8fb-26a1-4243-95e0-7ad8b68cbdf1", "name": "Delete an account holder", "request": { "name": "Delete an account holder", @@ -4383,24 +3619,6 @@ "type": "any", "value": "524bc947d2b37a1a759ba3d174b58f9b", "key": "holderId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -4422,81 +3640,39 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "DELETE" + "method": "DELETE", + "body": {} }, "response": [ { "_": { - "postman_previewlanguage": "json" - }, - "id": "286e2544-0ce9-4839-bc66-04954c069f8a", - "name": "OK", - "originalRequest": { - "url": { - "path": [ - "api", - "creditcontrol", - "accounts", - ":creditAccountId", - "holders", - ":holderId" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Holder identification.", - "type": "text/plain" - }, - "type": "any", - "value": "524bc947d2b37a1a759ba3d174b58f9b", - "key": "holderId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "postman_previewlanguage": "json" + }, + "id": "1215bd80-ce25-42f2-b6e4-51101466fa25", + "name": "OK", + "originalRequest": { + "url": { + "path": [ + "api", + "creditcontrol", + "accounts", + ":creditAccountId", + "holders", + ":holderId" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -4518,6 +3694,14 @@ { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "DELETE", @@ -4539,7 +3723,7 @@ { "listen": "test", "script": { - "id": "0c662332-5600-40a6-b228-e41b7ca4dd93", + "id": "c5ee97dd-8b19-4986-882f-5da70faf7048", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/creditcontrol/accounts/:creditAccountId/holders/:holderId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -4555,7 +3739,7 @@ } }, { - "id": "872959bd-9199-418d-b1ce-15484896b318", + "id": "8960b464-aa2a-41de-91f0-d99f905e62d9", "name": "Change tolerance of an account", "request": { "name": "Change tolerance of an account", @@ -4585,24 +3769,6 @@ "type": "any", "value": "01bce461-9g03-12ds-8217-b3d39271e15b", "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -4624,6 +3790,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "PUT", @@ -4632,6 +3806,7 @@ "raw": "{\n \"value\": 0.3\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -4642,7 +3817,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "748cd805-53a1-4d6a-ba9d-38a0676dcf84", + "id": "b6aec99e-225b-4d41-9950-cca064249436", "name": "OK", "originalRequest": { "url": { @@ -4657,46 +3832,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -4715,9 +3853,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "PUT", @@ -4726,6 +3876,7 @@ "raw": "{\n \"value\": 0.3\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -4739,7 +3890,7 @@ "value": "application/json" } ], - "body": "{\n \"id\": \"fcba59e0-7f26-11ee-ba3c-511336e1518b\",\n \"balance\": -15,\n \"status\": \"Open\",\n \"creditLimit\": 12500,\n \"updatedAt\": \"2023-11-10T18:49:50.8074778Z\",\n \"createdAt\": \"2023-11-09T17:39:52.151897Z\",\n \"description\": \"This field is deprecated and is returned as an empty string\",\n \"availableCredit\": 12444.99,\n \"preAuthorizedCredit\": 55.92,\n \"email\": \"test@test.com.br\",\n \"tolerance\": 0.3,\n \"availableBalance\": 12444.99\n}", + "body": "{\n \"id\": \"fcba59e0-7f26-11ee-ba3c-511336e1518b\",\n \"balance\": -15,\n \"status\": \"Open\",\n \"creditLimit\": 12500,\n \"updatedAt\": \"2023-11-10T18:49:50.8074778Z\",\n \"createdAt\": \"2023-11-09T17:39:52.151897Z\",\n \"description\": \"This field is deprecated and is returned as an empty string.\",\n \"availableCredit\": 12444.99,\n \"preAuthorizedCredit\": 55.92,\n \"email\": \"test@test.com.br\",\n \"tolerance\": 0.3,\n \"availableBalance\": 12444.99\n}", "cookie": [] } ], @@ -4747,13 +3898,13 @@ { "listen": "test", "script": { - "id": "dd7d50ba-e716-4e71-8032-6c7ea7adc106", + "id": "4df2e700-f921-4bc3-a8db-86eba9934e4b", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/tolerance - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/tolerance - Content-Type is application/json\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\n});\n", "// Validate if response has JSON Body \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/tolerance - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"required\":[\"id\",\"balance\",\"status\",\"creditLimit\",\"updatedAt\",\"createdAt\",\"availableCredit\",\"preAuthorizedCredit\",\"email\",\"tolerance\",\"availableBalance\"],\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Credit customer account identification.\"},\"balance\":{\"type\":\"number\",\"description\":\"Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used.\"},\"status\":{\"type\":\"string\",\"description\":\"Credit customer account status.\"},\"creditLimit\":{\"type\":\"number\",\"description\":\"Maximum credit amount on the account.\"},\"updatedAt\":{\"type\":\"string\",\"description\":\"Date of the last update made to the account.\"},\"createdAt\":{\"type\":\"string\",\"description\":\"Account creation date.\"},\"description\":{\"type\":\"string\",\"description\":\"This field is deprecated.\",\"deprecated\":true},\"availableCredit\":{\"type\":\"number\",\"description\":\"Credit amount available on the account.\"},\"preAuthorizedCredit\":{\"type\":\"number\",\"description\":\"Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction.\"},\"email\":{\"type\":\"string\",\"description\":\"Account owner email.\"},\"tolerance\":{\"type\":\"number\",\"description\":\"Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount.\"},\"availableBalance\":{\"type\":\"number\",\"description\":\"Balance available for use on the account.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/tolerance - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"required\":[\"id\",\"balance\",\"status\",\"creditLimit\",\"updatedAt\",\"createdAt\",\"availableCredit\",\"preAuthorizedCredit\",\"email\",\"tolerance\",\"availableBalance\"],\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Credit customer account identification.\"},\"balance\":{\"type\":\"number\",\"description\":\"Account balance value. If this number is negative, it means that the account has a debit instead of a credit to be used.\"},\"status\":{\"type\":\"string\",\"description\":\"Credit customer account status.\"},\"creditLimit\":{\"type\":\"number\",\"description\":\"Maximum credit amount on the account.\"},\"updatedAt\":{\"type\":\"string\",\"description\":\"Date of the last update made to the account.\"},\"createdAt\":{\"type\":\"string\",\"description\":\"Account creation date.\"},\"description\":{\"type\":\"string\",\"description\":\"This field is deprecated.\"},\"availableCredit\":{\"type\":\"number\",\"description\":\"Credit amount available on the account.\"},\"preAuthorizedCredit\":{\"type\":\"number\",\"description\":\"Credit value that can only be used by the account owner after the merchant releases a specific purchase transaction.\"},\"email\":{\"type\":\"string\",\"description\":\"Account owner email.\"},\"tolerance\":{\"type\":\"number\",\"description\":\"Account credit tolerance (in decimals). This value represents the increase in credit on an account. For example, a value of `0.30` indicates that the account owner can use up to 30% above the account's original maximum credit amount.\"},\"availableBalance\":{\"type\":\"number\",\"description\":\"Balance available for use on the account.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/tolerance - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -4763,7 +3914,7 @@ } }, { - "id": "e3776eea-9898-47b3-88e4-262d8fdff8a0", + "id": "bc4b3afc-0338-44a0-85f1-1421317ec671", "name": "Partially or totally refund a settlement", "request": { "name": "Partially or totally refund a settlement", @@ -4805,24 +3956,6 @@ "type": "any", "value": "B2E754DCD7304D22866CB6F221CF0FEB", "key": "transactionId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" } ] }, @@ -4844,6 +3977,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "POST", @@ -4852,6 +3993,7 @@ "raw": "{\n \"value\": 30\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -4862,7 +4004,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "bf4c3886-ced2-4fc1-b937-46196f6e1280", + "id": "1e5d0ca1-9121-463a-8ee2-5e7723900a4e", "name": "OK", "originalRequest": { "url": { @@ -4879,56 +4021,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) Credit account identification.", - "type": "text/plain" - }, - "type": "any", - "value": "01bce461-9g03-12ds-8217-b3d39271e15b", - "key": "creditAccountId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Pre-authorization identification.", - "type": "text/plain" - }, - "type": "any", - "value": "B2E754DCD7304D22866CB6F221CF0FEB", - "key": "transactionId" - }, - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -4947,9 +4042,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "POST", @@ -4958,6 +4065,7 @@ "raw": "{\n \"value\": 30\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -4971,7 +4079,7 @@ "value": "application/json" } ], - "body": "{\n \"value\": 30\n}", + "body": "30", "cookie": [] } ], @@ -4979,7 +4087,7 @@ { "listen": "test", "script": { - "id": "c8019cb7-1578-4e7e-bac4-a4db4d2f2cec", + "id": "42350fd9-6b30-483a-9f20-ce83b640ac0a", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/transactions/:transactionId/refunds - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -4998,7 +4106,7 @@ "event": [] }, { - "id": "d356d9d9-7ae9-4e69-a13e-2b41a295dd51", + "id": "98dcd879-72ca-4602-8b1d-e88033664d7f", "name": "Store Configuration", "description": { "content": "", @@ -5006,7 +4114,7 @@ }, "item": [ { - "id": "1cb4dbea-d60d-4433-942e-ecb68702d1e9", + "id": "125cef36-0520-4b15-be1d-8659cf3ef325", "name": "Retrieve store configuration", "request": { "name": "Retrieve store configuration", @@ -5024,26 +4132,7 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ { @@ -5063,16 +4152,21 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "GET" + "method": "GET", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "json" }, - "id": "d4262388-7885-46d0-b7d7-80afce944cea", + "id": "16396363-fc61-4b84-892b-a78d1002a1f1", "name": "OK", "originalRequest": { "url": { @@ -5085,36 +4179,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -5136,6 +4203,14 @@ { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "GET", @@ -5157,7 +4232,7 @@ { "listen": "test", "script": { - "id": "85657acf-a7b2-485a-acb2-79e87a37fadd", + "id": "791826a6-d8de-4289-8b1a-48d43f60979a", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/creditcontrol/storeconfig - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -5173,7 +4248,7 @@ } }, { - "id": "02adc63c-de64-4bd4-8875-bbfa451a2f30", + "id": "568b5c4b-9780-4e6a-893c-cc888b9c71bf", "name": "Create or change store configuration", "request": { "name": "Create or change store configuration", @@ -5191,26 +4266,7 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ { @@ -5230,6 +4286,14 @@ }, "key": "Accept", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "PUT", @@ -5238,6 +4302,7 @@ "raw": "{\n \"dailyInterestRate\": 0.01,\n \"invoicePostponementLimit\": 2,\n \"taxRate\": 0.4,\n \"maxPostponementDays\": 3,\n \"defaultCreditValue\": 150,\n \"maxPreAuthorizationGrowthRate\": 0.1,\n \"myCreditsEnabled\": true,\n \"toleranceEnabled\": true,\n \"automaticCheckingAccountCreationEnabled\": true,\n \"postponementEnabled\": true,\n \"notificationsSettings\": {\n \"daysPrior\": [\n {\n \"days\": 1,\n \"timeOfDay\": \"16:00:00\"\n },\n {\n \"days\": 1,\n \"timeOfDay\": \"16:00:00\"\n }\n ],\n \"daysAfter\": [\n {\n \"days\": 0,\n \"timeOfDay\": \"12:00:00\"\n },\n {\n \"days\": 0,\n \"timeOfDay\": \"12:00:00\"\n }\n ]\n }\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -5248,7 +4313,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "a9200a5e-3c06-48b3-8807-82314dac7371", + "id": "4360720c-7e9f-42e5-915b-b27e184ab0cf", "name": "OK", "originalRequest": { "url": { @@ -5261,36 +4326,9 @@ "{{baseUrl}}" ], "query": [], - "variable": [ - { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, - "type": "any", - "value": "{{accountName}}", - "key": "accountName" - }, - { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, - "type": "any", - "value": "{{environment}}", - "key": "environment" - } - ] + "variable": [] }, "header": [ - { - "description": { - "content": "Added as a part of security scheme: apikey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "" - }, { "disabled": false, "description": { @@ -5309,9 +4347,21 @@ "key": "Accept", "value": "application/json" }, + { + "key": "Content-Type", + "value": "application/json" + }, { "key": "Accept", "value": "application/json" + }, + { + "description": { + "content": "Added as a part of security scheme: apikey", + "type": "text/plain" + }, + "key": "X-VTEX-API-AppKey", + "value": "" } ], "method": "PUT", @@ -5320,6 +4370,7 @@ "raw": "{\n \"dailyInterestRate\": 0.01,\n \"invoicePostponementLimit\": 2,\n \"taxRate\": 0.4,\n \"maxPostponementDays\": 3,\n \"defaultCreditValue\": 150,\n \"maxPreAuthorizationGrowthRate\": 0.1,\n \"myCreditsEnabled\": true,\n \"toleranceEnabled\": true,\n \"automaticCheckingAccountCreationEnabled\": true,\n \"postponementEnabled\": true,\n \"notificationsSettings\": {\n \"daysPrior\": [\n {\n \"days\": 1,\n \"timeOfDay\": \"16:00:00\"\n },\n {\n \"days\": 1,\n \"timeOfDay\": \"16:00:00\"\n }\n ],\n \"daysAfter\": [\n {\n \"days\": 0,\n \"timeOfDay\": \"12:00:00\"\n },\n {\n \"days\": 0,\n \"timeOfDay\": \"12:00:00\"\n }\n ]\n }\n}", "options": { "raw": { + "headerFamily": "json", "language": "json" } } @@ -5341,7 +4392,7 @@ { "listen": "test", "script": { - "id": "c4b240ab-083e-40a1-829b-01aab8e8e3ff", + "id": "ed848cb5-47e8-4cb9-bd03-69333496f7e0", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/creditcontrol/storeconfig - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -5383,33 +4434,24 @@ "event": [], "variable": [ { - "description": { - "content": "Name of the VTEX account. Used as part of the URL", - "type": "text/plain" - }, "type": "any", "value": "apiexamples", "key": "accountName" }, { - "description": { - "content": "Environment to use. Used as part of the URL. (This can only be one of vtexcommercestable)", - "type": "text/plain" - }, "type": "any", "value": "vtexcommercestable", "key": "environment" }, { - "type": "string", + "type": "any", "value": "https://{{accountName}}.{{environment}}.com.br", "key": "baseUrl" } ], "info": { - "_postman_id": "f81d30fa-cb1e-4092-b37e-4e106131f6b1", + "_postman_id": "ca090c7e-4bcc-4f1e-9d87-87af93b0d62c", "name": "Customer Credit API", - "version": {}, "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": { "content": "With Customer Credit your store can enable **credit payments** through the checkout. You can also control **invoices** and the **credit limits** of your clients.\r\n\r\nLearn more about Customer Credit in our [Help Center article](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/36grlQ69NK6OCuioeekyCs).\r\n\r\nAdditionally, you can find more information on installment payments for an order in the `customData` field found in the [Get Order](https://developers.vtex.com/docs/api-reference/orders-api#get-/api/oms/pvt/orders/-orderId-) endpoint of the Orders API. This includes the number of installments, amount and due dates.\r\n\r\nAll requests need an authorization header. This API allows two kinds of authorization:\r\n\r\n1. Authorization header containing the VTEX ID authentication token.\r\n2. VTEX Appkey and Apptoken headers.\r\n\r\nRead [Authentication](https://developers.vtex.com/docs/guides/authentication) for more information about authentication options.\r\n\r\n## Customer Credit API Index\r\n\r\n### Invoices\r\n\r\n- `GET` [Search all invoices](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/invoices)\r\n- `GET` [Retrieve Invoice by Id](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-)\r\n- `PUT` [Change Invoice](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-)\r\n- `DELETE` [Cancel Invoice](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-)\r\n- `GET` [Retrieve invoices by Customer Credit account ID](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-/invoices)\r\n- `POST` [Mark an invoice as Paid](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-/payments)\r\n- `PUT` [Postpone an invoice](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/invoices/-invoiceId-/postponement)\r\n\r\n### Account\r\n\r\n- `GET` [Search all accounts](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts)\r\n- `POST` [Open an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts)\r\n- `GET` [Retrieve an account by Id](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-)\r\n- `DELETE` [Close an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-)\r\n- `PUT` [Update account information](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-)\r\n- `GET` [Account statements](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/accounts/-creditAccountId-/statements)\r\n- `PUT` [Change credit limit of an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/creditlimit)\r\n- `PUT` [Decrease balance of an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/statements/-statementId-)\r\n- `PUT` [Create or Update Settlement](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-/settlement)\r\n- `POST` [Create a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/transactions)\r\n- `PUT` [Update a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-)\r\n- `DELETE` [Cancel a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-)\r\n- `POST` [Add an account Holder](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/holders)\r\n- `DELETE` [Delete an account holder](https://developers.vtex.com/docs/api-reference/customer-credit-api#delete-/api/creditcontrol/accounts/-creditAccountId-/holders/-holderId-)\r\n- `PUT` [Change tolerance of an account](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/accounts/-creditAccountId-/tolerance)\r\n- `POST` [Partial or Total Refund a Settlement](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/transactions/-transactionId-/refunds)\r\n\r\n### Store Configuration\r\n\r\n- `GET` [Retrieve store configuration](https://developers.vtex.com/docs/api-reference/customer-credit-api#get-/api/creditcontrol/storeconfig)\r\n- `PUT` [Create or change store configuration](https://developers.vtex.com/docs/api-reference/customer-credit-api#put-/api/creditcontrol/storeconfig)\r\n", diff --git a/VTEX - Customer Credit API.json b/VTEX - Customer Credit API.json index 5bf2c87bc..8ce1bf5c4 100644 --- a/VTEX - Customer Credit API.json +++ b/VTEX - Customer Credit API.json @@ -127,7 +127,7 @@ "style": "form", "schema": { "type": "string", - "enum": ["Open", "Paid", "Cancelled"], + "enum": ["Opened", "Paid", "Cancelled"], "example": "Paid" } }, @@ -541,7 +541,7 @@ "status": { "type": "string", "description": "Invoice status.", - "enum": ["Open", "Paid", "Cancelled"], + "enum": ["Opened", "Paid", "Cancelled"], "example": "Paid" }, "observation": { @@ -854,7 +854,7 @@ "status": { "type": "string", "description": "Invoice status.", - "enum": ["Open", "Paid", "Cancelled"] + "enum": ["Opened", "Paid", "Cancelled"] }, "value": { "type": "number", @@ -1025,7 +1025,7 @@ "style": "form", "schema": { "type": "string", - "enum": ["Open", "Paid", "Cancelled"], + "enum": ["Opened", "Paid", "Cancelled"], "example": "Paid" } },