From 1486f8a9f8f9e560fb545ec23b48e6cdb3a8357b Mon Sep 17 00:00:00 2001 From: Geise Costa Date: Thu, 7 Dec 2023 15:43:59 -0300 Subject: [PATCH 1/5] Added common parameter table --- VTEX - Pricing Hub.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Pricing Hub.json b/VTEX - Pricing Hub.json index e374ad610..7e02ce382 100644 --- a/VTEX - Pricing Hub.json +++ b/VTEX - Pricing Hub.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "Pricing Hub", - "description": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https:\/\/support.vtex.com\/hc\/en-us\/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https:\/\/user-images.githubusercontent.com\/77292838\/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https:\/\/github.com\/vtex-apps\/external-prices-app)\r\n- [Node template](https:\/\/github.com\/vtex-apps\/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- [POST - Retrieve prices](https:\/\/developers.vtex.com\/docs\/api-reference\/pricing-hub#post-\/api\/pricing-hub\/prices?endpoint=post-\/api\/pricing-hub\/prices)\r\n- [PUT - Configure External Price Source](https:\/\/developers.vtex.com\/docs\/api-reference\/pricing-hub#put-\/api\/pricing-hub\/prices\/config)", + "description": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https:\/\/support.vtex.com\/hc\/en-us\/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https:\/\/user-images.githubusercontent.com\/77292838\/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https:\/\/github.com\/vtex-apps\/external-prices-app)\r\n- [Node template](https:\/\/github.com\/vtex-apps\/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- [POST - Retrieve prices](https:\/\/developers.vtex.com\/docs\/api-reference\/pricing-hub#post-\/api\/pricing-hub\/prices?endpoint=post-\/api\/pricing-hub\/prices)\r\n- [PUT - Configure External Price Source](https:\/\/developers.vtex.com\/docs\/api-reference\/pricing-hub#put-\/api\/pricing-hub\/prices\/config)\r\n## Common parameters in the documentation\r\n\r\n| Parameter name | Description |\r\n|---------------------------|-----------------------------------------------------------------------------------------|\r\n| `{{accountName}}` | Store account name. |\r\n| `{{environment}}` | The environment that will be called. |\r\n| `{{X-VTEX-API-AppKey}}` | Located in the headers of the requests, user authentication key. |\r\n| `{{X-VTEX-API-AppToken}}` | Located in the headers of the requests, authentication password. |\r\n", "contact": {}, "version": "1.0" }, From fedaddbc11eb94c24bf73ca9ef33435c6cc88cea Mon Sep 17 00:00:00 2001 From: ricardoaerobr Date: Thu, 7 Dec 2023 11:51:43 -0300 Subject: [PATCH 2/5] Fix API Index links --- VTEX - Customer Credit API.json | 2 +- VTEX - GiftCard Hub API.json | 2 +- VTEX - Giftcard API.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VTEX - Customer Credit API.json b/VTEX - Customer Credit API.json index dd5a30b31..3c9d2f6ba 100644 --- a/VTEX - Customer Credit API.json +++ b/VTEX - Customer Credit API.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "Customer Credit API", - "description": "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 invoice by creditAccountId](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-/transaction)\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", + "description": "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 invoice by creditAccountId](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", "contact": {}, "version": "1.0" }, diff --git a/VTEX - GiftCard Hub API.json b/VTEX - GiftCard Hub API.json index b558dd3d9..4f873cff1 100644 --- a/VTEX - GiftCard Hub API.json +++ b/VTEX - GiftCard Hub API.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "GiftCard Hub API", - "description": ">ℹ️ Check the new [Payments onboarding guide](https:\/\/developers.vtex.com\/vtex-rest-api\/docs\/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Gift Card Hub API allows interactions with all Gift card providers registered to a store from a single point.\r\n\r\nGift card providers are systems capable of providing cards to be used in the buying process.\r\n\r\nThe following is the sequence diagram that represents calls in the purchase closing process.\r\n![](https:\/\/cdn.jsdelivr.net\/gh\/vtexdocs\/dev-portal-content@main\/images\/gift-card-integration-guide-provider-protocol-0.png)\r\n\r\n**Checkout + Gateway**: Systems responsible for the sale and for processing orders and payments.\r\n\r\n**Gift Card Hub**: System responsible for managing multiple registered Gift card providers for a store.\r\n\r\n**Gift Card Provider**: System responsible for providing the Gift cards available to the user not closing a purchase. This system can be implemented by third parties.\r\n\r\n## GiftCard Hub API Index\r\n\r\n### Provider\r\n\r\n- `GET` [List All GiftCard Providers](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/giftcardproviders)\r\n- `GET` [Get GiftCard Provider by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/giftcardproviders\/-giftCardProviderId-)\r\n- `PUT` [Create\/Update GiftCard Provider by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#put-\/giftcardproviders\/-giftCardProviderID-)\r\n- `DELETE` [Delete GiftCard Provider by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#delete-\/giftcardproviders\/-giftCardProviderID-)\r\n\r\n### Transaction\r\n\r\n- `POST` [Create GiftCard in GiftCard Provider](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/giftcardproviders\/-giftCardProviderID-\/giftcards)\r\n- `POST` [Get GiftCard from GiftCard Provider](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/_search)\r\n- `GET` [Get GiftCard from GiftCard Provider by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/-giftCardID-)\r\n- `GET` [List All GiftCard Transactions](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/-giftCardID-\/transactions)\r\n- `POST` [Create GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/-giftCardID-\/transactions)\r\n- `GET` [Get GiftCard Transaction by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/-giftCardID-\/transactions\/-transactionID-)\r\n- `GET` [Get GiftCard Authorization Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/-giftCardID-\/transactions\/-tId-\/authorization)\r\n- `GET` [List All GiftCard Settlement Transactions](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/-giftCardID-\/transactions\/-tId-\/settlements)\r\n- `POST` [Create GiftCard Settlement Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/-giftCardID-\/transactions\/-tId-\/settlements)\r\n- `GET` [List All GiftCard Cancellation Transactions](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/-giftCardID-\/transactions\/-tId-\/cancellations)\r\n- `POST` [Create GiftCard Cancellation Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/giftcardproviders\/-giftCardProviderID-\/giftcards\/-giftCardID-\/transactions\/-tId-\/cancellations).", + "description": ">ℹ️ Check the new [Payments onboarding guide](https:\/\/developers.vtex.com\/vtex-rest-api\/docs\/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Gift Card Hub API allows interactions with all Gift card providers registered to a store from a single point.\r\n\r\nGift card providers are systems capable of providing cards to be used in the buying process.\r\n\r\nThe following is the sequence diagram that represents calls in the purchase closing process.\r\n![](https:\/\/cdn.jsdelivr.net\/gh\/vtexdocs\/dev-portal-content@main\/images\/gift-card-integration-guide-provider-protocol-0.png)\r\n\r\n**Checkout + Gateway**: Systems responsible for the sale and for processing orders and payments.\r\n\r\n**Gift Card Hub**: System responsible for managing multiple registered Gift card providers for a store.\r\n\r\n**Gift Card Provider**: System responsible for providing the Gift cards available to the user not closing a purchase. This system can be implemented by third parties.\r\n\r\n## GiftCard Hub API Index\r\n\r\n### Provider\r\n\r\n- `PUT` [Create\/Update GiftCard Provider by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#put-\/api\/giftcardproviders\/-giftCardProviderId-)\r\n- `GET` [Get GiftCard Provider by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/api\/giftcardproviders\/-giftCardProviderId-)\r\n- `GET` [List All GiftCard Providers](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/api\/giftcardproviders)\r\n- `DELETE` [Delete GiftCard Provider by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#delete-\/api\/giftcardproviders\/-giftCardProviderId-)\r\n\r\n### Transaction\r\n\r\n- `POST` [Create GiftCard in GiftCard Provider](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards)\r\n- `POST` [Get GiftCard from GiftCard Provider](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/_search)\r\n- `GET` [Get GiftCard from GiftCard Provider by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/-giftCardId-)\r\n- `POST` [Create GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/-giftCardId-\/transactions)\r\n- `GET` [Get GiftCard Transaction by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/-giftCardId-\/transactions\/-transactionId-)\r\n- `GET` [List All GiftCard Transactions](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/-giftCardId-\/transactions)\r\n- `GET` [Get GiftCard Transaction Authorization](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/-giftCardId-\/transactions\/-tId-\/authorization)\r\n- `POST` [Cancel GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/-giftCardId-\/transactions\/-tId-\/cancellations)\r\n- `GET` [List All GiftCard Transactions Cancellations](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/-giftCardId-\/transactions\/-tId-\/cancellations)\r\n- `POST` [Settle GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#post-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/-giftCardId-\/transactions\/-tId-\/settlements)\r\n- `GET` [List All GiftCard Transactions Settlements](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-hub-api#get-\/api\/giftcardproviders\/-giftCardProviderId-\/giftcards\/-giftCardId-\/transactions\/-tId-\/settlements)", "contact": {}, "version": "1.0" }, diff --git a/VTEX - Giftcard API.json b/VTEX - Giftcard API.json index 639ecfb77..83b287f6b 100644 --- a/VTEX - Giftcard API.json +++ b/VTEX - Giftcard API.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "GiftCard API", - "description": ">ℹ️ Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Gift Card is a payment method configured as a cash value associated with a client. It is used to grant a discount on the value of the order at the store. A Gift Card works as a **payment method**, **not a promotion**.\r\n\r\nIn VTEX's native gift card system, you can choose to create a new gift card either through [Admin VTEX](https://help.vtex.com/en/tutorial/gift-card--tutorials_995) or [API](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards). However, there are specific conditions to be observed when generating gift cards by one of these two methods.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
SpecificationsAdmin VTEXGiftCard API
Initial valueYou can create gift cards value with any value.All gift cards are generated with no value (balance = 0). After its creation, you need to use Admin VTEX or the Create GiftCard Transaction to add any balance amount.
Ownership restrictionYou can create gift cards with or without a user assigned to them.All gift cards must be created with a profileId associated to them.
User data identificationCustomer ID (data that identifies a specific client, such as CPF/CNPJ in Brazil).profileId (data that identifies a specific client)
Additional SettingsYou can use checkboxes to select whether a gift card will be: Restricted (only a specific customer ID can use this gift card), Reloadable (balance can be changed while it is still active), or Reusable (available for making new purchases with this gift card until its value is completely used up).You can use the following fields to configure the same conditions applied in Admin: restrictedToOwner, multipleCredits, and multipleRedemptions.
\r\n\r\n>⚠️ All GiftCard API endpoints are limited to 500 concurrent requests and 5000 requests per minute.\r\n\r\n## GiftCard API Index\r\n\r\n### Gift Card\r\n\r\n- `POST` [Create GiftCard](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards)\r\n- `GET` [Get GiftCard by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-)\r\n- `POST` [List All GiftCards](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards\/_search)\r\n\r\n### Transaction\r\n\r\n- `POST` [Create GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards\/-giftCardId-\/transactions)\r\n- `GET` [Get GiftCard Transaction by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions\/-transactionId-)\r\n- `GET` [List All GiftCards Transactions](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions)\r\n- `GET` [Get GiftCard Transaction Authorizations](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/authorization)\r\n- `POST` [Cancel GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/cancellations)\r\n- `GET` [List All GiftCard Transaction Cancellations](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/cancellations)\r\n- `POST` [Settle GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/settlements)\r\n- `GET` [List All GiftCard Transactions Settlements](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/settlements).", + "description": ">ℹ️ Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Gift Card is a payment method configured as a cash value associated with a client. It is used to grant a discount on the value of the order at the store. A Gift Card works as a **payment method**, **not a promotion**.\r\n\r\nIn VTEX's native gift card system, you can choose to create a new gift card either through [Admin VTEX](https://help.vtex.com/en/tutorial/gift-card--tutorials_995) or [API](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards). However, there are specific conditions to be observed when generating gift cards by one of these two methods.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
SpecificationsAdmin VTEXGiftCard API
Initial valueYou can create gift cards value with any value.All gift cards are generated with no value (balance = 0). After its creation, you need to use Admin VTEX or the Create GiftCard Transaction to add any balance amount.
Ownership restrictionYou can create gift cards with or without a user assigned to them.All gift cards must be created with a profileId associated to them.
User data identificationCustomer ID (data that identifies a specific client, such as CPF/CNPJ in Brazil).profileId (data that identifies a specific client)
Additional SettingsYou can use checkboxes to select whether a gift card will be: Restricted (only a specific customer ID can use this gift card), Reloadable (balance can be changed while it is still active), or Reusable (available for making new purchases with this gift card until its value is completely used up).You can use the following fields to configure the same conditions applied in Admin: restrictedToOwner, multipleCredits, and multipleRedemptions.
\r\n\r\n>⚠️ All GiftCard API endpoints are limited to 500 concurrent requests and 5000 requests per minute.\r\n\r\n## GiftCard API Index\r\n\r\n### Gift Card\r\n\r\n- `POST` [Create GiftCard](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards)\r\n- `GET` [Get GiftCard by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-)\r\n- `POST` [List All GiftCards](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards\/_search)\r\n\r\n### Transaction\r\n\r\n- `POST` [Create GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards\/-giftCardId-\/transactions)\r\n- `GET` [Get GiftCard Transaction by ID](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions\/-transactionId-)\r\n- `GET` [List All GiftCards Transactions](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions)\r\n- `GET` [Get GiftCard Transaction Authorizations](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/authorization)\r\n- `POST` [Cancel GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/cancellations)\r\n- `GET` [List All GiftCard Transaction Cancellations](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/cancellations)\r\n- `POST` [Settle GiftCard Transaction](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#post-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/settlements)\r\n- `GET` [List All GiftCard Transactions Settlements](https:\/\/developers.vtex.com\/docs\/api-reference\/giftcard-api#get-\/giftcards\/-giftCardId-\/transactions\/-transactionId-\/settlements)", "contact": {}, "version": "1.0" }, @@ -15,7 +15,7 @@ "description": "Name of the VTEX account. Used as part of the URL.", "default": "apiexamples" }, - "environment": { + "environment": { "description": "Environment to use. Used as part of the URL.", "enum": [ "vtexcommercestable" From 36b53d60257050ad9f3762df6e6c196e29d79432 Mon Sep 17 00:00:00 2001 From: ricardoaerobr <> Date: Thu, 7 Dec 2023 14:55:28 +0000 Subject: [PATCH 3/5] Update generated files by portman --- .../VTEX - Customer Credit API.json | 304 +++--- .../VTEX - GiftCard Hub API.json | 927 ++++-------------- PostmanCollections/VTEX - Giftcard API.json | 78 +- 3 files changed, 386 insertions(+), 923 deletions(-) diff --git a/PostmanCollections/VTEX - Customer Credit API.json b/PostmanCollections/VTEX - Customer Credit API.json index 5314a7a67..60a18468b 100644 --- a/PostmanCollections/VTEX - Customer Credit API.json +++ b/PostmanCollections/VTEX - Customer Credit API.json @@ -1,10 +1,10 @@ { "_": { - "postman_id": "7a069ea5-02b5-4db7-9033-17449078a7aa" + "postman_id": "1cf140bf-66f4-4c36-bf2c-896acb7fbe4c" }, "item": [ { - "id": "20f5823b-5991-4992-b607-4cc18c8d8e25", + "id": "23a3c0b7-c561-4d61-aace-3bcd586b0e85", "name": "Invoices", "description": { "content": "", @@ -12,7 +12,7 @@ }, "item": [ { - "id": "e8a82bd5-6a25-4397-9008-ab0af97464a7", + "id": "2a16ecc3-843f-4470-a634-e581e9fbe891", "name": "Search all invoices", "request": { "name": "Search all invoices", @@ -33,20 +33,20 @@ { "disabled": false, "description": { - "content": "Indicates the starting position of the invoice to be searched in the invoice list. Example, value `1` indicates that the first invoice in the list will be returned.", + "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": "consequat commodo dolor non aliquip" + "value": "1" }, { "disabled": false, "description": { - "content": "Indicates the final position of the invoice to be searched in the invoice list. 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.", + "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": "consectetur" + "value": "300" }, { "disabled": false, @@ -91,7 +91,7 @@ "type": "text/plain" }, "key": "value", - "value": "-16867977.18987894" + "value": "101.22" }, { "disabled": false, @@ -105,7 +105,7 @@ { "disabled": false, "description": { - "content": "Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice and it consists of a 8 digit random id (of numbers and letters) and the installment.", + "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", @@ -164,7 +164,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "e45d5585-390e-4aa8-8b20-748f56572ed6", + "id": "86a0fccc-510e-4d0d-b350-8d95982d6ddc", "name": "OK", "originalRequest": { "url": { @@ -179,11 +179,11 @@ "query": [ { "key": "from", - "value": "consequat commodo dolor non aliquip" + "value": "1" }, { "key": "to", - "value": "consectetur" + "value": "300" }, { "key": "createdDateFrom", @@ -203,7 +203,7 @@ }, { "key": "value", - "value": "-16867977.18987894" + "value": "101.22" }, { "key": "status", @@ -375,13 +375,13 @@ { "listen": "test", "script": { - "id": "29f9081f-fa3c-44bb-bc45-4a92729abe61", + "id": "3b167c8b-6efb-4539-b52d-b4ff6c07593f", "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", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/creditcontrol/invoices - 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(\"[GET]::/api/creditcontrol/invoices - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"required\":[\"data\",\"summary\"],\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"array\",\"description\":\"Data information.\",\"items\":{\"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 and it consists of a 8 digit random id (of numbers and letters) and the installment.\"},\"status\":{\"type\":\"string\",\"description\":\"Invoice status. Possible values: `Open`, `Paid` or `Cancelled`.\"},\"value\":{\"type\":\"number\",\"description\":\"Invoice value.\"},\"accountId\":{\"type\":\"string\",\"description\":\"Account identification. It is the same `creditAccountId` parameter used in other Customer Credit API endpoints.\"},\"creditValue\":{\"type\":\"number\",\"description\":\"Credit value.\"},\"createdAt\":{\"type\":\"string\",\"description\":\"Invoice creation date.\"},\"resolvedAt\":{\"type\":[\"string\",\"null\"],\"description\":\"Invoice closing date.\"},\"updatedAt\":{\"type\":\"string\",\"description\":\"Date of the last update made to the invoice.\"},\"paymentLink\":{\"type\":[\"string\",\"null\"],\"description\":\"Link (URL) created to direct the customer to an invoice payment environment (optional).\"},\"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\":\"number\",\"description\":\"Identification of the order that generated the invoice.\"},\"observation\":{\"type\":[\"string\",\"null\"],\"description\":\"Observation notes about 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.\"}}}},\"summary\":{\"required\":[\"total\",\"count\"],\"type\":\"object\",\"description\":\"Summary information.\",\"properties\":{\"total\":{\"type\":\"number\",\"description\":\"Total amount payable (sum of invoices listed with status `Open`).\"},\"count\":{\"type\":\"integer\",\"description\":\"Number of invoices listed.\"},\"totalPaid\":{\"type\":\"integer\",\"description\":\"Total amount paid (sum of invoices listed with status `Paid`).\"},\"totalCancelled\":{\"type\":\"integer\",\"description\":\"Total amount canceled (sum of invoices listed with status `Cancelled`).\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/invoices - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", + "// Response Validation\nconst schema = {\"required\":[\"data\",\"summary\"],\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"array\",\"description\":\"Data information.\",\"items\":{\"required\":[\"id\",\"friendlyId\",\"status\",\"value\",\"accountId\",\"creditValue\",\"createdAt\",\"updatedAt\",\"originalDueDate\",\"dueDate\",\"installment\",\"orderId\",\"transactionId\",\"numberOfInstallments\",\"creditAccountId\"],\"type\":\"object\",\"description\":\"Object with information about each invoice.\",\"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 `creditAccountId` parameter used in other Customer Credit API endpoints.\"},\"creditValue\":{\"type\":\"number\",\"description\":\"Credit value.\"},\"createdAt\":{\"type\":\"string\",\"description\":\"Invoice creation date.\"},\"resolvedAt\":{\"type\":[\"string\",\"null\"],\"description\":\"Invoice closing date.\"},\"updatedAt\":{\"type\":\"string\",\"description\":\"Date of the last update made to the invoice.\"},\"paymentLink\":{\"type\":[\"string\",\"null\"],\"description\":\"Link (URL) created to direct the customer to an invoice payment environment (optional).\"},\"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.\"},\"observation\":{\"type\":[\"string\",\"null\"],\"description\":\"Observation notes about 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.\"}}}},\"summary\":{\"required\":[\"total\",\"count\"],\"type\":\"object\",\"description\":\"Summary information.\",\"properties\":{\"total\":{\"type\":\"number\",\"description\":\"Total amount payable (sum of invoices listed with status `Open`).\"},\"count\":{\"type\":\"integer\",\"description\":\"Number of invoices listed.\"},\"totalPaid\":{\"type\":\"number\",\"description\":\"Total amount paid (sum of invoices listed with status `Paid`).\"},\"totalCancelled\":{\"type\":\"number\",\"description\":\"Total amount canceled (sum of invoices listed with status `Cancelled`).\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/invoices - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/invoices - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/invoices - Response header Content-Encoding is present\", function () {\n pm.response.to.have.header(\"Content-Encoding\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/invoices - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -400,10 +400,10 @@ } }, { - "id": "1e837724-8163-48b6-9add-9100555edd55", - "name": "Retrieve Invoice by Id", + "id": "d6b999ca-2f76-468c-9b37-6374c541e477", + "name": "Retrieve invoice by ID", "request": { - "name": "Retrieve Invoice by Id", + "name": "Retrieve invoice by ID", "description": { "content": "Returns data from a specific invoice using `invoiceId`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Read Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" @@ -475,7 +475,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "c2e9d697-041f-4085-9def-df43924261d9", + "id": "b6097f05-bd89-4afc-982a-bb81d015b3c7", "name": "OK", "originalRequest": { "url": { @@ -655,13 +655,13 @@ { "listen": "test", "script": { - "id": "4c7fad69-a070-4c10-9c89-70bbe1367e09", + "id": "64311039-81ba-4a0a-bcce-7cad76c63823", "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", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - 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(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - 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 and it consists of a 8 digit random id (of numbers and letters) and the installment.\"},\"status\":{\"type\":\"string\",\"description\":\"Invoice status. Possible values: `Open`, `Paid` or `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\":\"number\",\"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(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - 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(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - Response header Content-Length is present\", function () {\n pm.response.to.have.header(\"Content-Length\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -679,12 +679,12 @@ } }, { - "id": "2f204e21-551e-4660-9a7b-21b2030aba8b", - "name": "Change Invoice", + "id": "0c3ab889-657a-4a18-bfac-eb25d7945380", + "name": "Change invoice", "request": { - "name": "Change Invoice", + "name": "Change invoice", "description": { - "content": "Updates invoice's attributes `status`, `observation` and `paymentLink`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Create Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Updates invoice's `status`, `observation` and `paymentLink` attributes.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Create Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -703,7 +703,7 @@ { "disabled": false, "description": { - "content": "Simplified identification of an invoice. This code is created automatically, always associated with an existing invoice and it consists of a 8 digit random id (of numbers and letters) and the installment.", + "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", @@ -760,7 +760,7 @@ "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"status\": \"Paid\",\n \"observation\": \"in incididunt cupidatat pariatur\",\n \"paymentLink\": \"nisi officia cillum\"\n}", + "raw": "{\n \"status\": \"Paid\",\n \"observation\": \"BF 2023 customer invoice.\",\n \"paymentLink\": \"https://paymentlink.com\"\n}", "options": { "raw": { "language": "json" @@ -773,8 +773,8 @@ "_": { "postman_previewlanguage": "text" }, - "id": "1889e091-3f4a-4c9f-9ad4-91967c7a72fa", - "name": "No content.", + "id": "3d376bb9-46f3-49e9-aa6c-0569c4ea19b4", + "name": "OK. This endpoint does not return any data in the response body.", "originalRequest": { "url": { "path": [ @@ -866,7 +866,7 @@ "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"status\": \"Paid\",\n \"observation\": \"in incididunt cupidatat pariatur\",\n \"paymentLink\": \"nisi officia cillum\"\n}", + "raw": "{\n \"status\": \"Paid\",\n \"observation\": \"BF 2023 customer invoice.\",\n \"paymentLink\": \"https://paymentlink.com\"\n}", "options": { "raw": { "language": "json" @@ -890,7 +890,7 @@ { "listen": "test", "script": { - "id": "1b8ef9d9-9dbb-4fd5-8098-b7468fd3838d", + "id": "39905367-7357-4193-8e5c-a3c6ba4dfb8e", "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" @@ -903,10 +903,10 @@ } }, { - "id": "3dbb68c4-7bf1-41f2-a127-1f4f341b8073", - "name": "Cancel Invoice", + "id": "3a17a662-9112-4717-9490-a8a019f27dca", + "name": "Cancel invoice", "request": { - "name": "Cancel Invoice", + "name": "Cancel invoice", "description": { "content": "Changes the status of a specific invoice (`invoiceId`) to `Cancelled`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Create Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" @@ -972,8 +972,8 @@ "_": { "postman_previewlanguage": "text" }, - "id": "58abb3ac-3392-4571-a44a-8eae3c2d0056", - "name": "OK", + "id": "bbcfd12d-ca38-440e-9503-7d7b4a8dc9c3", + "name": "OK. This endpoint does not return any data in the response body.", "originalRequest": { "url": { "path": [ @@ -1076,7 +1076,7 @@ { "listen": "test", "script": { - "id": "bd4a2ba5-5886-4a92-bce4-6d0fb58237d7", + "id": "738a4b2a-d6e1-4a1a-b0d4-61b39ec7f9bd", "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" @@ -1089,10 +1089,10 @@ } }, { - "id": "f5694d6e-10da-4abd-895f-f9392d35b2d2", - "name": "Retrieve invoice by creditAccountId", + "id": "2de02c44-7a1d-4738-b9ae-11cd51814188", + "name": "Retrieve invoices by creditaccountid", "request": { - "name": "Retrieve invoice by creditAccountId", + "name": "Retrieve invoices by creditaccountid", "description": { "content": "Returns associated invoices given a specific `creditAccountId`.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Read Invoices** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" @@ -1153,7 +1153,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "26cb3935-b686-4f71-9583-92b5b7bb5163", + "id": "cff2318e-778a-418a-9253-6a08e20e70cd", "name": "OK", "originalRequest": { "url": { @@ -1331,13 +1331,13 @@ { "listen": "test", "script": { - "id": "4e7affaf-b12c-4a7e-baf0-c1ba105fc072", + "id": "4ac9ebc1-3e61-4fd0-9869-a69ad28e5724", "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", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices - 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(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"required\":[\"data\",\"summary\"],\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"array\",\"description\":\"Data information.\",\"items\":{\"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 and it consists of a 8 digit random id (of numbers and letters) and the installment.\"},\"status\":{\"type\":\"string\",\"description\":\"Invoice status. Possible values: `Open`, `Paid` or `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\":\"number\",\"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.\"}}}},\"summary\":{\"required\":[\"total\",\"count\"],\"type\":\"object\",\"description\":\"Summary information.\",\"properties\":{\"total\":{\"type\":\"number\",\"description\":\"Total amount payable (sum of invoices listed with status `Open`).\"},\"count\":{\"type\":\"integer\",\"description\":\"Number of invoices listed.\"},\"totalPaid\":{\"type\":\"integer\",\"description\":\"Total amount paid (sum of invoices listed with status `Paid`).\"},\"totalCancelled\":{\"type\":\"integer\",\"description\":\"Total amount canceled (sum of invoices listed with status `Cancelled`).\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", + "// Response Validation\nconst schema = {\"required\":[\"data\",\"summary\"],\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"array\",\"description\":\"Data information.\",\"items\":{\"required\":[\"id\",\"friendlyId\",\"status\",\"value\",\"accountId\",\"creditValue\",\"createdAt\",\"updatedAt\",\"originalDueDate\",\"dueDate\",\"installment\",\"orderId\",\"transactionId\",\"numberOfInstallments\",\"creditAccountId\"],\"type\":\"object\",\"description\":\"Object with information about each invoice.\",\"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.\"}}}},\"summary\":{\"required\":[\"total\",\"count\"],\"type\":\"object\",\"description\":\"Summary information.\",\"properties\":{\"total\":{\"type\":\"number\",\"description\":\"Total amount payable (sum of invoices listed with status `Open`).\"},\"count\":{\"type\":\"integer\",\"description\":\"Number of invoices listed.\"},\"totalPaid\":{\"type\":\"integer\",\"description\":\"Total amount paid (sum of invoices listed with status `Paid`).\"},\"totalCancelled\":{\"type\":\"integer\",\"description\":\"Total amount canceled (sum of invoices listed with status `Cancelled`).\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices - Response header Content-Encoding is present\", function () {\n pm.response.to.have.header(\"Content-Encoding\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/invoices - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -1356,10 +1356,10 @@ } }, { - "id": "b9d51b1d-c15d-425c-b4d7-e019d8ff442a", - "name": "Mark an invoice as Paid", + "id": "e4a6c351-fb17-41fc-88ef-d9c4f8519072", + "name": "Mark an invoice as paid", "request": { - "name": "Mark an invoice as Paid", + "name": "Mark an invoice as paid", "description": { "content": "Records the payment of an invoice.\r\n\r\nThis operation causes a balance restore with the invoice value to the checking account.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Invoices | **Pay Invoice** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" @@ -1432,7 +1432,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "31979b4d-1d4d-4dd1-ad58-4b1bb2295e98", + "id": "6c5a3560-8784-4180-b771-4a285ca7fde8", "name": "OK", "originalRequest": { "url": { @@ -1640,13 +1640,13 @@ { "listen": "test", "script": { - "id": "c16ea02b-47a8-4c5d-b11a-0fa001c36c7e", + "id": "2ed97b71-2e4f-45dc-89be-9c65ac41a776", "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\":[\"data\",\"summary\"],\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"array\",\"description\":\"Data information.\",\"items\":{\"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 and it consists of a 8 digit random id (of numbers and letters) and the installment.\"},\"status\":{\"type\":\"string\",\"description\":\"Invoice status. Possible values: `Open`, `Paid` or `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\":\"number\",\"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\":[\"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", "// Validate if response header is present \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/payments - Response header Access-Control-Allow-Origin is present\", function () {\n pm.response.to.have.header(\"Access-Control-Allow-Origin\");\n});\n", "// Validate if response header is present \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/payments - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[POST]::/api/creditcontrol/accounts/:creditAccountId/invoices/:invoiceId/payments - Response header Content-Length is present\", function () {\n pm.response.to.have.header(\"Content-Length\");\n});\n", @@ -1667,7 +1667,7 @@ } }, { - "id": "25317e2c-34ad-4d5b-b305-31992c3b7898", + "id": "23e679b7-23ee-4162-9947-ab95ea7653e8", "name": "Postpone an invoice", "request": { "name": "Postpone an invoice", @@ -1752,8 +1752,8 @@ "_": { "postman_previewlanguage": "text" }, - "id": "fdc0a3ab-b4fe-4aab-b412-b21a45b7f9fd", - "name": "OK", + "id": "4e6416c6-0d71-4fad-94d0-ac51814b69a2", + "name": "OK. This endpoint does not return any data in the response body.", "originalRequest": { "url": { "path": [ @@ -1865,7 +1865,7 @@ { "listen": "test", "script": { - "id": "2aee67f0-05b6-45a9-ad30-0b80e501da73", + "id": "a731554e-fcc1-4ab4-a327-b01a2954ae4a", "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" @@ -1881,7 +1881,7 @@ "event": [] }, { - "id": "78575f63-0467-4b2f-92af-5e5dacada0e4", + "id": "09f0d2bc-b258-4e81-bd96-214811492f15", "name": "Account", "description": { "content": "", @@ -1889,7 +1889,7 @@ }, "item": [ { - "id": "40372c27-e2bb-4a3a-8472-bedda864f9b6", + "id": "5d650bb0-5b62-4b4e-b337-b51a31a306e9", "name": "Search all accounts", "request": { "name": "Search all accounts", @@ -1914,7 +1914,7 @@ "type": "text/plain" }, "key": "from", - "value": "consequat commodo dolor non aliquip" + "value": "1" }, { "disabled": false, @@ -1923,7 +1923,7 @@ "type": "text/plain" }, "key": "to", - "value": "sed ex" + "value": "40" }, { "disabled": false, @@ -1978,7 +1978,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "d39b542b-f317-4b9b-9712-c1b2ff186f43", + "id": "e9f45c0c-d281-41d4-b766-486617a8929a", "name": "OK", "originalRequest": { "url": { @@ -1993,11 +1993,11 @@ "query": [ { "key": "from", - "value": "consequat commodo dolor non aliquip" + "value": "1" }, { "key": "to", - "value": "sed ex" + "value": "40" }, { "key": "status", @@ -2170,13 +2170,13 @@ { "listen": "test", "script": { - "id": "da71d58b-1b60-481a-9c49-2e2affa5a53c", + "id": "9066d43d-4209-4f94-9c06-0d944d0caa41", "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", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/creditcontrol/accounts - 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(\"[GET]::/api/creditcontrol/accounts - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"required\":[\"data\",\"summary\"],\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"array\",\"description\":\"Data information.\",\"items\":{\"required\":[\"id\",\"balance\",\"document\",\"status\",\"documentType\",\"creditLimit\",\"updatedAt\",\"createdAt\",\"availableCredit\",\"preAuthorizedCredit\",\"email\",\"tolerance\",\"availableBalance\"],\"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. Possible value: `Open` or `Closed`. This value will always come as `Open`. If an account is closed (`Closed`), it will not be displayed in the response body of this endpoint.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Document type. Possible values: `CPF`, `CNPJ` or `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.\"}}}},\"summary\":{\"required\":[\"count\"],\"type\":\"object\",\"description\":\"Summary information.\",\"properties\":{\"count\":{\"type\":\"integer\",\"description\":\"Number of customer credit accounts in the store.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/accounts - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", + "// Response Validation\nconst schema = {\"required\":[\"data\",\"summary\"],\"type\":\"object\",\"properties\":{\"data\":{\"type\":\"array\",\"description\":\"Data information.\",\"items\":{\"type\":\"object\",\"description\":\"Object with information about each account.\",\"required\":[\"id\",\"balance\",\"document\",\"status\",\"documentType\",\"creditLimit\",\"updatedAt\",\"createdAt\",\"availableCredit\",\"preAuthorizedCredit\",\"email\",\"tolerance\",\"availableBalance\"],\"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. This value will always come as `Open`. If an account is closed (`Closed`), it will not be displayed in the response body of this endpoint.\",\"enum\":[\"Open\",\"Closed\"]},\"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.\"}}}},\"summary\":{\"required\":[\"count\"],\"type\":\"object\",\"description\":\"Summary information.\",\"properties\":{\"count\":{\"type\":\"integer\",\"description\":\"Number of customer credit accounts in the store.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/accounts - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts - Response header Content-Length is present\", function () {\n pm.response.to.have.header(\"Content-Length\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -2196,7 +2196,7 @@ } }, { - "id": "b0b6cb7c-a520-4b22-bfb0-9d009637a4b6", + "id": "d6a2a8c7-ce24-4733-b4ee-bab8e1ccd25f", "name": "Open an account", "request": { "name": "Open an account", @@ -2248,7 +2248,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"document\": \"11111111111\",\n \"documentType\": \"CPF\",\n \"email\": \"test@test.com\",\n \"creditLimit\": \"1100\",\n \"description\": \"Account test.\",\n \"tolerance\": \"0.2\"\n}", + "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": { "language": "json" @@ -2261,7 +2261,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "e90d12f2-e789-410f-998d-cdb748bbc4b9", + "id": "b325cdaf-36f6-4c43-b51a-8a02ead38f89", "name": "OK", "originalRequest": { "url": { @@ -2330,7 +2330,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"document\": \"11111111111\",\n \"documentType\": \"CPF\",\n \"email\": \"test@test.com\",\n \"creditLimit\": \"1100\",\n \"description\": \"Account test.\",\n \"tolerance\": \"0.2\"\n}", + "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": { "language": "json" @@ -2444,13 +2444,13 @@ { "listen": "test", "script": { - "id": "9b3fb1eb-eb1b-42c9-a4f9-5995bb5522bd", + "id": "cb6458f5-9397-47f9-a6f6-206b4e7a8a0d", "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", "// Validate if response header has matching content-type\npm.test(\"[POST]::/api/creditcontrol/accounts - 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 - 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. Possible values: `CPF`, `CNPJ` or `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(\"[POST]::/api/creditcontrol/accounts - 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. Possible values: `CPF`, `CNPJ` or `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(\"[POST]::/api/creditcontrol/accounts - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[POST]::/api/creditcontrol/accounts - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[POST]::/api/creditcontrol/accounts - Response header Content-Length is present\", function () {\n pm.response.to.have.header(\"Content-Length\");\n});\n", "// Validate if response header is present \npm.test(\"[POST]::/api/creditcontrol/accounts - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -2470,12 +2470,12 @@ } }, { - "id": "1777c0d1-c5cd-4963-8f01-d7e0b791330d", - "name": "Retrieve an account by Id", + "id": "e4fda55b-908e-4803-8af2-e93e9353b66a", + "name": "Retrieve an account by ID", "request": { - "name": "Retrieve an account by Id", + "name": "Retrieve an account by ID", "description": { - "content": "Retrieve a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) by the credit account identification.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Checking Accounts | **Read Checking Accounts** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Retrieves a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) by the credit account identification.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Checking Accounts | **Read Checking Accounts** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -2533,7 +2533,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "ec295046-cfb0-40a5-a7c1-884e4397785b", + "id": "a77cab8b-d21e-4563-9d81-d19d1e061a95", "name": "OK", "originalRequest": { "url": { @@ -2701,13 +2701,13 @@ { "listen": "test", "script": { - "id": "ed8431b8-680a-4c27-8d61-23b4943a3191", + "id": "4701fc08-a769-4cd5-b933-d23c92cb5b4f", "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", "// Validate if response header has matching content-type\npm.test(\"[GET]::/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(\"[GET]::/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. Possible values: `CPF`, `CNPJ` or `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(\"[GET]::/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. Possible values: `CPF`, `CNPJ` or `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(\"[GET]::/api/creditcontrol/accounts/:creditAccountId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId - Response header Content-Length is present\", function () {\n pm.response.to.have.header(\"Content-Length\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -2725,7 +2725,7 @@ } }, { - "id": "ec037bb1-ae8b-4b85-93ce-e684fe904350", + "id": "15ccced0-277f-437f-88c0-8ac75c0708cc", "name": "Close an account", "request": { "name": "Close an account", @@ -2801,7 +2801,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "28611cd7-a8ba-4d80-8a3a-8227dfc54ddd", + "id": "5e0985d1-6dfb-478e-bdb1-55e93831b6d0", "name": "OK", "originalRequest": { "url": { @@ -2905,13 +2905,13 @@ { "listen": "test", "script": { - "id": "3c301c85-87ba-4d62-bc67-f6dc16e65ab0", + "id": "ffab6964-4186-4012-95a0-c31e072eb31f", "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. Possible values: `CPF`, `CNPJ` or `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" + "// 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" ] } } @@ -2921,7 +2921,7 @@ } }, { - "id": "150b8552-9310-4d1d-be2e-cee65393a18d", + "id": "387dda08-34ae-44fb-920a-54b8697f1ca6", "name": "Update account information", "request": { "name": "Update account information", @@ -2997,7 +2997,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "2e1a6f45-7dbe-432f-96b1-368dd9379740", + "id": "0b186a77-6e84-4b89-92a6-0d887fb52e49", "name": "OK", "originalRequest": { "url": { @@ -3191,13 +3191,13 @@ { "listen": "test", "script": { - "id": "242362fe-b78f-4e84-950d-37b8335fdb10", + "id": "6097fc4a-72c8-437e-b716-5ead71a41fc0", "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", "// Validate if response header has matching content-type\npm.test(\"[PUT]::/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(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId - 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.\"},\"document\":{\"type\":\"string\",\"description\":\"Account owner document.\"},\"status\":{\"type\":\"string\",\"description\":\"Credit customer account status.\"},\"documentType\":{\"type\":\"string\",\"description\":\"Document type. Possible values: `CPF`, `CNPJ` or `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(\"[PUT]::/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\",\"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.\"},\"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(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId - Response header Content-Length is present\", function () {\n pm.response.to.have.header(\"Content-Length\");\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -3217,12 +3217,12 @@ } }, { - "id": "54889ace-4203-4029-928c-c29abf9ba104", - "name": "Account statements", + "id": "e3e099eb-71d2-4977-896d-75b40dfe6d5f", + "name": "Get account statements", "request": { - "name": "Account statements", + "name": "Get account statements", "description": { - "content": "Get the [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) statements.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Statements | **Read Statements** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Retrieves the [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU) statements.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Statements | **Read Statements** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -3281,7 +3281,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "1a90d42b-c470-4fa8-9f51-4ce7a0c9c34d", + "id": "2ef5320c-5419-4c31-9fab-b6be92a56ae8", "name": "OK", "originalRequest": { "url": { @@ -3477,13 +3477,13 @@ { "listen": "test", "script": { - "id": "fcd62140-1e2c-4d86-9a05-e5312aeee7b9", + "id": "91b6c202-2c92-459a-94b7-523f12d8c4d6", "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", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/statements - 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(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/statements - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"required\":[\"statements\",\"currentBalance\",\"intervalBalance\",\"previousBalance\"],\"type\":\"object\",\"properties\":{\"statements\":{\"type\":\"array\",\"description\":\"Statements information.\",\"items\":{\"required\":[\"value\",\"date\",\"origin\"],\"type\":\"object\",\"properties\":{\"value\":{\"type\":\"number\",\"description\":\"Operation value.\"},\"date\":{\"type\":\"string\",\"description\":\"Operation date.\"},\"doneby\":{\"type\":\"string\",\"description\":\"Email of the person responsible for the operation.\"},\"origin\":{\"type\":\"string\",\"description\":\"Operation origin. Possible values: `Credit`, `Invoice`, `Payment` and `Statement`.\"},\"metadata\":{\"type\":\"object\",\"description\":\"Metadata information.\",\"properties\":{\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction identification.\"},\"numberOfInstallments\":{\"type\":\"number\",\"description\":\"Number of installments.\"}}}}}},\"currentBalance\":{\"type\":\"number\",\"description\":\"Current balance value.\"},\"intervalBalance\":{\"type\":\"number\",\"description\":\"Interval balance. Indicates the balance between debits and credits made since the account was opened. Negative values ​​indicate that there were more debits than new credits in the account.\"},\"previousBalance\":{\"type\":\"number\",\"description\":\"Current balance value.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/statements - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", + "// Response Validation\nconst schema = {\"required\":[\"statements\",\"currentBalance\",\"intervalBalance\",\"previousBalance\"],\"type\":\"object\",\"properties\":{\"statements\":{\"type\":\"array\",\"description\":\"Statements information.\",\"items\":{\"required\":[\"value\",\"date\",\"origin\"],\"type\":\"object\",\"description\":\"Object with information about each statement.\",\"properties\":{\"value\":{\"type\":\"number\",\"description\":\"Operation value.\"},\"date\":{\"type\":\"string\",\"description\":\"Operation date.\"},\"doneby\":{\"type\":\"string\",\"description\":\"Email of the person responsible for the operation.\"},\"origin\":{\"type\":\"string\",\"description\":\"Operation origin.\",\"enum\":[\"Credit\",\"Invoice\",\"Payment\",\"Statement\"]},\"metadata\":{\"type\":\"object\",\"description\":\"Metadata information.\",\"properties\":{\"transactionId\":{\"type\":\"string\",\"description\":\"Transaction identification.\"},\"numberOfInstallments\":{\"type\":\"number\",\"description\":\"Number of installments.\"}}}}}},\"currentBalance\":{\"type\":\"number\",\"description\":\"Current balance value.\"},\"intervalBalance\":{\"type\":\"number\",\"description\":\"Interval balance. Indicates the balance between debits and credits made since the account was opened. Negative values ​​indicate that there were more debits than new credits in the account.\"},\"previousBalance\":{\"type\":\"number\",\"description\":\"Current balance value.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/statements - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/statements - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/statements - Response header Content-Encoding is present\", function () {\n pm.response.to.have.header(\"Content-Encoding\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/accounts/:creditAccountId/statements - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -3504,12 +3504,12 @@ } }, { - "id": "deb99ee9-91e7-48f9-a4d2-53d9324e3cc8", + "id": "2339f25e-2ac5-4528-8fd7-b1b07e71c176", "name": "Change credit limit of an account", "request": { "name": "Change credit limit of an account", "description": { - "content": "Increase the credit limit of a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Checking Accounts | **Edit credits** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Increases or decreases the credit limit of a [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Checking Accounts | **Edit credits** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -3581,7 +3581,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "7d5ef4a6-b3d7-4b9d-b890-2508b39c953c", + "id": "4204b09b-feca-48c4-8481-82a3842d88b7", "name": "OK", "originalRequest": { "url": { @@ -3767,13 +3767,13 @@ { "listen": "test", "script": { - "id": "9720c050-4a7f-4752-ac08-5395bae95892", + "id": "8daeb756-f0b2-4d1c-aeb7-f7ef6d952fce", "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", "// Validate if response header has matching content-type\npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/creditlimit - 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/creditlimit - 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.\"},\"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/creditlimit - 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/creditlimit - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/creditlimit - Response header connection is present\", function () {\n pm.response.to.have.header(\"connection\");\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/creditlimit - Response header content-length is present\", function () {\n pm.response.to.have.header(\"content-length\");\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/creditlimit - Response header date is present\", function () {\n pm.response.to.have.header(\"date\");\n});\n", @@ -3792,12 +3792,12 @@ } }, { - "id": "52f49816-45c7-4a1a-ac1b-a2d2b2764f03", + "id": "959bb471-efcc-4f8a-80f1-8294ae1eb282", "name": "Decrease balance of an account", "request": { "name": "Decrease balance of an account", "description": { - "content": "Create a debit value updating the account balance.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Checking Accounts | **Edit credits** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Creates a debit value updating the account balance.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Checking Accounts | **Edit credits** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -3880,7 +3880,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "baec2bd2-da0f-473b-b432-54e751867691", + "id": "ecbcec04-ff7b-4a22-bf41-91816d9f4be1", "name": "OK", "originalRequest": { "url": { @@ -3996,7 +3996,7 @@ { "listen": "test", "script": { - "id": "bd09b31f-7206-4ff9-bbec-c81ddd70b9c3", + "id": "dcf8a19e-7125-4a02-bc9e-70195c648856", "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", @@ -4012,12 +4012,12 @@ } }, { - "id": "70a30af9-17e4-4a18-9012-4ee321b79cdd", - "name": "Create or Update Settlement", + "id": "1db3d81e-7b33-4ea7-a99c-abd66ab42288", + "name": "Create or update settlement", "request": { - "name": "Create or Update Settlement", + "name": "Create or update settlement", "description": { - "content": "Create an invoice or update its value for an order placed in the store that used customer credit as a payment method.\r\n\r\n>ℹ️ If payment for the order is made in installments, you can create an invoice for each installment. The first invoice will be due in 30 days, and subsequent invoices will be due 30 days after the previous invoice.\r\n\r\n.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Statements | **Create Statements** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Creates an invoice or update its value for an order placed in the store that used customer credit as a payment method.\r\n\r\n>ℹ️ If payment for the order is made in installments, you can create an invoice for each installment. The first invoice will be due in 30 days, and subsequent invoices will be due 30 days after the previous invoice.\r\n\r\n.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Statements | **Create Statements** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -4101,7 +4101,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "649e43b1-e881-4cbf-b08f-d6ab510d7d6e", + "id": "8717754b-eb3b-4e76-97cc-5746c28ae6f3", "name": "OK", "originalRequest": { "url": { @@ -4272,7 +4272,7 @@ { "listen": "test", "script": { - "id": "76019911-bbf8-489a-a706-4e919d703591", + "id": "33be5455-5406-4929-9b9c-2a627c9319d7", "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", @@ -4295,10 +4295,10 @@ } }, { - "id": "9bb1da6c-6f25-426a-8c04-7e0c5dcfb1e1", - "name": "Create a Pre-Authorization", + "id": "ae1f144f-61a0-4725-8882-145eb7df18a2", + "name": "Create a pre-authorization", "request": { - "name": "Create a Pre-Authorization", + "name": "Create a pre-authorization", "description": { "content": "Creates a Pre-Authorization. Also known as authorization hold, card authorization or pre-auth, pre-authorization is the practice of holding this balance as unavailable until either the merchant clears the transaction, also called settlement, or the hold *falls off*.\r\n\r\nThis operation does not appear in statements, but the available balance will be updated.\r\n\r\nThe result of this operation is generating a `transactionId` (pre-authorization identification) to use in a settlement.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Statements | **Create Statements** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" @@ -4372,7 +4372,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "765ccfec-f884-479c-b772-3fb9d50a2e4d", + "id": "c7f7e7dc-87db-4013-a46f-99021abed13e", "name": "OK", "originalRequest": { "url": { @@ -4477,7 +4477,7 @@ { "listen": "test", "script": { - "id": "98fe957d-ad44-4c51-b275-2f5466c6cb59", + "id": "e8d7985a-a398-4393-8f34-8f5eca2f226b", "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", @@ -4493,10 +4493,10 @@ } }, { - "id": "08d6f226-f3ea-4c8c-9f45-725ffd8baae6", - "name": "Update a Pre-Authorization", + "id": "e87f707b-174c-49c5-8170-63b649106340", + "name": "Update a pre-authorization", "request": { - "name": "Update a Pre-Authorization", + "name": "Update a pre-authorization", "description": { "content": "Updates information for a specific pre-authorization request.\r\n\r\n>⚠️ This call can only be used for pre-authorizations that have not yet been captured or canceled.\r\n\r\nAlso known as authorization hold, card authorization or pre-auth, pre-authorization is the practice of holding this balance as unavailable until either the merchant clears the transaction, also called settlement, or the hold *falls off*.\r\n\r\nThis operation does not appear in statements but the available balance will be updated.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Statements | **Create Statements** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" @@ -4581,7 +4581,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "ea35e593-f873-4b5b-a668-b3900f067dc2", + "id": "e33b0610-25bb-456c-8669-2989472e1782", "name": "OK", "originalRequest": { "url": { @@ -4697,7 +4697,7 @@ { "listen": "test", "script": { - "id": "9c87d06a-899b-4545-9aea-acbd83103a7b", + "id": "b22c9946-0ffe-4c57-a9eb-32ba3d03c18a", "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", @@ -4713,10 +4713,10 @@ } }, { - "id": "f833e222-24cd-405a-b525-0a1878aab947", - "name": "Cancel a Pre Authorization", + "id": "7da5c557-397e-46bb-8896-ee80b02b8153", + "name": "Cancel a pre-authorization", "request": { - "name": "Cancel a Pre Authorization", + "name": "Cancel a pre-authorization", "description": { "content": "Cancels a pre-authorization created by the [Create a Pre-Authorization](https://developers.vtex.com/docs/api-reference/customer-credit-api#post-/api/creditcontrol/accounts/-creditAccountId-/transaction) endpoint. \r\n\r\n>⚠️ The pre-authorization can only be deleted by this endpoint if it was created with the `settled` field set to `false` previously.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Statements | **Create Statements** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" @@ -4782,8 +4782,8 @@ "_": { "postman_previewlanguage": "text" }, - "id": "685a1228-8f22-4589-9b00-a63c7132b504", - "name": "OK", + "id": "c7440e00-9959-4fdc-9846-458316658cfb", + "name": "OK. This endpoint does not return any data in the response body.", "originalRequest": { "url": { "path": [ @@ -4886,7 +4886,7 @@ { "listen": "test", "script": { - "id": "2cf3c3a8-47d5-427b-9f7f-09cb37f92142", + "id": "f51b4c87-e4cc-4177-bd9d-4a3af42bd309", "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" @@ -4899,10 +4899,10 @@ } }, { - "id": "c7db57be-39ad-4755-aa77-9e5c1a246271", - "name": "Add an account Holder", + "id": "1f5dc2f8-c316-4514-9bff-20ba029f6626", + "name": "Add an account holder", "request": { - "name": "Add an account Holder", + "name": "Add an account holder", "description": { "content": "Adds a new account holder to the [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU). This new user can share the account's credit limit with users already registered on the account.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Checking Accounts | **Create Checking Accounts** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" @@ -4976,7 +4976,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "05bc4698-2f47-463d-9dca-14524bf275a9", + "id": "57c9300d-72f3-4c20-b464-662220f6ce54", "name": "OK", "originalRequest": { "url": { @@ -5171,7 +5171,7 @@ { "listen": "test", "script": { - "id": "5026b906-c343-4d4d-8fe5-47f32f0ebc65", + "id": "fc95d698-2f06-41b1-a15d-26ab3827e47c", "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", @@ -5197,12 +5197,12 @@ } }, { - "id": "910010ec-fe06-4f8f-8e7f-febb40c142c8", + "id": "6075a6ad-b950-4fd9-a158-ba1884353281", "name": "Delete an account holder", "request": { "name": "Delete an account holder", "description": { - "content": "Delete an account holder from the [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Checking Accounts | **Create Checking Accounts** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Deletes an account holder from the [customer credit account](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Checking Accounts | **Create Checking Accounts** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -5272,7 +5272,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "0af6f126-1dfe-4d59-8799-78d14f52af88", + "id": "61b8c220-bffb-42e6-a7c4-04238714ad1b", "name": "OK", "originalRequest": { "url": { @@ -5470,7 +5470,7 @@ { "listen": "test", "script": { - "id": "a6eebcf5-687d-41d2-b059-01da40c92bf7", + "id": "3bb867e8-4b58-4017-b3a2-a5cdd88a304e", "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", @@ -5496,7 +5496,7 @@ } }, { - "id": "16a499f0-8390-4ffd-af46-9045244bbfc6", + "id": "7f5545fd-82ed-4309-b64c-249b5bed847c", "name": "Change tolerance of an account", "request": { "name": "Change tolerance of an account", @@ -5573,7 +5573,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "7b2a9cce-fa56-46e6-b95e-03bf7a5d1e02", + "id": "619f520c-7242-4216-bd97-42fbfa0417f4", "name": "OK", "originalRequest": { "url": { @@ -5759,13 +5759,13 @@ { "listen": "test", "script": { - "id": "543ae4a9-5e62-45b9-96d7-b3026865a30f", + "id": "ec620c7b-c79a-45a6-b5a4-e873cec56563", "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.\"},\"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.\",\"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", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/tolerance - Response header connection is present\", function () {\n pm.response.to.have.header(\"connection\");\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/tolerance - Response header content-length is present\", function () {\n pm.response.to.have.header(\"content-length\");\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/accounts/:creditAccountId/tolerance - Response header date is present\", function () {\n pm.response.to.have.header(\"date\");\n});\n", @@ -5784,7 +5784,7 @@ } }, { - "id": "7ec75cf0-aedd-4aa3-bfa2-1777985e7bb7", + "id": "b2328376-b95b-49ea-8512-5ac588ada8e3", "name": "Partially or totally refund a settlement", "request": { "name": "Partially or totally refund a settlement", @@ -5873,7 +5873,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "dbfeb11b-313a-4b19-a4e6-14f065716414", + "id": "5ba9cfd8-c9ec-45dd-a475-9ead8954bd92", "name": "OK", "originalRequest": { "url": { @@ -6044,7 +6044,7 @@ { "listen": "test", "script": { - "id": "7230198c-eecb-4d48-bafc-bc15789aeeb5", + "id": "d455ca5d-8834-44aa-adbf-583485456826", "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", @@ -6070,7 +6070,7 @@ "event": [] }, { - "id": "bbd64294-7ad6-49b3-9f05-5bfc65d4c52f", + "id": "6f69aa6c-e7b4-4ced-85b5-47befcc8f620", "name": "Store Configuration", "description": { "content": "", @@ -6078,12 +6078,12 @@ }, "item": [ { - "id": "9840f9b9-e125-4b94-ae7e-40fc82172cd9", + "id": "eb5b94a9-fcb2-4952-8456-4905bda5ae5d", "name": "Retrieve store configuration", "request": { "name": "Retrieve store configuration", "description": { - "content": "Get store configuration data related to [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Store Configuration | **Read Configuration** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Gets store configuration data related to [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Store Configuration | **Read Configuration** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -6130,7 +6130,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "b0cb39db-56bb-43dc-993f-cbe0519ea1b0", + "id": "59ac21b0-8332-4f71-9cf6-15e0d3039e3c", "name": "OK", "originalRequest": { "url": { @@ -6305,13 +6305,13 @@ { "listen": "test", "script": { - "id": "8e629fab-8ff6-42f4-9510-46f843d665ad", + "id": "284bbc79-c413-4649-bbfa-6c10ab904f0a", "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", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/creditcontrol/storeconfig - 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(\"[GET]::/api/creditcontrol/storeconfig - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"required\":[\"dailyInterestRate\",\"invoicePostponementLimit\",\"taxRate\",\"maxPostponementDays\",\"defaultCreditValue\",\"postponementEnabled\",\"automaticCheckingAccountCreationEnabled\",\"toleranceEnabled\",\"myCreditsEnabled\",\"maxPreAuthorizationGrowthRate\"],\"type\":\"object\",\"properties\":{\"dailyInterestRate\":{\"type\":\"number\",\"description\":\"Daily interest rate (percent 0.1 = 10%).\"},\"invoicePostponementLimit\":{\"type\":\"number\",\"description\":\"Maximum number of postponements allowed.\"},\"taxRate\":{\"type\":\"number\",\"description\":\"Tax rate value (percent 0.1 = 10%).\"},\"maxPostponementDays\":{\"type\":\"number\",\"description\":\"Maximum number of days of postponement.\"},\"defaultCreditValue\":{\"type\":\"number\",\"description\":\"Default credit amount.\"},\"postponementEnabled\":{\"type\":\"boolean\",\"description\":\"Postponement option activated.\",\"default\":false},\"automaticCheckingAccountCreationEnabled\":{\"type\":\"boolean\",\"description\":\"Allows users who have not previously received credit to complete an order.\",\"default\":false},\"toleranceEnabled\":{\"type\":\"boolean\",\"description\":\"Allows orders to be placed even if they exceed X % of the account's credit limit.\",\"default\":false},\"myCreditsEnabled\":{\"type\":\"boolean\",\"description\":\"Show the [\\\"My Credits\\\"](https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0#my-credits) page on storefront.\",\"default\":false},\"maxPreAuthorizationGrowthRate\":{\"type\":\"string\",\"description\":\"Pre-Authorization growth-rate value (percent 0.1 = 10%).\"},\"notificationsSettings\":{\"type\":\"object\",\"description\":\"Notification settings information.\",\"properties\":{\"daysPrior\":{\"type\":\"array\",\"description\":\"Notification information sent before invoice payment date.\",\"items\":{\"required\":[\"days\",\"timeOfDay\"],\"type\":\"object\",\"properties\":{\"days\":{\"type\":\"integer\",\"description\":\"How many days before the invoice payment date is the notification sent.\"},\"timeOfDay\":{\"type\":\"string\",\"description\":\"Notification sending time.\"}}}},\"daysAfter\":{\"type\":\"array\",\"description\":\"Notification information sent after invoice payment date.\",\"items\":{\"required\":[\"days\",\"timeOfDay\"],\"type\":\"object\",\"properties\":{\"days\":{\"type\":\"integer\",\"description\":\"How many days after the invoice payment date is the notification sent.\"},\"timeOfDay\":{\"type\":\"string\",\"description\":\"Notification sending time.\"}}}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/storeconfig - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", + "// Response Validation\nconst schema = {\"required\":[\"dailyInterestRate\",\"invoicePostponementLimit\",\"taxRate\",\"maxPostponementDays\",\"defaultCreditValue\",\"postponementEnabled\",\"automaticCheckingAccountCreationEnabled\",\"toleranceEnabled\",\"myCreditsEnabled\",\"maxPreAuthorizationGrowthRate\"],\"type\":\"object\",\"properties\":{\"dailyInterestRate\":{\"type\":\"number\",\"description\":\"Daily interest rate (percent 0.1 = 10%).\"},\"invoicePostponementLimit\":{\"type\":\"number\",\"description\":\"Maximum number of postponements allowed.\"},\"taxRate\":{\"type\":\"number\",\"description\":\"Tax rate value (percent 0.1 = 10%).\"},\"maxPostponementDays\":{\"type\":\"number\",\"description\":\"Maximum number of days of postponement.\"},\"defaultCreditValue\":{\"type\":\"number\",\"description\":\"Default credit amount.\"},\"postponementEnabled\":{\"type\":\"boolean\",\"description\":\"Postponement option activated.\",\"default\":false},\"automaticCheckingAccountCreationEnabled\":{\"type\":\"boolean\",\"description\":\"Allows users who have not previously received credit to complete an order.\",\"default\":false},\"toleranceEnabled\":{\"type\":\"boolean\",\"description\":\"Allows orders to be placed even if they exceed X % of the account's credit limit.\",\"default\":false},\"myCreditsEnabled\":{\"type\":\"boolean\",\"description\":\"Show the [My Credits](https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0#my-credits) page on storefront.\",\"default\":false},\"maxPreAuthorizationGrowthRate\":{\"type\":\"number\",\"description\":\"Pre-authorization growth-rate value (percent 0.1 = 10%).\"},\"notificationsSettings\":{\"type\":\"object\",\"description\":\"Notification settings information.\",\"properties\":{\"daysPrior\":{\"type\":\"array\",\"description\":\"Notification information sent before invoice payment date.\",\"items\":{\"required\":[\"days\",\"timeOfDay\"],\"type\":\"object\",\"description\":\"Object with information about the moment when the notification is sent.\",\"properties\":{\"days\":{\"type\":\"integer\",\"description\":\"How many days before the invoice payment date is the notification sent.\"},\"timeOfDay\":{\"type\":\"string\",\"description\":\"Notification sending time.\"}}}},\"daysAfter\":{\"type\":\"array\",\"description\":\"Notification information sent after invoice payment date.\",\"items\":{\"required\":[\"days\",\"timeOfDay\"],\"type\":\"object\",\"description\":\"Object with information about the moment when the notification is sent.\",\"properties\":{\"days\":{\"type\":\"integer\",\"description\":\"How many days after the invoice payment date is the notification sent.\"},\"timeOfDay\":{\"type\":\"string\",\"description\":\"Notification sending time.\"}}}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/creditcontrol/storeconfig - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/storeconfig - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/storeconfig - Response header Content-Length is present\", function () {\n pm.response.to.have.header(\"Content-Length\");\n});\n", "// Validate if response header is present \npm.test(\"[GET]::/api/creditcontrol/storeconfig - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -6331,12 +6331,12 @@ } }, { - "id": "1463aa8f-de71-47ae-aa6e-6d2aa997cdd6", + "id": "21860cdf-b6ac-4280-8a71-d943398cd4fc", "name": "Create or change store configuration", "request": { "name": "Create or change store configuration", "description": { - "content": "Create or change store configuration data related to [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Store Configuration | **Edit Configuration** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Creates or changes store configuration data related to [customer credit accounts](https://help.vtex.com/en/tracks/customer-credit-getting-started--1hCRg21lXYy2seOKgqQ2CC/7FHLd0cmxqqGeEUuc8uioU).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| Credit Control | Main | **Main Access** |\r\n| Credit Control | Store Configuration | **Edit Configuration** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint.To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -6383,7 +6383,7 @@ "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"dailyInterestRate\": 0.01,\n \"invoicePostponementLimit\": 2,\n \"taxRate\": 0.4,\n \"maxPostponementDays\": 3,\n \"defaultCreditValue\": 150,\n \"maxPreAuthorizationGrowthRate\": \"ex ut\",\n \"myCreditsEnabled\": false,\n \"toleranceEnabled\": false,\n \"automaticCheckingAccountCreationEnabled\": false,\n \"postponementEnabled\": false,\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}", + "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": { "language": "json" @@ -6396,7 +6396,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "9ff7ce53-881f-4007-a567-a74d65060001", + "id": "ea895835-5e75-4404-be34-069979e9dc91", "name": "OK", "originalRequest": { "url": { @@ -6465,7 +6465,7 @@ "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"dailyInterestRate\": 0.01,\n \"invoicePostponementLimit\": 2,\n \"taxRate\": 0.4,\n \"maxPostponementDays\": 3,\n \"defaultCreditValue\": 150,\n \"maxPreAuthorizationGrowthRate\": \"in magna laboris\",\n \"myCreditsEnabled\": false,\n \"toleranceEnabled\": false,\n \"automaticCheckingAccountCreationEnabled\": false,\n \"postponementEnabled\": false,\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}", + "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": { "language": "json" @@ -6579,13 +6579,13 @@ { "listen": "test", "script": { - "id": "2c55ba21-c1f2-4f33-a12b-42bc65a39b81", + "id": "86f474ce-a07e-4596-acc7-728278350086", "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", "// Validate if response header has matching content-type\npm.test(\"[PUT]::/api/creditcontrol/storeconfig - 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/storeconfig - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"required\":[\"dailyInterestRate\",\"invoicePostponementLimit\",\"taxRate\",\"maxPostponementDays\",\"defaultCreditValue\",\"postponementEnabled\",\"automaticCheckingAccountCreationEnabled\",\"toleranceEnabled\",\"myCreditsEnabled\",\"maxPreAuthorizationGrowthRate\"],\"type\":\"object\",\"properties\":{\"dailyInterestRate\":{\"type\":\"number\",\"description\":\"Daily interest rate (percent 0.1 = 10%).\"},\"invoicePostponementLimit\":{\"type\":\"number\",\"description\":\"Maximum number of postponements allowed.\"},\"taxRate\":{\"type\":\"number\",\"description\":\"Tax rate value (percent 0.1 = 10%).\"},\"maxPostponementDays\":{\"type\":\"number\",\"description\":\"Maximum number of days of postponement.\"},\"defaultCreditValue\":{\"type\":\"number\",\"description\":\"Default credit amount.\"},\"postponementEnabled\":{\"type\":\"boolean\",\"description\":\"Postponement option activated.\",\"default\":false},\"automaticCheckingAccountCreationEnabled\":{\"type\":\"boolean\",\"description\":\"Allows users who have not previously received credit to complete an order.\",\"default\":false},\"toleranceEnabled\":{\"type\":\"boolean\",\"description\":\"Allows orders to be placed even if they exceed X % of the account's credit limit.\",\"default\":false},\"myCreditsEnabled\":{\"type\":\"boolean\",\"description\":\"Show the [\\\"My Credits\\\"](https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0#my-credits) page on storefront.\",\"default\":false},\"maxPreAuthorizationGrowthRate\":{\"type\":\"string\",\"description\":\"Pre-Authorization growth-rate value (percent 0.1 = 10%).\"},\"notificationsSettings\":{\"type\":\"object\",\"description\":\"Notification settings information.\",\"properties\":{\"daysPrior\":{\"type\":\"array\",\"description\":\"Notification information sent before invoice payment date.\",\"items\":{\"required\":[\"days\",\"timeOfDay\"],\"type\":\"object\",\"properties\":{\"days\":{\"type\":\"integer\",\"description\":\"How many days before the invoice payment date is the notification sent.\"},\"timeOfDay\":{\"type\":\"string\",\"description\":\"Notification sending time.\"}}}},\"daysAfter\":{\"type\":\"array\",\"description\":\"Notification information sent after invoice payment date.\",\"items\":{\"required\":[\"days\",\"timeOfDay\"],\"type\":\"object\",\"properties\":{\"days\":{\"type\":\"integer\",\"description\":\"How many days after the invoice payment date is the notification sent.\"},\"timeOfDay\":{\"type\":\"string\",\"description\":\"Notification sending time.\"}}}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/api/creditcontrol/storeconfig - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", + "// Response Validation\nconst schema = {\"required\":[\"dailyInterestRate\",\"invoicePostponementLimit\",\"taxRate\",\"maxPostponementDays\",\"defaultCreditValue\",\"postponementEnabled\",\"automaticCheckingAccountCreationEnabled\",\"toleranceEnabled\",\"myCreditsEnabled\",\"maxPreAuthorizationGrowthRate\"],\"type\":\"object\",\"properties\":{\"dailyInterestRate\":{\"type\":\"number\",\"description\":\"Daily interest rate (percent 0.1 = 10%).\"},\"invoicePostponementLimit\":{\"type\":\"number\",\"description\":\"Maximum number of postponements allowed.\"},\"taxRate\":{\"type\":\"number\",\"description\":\"Tax rate value (percent 0.1 = 10%).\"},\"maxPostponementDays\":{\"type\":\"number\",\"description\":\"Maximum number of days of postponement.\"},\"defaultCreditValue\":{\"type\":\"number\",\"description\":\"Default credit amount.\"},\"postponementEnabled\":{\"type\":\"boolean\",\"description\":\"Postponement option activated.\",\"default\":false},\"automaticCheckingAccountCreationEnabled\":{\"type\":\"boolean\",\"description\":\"Allows users who have not previously received credit to complete an order.\",\"default\":false},\"toleranceEnabled\":{\"type\":\"boolean\",\"description\":\"Allows orders to be placed even if they exceed X % of the account's credit limit.\",\"default\":false},\"myCreditsEnabled\":{\"type\":\"boolean\",\"description\":\"Show the [My Credits](https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0#my-credits) page on storefront.\",\"default\":false},\"maxPreAuthorizationGrowthRate\":{\"type\":\"number\",\"description\":\"Pre-authorization growth rate value (percent 0.1 = 10%).\"},\"notificationsSettings\":{\"type\":\"object\",\"description\":\"Notification settings information.\",\"properties\":{\"daysPrior\":{\"type\":\"array\",\"description\":\"Notification information sent before invoice payment date.\",\"items\":{\"required\":[\"days\",\"timeOfDay\"],\"type\":\"object\",\"description\":\"Object with information about the moment when the notification is sent.\",\"properties\":{\"days\":{\"type\":\"integer\",\"description\":\"How many days before the invoice payment date is the notification sent.\"},\"timeOfDay\":{\"type\":\"string\",\"description\":\"Notification sending time.\"}}}},\"daysAfter\":{\"type\":\"array\",\"description\":\"Notification information sent after invoice payment date.\",\"items\":{\"required\":[\"days\",\"timeOfDay\"],\"type\":\"object\",\"description\":\"Object with information about the moment when the notification is sent.\",\"properties\":{\"days\":{\"type\":\"integer\",\"description\":\"How many days after the invoice payment date is the notification sent.\"},\"timeOfDay\":{\"type\":\"string\",\"description\":\"Notification sending time.\"}}}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/api/creditcontrol/storeconfig - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/storeconfig - Response header Connection is present\", function () {\n pm.response.to.have.header(\"Connection\");\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/storeconfig - Response header Content-Length is present\", function () {\n pm.response.to.have.header(\"Content-Length\");\n});\n", "// Validate if response header is present \npm.test(\"[PUT]::/api/creditcontrol/storeconfig - Response header Date is present\", function () {\n pm.response.to.have.header(\"Date\");\n});\n", @@ -6655,11 +6655,11 @@ } ], "info": { - "_postman_id": "7a069ea5-02b5-4db7-9033-17449078a7aa", + "_postman_id": "1cf140bf-66f4-4c36-bf2c-896acb7fbe4c", "name": "Customer Credit API", "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 invoice by creditAccountId](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-/transaction)\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", + "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 invoice by creditAccountId](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", "type": "text/plain" } } diff --git a/PostmanCollections/VTEX - GiftCard Hub API.json b/PostmanCollections/VTEX - GiftCard Hub API.json index 30b70bb5a..60d6b1e90 100644 --- a/PostmanCollections/VTEX - GiftCard Hub API.json +++ b/PostmanCollections/VTEX - GiftCard Hub API.json @@ -1,10 +1,10 @@ { "_": { - "postman_id": "3773e6e7-2679-4ff7-8d14-4ba2852ed18c" + "postman_id": "d48ae80e-0a0c-4bfb-bff0-fc9dd4547e88" }, "item": [ { - "id": "ca897824-2442-45c7-916b-fcbce2c1b2d0", + "id": "f9ed1cdd-c8b4-4649-b5b3-bd7f2f092a07", "name": "Provider", "description": { "content": "", @@ -12,12 +12,12 @@ }, "item": [ { - "id": "dbe74f3a-8af9-4eec-9b61-fa13b0c08911", + "id": "22447199-56ff-4671-8d00-eb301526c700", "name": "List All GiftCard Providers", "request": { "name": "List All GiftCard Providers", "description": { - "content": "Returns a collection of giftcard providers from a store.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Returns a collection of gift card providers from a store.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -54,30 +54,12 @@ { "disabled": false, "description": { - "content": "Pagination control. This query variable must follow the format _resources={from}-{to}_.", + "content": "Pagination control. This query variable must follow the format `_resources={from}-{to}_`.", "type": "text/plain" }, "key": "REST-Range", "value": "resources=0-49" }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", "value": "application/json" @@ -90,7 +72,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "46ab6f27-2914-4740-90b8-e762623d0878", + "id": "036bb07c-5550-47e3-803d-1e25e8669997", "name": "OK", "originalRequest": { "url": { @@ -135,48 +117,30 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, - "key": "Accept", + "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "Content-Type", + "key": "Accept", "value": "application/json" }, { "disabled": false, "description": { - "content": "Pagination control. This query variable must follow the format _resources={from}-{to}_.", + "content": "Pagination control. This query variable must follow the format `_resources={from}-{to}_`.", "type": "text/plain" }, "key": "REST-Range", "value": "resources=0-49" }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", "value": "application/json" @@ -201,13 +165,13 @@ { "listen": "test", "script": { - "id": "53222cb5-7486-47d9-8450-1a9f2de909d5", + "id": "8c6286dc-b4b7-470b-b2a4-1fdc8fc6becc", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/giftcardproviders - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/giftcardproviders - 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(\"[GET]::/api/giftcardproviders - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"array\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"GiftCard provider identification.\"},\"serviceUrl\":{\"type\":\"string\",\"description\":\"URL from the provider.\"},\"oauthProvider\":{\"type\":\"string\",\"description\":\"Provider's authentication.\"},\"preAuthEnabled\":{\"type\":\"boolean\",\"description\":\"Related to the pre-authorization that can happen on the transaction generated through the provider.\"},\"cancelEnabled\":{\"type\":\"boolean\",\"description\":\"It says if it is possible to cancel the transaction, generated through the provider.\"},\"_self\":{\"type\":\"object\",\"description\":\"Object that carries an auto reference from the provider at the Hub (on its API).\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/giftcardproviders - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Gift card provider identification.\"},\"serviceUrl\":{\"type\":\"string\",\"description\":\"URL from the provider.\"},\"oauthProvider\":{\"type\":\"string\",\"description\":\"Provider's authentication.\"},\"preAuthEnabled\":{\"type\":\"boolean\",\"description\":\"Related to the pre-authorization that can happen on the transaction generated through the provider.\"},\"cancelEnabled\":{\"type\":\"boolean\",\"description\":\"Indicates whether it is possible to cancel the transaction, generated through the provider.\"},\"_self\":{\"type\":\"object\",\"description\":\"Object that carries an auto reference from the provider at the Hub (on its API).\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/giftcardproviders - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -217,12 +181,12 @@ } }, { - "id": "60f79b09-1edd-4765-80ab-8fd923e435b6", + "id": "166fe9bc-3a17-49fa-a82b-95fc7ff0682a", "name": "Get GiftCard Provider by ID", "request": { "name": "Get GiftCard Provider by ID", "description": { - "content": "Returns a giftcard provider from a store.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Returns a gift card provider from a store.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -239,7 +203,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift Card provider's ID.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -267,24 +231,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", "value": "application/json" @@ -297,7 +243,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "141673ee-a5f1-42e0-9e81-e03bc6c9ded4", + "id": "29d85234-230b-4ca1-80a4-a3b59b9b8aca", "name": "OK", "originalRequest": { "url": { @@ -314,7 +260,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift Card provider's ID.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -353,16 +299,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -371,20 +308,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -409,7 +337,7 @@ "_": { "postman_previewlanguage": "text" }, - "id": "e7f392ff-f6c2-475c-9f66-b525187a9998", + "id": "60d558bc-402f-4473-9dd0-149e6e1ab9d9", "name": "Object reference not set to an instance of an object (The gift card provider described does not exist).", "originalRequest": { "url": { @@ -426,7 +354,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift Card provider's ID.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -465,16 +393,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -483,20 +402,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" } ], "method": "GET", @@ -518,13 +428,13 @@ { "listen": "test", "script": { - "id": "bf59dae5-199a-4004-92bd-c7d4c0cf1e89", + "id": "8ff7d48a-ad60-450a-8ce2-d39d81227826", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId - 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(\"[GET]::/api/giftcardproviders/:giftCardProviderId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"GiftCard provider identification.\"},\"serviceUrl\":{\"type\":\"string\",\"description\":\"URL from the provider.\"},\"oauthProvider\":{\"type\":\"string\",\"description\":\"Provider's authentication.\"},\"caption\":{\"type\":\"string\",\"description\":\"Description about the provider.\"},\"preAuthEnabled\":{\"type\":\"boolean\",\"description\":\"Related to the pre-authorization that can happen on the transaction generated through the provider.\"},\"cancelEnabled\":{\"type\":\"boolean\",\"description\":\"It says if it is possible to cancel the transaction, generated through the provider.\"},\"_self\":{\"type\":\"object\",\"description\":\"Object that carries an auto reference from the provider at the Hub (on its API).\",\"items\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Gift card provider identification.\"},\"serviceUrl\":{\"type\":\"string\",\"description\":\"URL from the provider.\"},\"oauthProvider\":{\"type\":\"string\",\"description\":\"Provider's authentication.\"},\"caption\":{\"type\":\"string\",\"description\":\"Description about the provider.\"},\"preAuthEnabled\":{\"type\":\"boolean\",\"description\":\"Related to the pre-authorization that can happen on the transaction generated through the provider.\"},\"cancelEnabled\":{\"type\":\"boolean\",\"description\":\"Indicates whether it is possible to cancel the transaction, generated through the provider.\"},\"_self\":{\"type\":\"object\",\"description\":\"Object that carries an auto reference from the provider at the Hub (on its API).\",\"items\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -534,12 +444,12 @@ } }, { - "id": "0803e983-027b-4ab2-817e-179e413eb64a", + "id": "50087db4-05aa-44f5-ad1d-347ce15b228d", "name": "Create/Update GiftCard Provider by ID", "request": { "name": "Create/Update GiftCard Provider by ID", "description": { - "content": "Create or update a giftcard provider from a store.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **Edit Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Create or update a gift card provider from a store.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **Edit Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -556,7 +466,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -584,24 +494,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Content-Type", "value": "application/vnd.vtex.giftcardproviders.v1+json" @@ -614,7 +506,7 @@ "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"serviceUrl\": \"https://api.vtex.com.br/basedevmkp\",\n \"oauthProvider\": \"vtex\",\n \"preAuthEnabled\": true,\n \"cancelEnabled\": true\n}", + "raw": "{\n \"serviceUrl\": \"https://api.vtex.com.br/example\",\n \"oauthProvider\": \"vtex\",\n \"preAuthEnabled\": true,\n \"cancelEnabled\": true,\n \"appKey\": \"key\",\n \"appToken\": \"token\"\n}", "options": { "raw": { "language": "json" @@ -627,7 +519,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "0be789fc-d369-4f9c-a37e-5551281dfbde", + "id": "5a32ed70-a360-43f0-9c3d-d0e92a30b141", "name": "OK", "originalRequest": { "url": { @@ -644,7 +536,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -683,16 +575,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -701,20 +584,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -724,7 +598,7 @@ "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"serviceUrl\": \"https://api.vtex.com.br/basedevmkp\",\n \"oauthProvider\": \"vtex\",\n \"preAuthEnabled\": true,\n \"cancelEnabled\": true\n}", + "raw": "{\n \"serviceUrl\": \"https://api.vtex.com.br/example\",\n \"oauthProvider\": \"vtex\",\n \"preAuthEnabled\": true,\n \"cancelEnabled\": true,\n \"appKey\": \"key\",\n \"appToken\": \"token\"\n}", "options": { "raw": { "language": "json" @@ -748,13 +622,13 @@ { "listen": "test", "script": { - "id": "797b9b06-5ed6-4976-b32e-c13abb81bf25", + "id": "524f8ead-b0a8-473b-9409-5cc47727ae2b", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/giftcardproviders/:giftCardProviderId - 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/giftcardproviders/:giftCardProviderId - 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/giftcardproviders/:giftCardProviderId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"GiftCard provider identification.\"},\"serviceUrl\":{\"type\":\"string\",\"description\":\"URL from the provider.\"},\"oauthProvider\":{\"type\":\"string\",\"description\":\"Provider's authentication.\"},\"preAuthEnabled\":{\"type\":\"boolean\",\"description\":\"Related to the pre-authorization that can happen on the transaction generated through the provider.\"},\"cancelEnabled\":{\"type\":\"boolean\",\"description\":\"It says if it is possible to cancel the transaction, generated through the provider.\"},\"_self\":{\"type\":\"object\",\"description\":\"Object that carries an auto reference from the provider at the Hub (on its API).\",\"items\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/api/giftcardproviders/:giftCardProviderId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Gift card provider identification.\"},\"serviceUrl\":{\"type\":\"string\",\"description\":\"URL from the provider.\"},\"oauthProvider\":{\"type\":\"string\",\"description\":\"Provider's authentication.\"},\"preAuthEnabled\":{\"type\":\"boolean\",\"description\":\"Related to the pre-authorization that can happen on the transaction generated through the provider.\"},\"cancelEnabled\":{\"type\":\"boolean\",\"description\":\"Indicates whether it is possible to cancel the transaction, generated through the provider.\"},\"_self\":{\"type\":\"object\",\"description\":\"Object that carries an auto reference from the provider at the Hub (on its API).\",\"items\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/api/giftcardproviders/:giftCardProviderId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -764,12 +638,12 @@ } }, { - "id": "3f2ee0b2-31d9-4186-8350-5c9ef67c897d", + "id": "b968b461-11cf-4881-9f9c-2818acf48d31", "name": "Delete GiftCard Provider by ID", "request": { "name": "Delete GiftCard Provider by ID", "description": { - "content": "Delete a giftcard provider from a store.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **Edit Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Delete a gift card provider from a store.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **Edit Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -786,7 +660,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -814,27 +688,9 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", - "value": "text/plain" + "value": "application/json" } ], "method": "DELETE" @@ -842,9 +698,10 @@ "response": [ { "_": { - "postman_previewlanguage": "text" + "postman_previewlanguage": "json" }, - "id": "85a86eca-a1ce-4522-ab33-464fd8fb2311", + "id": "c8c422b8-ccbc-46ea-ba75-4f22681afedf", + "name": "OK", "originalRequest": { "url": { "path": [ @@ -860,7 +717,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -899,16 +756,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -917,24 +765,15 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", - "value": "text/plain" + "value": "application/json" } ], "method": "DELETE", @@ -945,17 +784,17 @@ "header": [ { "key": "Content-Type", - "value": "text/plain" + "value": "application/json" } ], - "body": "", + "body": "{}", "cookie": [] }, { "_": { "postman_previewlanguage": "text" }, - "id": "26e398d7-cd4e-4dd5-a0ea-c64cabd5d10e", + "id": "4389083e-d703-4043-9c65-e0430363971b", "name": "The gift card provider described does not exist.\n", "originalRequest": { "url": { @@ -972,7 +811,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -1011,16 +850,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -1029,20 +859,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" } ], "method": "DELETE", @@ -1064,11 +885,13 @@ { "listen": "test", "script": { - "id": "c108fd78-d981-40a5-b95b-c1c9582144b5", + "id": "61b9a2c4-5a3e-4d3a-ae2e-d1e0b59035e0", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[DELETE]::/api/giftcardproviders/:giftCardProviderId - 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/giftcardproviders/:giftCardProviderId - Content-Type is text/plain\", function () {\n pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"text/plain\");\n});\n" + "// Validate if response header has matching content-type\npm.test(\"[DELETE]::/api/giftcardproviders/:giftCardProviderId - 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/giftcardproviders/:giftCardProviderId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", + "// Response Validation\nconst schema = {\"type\":\"object\"}\n\n// Validate if response matches JSON schema \npm.test(\"[DELETE]::/api/giftcardproviders/:giftCardProviderId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -1081,7 +904,7 @@ "event": [] }, { - "id": "fa367697-b705-4046-9c30-2b4e403a7066", + "id": "16673784-8b46-49c7-8ca4-4228dcd61243", "name": "Transaction", "description": { "content": "", @@ -1089,12 +912,12 @@ }, "item": [ { - "id": "ba9caf2b-7c28-4247-a12e-c1c77fa8ed50", + "id": "98c9689c-cbea-47e8-907d-a4bfc028aabe", "name": "Create GiftCard in GiftCard Provider", "request": { "name": "Create GiftCard in GiftCard Provider", "description": { - "content": "Creates a giftcard in a giftcard provider.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **Edit Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Creates a gift card in a gift card provider.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **Edit Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -1112,7 +935,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -1140,24 +963,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Content-Type", "value": "application/vnd.vtex.giftcardproviders.v1+json" @@ -1170,7 +975,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"relationName\": \"loyalty-program\",\n \"emissionDate\": \"2023-06-27T17:02:19.17\",\n \"expiringDate\": \"2023-10-27T17:02:19.17\",\n \"caption\": \"Loyalty Program\",\n \"restrictedToOwner\": true,\n \"multipleRedemptions\": true,\n \"multipleCredits\": true,\n \"profileId\": \"92de2449-0e02-4ca9-a4aa-a09cc9d8f7ff\",\n \"currencyCode\": \"USD\"\n}", + "raw": "{\n \"relationName\": \"loyalty-program\",\n \"emissionDate\": \"2020-09-01T13:15:30Z\",\n \"expiringDate\": \"2020-09-10T13:15:30Z\",\n \"caption\": \"Loyalty Program\",\n \"restrictedToOwner\": false,\n \"multipleRedemptions\": false,\n \"multipleCredits\": false,\n \"profileId\": \"1234\",\n \"currencyCode\": \"USD\"\n}", "options": { "raw": { "language": "json" @@ -1183,7 +988,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "85713dfe-653e-4b95-b27a-f86cb8c40c4b", + "id": "9b2b74b9-436d-4578-ae5c-d8f53badd586", "name": "OK", "originalRequest": { "url": { @@ -1201,7 +1006,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -1240,16 +1045,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -1258,20 +1054,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -1281,7 +1068,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"relationName\": \"loyalty-program\",\n \"emissionDate\": \"2023-06-27T17:02:19.17\",\n \"expiringDate\": \"2023-10-27T17:02:19.17\",\n \"caption\": \"Loyalty Program\",\n \"restrictedToOwner\": true,\n \"multipleRedemptions\": true,\n \"multipleCredits\": true,\n \"profileId\": \"92de2449-0e02-4ca9-a4aa-a09cc9d8f7ff\",\n \"currencyCode\": \"USD\"\n}", + "raw": "{\n \"relationName\": \"loyalty-program\",\n \"emissionDate\": \"2020-09-01T13:15:30Z\",\n \"expiringDate\": \"2020-09-10T13:15:30Z\",\n \"caption\": \"Loyalty Program\",\n \"restrictedToOwner\": false,\n \"multipleRedemptions\": false,\n \"multipleCredits\": false,\n \"profileId\": \"1234\",\n \"currencyCode\": \"USD\"\n}", "options": { "raw": { "language": "json" @@ -1305,13 +1092,13 @@ { "listen": "test", "script": { - "id": "e382cc29-1571-4bc0-944b-6be497cc87cf", + "id": "7aca96f7-bed0-4b3f-ad35-27c72618b589", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/giftcardproviders/:giftCardProviderId/giftcards - 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/giftcardproviders/:giftCardProviderId/giftcards - 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/giftcardproviders/:giftCardProviderId/giftcards - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Gift card `id`.\"},\"emissionDate\":{\"type\":\"string\",\"description\":\"Giftcard emission date.\"},\"expiringDate\":{\"type\":\"string\",\"description\":\"Giftcard expiration date.\"},\"caption\":{\"type\":\"string\",\"description\":\"Field to be filled in if a loyalty program must be created for the Gift Card.\"},\"provider\":{\"type\":\"string\",\"description\":\"Provider name.\"},\"discount\":{\"type\":\"boolean\",\"deprecated\":true},\"currencyCode\":{\"type\":\"string\",\"description\":\"Currency code in ISO 4217.\"},\"transaction\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"Giftcard resource URL.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/giftcardproviders/:giftCardProviderId/giftcards - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Gift card identification.\"},\"emissionDate\":{\"type\":\"string\",\"description\":\"Gift card emission date.\"},\"expiringDate\":{\"type\":\"string\",\"description\":\"Gift card expiration date.\"},\"caption\":{\"type\":\"string\",\"description\":\"Field to be filled in if a loyalty program must be created for the gift card.\"},\"provider\":{\"type\":\"string\",\"description\":\"Provider name.\"},\"discount\":{\"type\":\"boolean\",\"deprecated\":true},\"currencyCode\":{\"type\":\"string\",\"description\":\"Currency code in ISO 4217.\"},\"transaction\":{\"type\":\"object\",\"description\":\"Transaction information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"Gift card resource URL. The number described in the URL refers to the gift card identification.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/giftcardproviders/:giftCardProviderId/giftcards - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -1321,12 +1108,12 @@ } }, { - "id": "6fe1c2f9-f653-4af5-8a71-b3196ed6c100", + "id": "5f20664d-f7a7-4886-ac45-9f4ab9baf1b9", "name": "Get GiftCard from GiftCard Provider", "request": { "name": "Get GiftCard from GiftCard Provider", "description": { - "content": "Returns all giftcards from a giftcard provider according to the filters.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Returns all gift cards from a gift card provider according to the filters.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -1345,7 +1132,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -1376,25 +1163,7 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) Range of documents to show.", + "content": "Pagination control. This query variable must follow the format `_resources={from}-{to}_`.", "type": "text/plain" }, "key": "REST-Range", @@ -1412,7 +1181,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"client\": {\n \"id\": \"3b1abc17-988e-4a14-8b7f-31fc6a5b955c\",\n \"email\": \"email@domain.com\",\n \"document\": \"42151783120\"\n },\n \"cart\": {\n \"grandTotal\": 182,\n \"relationName\": null,\n \"redemptionCode\": null,\n \"discounts\": -20,\n \"shipping\": 2,\n \"taxes\": 0,\n \"items\": [\n {\n \"productId\": \"2000000\",\n \"id\": \"2000002\",\n \"refId\": \"MEV41\",\n \"name\": null,\n \"price\": 200,\n \"quantity\": 1\n }\n ],\n \"itemsTotal\": 200\n }\n}", + "raw": "{\n \"client\": {\n \"id\": \"3b1abc17-988e-4a14-8b7f-31fc6a5b955c\",\n \"email\": \"email@domain.com\",\n \"document\": \"42151783120\"\n },\n \"cart\": {\n \"grandTotal\": 0,\n \"relationName\": \"loyalty-program\",\n \"redemptionCode\": \"***********ASDQ\",\n \"discounts\": 20,\n \"shipping\": 2,\n \"taxes\": 0,\n \"items\": [\n {\n \"productId\": \"2000000\",\n \"id\": \"2000002\",\n \"refId\": \"MEV41\",\n \"name\": \"Shoes\",\n \"price\": 200,\n \"quantity\": 1\n },\n {\n \"productId\": \"2000000\",\n \"id\": \"2000002\",\n \"refId\": \"MEV41\",\n \"name\": \"Shoes\",\n \"price\": 200,\n \"quantity\": 1\n }\n ],\n \"itemsTotal\": 200\n }\n}", "options": { "raw": { "language": "json" @@ -1425,7 +1194,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "26dc05af-dea5-4e81-9ea3-d24abf45a441", + "id": "b6ff5f0f-8464-4f0b-9f63-c84b547b3e8d", "name": "OK", "originalRequest": { "url": { @@ -1444,7 +1213,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -1483,43 +1252,25 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/vnd.vtex.giftcards.v1+json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", - "value": "application/vnd.vtex.giftcards.v1+json" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" + "value": "application/json" }, { "disabled": false, "description": { - "content": "(Required) VTEX API AppToken", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "disabled": false, "description": { - "content": "(Required) Range of documents to show.", + "content": "Pagination control. This query variable must follow the format `_resources={from}-{to}_`.", "type": "text/plain" }, "key": "REST-Range", @@ -1533,7 +1284,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"client\": {\n \"id\": \"3b1abc17-988e-4a14-8b7f-31fc6a5b955c\",\n \"email\": \"email@domain.com\",\n \"document\": \"42151783120\"\n },\n \"cart\": {\n \"grandTotal\": 182,\n \"relationName\": null,\n \"redemptionCode\": null,\n \"discounts\": -20,\n \"shipping\": 2,\n \"taxes\": 0,\n \"items\": [\n {\n \"productId\": \"2000000\",\n \"id\": \"2000002\",\n \"refId\": \"MEV41\",\n \"name\": null,\n \"price\": 200,\n \"quantity\": 1\n }\n ],\n \"itemsTotal\": 200\n }\n}", + "raw": "{\n \"client\": {\n \"id\": \"3b1abc17-988e-4a14-8b7f-31fc6a5b955c\",\n \"email\": \"email@domain.com\",\n \"document\": \"42151783120\"\n },\n \"cart\": {\n \"grandTotal\": 0,\n \"relationName\": \"loyalty-program\",\n \"redemptionCode\": \"***********ASDQ\",\n \"discounts\": 20,\n \"shipping\": 2,\n \"taxes\": 0,\n \"items\": [\n {\n \"productId\": \"2000000\",\n \"id\": \"2000002\",\n \"refId\": \"MEV41\",\n \"name\": \"Shoes\",\n \"price\": 200,\n \"quantity\": 1\n },\n {\n \"productId\": \"2000000\",\n \"id\": \"2000002\",\n \"refId\": \"MEV41\",\n \"name\": \"Shoes\",\n \"price\": 200,\n \"quantity\": 1\n }\n ],\n \"itemsTotal\": 200\n }\n}", "options": { "raw": { "language": "json" @@ -1557,13 +1308,13 @@ { "listen": "test", "script": { - "id": "78be6679-04ff-4ee8-93cb-5e95932fa7d0", + "id": "98fc298c-1fd3-4b69-b523-84c0f0a5510f", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/giftcardproviders/:giftCardProviderId/giftcards/_search - 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/giftcardproviders/:giftCardProviderId/giftcards/_search - 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/giftcardproviders/:giftCardProviderId/giftcards/_search - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"array\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Gift card identification.\"},\"provider\":{\"type\":\"string\",\"description\":\"Gift card provider name.\"},\"balance\":{\"type\":\"number\",\"description\":\"Gift card current balance.\"},\"_self\":{\"type\":\"object\",\"description\":\"Object that carries an auto reference from the provider at the Hub (on its API).\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/giftcardproviders/:giftCardProviderId/giftcards/_search - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Gift card identification.\"},\"provider\":{\"type\":\"string\",\"description\":\"Gift card provider name.\"},\"balance\":{\"type\":\"number\",\"description\":\"Gift card current balance.\"},\"_self\":{\"type\":\"object\",\"description\":\"Object that carries an auto reference from the provider at the Hub (on its API).\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[POST]::/api/giftcardproviders/:giftCardProviderId/giftcards/_search - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -1573,12 +1324,12 @@ } }, { - "id": "d8b69e59-f629-4e8a-8f74-a7f7ad93e59f", + "id": "a9a1e086-3ebc-4c2f-aff7-60c3e0ff25e0", "name": "Get GiftCard from GiftCard Provider by ID", "request": { "name": "Get GiftCard from GiftCard Provider by ID", "description": { - "content": "Returns a specific giftcard from a giftcard provider.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Returns a specific gift card from a gift card provider.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -1597,7 +1348,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -1607,7 +1358,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift Card ID.", + "content": "(Required) Gift card identification.", "type": "text/plain" }, "type": "any", @@ -1635,24 +1386,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", "value": "application/json" @@ -1665,7 +1398,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "29a6e7bf-a145-47a4-83e2-d8288988fb14", + "id": "ad4cc4a2-1b95-4ab7-bf2e-8e876750d1c5", "name": "OK", "originalRequest": { "url": { @@ -1684,7 +1417,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -1694,7 +1427,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift Card ID.", + "content": "(Required) Gift card identification.", "type": "text/plain" }, "type": "any", @@ -1733,16 +1466,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -1751,20 +1475,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -1790,13 +1505,13 @@ { "listen": "test", "script": { - "id": "cea87cfb-00d4-4009-8add-b97ae8656827", + "id": "5f566c92-7e00-460b-be5f-c981f7146a34", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId - 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(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Gift card identification.\"},\"redemptionToken\":{\"type\":\"string\",\"description\":\"Gift card redemption token.\"},\"redemptionCode\":{\"type\":\"string\",\"description\":\"Gift card redemption code.\"},\"balance\":{\"type\":\"number\",\"description\":\"Giftcard current balance. For newly created giftcards, the balance will be 0.0.\"},\"emissionDate\":{\"type\":\"string\",\"description\":\"Giftcard emission date.\"},\"expiringDate\":{\"type\":\"string\",\"description\":\"Giftcard expiration date.\"},\"currencyCode\":{\"type\":\"string\",\"description\":\"Currency code in ISO 4217.\"},\"discount\":{\"type\":\"boolean\",\"deprecated\":true},\"transactions\":{\"type\":\"object\",\"description\":\"Transactions information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Gift card identification.\"},\"redemptionToken\":{\"type\":\"string\",\"description\":\"Gift card redemption token.\"},\"redemptionCode\":{\"type\":\"string\",\"description\":\"Gift card redemption code.\"},\"balance\":{\"type\":\"number\",\"description\":\"Gift card current balance. For newly created gift cards, the balance will be 0.0.\"},\"emissionDate\":{\"type\":\"string\",\"description\":\"Gift card emission date.\"},\"expiringDate\":{\"type\":\"string\",\"description\":\"Gift card expiration date.\"},\"currencyCode\":{\"type\":\"string\",\"description\":\"Currency code in ISO 4217.\"},\"discount\":{\"type\":\"boolean\",\"deprecated\":true},\"transactions\":{\"type\":\"object\",\"description\":\"Transactions information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"This is one of the fields inside the `_self`. It is exactly the route that identifies this provider on the Hub's API, but it is not the same thing as the `serviceURL`.\"}}}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -1806,7 +1521,7 @@ } }, { - "id": "5eaca385-1adc-437a-b0ca-0fcb725e29e3", + "id": "f3501f63-1aca-4699-82d7-b4e8c22443e3", "name": "List All GiftCard Transactions", "request": { "name": "List All GiftCard Transactions", @@ -1831,7 +1546,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -1869,24 +1584,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", "value": "application/json" @@ -1899,7 +1596,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "7550a5eb-37f3-4e48-9fac-108be8b4e9ef", + "id": "e3315492-8d70-46a5-b1a1-e16488f26e57", "name": "OK", "originalRequest": { "url": { @@ -1919,7 +1616,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -1968,16 +1665,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -1986,20 +1674,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -2025,7 +1704,7 @@ { "listen": "test", "script": { - "id": "b82ef8fd-2e9a-4e4b-b0d1-563e75018095", + "id": "dd168b2f-25cb-4b70-8699-166dc8a9ad91", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2041,7 +1720,7 @@ } }, { - "id": "6cc2052b-3f97-40e4-aa16-03804012a4fc", + "id": "60651e63-398f-4ea5-acd9-7ffc9c6ba860", "name": "Create GiftCard Transaction", "request": { "name": "Create GiftCard Transaction", @@ -2066,7 +1745,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -2104,24 +1783,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Content-Type", "value": "application/vnd.vtex.giftcardproviders.v1+json" @@ -2134,7 +1795,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"operation\": \"Credit\",\n \"value\": 28.4,\n \"description\": \"Order v2915869org-01\",\n \"redemptionToken\": null,\n \"redemptionCode\": null,\n \"requestId\": \"v2915869org-01\",\n \"orderInfo\": {\n \"orderId\": \"v2915869org-01\",\n \"sequence\": 2915869,\n \"cart\": {\n \"items\": [\n {\n \"id\": \"2000330\",\n \"productId\": \"2000196\",\n \"refId\": null,\n \"name\": \"T-Shirt M\",\n \"value\": 15,\n \"price\": 15,\n \"quantity\": 1,\n \"shippingDiscount\": 0,\n \"discount\": 0,\n \"priceTags\": []\n }\n ],\n \"grandTotal\": 0,\n \"discounts\": 0,\n \"shipping\": 0,\n \"taxes\": 0,\n \"itemsTotal\": 15\n },\n \"clientProfile\": {\n \"email\": \"email@domain.com\",\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"document\": \"10617764093\",\n \"documentType\": \"cpf\",\n \"phone\": \"+5521993759875\",\n \"birthDate\": \"0001-01-01T00:00:00\",\n \"isCorporate\": false\n },\n \"shipping\": {\n \"receiverName\": \"John Smith\",\n \"postalCode\": \"24417-246\",\n \"city\": \"Leblon\",\n \"state\": \"RJ\",\n \"country\": \"BRA\",\n \"street\": \"Rua Aidea Barreto do Couto\",\n \"number\": \"9678\",\n \"neighborhood\": \"address\",\n \"complement\": \"address\",\n \"reference\": \"address\"\n }\n }\n}", + "raw": "{\n \"operation\": \"Debit\",\n \"value\": 3,\n \"description\": \"GiftCardHub\",\n \"redemptionToken\": \"b2dac6f2-f365-48cd-82a9-0b376a55557a\",\n \"redemptionCode\": \"***********ASDQ\",\n \"requestId\": \"B56CBE231DEE4E1A859183C1030CE926\",\n \"orderInfo\": {\n \"orderId\": \"v5006128str\",\n \"sequence\": 5006128,\n \"cart\": {\n \"items\": [\n {\n \"id\": \"2001023\",\n \"productId\": \"2000492\",\n \"refId\": \"35994\",\n \"name\": \"Vaporizador Des. ColC4nia Branco\",\n \"value\": 14.99,\n \"price\": 14.99,\n \"quantity\": 1,\n \"shippingDiscount\": 0,\n \"discount\": -7.5,\n \"priceTags\": {\n \"name\": \"discount@price-discount_store_183#4911bf6f-22a2-4af1-a365-cce895c3df2c\",\n \"value\": 0\n }\n },\n {\n \"id\": \"2001023\",\n \"productId\": \"2000492\",\n \"refId\": \"35994\",\n \"name\": \"Vaporizador Des. ColC4nia Branco\",\n \"value\": 14.99,\n \"price\": 14.99,\n \"quantity\": 1,\n \"shippingDiscount\": 0,\n \"discount\": -7.5,\n \"priceTags\": {\n \"name\": \"discount@price-discount_store_183#4911bf6f-22a2-4af1-a365-cce895c3df2c\",\n \"value\": 0\n }\n }\n ],\n \"grandTotal\": 0,\n \"discounts\": -7.5,\n \"shipping\": 7.27,\n \"taxes\": 0,\n \"itemsTotal\": 14.99\n },\n \"clientProfile\": {\n \"email\": \"michael.scott96@mail.com\",\n \"firstName\": \"Michael\",\n \"lastName\": \"Scott\",\n \"document\": \"02906792063\",\n \"phone\": \"+551111111111\",\n \"birthDate\": \"0001-01-01T00:00:00\",\n \"isCorporate\": false\n },\n \"shipping\": {\n \"receiverName\": \"Michael Scott\",\n \"postalCode\": \"22250040\",\n \"city\": \"Rio de Janeiro\",\n \"state\": \"RJ\",\n \"country\": \"BRA\",\n \"street\": \"Praia de Botafogo\",\n \"number\": \"111\",\n \"neighborhood\": \"Botafogo\",\n \"complement\": \"House\",\n \"reference\": \"Subway\"\n }\n }\n}", "options": { "raw": { "language": "json" @@ -2147,7 +1808,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "35cef4df-5a0c-48f1-a590-69af6eea4343", + "id": "535f5fd9-28f0-4e08-921d-e34817852761", "name": "OK", "originalRequest": { "url": { @@ -2167,7 +1828,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -2216,16 +1877,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -2234,20 +1886,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -2257,7 +1900,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"operation\": \"Credit\",\n \"value\": 28.4,\n \"description\": \"Order v2915869org-01\",\n \"redemptionToken\": null,\n \"redemptionCode\": null,\n \"requestId\": \"v2915869org-01\",\n \"orderInfo\": {\n \"orderId\": \"v2915869org-01\",\n \"sequence\": 2915869,\n \"cart\": {\n \"items\": [\n {\n \"id\": \"2000330\",\n \"productId\": \"2000196\",\n \"refId\": null,\n \"name\": \"T-Shirt M\",\n \"value\": 15,\n \"price\": 15,\n \"quantity\": 1,\n \"shippingDiscount\": 0,\n \"discount\": 0,\n \"priceTags\": []\n }\n ],\n \"grandTotal\": 0,\n \"discounts\": 0,\n \"shipping\": 0,\n \"taxes\": 0,\n \"itemsTotal\": 15\n },\n \"clientProfile\": {\n \"email\": \"email@domain.com\",\n \"firstName\": \"John\",\n \"lastName\": \"Smith\",\n \"document\": \"10617764093\",\n \"documentType\": \"cpf\",\n \"phone\": \"+5521993759875\",\n \"birthDate\": \"0001-01-01T00:00:00\",\n \"isCorporate\": false\n },\n \"shipping\": {\n \"receiverName\": \"John Smith\",\n \"postalCode\": \"24417-246\",\n \"city\": \"Leblon\",\n \"state\": \"RJ\",\n \"country\": \"BRA\",\n \"street\": \"Rua Aidea Barreto do Couto\",\n \"number\": \"9678\",\n \"neighborhood\": \"address\",\n \"complement\": \"address\",\n \"reference\": \"address\"\n }\n }\n}", + "raw": "{\n \"operation\": \"Debit\",\n \"value\": 3,\n \"description\": \"GiftCardHub\",\n \"redemptionToken\": \"b2dac6f2-f365-48cd-82a9-0b376a55557a\",\n \"redemptionCode\": \"***********ASDQ\",\n \"requestId\": \"B56CBE231DEE4E1A859183C1030CE926\",\n \"orderInfo\": {\n \"orderId\": \"v5006128str\",\n \"sequence\": 5006128,\n \"cart\": {\n \"items\": [\n {\n \"id\": \"2001023\",\n \"productId\": \"2000492\",\n \"refId\": \"35994\",\n \"name\": \"Vaporizador Des. ColC4nia Branco\",\n \"value\": 14.99,\n \"price\": 14.99,\n \"quantity\": 1,\n \"shippingDiscount\": 0,\n \"discount\": -7.5,\n \"priceTags\": {\n \"name\": \"discount@price-discount_store_183#4911bf6f-22a2-4af1-a365-cce895c3df2c\",\n \"value\": 0\n }\n },\n {\n \"id\": \"2001023\",\n \"productId\": \"2000492\",\n \"refId\": \"35994\",\n \"name\": \"Vaporizador Des. ColC4nia Branco\",\n \"value\": 14.99,\n \"price\": 14.99,\n \"quantity\": 1,\n \"shippingDiscount\": 0,\n \"discount\": -7.5,\n \"priceTags\": {\n \"name\": \"discount@price-discount_store_183#4911bf6f-22a2-4af1-a365-cce895c3df2c\",\n \"value\": 0\n }\n }\n ],\n \"grandTotal\": 0,\n \"discounts\": -7.5,\n \"shipping\": 7.27,\n \"taxes\": 0,\n \"itemsTotal\": 14.99\n },\n \"clientProfile\": {\n \"email\": \"michael.scott96@mail.com\",\n \"firstName\": \"Michael\",\n \"lastName\": \"Scott\",\n \"document\": \"02906792063\",\n \"phone\": \"+551111111111\",\n \"birthDate\": \"0001-01-01T00:00:00\",\n \"isCorporate\": false\n },\n \"shipping\": {\n \"receiverName\": \"Michael Scott\",\n \"postalCode\": \"22250040\",\n \"city\": \"Rio de Janeiro\",\n \"state\": \"RJ\",\n \"country\": \"BRA\",\n \"street\": \"Praia de Botafogo\",\n \"number\": \"111\",\n \"neighborhood\": \"Botafogo\",\n \"complement\": \"House\",\n \"reference\": \"Subway\"\n }\n }\n}", "options": { "raw": { "language": "json" @@ -2281,7 +1924,7 @@ { "listen": "test", "script": { - "id": "fdeabc52-064c-4077-a611-7e05cdc97058", + "id": "ff9ad556-4d57-4083-b882-9f74bb1bd342", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2297,12 +1940,12 @@ } }, { - "id": "1877edee-7a84-4f36-ae1c-8c60a74136e6", + "id": "311e47e1-d0ac-4b39-9d06-754d3e64cf8c", "name": "Get GiftCard Transaction by ID", "request": { "name": "Get GiftCard Transaction by ID", "description": { - "content": "Returns a specific transaction from a giftcard.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Returns a specific transaction from a gift card.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **View Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -2323,7 +1966,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -2343,7 +1986,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift Card transaction ID.", + "content": "(Required) Transaction identification.", "type": "text/plain" }, "type": "any", @@ -2371,24 +2014,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", "value": "application/json" @@ -2401,7 +2026,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "8919efbf-3e9d-4d24-a034-fa151fe24870", + "id": "c39a9001-978b-4087-9607-bf67472ef013", "name": "OK", "originalRequest": { "url": { @@ -2422,7 +2047,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -2442,7 +2067,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift Card transaction ID.", + "content": "(Required) Transaction identification.", "type": "text/plain" }, "type": "any", @@ -2481,16 +2106,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -2499,20 +2115,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -2538,13 +2145,13 @@ { "listen": "test", "script": { - "id": "339362fe-a204-41e0-8d8b-417ec978c12c", + "id": "e3575558-fb51-4686-b0d9-ddc4129158ad", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:transactionId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", "// Validate if response header has matching content-type\npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:transactionId - 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(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:transactionId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"value\":{\"type\":\"number\",\"description\":\"Transaction value.\"},\"description\":{\"type\":\"string\",\"description\":\"Transaction description.\"},\"date\":{\"type\":\"string\",\"description\":\"Date of the transaction in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format (`YYYY-MM-DDThh:mm:ss.fff`)\"},\"requestId\":{\"type\":\"string\",\"description\":\"VTEX request identifier.\"},\"settlement\":{\"type\":\"object\",\"description\":\"Settlement transaction information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"Giftcard resource URL.\"}}},\"cancellation\":{\"type\":\"object\",\"description\":\"Cancellation transaction information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"Giftcard resource URL.\"}}},\"authorization\":{\"type\":\"object\",\"description\":\"Authorization transaction information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"Giftcard resource URL.\"}}},\"operation\":{\"type\":\"string\",\"description\":\"Operation information (`credit` or `debit`).\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:transactionId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"value\":{\"type\":\"number\",\"description\":\"Transaction value.\"},\"description\":{\"type\":\"string\",\"description\":\"Transaction description.\"},\"date\":{\"type\":\"string\",\"description\":\"Date of the transaction in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format (`YYYY-MM-DDThh:mm:ss.fff`)\"},\"requestId\":{\"type\":\"string\",\"description\":\"VTEX request identifier.\"},\"settlement\":{\"type\":\"object\",\"description\":\"Settlement transaction information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"Gift card resource URL. The first number described in the URL refers to the gift card identification. The second number, refers to the transaction identification.\"}}},\"cancellation\":{\"type\":\"object\",\"description\":\"Cancellation transaction information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"Gift card resource URL. The first number described in the URL refers to the gift card identification. The second number, refers to the transaction identification.\"}}},\"authorization\":{\"type\":\"object\",\"description\":\"Authorization transaction information.\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"Gift card resource URL. The first number described in the URL refers to the gift card identification. The second number, refers to the transaction identification.\"}}},\"operation\":{\"type\":\"string\",\"description\":\"Operation information (`Credit` or `Debit`).\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:transactionId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -2554,7 +2161,7 @@ } }, { - "id": "82ead121-66ad-4f5b-ac61-accb889c1a83", + "id": "94773e77-90ef-4975-b40f-639939100a94", "name": "Get GiftCard Transaction Authorization", "request": { "name": "Get GiftCard Transaction Authorization", @@ -2581,7 +2188,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -2629,24 +2236,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", "value": "application/json" @@ -2659,7 +2248,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "0b25f333-844b-4cc8-80e7-df1fe9bbdf83", + "id": "fc7164db-1192-4f1b-a872-b88d4ff92c3e", "name": "OK", "originalRequest": { "url": { @@ -2681,7 +2270,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -2740,16 +2329,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -2758,20 +2338,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -2797,7 +2368,7 @@ { "listen": "test", "script": { - "id": "e1a37db1-e7ed-4cb7-8f00-12a05107f31e", + "id": "c936e8be-e89b-4836-a94a-cf4d0e47dc52", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:tId/authorization - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2813,7 +2384,7 @@ } }, { - "id": "49e92767-4f13-47ad-b089-fdc984b94798", + "id": "f467988e-582d-4d40-bf99-cde6d6503431", "name": "List All GiftCard Transactions Settlements", "request": { "name": "List All GiftCard Transactions Settlements", @@ -2840,7 +2411,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -2888,24 +2459,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", "value": "application/json" @@ -2918,7 +2471,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "107f7050-00c6-47f4-9901-5ed82deb4ecb", + "id": "d077fa47-2608-4172-a428-515eb4d58e43", "name": "OK", "originalRequest": { "url": { @@ -2940,7 +2493,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -2999,16 +2552,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -3017,20 +2561,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -3056,7 +2591,7 @@ { "listen": "test", "script": { - "id": "4b891335-77b9-458a-b141-fcefe32ed3e3", + "id": "ab4a60a6-35c4-4643-b7de-668f0c74d726", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:tId/settlements - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -3072,7 +2607,7 @@ } }, { - "id": "e8fafbb4-4c39-4aa2-9efc-6c6efee12ac5", + "id": "04b7e034-8dc7-4e86-b75e-d80058b5602a", "name": "Settle GiftCard Transaction", "request": { "name": "Settle GiftCard Transaction", @@ -3099,7 +2634,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -3149,7 +2684,7 @@ "header": [ { "key": "Content-Type", - "value": "application/json;charset=utf-8" + "value": "application/json" }, { "key": "Accept", @@ -3172,7 +2707,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "73ff4d3c-4cf6-404c-bdc4-d2857000015c", + "id": "763fb6f0-0970-4c6f-b5c9-a8757009e0a9", "name": "OK", "originalRequest": { "url": { @@ -3194,7 +2729,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -3253,19 +2788,19 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, - "key": "Accept", + "key": "Content-Type", "value": "application/json" }, { "disabled": false, "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "Content-Type", + "key": "Accept", "value": "application/json" }, { @@ -3300,7 +2835,7 @@ { "listen": "test", "script": { - "id": "e06a78a9-86e1-48e9-8c89-39a4aef2f73c", + "id": "64d8c64e-9707-4d45-85fe-c29058cad27d", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:tId/settlements - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -3316,7 +2851,7 @@ } }, { - "id": "548b7430-ce40-4c27-b2fc-91bb18da492a", + "id": "e9f59233-4a79-45c4-89ee-d4c5915fdb94", "name": "List All GiftCard Transactions Cancellations", "request": { "name": "List All GiftCard Transactions Cancellations", @@ -3343,7 +2878,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -3391,24 +2926,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Accept", "value": "application/json" @@ -3421,7 +2938,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "80a67372-13bb-4ec1-b9c9-f83bd6eea6c5", + "id": "845d9b9c-f63d-4398-8733-2f703537dd78", "name": "OK", "originalRequest": { "url": { @@ -3443,7 +2960,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -3502,16 +3019,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -3520,20 +3028,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -3559,7 +3058,7 @@ { "listen": "test", "script": { - "id": "8bb3b413-42c6-4899-b51b-d818ab90bf28", + "id": "875f9676-4cbc-40df-bcae-f55d70d45caf", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:tId/cancellations - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -3575,12 +3074,12 @@ } }, { - "id": "e7020f2c-1632-41a4-9d89-7f2f65b464b4", + "id": "0307b7a8-218e-43d1-828e-0792972856db", "name": "Cancel GiftCard Transaction", "request": { "name": "Cancel GiftCard Transaction", "description": { - "content": "Creates a cancellation transaction to a giftcard.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **Edit Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", + "content": "Creates a cancellation transaction to a gift card.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/authentication-overview#application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| GiftCard | GiftCard | **Edit Gift Card providers** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations.", "type": "text/plain" }, "url": { @@ -3602,7 +3101,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -3650,24 +3149,6 @@ ] }, "header": [ - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" - }, { "key": "Content-Type", "value": "application/vnd.vtex.giftcardproviders.v1+json" @@ -3680,7 +3161,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"value\": 12.1,\n \"requestId\": \"12093812masoidj120398\"\n}", + "raw": "{\n \"value\": 4.1,\n \"requestId\": \"12093812masoidj120398\"\n}", "options": { "raw": { "language": "json" @@ -3693,7 +3174,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "79c0201f-6368-4bb5-aa10-591392d0f22a", + "id": "dc33a522-17be-40fc-90bf-eda0b713dfc5", "name": "OK", "originalRequest": { "url": { @@ -3715,7 +3196,7 @@ { "disabled": false, "description": { - "content": "(Required) Gift card provider's identification.", + "content": "(Required) Gift card provider identification.", "type": "text/plain" }, "type": "any", @@ -3774,16 +3255,7 @@ { "disabled": false, "description": { - "content": "(Required) Media type(s) that is/are acceptable for the response. Default value for payment provider protocol is application/json.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) The Media type of the body of the request. Default value for payment provider protocol is application/json", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", @@ -3792,20 +3264,11 @@ { "disabled": false, "description": { - "content": "(Required) VTEX API AppKey", - "type": "text/plain" - }, - "key": "X-VTEX-API-AppKey", - "value": "{{X-VTEX-API-AppKey}}" - }, - { - "disabled": false, - "description": { - "content": "(Required) VTEX API AppToken", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, - "key": "X-VTEX-API-AppToken", - "value": "{{X-VTEX-API-AppToken}}" + "key": "Accept", + "value": "application/json" }, { "key": "Accept", @@ -3815,7 +3278,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"value\": 12.1,\n \"requestId\": \"12093812masoidj120398\"\n}", + "raw": "{\n \"value\": 4.1,\n \"requestId\": \"12093812masoidj120398\"\n}", "options": { "raw": { "language": "json" @@ -3839,7 +3302,7 @@ { "listen": "test", "script": { - "id": "c4b2997f-aac4-4d62-9002-25350965f16f", + "id": "a385b277-5162-41e9-9293-32b842410a27", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/giftcardproviders/:giftCardProviderId/giftcards/:giftCardId/transactions/:tId/cancellations - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -3905,11 +3368,11 @@ } ], "info": { - "_postman_id": "3773e6e7-2679-4ff7-8d14-4ba2852ed18c", + "_postman_id": "d48ae80e-0a0c-4bfb-bff0-fc9dd4547e88", "name": "GiftCard Hub API", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": { - "content": ">ℹ️ Check the new [Payments onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Gift Card Hub API allows interactions with all Gift Card providers registered to a store from a single point.\r\n\r\nGift Card providers are systems capable of providing cards to be used in the buying process.\r\n\r\nThe following is the sequence diagram that represents calls in the purchase closing process.\r\n![](https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/gift-card-integration-guide-provider-protocol-0.png)\r\n\r\n**Checkout + Gateway**: Systems responsible for the sale and for processing orders and payments.\r\n\r\n**Gift Card Hub**: System responsible for managing multiple registered Gift Card providers for a store.\r\n\r\n**Gift Card Provider**: System responsible for providing the Gift Cards available to the user not closing a purchase. This system can be implemented by third parties.\r\n\r\n## GiftCard Hub API Index\r\n\r\n### Provider\r\n\r\n- `GET` [List All GiftCard Providers](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/giftcardproviders)\r\n- `GET` [Get GiftCard Provider by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/giftcardproviders/-giftCardProviderId-)\r\n- `PUT` [Create/Update GiftCard Provider by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#put-/giftcardproviders/-giftCardProviderID-)\r\n- `DELETE` [Delete GiftCard Provider by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#delete-/giftcardproviders/-giftCardProviderID-)\r\n\r\n### Transaction\r\n\r\n- `POST` [Create GiftCard in GiftCard Provider](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/giftcardproviders/-giftCardProviderID-/giftcards)\r\n- `POST` [Get GiftCard from GiftCard Provider](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/giftcardproviders/-giftCardProviderID-/giftcards/_search)\r\n- `GET` [Get GiftCard from GiftCard Provider by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/giftcardproviders/-giftCardProviderID-/giftcards/-giftCardID-)\r\n- `GET` [List All GiftCard Transactions](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/giftcardproviders/-giftCardProviderID-/giftcards/-giftCardID-/transactions)\r\n- `POST` [Create GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/giftcardproviders/-giftCardProviderID-/giftcards/-giftCardID-/transactions)\r\n- `GET` [Get GiftCard Transaction by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/giftcardproviders/-giftCardProviderID-/giftcards/-giftCardID-/transactions/-transactionID-)\r\n- `GET` [Get GiftCard Authorization Transaction](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/giftcardproviders/-giftCardProviderID-/giftcards/-giftCardID-/transactions/-tId-/authorization)\r\n- `GET` [List All GiftCard Settlement Transactions](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/giftcardproviders/-giftCardProviderID-/giftcards/-giftCardID-/transactions/-tId-/settlements)\r\n- `POST` [Create GiftCard Settlement Transaction](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/giftcardproviders/-giftCardProviderID-/giftcards/-giftCardID-/transactions/-tId-/settlements)\r\n- `GET` [List All GiftCard Cancellation Transactions](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/giftcardproviders/-giftCardProviderID-/giftcards/-giftCardID-/transactions/-tId-/cancellations)\r\n- `POST` [Create GiftCard Cancellation Transaction](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/giftcardproviders/-giftCardProviderID-/giftcards/-giftCardID-/transactions/-tId-/cancellations).", + "content": ">ℹ️ Check the new [Payments onboarding guide](https://developers.vtex.com/vtex-rest-api/docs/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Gift Card Hub API allows interactions with all Gift card providers registered to a store from a single point.\r\n\r\nGift card providers are systems capable of providing cards to be used in the buying process.\r\n\r\nThe following is the sequence diagram that represents calls in the purchase closing process.\r\n![](https://cdn.jsdelivr.net/gh/vtexdocs/dev-portal-content@main/images/gift-card-integration-guide-provider-protocol-0.png)\r\n\r\n**Checkout + Gateway**: Systems responsible for the sale and for processing orders and payments.\r\n\r\n**Gift Card Hub**: System responsible for managing multiple registered Gift card providers for a store.\r\n\r\n**Gift Card Provider**: System responsible for providing the Gift cards available to the user not closing a purchase. This system can be implemented by third parties.\r\n\r\n## GiftCard Hub API Index\r\n\r\n### Provider\r\n\r\n- `PUT` [Create/Update GiftCard Provider by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#put-/api/giftcardproviders/-giftCardProviderId-)\r\n- `GET` [Get GiftCard Provider by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/api/giftcardproviders/-giftCardProviderId-)\r\n- `GET` [List All GiftCard Providers](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/api/giftcardproviders)\r\n- `DELETE` [Delete GiftCard Provider by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#delete-/api/giftcardproviders/-giftCardProviderId-)\r\n\r\n### Transaction\r\n\r\n- `POST` [Create GiftCard in GiftCard Provider](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/api/giftcardproviders/-giftCardProviderId-/giftcards)\r\n- `POST` [Get GiftCard from GiftCard Provider](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/api/giftcardproviders/-giftCardProviderId-/giftcards/_search)\r\n- `GET` [Get GiftCard from GiftCard Provider by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-)\r\n- `POST` [Create GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-/transactions)\r\n- `GET` [Get GiftCard Transaction by ID](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-/transactions/-transactionId-)\r\n- `GET` [List All GiftCard Transactions](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-/transactions)\r\n- `GET` [Get GiftCard Transaction Authorization](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-/transactions/-tId-/authorization)\r\n- `POST` [Cancel GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-/transactions/-tId-/cancellations)\r\n- `GET` [List All GiftCard Transactions Cancellations](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-/transactions/-tId-/cancellations)\r\n- `POST` [Settle GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#post-/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-/transactions/-tId-/settlements)\r\n- `GET` [List All GiftCard Transactions Settlements](https://developers.vtex.com/docs/api-reference/giftcard-hub-api#get-/api/giftcardproviders/-giftCardProviderId-/giftcards/-giftCardId-/transactions/-tId-/settlements)", "type": "text/plain" } } diff --git a/PostmanCollections/VTEX - Giftcard API.json b/PostmanCollections/VTEX - Giftcard API.json index c1acb0284..d72b0f5d5 100644 --- a/PostmanCollections/VTEX - Giftcard API.json +++ b/PostmanCollections/VTEX - Giftcard API.json @@ -1,10 +1,10 @@ { "_": { - "postman_id": "870d9d16-708e-4340-af4a-d8a2fc519706" + "postman_id": "99dfdce1-7a00-46d8-be55-734f2b91c06a" }, "item": [ { - "id": "df114fc8-5dc9-43c5-a5b7-23a1560d2fd6", + "id": "432d9041-9a18-4e25-bb35-78edca387247", "name": "Gift Card", "description": { "content": "", @@ -12,7 +12,7 @@ }, "item": [ { - "id": "1cbd1338-7d22-4e98-b7a7-38f102224661", + "id": "93cffbc3-6758-482c-a91f-d7a6ffbea06e", "name": "Create GiftCard", "request": { "name": "Create GiftCard", @@ -75,7 +75,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "c5c4aceb-1154-44e7-90a9-ae7b9c1da0f4", + "id": "2d934fa8-d5cc-418f-a4ae-34d738ba9ae7", "name": "OK", "originalRequest": { "url": { @@ -166,7 +166,7 @@ { "listen": "test", "script": { - "id": "e0f5cd72-7dc1-464b-b8ae-cda6e555aad8", + "id": "de50e6a1-fc09-4fb1-8ad3-55fab1415de3", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/giftcards - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -182,7 +182,7 @@ } }, { - "id": "99259d7a-e912-46e8-b7e9-fb0454229cf4", + "id": "5b37eb52-218f-468e-b723-c454c2c3fee2", "name": "Get GiftCard by ID", "request": { "name": "Get GiftCard by ID", @@ -243,7 +243,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "53fd6a56-97f9-478d-9d36-4d746adc9ac8", + "id": "399cc597-c477-404a-8b70-0966f83cb94e", "name": "OK", "originalRequest": { "url": { @@ -337,7 +337,7 @@ { "listen": "test", "script": { - "id": "d797b3a2-81b2-4fd5-8b6c-24a25780b31d", + "id": "d2218002-2118-4566-adbc-47ff0ed1acbe", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/giftcards/:giftCardId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -353,7 +353,7 @@ } }, { - "id": "3324f227-3c16-4446-b65e-0ab468db18a1", + "id": "179d18e4-e6a0-455d-b95e-c537318bd591", "name": "List All GiftCards", "request": { "name": "List All GiftCards", @@ -426,7 +426,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "8c550e5b-2995-4af9-999c-baaacbc68279", + "id": "2def846d-19b8-49b5-aeea-26f42d6237ca", "name": "OK", "originalRequest": { "url": { @@ -527,7 +527,7 @@ { "listen": "test", "script": { - "id": "6f92369c-0fe9-460e-b5b8-c13e5e63e7e7", + "id": "40300760-0332-43db-8185-a490d55abde4", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/giftcards/_search - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -546,7 +546,7 @@ "event": [] }, { - "id": "344d013e-13e9-4658-912f-290a4c015c90", + "id": "43df46db-6fcc-4613-b500-9839e486bb95", "name": "Transactions", "description": { "content": "", @@ -556,7 +556,7 @@ "event": [] }, { - "id": "2d5be89b-cc29-42b5-a4ef-9df513390cb0", + "id": "7f5d6863-7c5b-4d5c-ab80-79fd92408687", "name": "Transaction", "description": { "content": "", @@ -564,7 +564,7 @@ }, "item": [ { - "id": "061cb99b-2721-4370-9e89-3bce4555bbb2", + "id": "1c597b32-00c1-447f-b576-72634446b1ac", "name": "List All GiftCard Transactions", "request": { "name": "List All GiftCard Transactions", @@ -626,7 +626,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "e9983361-7026-41c4-b3a7-1bc4e9183736", + "id": "6f1e10f5-54e0-43c0-a3ad-28b0fb71c1ba", "name": "OK", "originalRequest": { "url": { @@ -721,7 +721,7 @@ { "listen": "test", "script": { - "id": "99b98ad5-9d1a-435a-83b7-4b6061bbc92f", + "id": "8e9ff267-ca1d-4c67-8c41-4f38d61b53c5", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/giftcards/:giftCardId/transactions - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -737,7 +737,7 @@ } }, { - "id": "a5aaad38-e6f3-46c1-8ac5-9ed10d3eb104", + "id": "906905a9-a3e3-4479-adb2-655f2d4ae13b", "name": "Create GiftCard Transaction", "request": { "name": "Create GiftCard Transaction", @@ -812,7 +812,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "47773143-c6db-4792-9f61-d6452269c9fe", + "id": "28168b9d-7918-4487-aafa-580515e4f9fd", "name": "OK", "originalRequest": { "url": { @@ -915,7 +915,7 @@ { "listen": "test", "script": { - "id": "72b0edc5-3285-4b34-b7ac-7182e39f3df1", + "id": "db343f18-6f01-4bad-8107-ff4d2cfdca43", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/giftcards/:giftCardId/transactions - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -931,7 +931,7 @@ } }, { - "id": "b2f63f43-507a-4cc5-bc22-5867e0ed9d79", + "id": "9696ef77-3c65-47cb-91f6-a4e92cb8c6b4", "name": "Get GiftCard Transaction by ID", "request": { "name": "Get GiftCard Transaction by ID", @@ -1004,7 +1004,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "a3c9d6b6-644f-42fd-9316-c55c932c4b28", + "id": "5250e8a5-b13d-4250-8be8-22d0935e021d", "name": "OK", "originalRequest": { "url": { @@ -1110,7 +1110,7 @@ { "listen": "test", "script": { - "id": "1c7aa06d-7455-4fb5-9765-a2785d666025", + "id": "650c3255-8e2a-4864-9261-48234bb6405f", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/giftcards/:giftCardId/transactions/:transactionId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -1126,7 +1126,7 @@ } }, { - "id": "e1e5f92b-891b-4438-9c9c-0f5ce7548c9b", + "id": "1ac96cb4-f722-4152-bc9b-251bed12507c", "name": "Get GiftCard Transaction Authorization", "request": { "name": "Get GiftCard Transaction Authorization", @@ -1200,7 +1200,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "10e6c71b-8f3d-4a7c-9b98-60b6cfb438b2", + "id": "38c478f6-1d29-4a4c-a94e-3cac588fe947", "name": "OK", "originalRequest": { "url": { @@ -1307,7 +1307,7 @@ { "listen": "test", "script": { - "id": "bc0def81-e525-4918-9a11-e38d9499b7f0", + "id": "7befd23e-de0b-4e1c-81c5-65e1d8a178d8", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/giftcards/:giftCardId/transactions/:transactionId/authorization - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -1323,7 +1323,7 @@ } }, { - "id": "be4955a9-ded2-4a3c-8c14-8633c3e70d41", + "id": "aac91653-7c78-48be-8640-8f08e19fb771", "name": "List All GiftCard Transactions Cancellations", "request": { "name": "List All GiftCard Transactions Cancellations", @@ -1397,7 +1397,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "676900fe-edc9-460a-9c22-cd09d06510ca", + "id": "ed57706a-a7ab-4a75-bda1-575679131ffb", "name": "OK", "originalRequest": { "url": { @@ -1504,7 +1504,7 @@ { "listen": "test", "script": { - "id": "0f175b3a-c026-4014-bc33-015c9efa9299", + "id": "04560db1-7a87-442c-8b51-c7b7eca62414", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/giftcards/:giftCardId/transactions/:transactionId/cancellations - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -1520,7 +1520,7 @@ } }, { - "id": "0a2a87a1-71f2-49f3-bbbe-2948a0e2f275", + "id": "4f699c43-89e3-4e72-be07-587a59f8b978", "name": "Cancel GiftCard Transaction", "request": { "name": "Cancel GiftCard Transaction", @@ -1607,7 +1607,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "632a454e-3f20-4be9-ab6d-e25263d0d14c", + "id": "faa8fc71-e3a9-4a1f-a53c-710932fae7d8", "name": "OK", "originalRequest": { "url": { @@ -1722,7 +1722,7 @@ { "listen": "test", "script": { - "id": "ac3ff335-dc5f-46f3-9151-6a4de6d09f94", + "id": "dfd92ffa-740d-47ab-a8ba-4f8577dbe25e", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/giftcards/:giftCardId/transactions/:transactionId/cancellations - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -1738,7 +1738,7 @@ } }, { - "id": "ac3a14ce-710f-494e-8cfb-f7740216b177", + "id": "ff78c477-c8ea-4645-bde9-53177c1f0252", "name": "List All GiftCard Transactions Settlements", "request": { "name": "List All GiftCard Transactions Settlements", @@ -1812,7 +1812,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "f52f66b0-59ea-4546-bf1e-d07228622147", + "id": "40b8920b-98f2-4b47-b801-7aa9f12966d3", "name": "OK", "originalRequest": { "url": { @@ -1919,7 +1919,7 @@ { "listen": "test", "script": { - "id": "a1905d11-2700-4557-bf24-d0557dce1b01", + "id": "fdd30436-ded4-4b0c-a94e-ed937fb97771", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[GET]::/giftcards/:giftCardId/transactions/:transactionId/settlements - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -1935,7 +1935,7 @@ } }, { - "id": "6300f0fa-5c00-4485-afce-af82c8c07991", + "id": "7d6be2cf-8b9b-4028-a3d9-a5f5746b86d6", "name": "Settle GiftCard Transaction", "request": { "name": "Settle GiftCard Transaction", @@ -2022,7 +2022,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "d2632a06-3af5-47e0-8bf7-63bb06da9084", + "id": "a920af5b-e6d0-48ce-ad85-3b70d1eb2be2", "name": "OK", "originalRequest": { "url": { @@ -2137,7 +2137,7 @@ { "listen": "test", "script": { - "id": "f89e23cd-cf8b-489b-90ac-dee9c03946fe", + "id": "a29010b2-1138-4931-99d4-b090b09edee1", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/giftcards/:giftCardId/transactions/:transactionId/settlements - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2203,11 +2203,11 @@ } ], "info": { - "_postman_id": "870d9d16-708e-4340-af4a-d8a2fc519706", + "_postman_id": "99dfdce1-7a00-46d8-be55-734f2b91c06a", "name": "GiftCard API", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": { - "content": ">ℹ️ Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Gift Card is a payment method configured as a cash value associated with a client. It is used to grant a discount on the value of the order at the store. A Gift Card works as a **payment method**, **not a promotion**.\r\n\r\nIn VTEX's native gift card system, you can choose to create a new gift card either through [Admin VTEX](https://help.vtex.com/en/tutorial/gift-card--tutorials_995) or [API](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards). However, there are specific conditions to be observed when generating gift cards by one of these two methods.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
SpecificationsAdmin VTEXGiftCard API
Initial valueYou can create gift cards value with any value.All gift cards are generated with no value (balance = 0). After its creation, you need to use Admin VTEX or the Create GiftCard Transaction to add any balance amount.
Ownership restrictionYou can create gift cards with or without a user assigned to them.All gift cards must be created with a profileId associated to them.
User data identificationCustomer ID (data that identifies a specific client, such as CPF/CNPJ in Brazil).profileId (data that identifies a specific client)
Additional SettingsYou can use checkboxes to select whether a gift card will be: Restricted (only a specific customer ID can use this gift card), Reloadable (balance can be changed while it is still active), or Reusable (available for making new purchases with this gift card until its value is completely used up).You can use the following fields to configure the same conditions applied in Admin: restrictedToOwner, multipleCredits, and multipleRedemptions.
\r\n\r\n>⚠️ All GiftCard API endpoints are limited to 500 concurrent requests and 5000 requests per minute.\r\n\r\n## GiftCard API Index\r\n\r\n### Gift Card\r\n\r\n- `POST` [Create GiftCard](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards)\r\n- `GET` [Get GiftCard by ID](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-)\r\n- `POST` [List All GiftCards](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards/_search)\r\n\r\n### Transaction\r\n\r\n- `POST` [Create GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards/-giftCardId-/transactions)\r\n- `GET` [Get GiftCard Transaction by ID](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions/-transactionId-)\r\n- `GET` [List All GiftCards Transactions](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions)\r\n- `GET` [Get GiftCard Transaction Authorizations](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions/-transactionId-/authorization)\r\n- `POST` [Cancel GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards/-giftCardId-/transactions/-transactionId-/cancellations)\r\n- `GET` [List All GiftCard Transaction Cancellations](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions/-transactionId-/cancellations)\r\n- `POST` [Settle GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards/-giftCardId-/transactions/-transactionId-/settlements)\r\n- `GET` [List All GiftCard Transactions Settlements](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions/-transactionId-/settlements).", + "content": ">ℹ️ Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Gift Card is a payment method configured as a cash value associated with a client. It is used to grant a discount on the value of the order at the store. A Gift Card works as a **payment method**, **not a promotion**.\r\n\r\nIn VTEX's native gift card system, you can choose to create a new gift card either through [Admin VTEX](https://help.vtex.com/en/tutorial/gift-card--tutorials_995) or [API](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards). However, there are specific conditions to be observed when generating gift cards by one of these two methods.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
SpecificationsAdmin VTEXGiftCard API
Initial valueYou can create gift cards value with any value.All gift cards are generated with no value (balance = 0). After its creation, you need to use Admin VTEX or the Create GiftCard Transaction to add any balance amount.
Ownership restrictionYou can create gift cards with or without a user assigned to them.All gift cards must be created with a profileId associated to them.
User data identificationCustomer ID (data that identifies a specific client, such as CPF/CNPJ in Brazil).profileId (data that identifies a specific client)
Additional SettingsYou can use checkboxes to select whether a gift card will be: Restricted (only a specific customer ID can use this gift card), Reloadable (balance can be changed while it is still active), or Reusable (available for making new purchases with this gift card until its value is completely used up).You can use the following fields to configure the same conditions applied in Admin: restrictedToOwner, multipleCredits, and multipleRedemptions.
\r\n\r\n>⚠️ All GiftCard API endpoints are limited to 500 concurrent requests and 5000 requests per minute.\r\n\r\n## GiftCard API Index\r\n\r\n### Gift Card\r\n\r\n- `POST` [Create GiftCard](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards)\r\n- `GET` [Get GiftCard by ID](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-)\r\n- `POST` [List All GiftCards](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards/_search)\r\n\r\n### Transaction\r\n\r\n- `POST` [Create GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards/-giftCardId-/transactions)\r\n- `GET` [Get GiftCard Transaction by ID](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions/-transactionId-)\r\n- `GET` [List All GiftCards Transactions](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions)\r\n- `GET` [Get GiftCard Transaction Authorizations](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions/-transactionId-/authorization)\r\n- `POST` [Cancel GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards/-giftCardId-/transactions/-transactionId-/cancellations)\r\n- `GET` [List All GiftCard Transaction Cancellations](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions/-transactionId-/cancellations)\r\n- `POST` [Settle GiftCard Transaction](https://developers.vtex.com/docs/api-reference/giftcard-api#post-/giftcards/-giftCardId-/transactions/-transactionId-/settlements)\r\n- `GET` [List All GiftCard Transactions Settlements](https://developers.vtex.com/docs/api-reference/giftcard-api#get-/giftcards/-giftCardId-/transactions/-transactionId-/settlements)", "type": "text/plain" } } From 50233d190c6ae9cb24d1f182188e30a74cc2db02 Mon Sep 17 00:00:00 2001 From: geisecosta <> Date: Thu, 7 Dec 2023 18:46:42 +0000 Subject: [PATCH 4/5] Update generated files by portman --- PostmanCollections/VTEX - Pricing Hub.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/PostmanCollections/VTEX - Pricing Hub.json b/PostmanCollections/VTEX - Pricing Hub.json index 1e47240d6..e22d22478 100644 --- a/PostmanCollections/VTEX - Pricing Hub.json +++ b/PostmanCollections/VTEX - Pricing Hub.json @@ -1,10 +1,10 @@ { "_": { - "postman_id": "33baa44e-0613-42e6-97e0-eb4f7f523c1e" + "postman_id": "e79d721f-74cc-4d03-8e24-8892f272ab57" }, "item": [ { - "id": "d9495fd3-e74a-4c36-9553-171911cfd29c", + "id": "fa275606-0356-4bbd-b319-8b0b5f042cc3", "name": "Pricing Hub Prices", "description": { "content": "", @@ -12,7 +12,7 @@ }, "item": [ { - "id": "8b264e80-5f42-4adf-8074-6ca969328dbf", + "id": "f11f0f0a-6e0f-4455-bf5a-4658c7f10ba6", "name": "Retrieve prices", "request": { "name": "Retrieve prices", @@ -78,7 +78,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "e88800cc-18e4-4e1e-813b-4493a9e164e4", + "id": "abbdcf7c-d425-44d9-9f21-f98e8ee8b159", "name": "OK", "originalRequest": { "url": { @@ -167,7 +167,7 @@ { "listen": "test", "script": { - "id": "6b3fc779-2094-40d7-8c6e-d6d0bb84d0cc", + "id": "c674e783-befe-4804-836c-2e0b377b1522", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[POST]::/api/pricing-hub/prices - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -183,7 +183,7 @@ } }, { - "id": "1a507e94-c724-4ef1-a7e1-cf62985cf0ae", + "id": "c3809958-3025-4bc2-b647-f30b451ad45b", "name": "Configure external price source", "request": { "name": "Configure external price source", @@ -246,7 +246,7 @@ "_": { "postman_previewlanguage": "text" }, - "id": "ad50f49c-f948-4465-a684-86e04e5e2103", + "id": "c7c98c21-d0b0-4735-be5c-5b02345222d4", "name": "OK", "originalRequest": { "url": { @@ -332,7 +332,7 @@ { "listen": "test", "script": { - "id": "52fcd773-7344-48ef-808e-b8bb5c320b9f", + "id": "ee8bf9a9-5450-4988-b0e5-73f0d37bc7e7", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/api/pricing-hub/prices/config - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" @@ -386,11 +386,11 @@ } ], "info": { - "_postman_id": "33baa44e-0613-42e6-97e0-eb4f7f523c1e", + "_postman_id": "e79d721f-74cc-4d03-8e24-8892f272ab57", "name": "Pricing Hub", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": { - "content": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https://user-images.githubusercontent.com/77292838/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https://github.com/vtex-apps/external-prices-app)\r\n- [Node template](https://github.com/vtex-apps/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- [POST - Retrieve prices](https://developers.vtex.com/docs/api-reference/pricing-hub#post-/api/pricing-hub/prices?endpoint=post-/api/pricing-hub/prices)\r\n- [PUT - Configure External Price Source](https://developers.vtex.com/docs/api-reference/pricing-hub#put-/api/pricing-hub/prices/config)", + "content": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https://user-images.githubusercontent.com/77292838/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https://github.com/vtex-apps/external-prices-app)\r\n- [Node template](https://github.com/vtex-apps/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- [POST - Retrieve prices](https://developers.vtex.com/docs/api-reference/pricing-hub#post-/api/pricing-hub/prices?endpoint=post-/api/pricing-hub/prices)\r\n- [PUT - Configure External Price Source](https://developers.vtex.com/docs/api-reference/pricing-hub#put-/api/pricing-hub/prices/config)\r\n## Common parameters in the documentation\r\n\r\n| Parameter name | Description |\r\n|---------------------------|-----------------------------------------------------------------------------------------|\r\n| `{{accountName}}` | Store account name. |\r\n| `{{environment}}` | The environment that will be called. |\r\n| `{{X-VTEX-API-AppKey}}` | Located in the headers of the requests, user authentication key. |\r\n| `{{X-VTEX-API-AppToken}}` | Located in the headers of the requests, authentication password. |\r\n", "type": "text/plain" } } From 1a792d793b56ea0dc5e160ede993a6711d25b7bb Mon Sep 17 00:00:00 2001 From: Geise Costa <136460310+geisecosta@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:35:11 -0300 Subject: [PATCH 5/5] Update VTEX - Pricing Hub.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Júlia Rabello <77292838+julia-rabello@users.noreply.github.com> --- VTEX - Pricing Hub.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Pricing Hub.json b/VTEX - Pricing Hub.json index 7e02ce382..5ad0c84d2 100644 --- a/VTEX - Pricing Hub.json +++ b/VTEX - Pricing Hub.json @@ -2,7 +2,7 @@ "openapi": "3.0.0", "info": { "title": "Pricing Hub", - "description": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https:\/\/support.vtex.com\/hc\/en-us\/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https:\/\/user-images.githubusercontent.com\/77292838\/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https:\/\/github.com\/vtex-apps\/external-prices-app)\r\n- [Node template](https:\/\/github.com\/vtex-apps\/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- [POST - Retrieve prices](https:\/\/developers.vtex.com\/docs\/api-reference\/pricing-hub#post-\/api\/pricing-hub\/prices?endpoint=post-\/api\/pricing-hub\/prices)\r\n- [PUT - Configure External Price Source](https:\/\/developers.vtex.com\/docs\/api-reference\/pricing-hub#put-\/api\/pricing-hub\/prices\/config)\r\n## Common parameters in the documentation\r\n\r\n| Parameter name | Description |\r\n|---------------------------|-----------------------------------------------------------------------------------------|\r\n| `{{accountName}}` | Store account name. |\r\n| `{{environment}}` | The environment that will be called. |\r\n| `{{X-VTEX-API-AppKey}}` | Located in the headers of the requests, user authentication key. |\r\n| `{{X-VTEX-API-AppToken}}` | Located in the headers of the requests, authentication password. |\r\n", + "description": "> This feature is in closed beta, available only for selected customers. If you have any questions, contact our [Support](https://support.vtex.com/hc/en-us/requests). \r\n\r\n In the B2B scenario, it is common for stores to have personalized prices per customer and complex pricing systems that require external integrations. Pricing Hub is a system developed for the B2B context that works as an intermediary between VTEX and external pricing systems.\r\n\r\n In VTEX, B2B stores have the option to use our internal pricing system or an external one. If the store chooses to operate with an external pricing system, Pricing Hub will query an external price calculation API. The external API should then respond with the price for all items in the shopping cart according to its predefined tax rules.\r\n\r\n![Pricing hub protocal diagram](https://user-images.githubusercontent.com/77292838/211634260-e4f7a516-91df-416e-ab43-d9c79d56bc91.png)\r\n\r\n## Implementation\r\n\r\nTo connect with external pricing systems using Pricing Hub, it is necessary to build a VTEX IO middleware app. We offer two reference implementation templates to simplify this process:\r\n\r\n- [C# template](https://github.com/vtex-apps/external-prices-app)\r\n- [Node template](https://github.com/vtex-apps/external-prices-node)\r\n\r\nRead the documentation on each repository to learn more about the required steps to use and customize the app.\r\n\r\n> The app used by Pricing Hub to connect must be a `major 0`. \r\n\r\n### Index\r\n- `POST` [Retrieve prices](https://developers.vtex.com/docs/api-reference/pricing-hub#post-/api/pricing-hub/prices)\r\n- `PUT` [Configure External Price Source](https://developers.vtex.com/docs/api-reference/pricing-hub#put-/api/pricing-hub/prices/config)\r\n\r\n## Common parameters in the documentation\r\n\r\n| Parameter name | Description |\r\n| - | - |\r\n| `{{an}}` | Name of the VTEX account.\r\n|\r\n| `{{environment}}` | Name of the VTEX account. |\r\n| `{{X-VTEX-API-AppKey}}` | Unique identifier of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys). |\r\n| `{{X-VTEX-API-AppToken}}` | Secret token of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys). |", "contact": {}, "version": "1.0" },