From 59ee3966dab198e460f60a663c47738d0304bc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=20Patr=C3=ADcia=20F=2E=20Barbosa?= Date: Fri, 14 Mar 2025 11:26:06 -0300 Subject: [PATCH 1/3] Merge branch 'fixspectralerror-marketplace-apis' of https://github.com/vtex/openapi-schemas into fixspectralerror-marketplace-apis --- VTEX - Marketplace APIs - Suggestions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VTEX - Marketplace APIs - Suggestions.json b/VTEX - Marketplace APIs - Suggestions.json index 98effad98..4ff68654d 100644 --- a/VTEX - Marketplace APIs - Suggestions.json +++ b/VTEX - Marketplace APIs - Suggestions.json @@ -22,7 +22,7 @@ "/suggestions/configuration/autoapproval/toggle": { "get": { "tags": [ - "SKU approval settings" + "SKU Approval settings" ], "summary": "Get autoApprove status in account settings", "description": "This endpoint can be used to check whether the autoapprove setting is active or not, for a specific seller. \n\nIf the response is `true`, the autoapprove setting is active. If the response is `false`, it is inactive.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https:\/\/developers.vtex.com\/docs\/guides\/authentication-overview#machine-authentication).\r\n\r\n>\u2757 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.", From 6c3c27b31d71bdefff6359b00ffb792b7aed935a Mon Sep 17 00:00:00 2001 From: anabaarbosa <> Date: Fri, 14 Mar 2025 14:29:18 +0000 Subject: [PATCH 2/3] Update generated files by portman --- ...VTEX - Marketplace APIs - Suggestions.json | 1805 ++++++++--------- 1 file changed, 883 insertions(+), 922 deletions(-) diff --git a/PostmanCollections/VTEX - Marketplace APIs - Suggestions.json b/PostmanCollections/VTEX - Marketplace APIs - Suggestions.json index 2c5479840..8c4a9b580 100644 --- a/PostmanCollections/VTEX - Marketplace APIs - Suggestions.json +++ b/PostmanCollections/VTEX - Marketplace APIs - Suggestions.json @@ -1,101 +1,111 @@ { "_": { - "postman_id": "2ad7a3e9-aca7-4156-b921-7edf011d0b7b" + "postman_id": "9814dee9-6718-4b02-b95d-b7a492f596be" }, "item": [ { - "id": "dc0d8363-93bf-4b5e-a2e4-075ff462e240", + "id": "ccbddc07-fe98-427f-be1c-deb32f570fd2", "name": "Get suggestions", "description": { "content": "Search and filter all suggestions using specific criteria.", "type": "text/plain" }, - "item": [], - "event": [] - }, - { - "id": "0dd098b4-4d25-419f-8de7-5799b4117672", - "name": "Manage suggestions", - "description": { - "content": "Send or delete SKU suggestions from the seller to marketplace.", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "e40f481f-ddfb-45e2-878a-4955077b2fad", - "name": "Get versions", - "description": { - "content": "Search and filter all versions of suggestions, using specific criteria.", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "01bbb8a9-d124-46e5-bd71-05d620dbd125", - "name": "SKU approval settings", - "description": { - "content": "", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "c45126c8-e564-4006-adbe-b8d182c33051", - "name": "Match received SKUs", - "description": { - "content": "Match SKU suggestions received in the marketplace.", - "type": "text/plain" - }, - "item": [], - "event": [] - }, - { - "id": "3bcc2153-485c-4602-919b-872522bb9e84", - "name": "SKU Approval Settings", - "description": { - "content": "", - "type": "text/plain" - }, "item": [ { - "id": "a384d307-f1f4-468b-b3b4-444384918e48", - "name": "Get autoApprove status in account settings", + "id": "5a84c495-7ee5-4567-9c7e-b2d328132ee4", + "name": "Get all SKU suggestions", "request": { - "name": "Get autoApprove status in account settings", + "name": "Get all SKU suggestions", "description": { - "content": "This endpoint can be used to check whether the autoapprove setting is active or not, for a specific seller. \n\nIf the response is `true`, the autoapprove setting is active. If the response is `false`, it is inactive.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "This endpoint retrieves a list of all SKUs sent by the seller for the marketplace's approval. Marketplace operators should use this endpoint whenever they want to check the full list of received SKUs and their information. \n\nNote that all the information sent by the seller will be in the [content] object. All remaining information in this endpoint's response is given by the Matcher. \n\nMatcher rates received SKUs by correlating the data sent by sellers, to existing fields in the marketplace. The calculation of these scores determines whether the product has been: \n\n`Approved`: Score equal to or greater than 80 points. \n\n`Pending`: From 31 to 79 points.\n\n`Denied`: From 0 to 30 points. \n\nNote that if the autoApprove setting is enabled, the SKUs will be approved, regardless of the Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ - "suggestions", - "configuration", - "autoapproval", - "toggle" + "suggestions" ], "host": [ "{{baseUrl}}" ], "query": [ { - "disabled": false, + "disabled": true, "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", + "content": "This field allows you to customize your search. You can fill in this query param if you want to narrow down your search using the available filters on Received SKU modules.", "type": "text/plain" }, - "key": "sellerId", - "value": "seller123" + "key": "q", + "value": "" + }, + { + "disabled": true, + "description": { + "content": "This field allows users to filter SKU suggestions, by searching only the new suggestions that were just sent, and suggestions that have already been sent, but were updated. Possible values for this field include `new` and `update`.", + "type": "text/plain" + }, + "key": "type", + "value": "new" + }, + { + "disabled": true, + "description": { + "content": "A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller so it can call this endpoint.", + "type": "text/plain" + }, + "key": "seller", + "value": "" + }, + { + "disabled": true, + "description": { + "content": "Narrow down you search, filtering by status. Values allowed on this field include: `accepted`, `pending` and `denied.`", + "type": "text/plain" + }, + "key": "status", + "value": "accepted" + }, + { + "disabled": true, + "description": { + "content": "This field allows you to filter SKUs that have mapping or not. Insert `true` to filter SKUs that have mapping, or `false` to retrieve SKUs that aren't mapped.", + "type": "text/plain" + }, + "key": "hasmapping", + "value": "true" + }, + { + "disabled": true, + "description": { + "content": "Identifies the matching entity. It can be either VTEX's matcher, or an external matcher developed by partners, for example. The `matcherId`'s value can be obtained through the [Get SKU Suggestion by ID](https://developers.vtex.com/vtex-rest-api/reference/getsuggestion) endpoint.", + "type": "text/plain" + }, + "key": "matcherid", + "value": "vtex-matcher" + }, + { + "disabled": true, + "description": { + "content": "Define your pagination range, by adding the pagination starting value. Values should be bigger than 0, with a maximum of 50 records per page.", + "type": "text/plain" + }, + "key": "_from", + "value": "1" + }, + { + "disabled": true, + "description": { + "content": "Define your pagination range, by adding the pagination ending value. Values should be bigger than 0, with a maximum of 50 records per page.", + "type": "text/plain" + }, + "key": "_to", + "value": "50" } ], "variable": [ { "disabled": false, "description": { - "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", + "content": "(Required) Name of the VTEX account. Used as part of the URL", "type": "text/plain" }, "type": "any", @@ -117,15 +127,11 @@ { "disabled": false, "description": { - "content": "(Required) Describes the type of the content being sent.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], "method": "GET", @@ -134,30 +140,90 @@ "response": [ { "_": { - "postman_previewlanguage": "json" + "postman_previewlanguage": "text" }, - "id": "f5892de0-30d6-48b6-9c68-c3cf56724deb", + "id": "431f6fc3-6eb3-43b2-b3db-9c5d8606f241", "name": "OK", "originalRequest": { "url": { "path": [ - "suggestions", - "configuration", - "autoapproval", - "toggle" + "suggestions" ], "host": [ "{{baseUrl}}" ], "query": [ { - "disabled": false, + "disabled": true, "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", + "content": "This field allows you to customize your search. You can fill in this query param if you want to narrow down your search using the available filters on Received SKU modules.", "type": "text/plain" }, - "key": "sellerId", - "value": "seller123" + "key": "q", + "value": "" + }, + { + "disabled": true, + "description": { + "content": "This field allows users to filter SKU suggestions, by searching only the new suggestions that were just sent, and suggestions that have already been sent, but were updated. Possible values for this field include `new` and `update`.", + "type": "text/plain" + }, + "key": "type", + "value": "new" + }, + { + "disabled": true, + "description": { + "content": "A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller so it can call this endpoint.", + "type": "text/plain" + }, + "key": "seller", + "value": "" + }, + { + "disabled": true, + "description": { + "content": "Narrow down you search, filtering by status. Values allowed on this field include: `accepted`, `pending` and `denied.`", + "type": "text/plain" + }, + "key": "status", + "value": "accepted" + }, + { + "disabled": true, + "description": { + "content": "This field allows you to filter SKUs that have mapping or not. Insert `true` to filter SKUs that have mapping, or `false` to retrieve SKUs that aren't mapped.", + "type": "text/plain" + }, + "key": "hasmapping", + "value": "true" + }, + { + "disabled": true, + "description": { + "content": "Identifies the matching entity. It can be either VTEX's matcher, or an external matcher developed by partners, for example. The `matcherId`'s value can be obtained through the [Get SKU Suggestion by ID](https://developers.vtex.com/vtex-rest-api/reference/getsuggestion) endpoint.", + "type": "text/plain" + }, + "key": "matcherid", + "value": "vtex-matcher" + }, + { + "disabled": true, + "description": { + "content": "Define your pagination range, by adding the pagination starting value. Values should be bigger than 0, with a maximum of 50 records per page.", + "type": "text/plain" + }, + "key": "_from", + "value": "1" + }, + { + "disabled": true, + "description": { + "content": "Define your pagination range, by adding the pagination ending value. Values should be bigger than 0, with a maximum of 50 records per page.", + "type": "text/plain" + }, + "key": "_to", + "value": "50" } ], "variable": [] @@ -175,15 +241,11 @@ { "disabled": false, "description": { - "content": "(Required) Describes the type of the content being sent.", + "content": "(Required) Type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], "method": "GET", @@ -191,13 +253,7 @@ }, "status": "OK", "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"Enabled\": false\n}", + "header": [], "cookie": [] } ], @@ -205,13 +261,10 @@ { "listen": "test", "script": { - "id": "21c7df3e-4bc1-4c07-89f5-f6097d6fc989", + "id": "c401cede-f5df-4643-9891-ba28c79099c6", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[GET]::/suggestions/configuration/autoapproval/toggle - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", - "// Validate if response header has matching content-type\npm.test(\"[GET]::/suggestions/configuration/autoapproval/toggle - 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]::/suggestions/configuration/autoapproval/toggle - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"Enabled\":{\"type\":\"boolean\",\"description\":\"If the autoapprove setting is active for a given seller (`true`) or not (`false`).\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/suggestions/configuration/autoapproval/toggle - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Validate status 2xx \npm.test(\"[GET]::/suggestions - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" ] } } @@ -221,20 +274,19 @@ } }, { - "id": "2dfe1d04-2c62-4ac4-b758-dac5c7671353", - "name": "Activate autoApprove in marketplace's account", + "id": "28e06568-21b7-45c6-af31-4995a1f875f0", + "name": "Get SKU suggestion by ID", "request": { - "name": "Activate autoApprove in marketplace's account", + "name": "Get SKU suggestion by ID", "description": { - "content": "This endpoint enables the autoapprove rule to a marketplace's whole Received SKUs module. Once enabling the rule, received SKUs will be automatically approved on your store, regardless of the seller. \n\n For the autoapprove rule to work as expected, the approval [Matcher score](https://help.vtex.com/en/tutorial/entendendo-a-pontuacao-do-vtex-matcher--tutorials_424) should be set up as 80 (default value), but you can configure a different number through the field `Score` in [Save Account's Approval Settings](https://developers.vtex.com/vtex-rest-api/reference/saveaccountconfig).\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "This endpoint retrieves the data of a specific SKU sent by the seller, to the marketplace. Marketplaces or external matchers can call this endpoint when they want to check the information about a single SKU. \n\nNote that all the information sent by the seller will be in the [content] object. All remaining information in this endpoint's response is given by the Matcher. \n\nMatcher rates received SKUs by correlating the data sent by sellers, to existing fields in the marketplace. The calculation of these scores determines whether the product has been: \n\n`Approved`: score equal to or greater than 80 points. \n\n`Pending`: from 31 to 79 points.\n\n`Denied`: from 0 to 30 points. \n\nNote that if the autoApprove setting is enabled, the SKUs will be approved, regardless of the Score.\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| Channels | UI resources | **Send marketplace suggestion** |\r\n| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion | Suggestion resources | **Main** |\r\n\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - "configuration", - "autoapproval", - "toggle" + ":sellerId", + ":sellerSkuId" ], "host": [ "{{baseUrl}}" @@ -242,172 +294,29 @@ "query": [], "variable": [ { - "disabled": false, - "description": { - "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", - "type": "text/plain" - }, - "type": "any", - "value": "apiexamples", - "key": "accountName" - } - ] - }, - "header": [ - { - "disabled": false, - "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) Describes the type of the content being sent.", - "type": "text/plain" - }, - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "PUT", - "body": { - "mode": "raw", - "raw": "{\n \"Enabled\": true\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - } - }, - "response": [ - { - "_": { - "postman_previewlanguage": "json" - }, - "id": "188dd87e-07a0-4bad-b196-55e6226741e9", - "name": "OK", - "originalRequest": { - "url": { - "path": [ - "suggestions", - "configuration", - "autoapproval", - "toggle" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [] - }, - "header": [ - { - "disabled": false, - "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", - "type": "text/plain" - }, - "key": "Accept", - "value": "application/json" - }, - { - "disabled": false, - "description": { - "content": "(Required) Describes the type of the content being sent.", - "type": "text/plain" - }, - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "method": "PUT", - "body": { - "mode": "raw", - "raw": "{\n \"Enabled\": true\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - } - }, - "status": "OK", - "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"Enabled\": false\n}", - "cookie": [] - } - ], - "event": [ - { - "listen": "test", - "script": { - "id": "d248b38d-a14c-4c14-995e-8b133e3f4078", - "type": "text/javascript", - "exec": [ - "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/configuration/autoapproval/toggle - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", - "// Validate if response header has matching content-type\npm.test(\"[PUT]::/suggestions/configuration/autoapproval/toggle - 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]::/suggestions/configuration/autoapproval/toggle - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"Enabled\":{\"type\":\"boolean\",\"description\":\"If the autoapprove setting is active (`true`) or not (`false`).\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/suggestions/configuration/autoapproval/toggle - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" - ] - } - } - ], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - }, - { - "id": "8fb827dd-33ba-4360-91fb-d460aeefaf41", - "name": "Get account's approval settings", - "request": { - "name": "Get account's approval settings", - "description": { - "content": "This endpoint retrieves the current approval settings of a marketplace's Received SKUs module. Its response includes: \n\n- `Score`: Matcher scores for approving and rejecting SKUs received from sellers. \n\n- `Matchers`: All Matchers configured on the marketplace, and their respective details. \n\n- `SpecificationsMapping`: Mapping of product and SKU specifications, per seller. \n\n- `MatchFlux`: This field determines the type of approval configuration applied to SKUs received from a seller. \n\nThe possible values include: \n\n-`default`, where the Matcher reviews the SKU, and approves it based on its score. \n\n-`manual`, for manual approvals through the Received SKU UI, or Match API. \n\n-`autoApprove`, for every SKU received from a given seller to be approved automatically, regardless of their Matcher Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { - "path": [ - "suggestions", - "configuration" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [], - "variable": [ + "disabled": false, + "description": { + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", + "type": "text/plain" + }, + "type": "any", + "value": "seller123", + "key": "sellerId" + }, { "disabled": false, "description": { - "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", + "content": "(Required) A string that identifies the SKU in the marketplace. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", + "type": "text/plain" + }, + "type": "any", + "value": "1234", + "key": "sellerSkuId" + }, + { + "disabled": false, + "description": { + "content": "(Required) Name of the VTEX account. Used as part of the URL", "type": "text/plain" }, "type": "any", @@ -434,10 +343,6 @@ }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], "method": "GET", @@ -446,15 +351,16 @@ "response": [ { "_": { - "postman_previewlanguage": "json" + "postman_previewlanguage": "text" }, - "id": "2c223c1e-dc3a-4746-ac3a-b09220bcea66", + "id": "9d2a98ea-b892-48c3-9290-31cc2e6f4764", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - "configuration" + ":sellerId", + ":sellerSkuId" ], "host": [ "{{baseUrl}}" @@ -480,10 +386,6 @@ }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], "method": "GET", @@ -491,13 +393,7 @@ }, "status": "OK", "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"Score\": {\n \"Approve\": 80,\n \"Reject\": 30\n },\n \"Matchers\": [\n {\n \"MatcherId\": \"vtex-matcher\",\n \"hook-base-address\": \"http://portal.vtexinternal.com/api/ssm/hooks\",\n \"IsActive\": true,\n \"UpdatesNotificationEndpoint\": \"https://example.com/updates/notifications\",\n \"Description\": \"This matcher is configured to handle specific product categories and has been optimized for high accuracy.\"\n }\n ],\n \"Rules\": {\n \"Item\": [],\n \"Product\": []\n },\n \"SpecificationsMapping\": [],\n \"MatchFlux\": \"Default\"\n}", + "header": [], "cookie": [] } ], @@ -505,13 +401,10 @@ { "listen": "test", "script": { - "id": "236ffef5-9b03-46fa-abf0-e33cace18914", + "id": "a4291100-aa8b-40c5-ae7f-6209ee16a225", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[GET]::/suggestions/configuration - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", - "// Validate if response header has matching content-type\npm.test(\"[GET]::/suggestions/configuration - 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]::/suggestions/configuration - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"Score\":{\"type\":\"object\",\"description\":\"Matcher scores for approving and rejecting SKUs received from sellers.\"},\"Matchers\":{\"type\":\"array\",\"description\":\"All Matchers configured on the marketplace, and their respective details.\",\"items\":{\"type\":\"object\",\"description\":\"Details of a single matcher configured in the marketplace.\",\"properties\":{\"MatcherId\":{\"type\":\"string\",\"description\":\"Identifies the matching entity, either VTEX's matcher or an external matcher.\"},\"hook-base-address\":{\"type\":\"string\",\"description\":\"The base address for the Matcher's API endpoint.\"},\"IsActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the matcher is active (`true`) or inactive (`false`).\"},\"UpdatesNotificationEndpoint\":{\"type\":\"string\",\"description\":\"Endpoint for receiving notifications about updates from the matcher.\"},\"Description\":{\"type\":\"string\",\"description\":\"Description or notes about the matcher.\"}}}},\"Rules\":{\"type\":\"object\",\"description\":\"Items and products.\"},\"SpecificationsMapping\":{\"type\":\"array\",\"description\":\"Mapping of product and SKU specifications between the marketplace and the seller.\",\"items\":{\"type\":\"object\",\"description\":\"Mapping details for a single specification.\",\"properties\":{\"fieldName\":{\"type\":\"string\",\"description\":\"Name of the specification field in the seller's catalog.\"},\"marketplaceField\":{\"type\":\"string\",\"description\":\"Corresponding name of the specification field in the marketplace's catalog.\"}}}},\"MatchFlux\":{\"type\":\"string\",\"description\":\"This field determines the type of approval configuration applied to SKUs received from a seller.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/suggestions/configuration - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Validate status 2xx \npm.test(\"[GET]::/suggestions/:sellerId/:sellerSkuId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" ] } } @@ -519,20 +412,32 @@ "protocolProfileBehavior": { "disableBodyPruning": true } - }, + } + ], + "event": [] + }, + { + "id": "398333bb-684d-4c85-ab4c-f1edffef5407", + "name": "Manage suggestions", + "description": { + "content": "Send or delete SKU suggestions from the seller to marketplace.", + "type": "text/plain" + }, + "item": [ { - "id": "923cc370-c3d4-4d66-ae16-d6a5ad3bf1ac", - "name": "Save account's approval settings", + "id": "47755c70-5e57-480b-9816-cea7c59d953c", + "name": "Send SKU suggestion", "request": { - "name": "Save account's approval settings", + "name": "Send SKU suggestion", "description": { - "content": "Marketplaces use this endpoint to create or update approval settings on their Received SKUs module. \n\nThe request includes all the details necessary to implement the chosen approval settings.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "This request is used by the seller when it wants to suggest that one of their SKUs is sold in the marketplace.\n\nBefore using this request, the seller should always use the [Change Notification](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-get-seller-sku-notification) request in order to check if the SKU already exists in the marketplace. If it doesn't, then this is the next call in the SKU integration flow.\n\nIn the Send Suggestion request, the seller must send information about the SKU, such as the product and SKU name, the seller ID, and the image URL. All parameters are explained below.\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| Channels | UI resources | **Send marketplace suggestion** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - "configuration" + ":sellerId", + ":sellerSkuId" ], "host": [ "{{baseUrl}}" @@ -542,7 +447,27 @@ { "disabled": false, "description": { - "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", + "type": "text/plain" + }, + "type": "any", + "value": "seller123", + "key": "sellerId" + }, + { + "disabled": false, + "description": { + "content": "(Required) A string that identifies the SKU in the seller. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", + "type": "text/plain" + }, + "type": "any", + "value": "1234", + "key": "sellerSkuId" + }, + { + "disabled": false, + "description": { + "content": "(Required) Name of the VTEX account to which the seller wants to suggest a new SKU. It is used as part of the request URL.", "type": "text/plain" }, "type": "any", @@ -555,7 +480,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -573,16 +498,12 @@ { "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"Score\": {\n \"Approve\": 80,\n \"Reject\": 30\n },\n \"Matchers\": [\n {\n \"MatcherId\": \"vtex-matcher\",\n \"hook-base-address\": \"http://simple-suggestion-matcher.vtex.com.br\",\n \"IsActive\": true,\n \"UpdatesNotificationEndpoint\": null,\n \"Description\": null\n }\n ],\n \"SpecificationsMapping\": [\n \"color=red\",\n \"size=L\"\n ],\n \"MatchFlux\": \"autoApprove\"\n}", + "raw": "{\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"NameComplete\": \"Complete product name\",\n \"ProductDescription\": \"sample\",\n \"BrandName\": \"Brand 1\",\n \"SkuName\": \"Sku sample\",\n \"SellerId\": \"string\",\n \"Height\": 1,\n \"Width\": 1,\n \"Length\": 1,\n \"Weight\": 1,\n \"Updated\": null,\n \"RefId\": \"REFID123\",\n \"SellerStockKeepingUnitId\": 567,\n \"CategoryFullPath\": \"Category 1\",\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"EAN\": \"EAN123\",\n \"MeasurementUnit\": \"un\",\n \"UnitMultiplier\": 1,\n \"AvailableQuantity\": 111,\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"SalePrice\": 399,\n \"CurrencySymbol\": \"R$\"\n }\n}", "options": { "raw": { "headerFamily": "json", @@ -594,15 +515,16 @@ "response": [ { "_": { - "postman_previewlanguage": "json" + "postman_previewlanguage": "text" }, - "id": "1e1c6aee-29c6-47f1-8577-ca00114dd943", + "id": "b3db9982-90c3-44b6-b0f2-86e50e15529a", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - "configuration" + ":sellerId", + ":sellerSkuId" ], "host": [ "{{baseUrl}}" @@ -614,7 +536,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", + "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -632,16 +554,12 @@ { "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], "method": "PUT", "body": { "mode": "raw", - "raw": "{\n \"Score\": {\n \"Approve\": 80,\n \"Reject\": 30\n },\n \"Matchers\": [\n {\n \"MatcherId\": \"vtex-matcher\",\n \"hook-base-address\": \"http://simple-suggestion-matcher.vtex.com.br\",\n \"IsActive\": true,\n \"UpdatesNotificationEndpoint\": null,\n \"Description\": null\n }\n ],\n \"SpecificationsMapping\": [\n \"color=red\",\n \"size=L\"\n ],\n \"MatchFlux\": \"autoApprove\"\n}", + "raw": "{\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"NameComplete\": \"Complete product name\",\n \"ProductDescription\": \"sample\",\n \"BrandName\": \"Brand 1\",\n \"SkuName\": \"Sku sample\",\n \"SellerId\": \"string\",\n \"Height\": 1,\n \"Width\": 1,\n \"Length\": 1,\n \"Weight\": 1,\n \"Updated\": null,\n \"RefId\": \"REFID123\",\n \"SellerStockKeepingUnitId\": 567,\n \"CategoryFullPath\": \"Category 1\",\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"EAN\": \"EAN123\",\n \"MeasurementUnit\": \"un\",\n \"UnitMultiplier\": 1,\n \"AvailableQuantity\": 111,\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"SalePrice\": 399,\n \"CurrencySymbol\": \"R$\"\n }\n}", "options": { "raw": { "headerFamily": "json", @@ -652,13 +570,7 @@ }, "status": "OK", "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"Score\": {\n \"Approve\": 80,\n \"Reject\": 30\n },\n \"Matchers\": [\n {\n \"MatcherId\": \"vtex-matcher\",\n \"hook-base-address\": \"http://simple-suggestion-matcher.vtex.com.br\",\n \"IsActive\": true,\n \"UpdatesNotificationEndpoint\": \"notification.endpoint\",\n \"Description\": \"Note\"\n }\n ],\n \"Rules\": {\n \"Item\": [\n 1\n ],\n \"Product\": [\n \"Shirt\"\n ]\n },\n \"SpecificationsMapping\": [\n {\n \"SellerId\": \"Store1\",\n \"Mapping\": {\n \"Yellow\": \"Light yellow\"\n }\n }\n ],\n \"MatchFlux\": \"autoApprove\"\n}", + "header": [], "cookie": [] } ], @@ -666,13 +578,10 @@ { "listen": "test", "script": { - "id": "a4007683-a01c-44b3-a838-9bcee8cfb603", + "id": "b5ce1452-182c-4c86-9323-e7386e7fe81a", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/configuration - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", - "// Validate if response header has matching content-type\npm.test(\"[PUT]::/suggestions/configuration - 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]::/suggestions/configuration - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"description\":\"Response object for the Save Accounts Approval Settings endpoint.\",\"properties\":{\"Score\":{\"type\":\"object\",\"description\":\"[Matcher's rates](https://help.vtex.com/en/tutorial/understanding-vtex-matcher-scoring) to approve or reject [received SKUs](https://help.vtex.com/en/tutorial/cataloging-received-skus--tutorials_396) sent by sellers.\",\"properties\":{\"Approve\":{\"type\":\"integer\",\"description\":\"Score to approve SKUs sent by sellers.\"},\"Reject\":{\"type\":\"integer\",\"description\":\"Score to reject SKUs sent by sellers.\"}}},\"Matchers\":{\"type\":\"array\",\"description\":\"[Matchers](https://help.vtex.com/en/tutorial/understanding-vtex-matcher-scoring) configurations for approving and rejecting [received SKUs](https://help.vtex.com/en/tutorial/cataloging-received-skus--tutorials_396) sent by sellers.\",\"items\":{\"type\":\"object\",\"description\":\"Details of a matcher used for scoring and managing SKUs approvals and rejections.\",\"properties\":{\"MatcherId\":{\"type\":\"string\",\"description\":\"Identifies the matching entity. It can be either [VTEX's matcher](https://help.vtex.com/en/tutorial/understanding-vtex-matcher-scoring), or an external matcher.\"},\"hook-base-address\":{\"type\":\"string\",\"description\":\"The given matcher's URL.\"},\"IsActive\":{\"type\":\"boolean\",\"description\":\"Whether the matcher is active in the account (`true`), or not (`false`).\"},\"UpdatesNotificationEndpoint\":{\"type\":\"string\",\"description\":\"The [received SKUs](https://help.vtex.com/en/tutorial/cataloging-received-skus--tutorials_396) module calls this endpoint for matcher's suggestions updates.\"},\"Description\":{\"type\":\"string\",\"description\":\"The note inserted on the request body.\"}}}},\"Rules\":{\"type\":\"object\",\"description\":\"Items and products that belong to sellers.\",\"properties\":{\"Item\":{\"type\":\"array\",\"description\":\"SKUs' ID.\",\"items\":{\"type\":\"integer\",\"description\":\"SKU ID.\"}},\"Product\":{\"type\":\"array\",\"description\":\"Product's name.\",\"items\":{\"type\":\"string\",\"description\":\"Product name.\"}}}},\"SpecificationsMapping\":{\"type\":\"array\",\"description\":\"This attribute maps product and SKU's specifications between the marketplace and the seller.\",\"items\":{\"type\":\"object\",\"description\":\"Object representing a single specification mapping between the marketplace and the seller.\",\"properties\":{\"SellerId\":{\"type\":\"string\",\"description\":\"The seller ID.\"},\"Mapping\":{\"type\":\"object\",\"description\":\"The attributes and values mapped between the marketplace and the seller.\"}}}},\"MatchFlux\":{\"type\":\"string\",\"description\":\"Type of approval configuration that apply to received SKUs sent by sellers. The possible values are: \\n\\n`default`: The matcher approves the SKU. \\n\\n`manual`: Manual SKU's approvals. \\n\\n`AutoApprove`: Automatic SKU's approvals.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/suggestions/configuration - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/:sellerId/:sellerSkuId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" ] } } @@ -682,20 +591,19 @@ } }, { - "id": "c101cfd1-3df2-4297-9b8a-c31dff8d0be0", - "name": "Get account's matcher settings", + "id": "8f2aba2d-c027-4709-8603-5a82ac3c4a16", + "name": "Delete SKU suggestion", "request": { - "name": "Get account's matcher settings", + "name": "Delete SKU suggestion", "description": { - "content": "This endpoint will be used by the marketplace to query the matcher's current approval settings on their incoming SKUs module. If the account has no matcher configured, the response will be `404 Not Found`. \n\nFor account approval configuration information, with response including specification information, see [Get Account Approval Settings](https://developers.vtex.com/docs/api-reference/marketplace-apis-suggestions#get-/suggestions/configuration) terminal. \n\nThe [VTEX matcher](https://help.vtex.com/pt/tutorial/entendendo-a-punctuacao-do-vtex-matcher--tutorials_424) is a tool used by marketplaces to evaluate SKUs corresponding to information from an advertisement of the seller, with those of items already present in the marketplace catalog.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "This endpoint deletes a chosen SKU suggestion. Only one SKU should be deleted per request. This action cannot be undone. A workaround to revert a deletion is to send the suggestion again, through the Send Suggestion API.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion | Suggestion resources | **Main** |\r\n\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - "configuration", - "account", - "config" + ":sellerId", + ":sellerSkuId" ], "host": [ "{{baseUrl}}" @@ -705,7 +613,27 @@ { "disabled": false, "description": { - "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", + "type": "text/plain" + }, + "type": "any", + "value": "seller123", + "key": "sellerId" + }, + { + "disabled": false, + "description": { + "content": "(Required) A string that identifies the SKU in the marketplace. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", + "type": "text/plain" + }, + "type": "any", + "value": "1234", + "key": "sellerSkuId" + }, + { + "disabled": false, + "description": { + "content": "(Required) Name of the VTEX account. Used as part of the URL.", "type": "text/plain" }, "type": "any", @@ -732,29 +660,24 @@ }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], - "method": "GET", + "method": "DELETE", "body": {} }, "response": [ { "_": { - "postman_previewlanguage": "json" + "postman_previewlanguage": "text" }, - "id": "01902efa-b228-4c46-aac2-3e7d6d554589", + "id": "210cfd36-8199-45ed-a026-963a46edc61c", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - "configuration", - "account", - "config" + ":sellerId", + ":sellerSkuId" ], "host": [ "{{baseUrl}}" @@ -780,24 +703,14 @@ }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], - "method": "GET", + "method": "DELETE", "body": {} }, "status": "OK", "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"score\": {\n \"approve\": 85,\n \"pending\": 31,\n \"reject\": 30\n },\n \"matchers\": [\n {\n \"matcherId\": \"example-matcher\",\n \"hook-base-address\": \"http://portal.vtexinternal.com.br/api/u90/hooks\",\n \"isActive\": true,\n \"updatesNotificationEndpoint\": null,\n \"description\": null\n }\n ],\n \"rules\": {\n \"item\": [],\n \"product\": []\n },\n \"specificationsMapping\": [],\n \"matchFlux\": \"Default\"\n}", + "header": [], "cookie": [] } ], @@ -805,13 +718,10 @@ { "listen": "test", "script": { - "id": "f15a8194-7a04-4461-8b81-35f6d276fb27", + "id": "8f11aa2f-2ddd-46b8-af9d-5cb758d7a9d4", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[GET]::/suggestions/configuration/account/config - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", - "// Validate if response header has matching content-type\npm.test(\"[GET]::/suggestions/configuration/account/config - 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]::/suggestions/configuration/account/config - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"description\":\"Response from Get Account's Matcher Settings endpoint with information about current matcher score setting, rules, spec mapping, and matchFlux.\",\"type\":\"object\",\"properties\":{\"score\":{\"description\":\"[Matcher](https://help.vtex.com/pt/tutorial/entendendo-a-pontuacao-do-vtex-matcher--tutorials_424) rates received SKUs by comparing the data sent by sellers to existing fields in the marketplace. The calculation of these scores determines whether the product has been: `Approved`, `Pending` or `Denied`.\",\"type\":\"object\",\"properties\":{\"approve\":{\"type\":\"integer\",\"description\":\"Minimum approval score set by the marketplace.\",\"default\":80},\"pending\":{\"type\":\"integer\",\"description\":\"Minimum value for the ad to be pending.\",\"default\":31},\"reject\":{\"type\":\"integer\",\"description\":\"Bounce score set by marketplace.\",\"default\":30}}},\"matchers\":{\"description\":\"Array of objects that presents a list of matchers configured in the marketplace. If the marketplace has more than one matcher configured in the account, an array will be displayed for each matcher.\\n\\n By default, the VTEX Matcher is set up automatically in VTEX account.\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"description\":\"An object representing a single matcher configuration.\",\"properties\":{\"matcherId\":{\"type\":\"string\",\"description\":\"The Matcher Id.\"},\"hook-base-address\":{\"type\":\"string\",\"description\":\"The base address of the Matcher hook.\"},\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates if Matcher is active or not. `TRUE` = Matcher is active or `FALSE` = Matcher is inactive.\"}}}},\"rules\":{\"description\":\"Arrays object that contains the rules defined for product approval.\",\"type\":\"object\",\"properties\":{\"item\":{\"type\":\"array\",\"description\":\"A list of rules for items.\",\"items\":{\"type\":\"object\",\"description\":\"A rule for items.\"}},\"product\":{\"type\":\"array\",\"description\":\"A list of rules for products.\",\"items\":{\"type\":\"object\",\"description\":\"A rule for products.\"}}}},\"SpecificationsMapping\":{\"type\":\"array\",\"description\":\"List of product specifications and SKU attributes configured for mapping.\",\"items\":{\"type\":\"object\",\"description\":\"A specification mapping entry.\"}},\"matchFlux\":{\"type\":\"string\",\"description\":\"This field shows what type of approval setting is being applied to SKUs received from a seller. \\n\\nPossible values include: \\n\\n-`default`: where Matcher reviews the SKU and approves it based on its score. \\n\\n-`manual`: for manual approvals via incoming SKU UI or mailing API. \\n\\n-`autoApprove`: so that every SKU received from a given seller is automatically approved, regardless of its Matcher Score.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/suggestions/configuration/account/config - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Validate status 2xx \npm.test(\"[DELETE]::/suggestions/:sellerId/:sellerSkuId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" ] } } @@ -819,22 +729,33 @@ "protocolProfileBehavior": { "disableBodyPruning": true } - }, + } + ], + "event": [] + }, + { + "id": "9362df6f-32e4-4899-ab0f-c9939cfba379", + "name": "Get versions", + "description": { + "content": "Search and filter all versions of suggestions, using specific criteria.", + "type": "text/plain" + }, + "item": [ { - "id": "a92d229c-ebc6-41fe-b672-f85b54a9cb79", - "name": "Get seller's approval settings", + "id": "49432eae-fab9-43c0-9002-162011481d12", + "name": "Get all versions", "request": { - "name": "Get seller's approval settings", + "name": "Get all versions", "description": { - "content": "This endpoint retrieves the current Received SKUs approval settings applied to a specific seller. Its response includes: \n\n- `sellerId`: A string that identifies the seller in the marketplace. \n\n- `accountId`: Marketplace’s account ID. \n\n- `accountName`: Marketplace’s account name. \n\n- `mapping`: Mapping of SKU and product Specifications. \n\n- `matchFlux`: This field determines the type of approval configuration applied to SKUs received from a seller. \n\nThe possible values include: \n\n-`default`, where the Matcher reviews the SKU, and approves it based on its score. \n\n-`manual`, for manual approvals through the Received SKU UI and Match API. \n\n-`autoApprove`, for every SKU received from a given seller to be approved automatically, regardless of the Matcher Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\r\n|Mapper| Suggestion resources| **Mapper**|\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "Whenever a SKU suggestion is updated or changed, a new version of the original one is created. All versions are logged, so you can search for previous our current states of SKU suggestions. \n\nThis endpoint retrieves the data of *all* previous and latest versions of a specific SKU suggestion, sent by the seller. Whenever a SKU is updated, it is important to map previous versions, to compare and identify changes. \n\nThe response's object [latestversion] provides the information of the most recent version of that SKU suggestion.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion | Suggestion resources | **Main** |\r\n\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - "configuration", - "seller", - ":sellerId" + ":sellerId", + ":sellerskuid", + "versions" ], "host": [ "{{baseUrl}}" @@ -844,7 +765,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", "type": "text/plain" }, "type": "any", @@ -854,7 +775,17 @@ { "disabled": false, "description": { - "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", + "content": "(Required) A string that identifies the SKU in the marketplace. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", + "type": "text/plain" + }, + "type": "any", + "value": "1234", + "key": "sellerskuid" + }, + { + "disabled": false, + "description": { + "content": "(Required) Name of the VTEX account. Used as part of the URL", "type": "text/plain" }, "type": "any", @@ -867,7 +798,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand", "type": "text/plain" }, "key": "Accept", @@ -881,10 +812,6 @@ }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], "method": "GET", @@ -893,17 +820,17 @@ "response": [ { "_": { - "postman_previewlanguage": "json" + "postman_previewlanguage": "text" }, - "id": "093c951f-b5a3-4818-99b2-119e68806754", + "id": "e33c68f9-4269-46e1-9635-eaf4e8f98a62", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - "configuration", - "seller", - ":sellerId" + ":sellerId", + ":sellerskuid", + "versions" ], "host": [ "{{baseUrl}}" @@ -915,7 +842,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand", "type": "text/plain" }, "key": "Accept", @@ -929,24 +856,14 @@ }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" } ], "method": "GET", "body": {} }, - "status": "OK", - "code": 200, - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": "{\n \"sellerId\": \"sellerexample\",\n \"accountId\": \"d74dau71f-325a-4463-bd53-ae8b0453186ca\",\n \"accountName\": \"marketplaceexample\",\n \"mapping\": {\n \"defaultColor\": \"white /black\",\n \"searchColor\": \"color1, color2\",\n \"color1\": \"black\",\n \"color2\": \"white\",\n \"color\": \"black\",\n \"size\": \"EUR44\"\n },\n \"matchFlux\": \"autoApprove\"\n}", + "status": "OK", + "code": 200, + "header": [], "cookie": [] } ], @@ -954,13 +871,10 @@ { "listen": "test", "script": { - "id": "91796a3a-c7e0-4bfa-a2d8-08dbe4559fa4", + "id": "ae37d4e7-8999-4e41-8c1c-c344de569cb9", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[GET]::/suggestions/configuration/seller/:sellerId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", - "// Validate if response header has matching content-type\npm.test(\"[GET]::/suggestions/configuration/seller/:sellerId - 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]::/suggestions/configuration/seller/:sellerId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", - "// Response Validation\nconst schema = {\"type\":\"object\",\"description\":\"Represents the approval settings configured for a specific seller within the marketplace. This object includes details about the seller, their account, and how SKUs are mapped and approved.\",\"properties\":{\"sellerId\":{\"type\":\"string\",\"description\":\"A string that identifies the seller in the marketplace.\"},\"accountId\":{\"type\":\"string\",\"description\":\"Marketplace’s account ID.\"},\"accountName\":{\"type\":\"string\",\"description\":\"Marketplace’s account name.\"},\"mapping\":{\"type\":\"object\",\"default\":{},\"description\":\"SKU mapping information and product [specifications](https://developers.vtex.com/docs/guides/catalog-overview#configuring-initial-settings-mandatory).\\n\\n The properties included within `mapping` can change according to the product type, the `color` specification and its variations described in this example are just one of the possibilities. The values received in this call's payload for those properties depend on the seller's catalog architecture, and are not default. \\n\\nSee some examples of specifications: \\n\\n- Voltage \\n\\n- Power \\n\\n- Size \\n\\n- Height \\n\\n- Width.\",\"properties\":{\"defaultColor\":{\"type\":\"string\",\"description\":\"The field will indicate the default color predefined by the seller in cases where specific product colors are not defined. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"searchColor\":{\"type\":\"string\",\"description\":\"Field that provides the available colors to filter searches. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"color1\":{\"type\":\"string\",\"description\":\"`color1` available for search filter. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"color2\":{\"type\":\"string\",\"description\":\"`color2` available for search filter. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"color\":{\"type\":\"string\",\"description\":\"Indicates the predominant or main color of the product. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"size\":{\"type\":\"string\",\"description\":\"Indicates the size of the product. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"}}},\"matchFlux\":{\"type\":\"string\",\"description\":\"This field determines the type of [approval configuration applied to SKUs received from a seller](https://developers.vtex.com/docs/api-reference/marketplace-apis-suggestions#put-/suggestions/configuration/seller/-sellerId-). \\n\\nThe possible values include: \\n\\n-`default`, where the Matcher reviews the SKU, and approves it based on its score. \\n\\n-`manual`, for manual approvals through the Received SKU UI and Match API. \\n\\n-`autoApprove`, for every SKU received from a given seller to be approved automatically, regardless of the Matcher Score.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/suggestions/configuration/seller/:sellerId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + "// Validate status 2xx \npm.test(\"[GET]::/suggestions/:sellerId/:sellerskuid/versions - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" ] } } @@ -970,20 +884,21 @@ } }, { - "id": "d613124e-654e-4e1d-b7f3-2d0ace4a315c", - "name": "Save seller's approval settings", + "id": "fd29c052-be98-4c5b-8fcf-bbaf669e47af", + "name": "Get version by ID", "request": { - "name": "Save seller's approval settings", + "name": "Get version by ID", "description": { - "content": "Marketplaces use this endpoint to create or update approval settings to a specific seller, on the Received SKUs module. \n\nThe request includes all the details necessary to implement the chosen approval settings.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "Whenever a SKU suggestion is updated or changed, a new version of the original one is created. All versions are logged, so you can search for previous our current states of SKU suggestions. \n\n This endpoint retrieves a specific *version* of a chosen SKU sent by the seller. Add the Seller's ID, Seller's SKU ID, and version ID in the path to detail your search.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion | Suggestion resources | **Main** |\r\n\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - "configuration", - "seller", - ":sellerId" + ":sellerId", + ":sellerskuid", + "versions", + ":version" ], "host": [ "{{baseUrl}}" @@ -993,7 +908,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", "type": "text/plain" }, "type": "any", @@ -1003,7 +918,27 @@ { "disabled": false, "description": { - "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", + "content": "(Required) A string that identifies the SKU in the marketplace. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", + "type": "text/plain" + }, + "type": "any", + "value": "1234", + "key": "sellerskuid" + }, + { + "disabled": false, + "description": { + "content": "(Required) Whenever an SKU Suggestion is updated or changed, a new version of the original one is created. All versions are logged, so you can search for previous our current states of SKU suggestions. This field is the `versionId` associated to the version you choose to search for. You can get this field's value through the [Get SKU Suggestion by ID](https://developers.vtex.com/vtex-rest-api/reference/getsuggestion). through the `latestVersionId` field.", + "type": "text/plain" + }, + "type": "any", + "value": "09072021142808277", + "key": "version" + }, + { + "disabled": false, + "description": { + "content": "(Required) Name of the VTEX account. Used as part of the URL", "type": "text/plain" }, "type": "any", @@ -1016,7 +951,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand", "type": "text/plain" }, "key": "Accept", @@ -1030,38 +965,26 @@ }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Content-Type", - "value": "application/json" } ], - "method": "PUT", - "body": { - "mode": "raw", - "raw": "{\n \"sellerId\": \"1a\",\n \"mapping\": null,\n \"matchFlux\": \"Default\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - } + "method": "GET", + "body": {} }, "response": [ { "_": { "postman_previewlanguage": "text" }, - "id": "ddfda864-7e50-4b8f-a7b3-e2cab0a07351", + "id": "028a97f0-b82b-494b-80f5-0ce3aa1441ac", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - "configuration", - "seller", - ":sellerId" + ":sellerId", + ":sellerskuid", + "versions", + ":version" ], "host": [ "{{baseUrl}}" @@ -1073,7 +996,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand", "type": "text/plain" }, "key": "Accept", @@ -1087,23 +1010,10 @@ }, "key": "Content-Type", "value": "application/json" - }, - { - "key": "Content-Type", - "value": "application/json" } ], - "method": "PUT", - "body": { - "mode": "raw", - "raw": "{\n \"sellerId\": \"1a\",\n \"mapping\": null,\n \"matchFlux\": \"Default\"\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - } + "method": "GET", + "body": {} }, "status": "OK", "code": 200, @@ -1115,10 +1025,10 @@ { "listen": "test", "script": { - "id": "b0023ef6-06ca-4798-8f2d-6d001ae8191b", + "id": "5c5e98a3-90fa-4961-943b-1fe355559583", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/configuration/seller/:sellerId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" + "// Validate status 2xx \npm.test(\"[GET]::/suggestions/:sellerId/:sellerskuid/versions/:version - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" ] } } @@ -1126,14 +1036,25 @@ "protocolProfileBehavior": { "disableBodyPruning": true } - }, + } + ], + "event": [] + }, + { + "id": "9631cf60-1e26-4dce-b147-a4e5ab5ba967", + "name": "SKU approval settings", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ { - "id": "5b407930-5598-405d-9cb9-afb25daebe30", - "name": "Activate autoApprove setting for a seller", + "id": "3d2b95e2-94d9-491d-b75e-acee501ec1e6", + "name": "Activate autoApprove in marketplace's account", "request": { - "name": "Activate autoApprove setting for a seller", + "name": "Activate autoApprove in marketplace's account", "description": { - "content": "This endpoint enables the auto approve setting to received SKUs from a specific seller. Be aware that once enabling the rule through this request, all received SKUs from that seller will be automatically approved on your store, regardless of the Matcher Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "This endpoint enables the autoapprove rule to a marketplace's whole Received SKUs module. Once enabling the rule, received SKUs will be automatically approved on your store, regardless of the seller. \n\n For the autoapprove rule to work as expected, the approval [Matcher score](https://help.vtex.com/en/tutorial/entendendo-a-pontuacao-do-vtex-matcher--tutorials_424) should be set up as 80 (default value), but you can configure a different number through the field `Score` in [Save Account's Approval Settings](https://developers.vtex.com/vtex-rest-api/reference/saveaccountconfig).\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { @@ -1141,25 +1062,13 @@ "suggestions", "configuration", "autoapproval", - "toggle", - "seller", - ":sellerId" + "toggle" ], "host": [ "{{baseUrl}}" ], "query": [], "variable": [ - { - "disabled": false, - "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", - "type": "text/plain" - }, - "type": "any", - "value": "seller123", - "key": "sellerId" - }, { "disabled": false, "description": { @@ -1194,6 +1103,10 @@ { "key": "Content-Type", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "PUT", @@ -1211,9 +1124,9 @@ "response": [ { "_": { - "postman_previewlanguage": "text" + "postman_previewlanguage": "json" }, - "id": "0e9cba71-7b48-49b9-842a-de78c90cc9a5", + "id": "c3257a38-bc71-4adf-9336-405e402328d3", "name": "OK", "originalRequest": { "url": { @@ -1221,9 +1134,7 @@ "suggestions", "configuration", "autoapproval", - "toggle", - "seller", - ":sellerId" + "toggle" ], "host": [ "{{baseUrl}}" @@ -1250,151 +1161,81 @@ "key": "Content-Type", "value": "application/json" }, - { - "key": "Content-Type", - "value": "application/json" - } - ], - "method": "PUT", - "body": { - "mode": "raw", - "raw": "{\n \"Enabled\": true\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - } - }, - "status": "OK", - "code": 200, - "header": [], - "cookie": [] - } - ], - "event": [ - { - "listen": "test", - "script": { - "id": "650a7321-3bb4-4fa3-8350-2821c1e2efda", - "type": "text/javascript", - "exec": [ - "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/configuration/autoapproval/toggle/seller/:sellerId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" - ] - } - } - ], - "protocolProfileBehavior": { - "disableBodyPruning": true - } - } - ], - "event": [] - }, - { - "id": "ae5e1daa-3eaa-4ac0-ba2d-23840f1cd9c9", - "name": "Get Suggestions", - "description": { - "content": "", - "type": "text/plain" - }, - "item": [ - { - "id": "d0a649c6-1328-4de8-b621-e3a0347051b4", - "name": "Get all SKU suggestions", - "request": { - "name": "Get all SKU suggestions", - "description": { - "content": "This endpoint retrieves a list of all SKUs sent by the seller for the marketplace's approval. Marketplace operators should use this endpoint whenever they want to check the full list of received SKUs and their information. \n\nNote that all the information sent by the seller will be in the [content] object. All remaining information in this endpoint's response is given by the Matcher. \n\nMatcher rates received SKUs by correlating the data sent by sellers, to existing fields in the marketplace. The calculation of these scores determines whether the product has been: \n\n`Approved`: Score equal to or greater than 80 points. \n\n`Pending`: From 31 to 79 points.\n\n`Denied`: From 0 to 30 points. \n\nNote that if the autoApprove setting is enabled, the SKUs will be approved, regardless of the Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { - "path": [ - "suggestions" - ], - "host": [ - "{{baseUrl}}" - ], - "query": [ - { - "disabled": true, - "description": { - "content": "This field allows you to customize your search. You can fill in this query param if you want to narrow down your search using the available filters on Received SKU modules.", - "type": "text/plain" - }, - "key": "q", - "value": "" - }, - { - "disabled": true, - "description": { - "content": "This field allows users to filter SKU suggestions, by searching only the new suggestions that were just sent, and suggestions that have already been sent, but were updated. Possible values for this field include `new` and `update`.", - "type": "text/plain" - }, - "key": "type", - "value": "new" - }, - { - "disabled": true, - "description": { - "content": "A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller so it can call this endpoint.", - "type": "text/plain" - }, - "key": "seller", - "value": "" - }, - { - "disabled": true, - "description": { - "content": "Narrow down you search, filtering by status. Values allowed on this field include: `accepted`, `pending` and `denied.`", - "type": "text/plain" - }, - "key": "status", - "value": "accepted" - }, - { - "disabled": true, - "description": { - "content": "This field allows you to filter SKUs that have mapping or not. Insert `true` to filter SKUs that have mapping, or `false` to retrieve SKUs that aren't mapped.", - "type": "text/plain" - }, - "key": "hasmapping", - "value": "true" - }, - { - "disabled": true, - "description": { - "content": "Identifies the matching entity. It can be either VTEX's matcher, or an external matcher developed by partners, for example. The `matcherId`'s value can be obtained through the [Get SKU Suggestion by ID](https://developers.vtex.com/vtex-rest-api/reference/getsuggestion) endpoint.", - "type": "text/plain" - }, - "key": "matcherid", - "value": "vtex-matcher" - }, - { - "disabled": true, - "description": { - "content": "Define your pagination range, by adding the pagination starting value. Values should be bigger than 0, with a maximum of 50 records per page.", - "type": "text/plain" + { + "key": "Content-Type", + "value": "application/json" }, - "key": "_from", - "value": "1" - }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"Enabled\": true\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } + }, + "status": "OK", + "code": 200, + "header": [ { - "disabled": true, - "description": { - "content": "Define your pagination range, by adding the pagination ending value. Values should be bigger than 0, with a maximum of 50 records per page.", - "type": "text/plain" - }, - "key": "_to", - "value": "50" + "key": "Content-Type", + "value": "application/json" } ], + "body": "{\n \"Enabled\": false\n}", + "cookie": [] + } + ], + "event": [ + { + "listen": "test", + "script": { + "id": "c6a7b897-2f1a-482a-a246-774a29391c8b", + "type": "text/javascript", + "exec": [ + "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/configuration/autoapproval/toggle - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[PUT]::/suggestions/configuration/autoapproval/toggle - 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]::/suggestions/configuration/autoapproval/toggle - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", + "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"Enabled\":{\"type\":\"boolean\",\"description\":\"If the autoapprove setting is active (`true`) or not (`false`).\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/suggestions/configuration/autoapproval/toggle - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + ] + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + }, + { + "id": "236feefc-9af3-4805-a0e7-5a841bd5e6ed", + "name": "Get account's approval settings", + "request": { + "name": "Get account's approval settings", + "description": { + "content": "This endpoint retrieves the current approval settings of a marketplace's Received SKUs module. Its response includes: \n\n- `Score`: Matcher scores for approving and rejecting SKUs received from sellers. \n\n- `Matchers`: All Matchers configured on the marketplace, and their respective details. \n\n- `SpecificationsMapping`: Mapping of product and SKU specifications, per seller. \n\n- `MatchFlux`: This field determines the type of approval configuration applied to SKUs received from a seller. \n\nThe possible values include: \n\n-`default`, where the Matcher reviews the SKU, and approves it based on its score. \n\n-`manual`, for manual approvals through the Received SKU UI, or Match API. \n\n-`autoApprove`, for every SKU received from a given seller to be approved automatically, regardless of their Matcher Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { + "path": [ + "suggestions", + "configuration" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [], "variable": [ { "disabled": false, "description": { - "content": "(Required) Name of the VTEX account. Used as part of the URL", + "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", "type": "text/plain" }, "type": "any", @@ -1416,11 +1257,15 @@ { "disabled": false, "description": { - "content": "(Required) Type of the content being sent.", + "content": "(Required) Describes the type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "GET", @@ -1429,92 +1274,20 @@ "response": [ { "_": { - "postman_previewlanguage": "text" + "postman_previewlanguage": "json" }, - "id": "d712e34f-f839-4926-91c3-2456c83bb307", + "id": "6a58c6a4-0d59-4a84-b53f-2f6acbbef083", "name": "OK", "originalRequest": { "url": { "path": [ - "suggestions" + "suggestions", + "configuration" ], "host": [ "{{baseUrl}}" ], - "query": [ - { - "disabled": true, - "description": { - "content": "This field allows you to customize your search. You can fill in this query param if you want to narrow down your search using the available filters on Received SKU modules.", - "type": "text/plain" - }, - "key": "q", - "value": "" - }, - { - "disabled": true, - "description": { - "content": "This field allows users to filter SKU suggestions, by searching only the new suggestions that were just sent, and suggestions that have already been sent, but were updated. Possible values for this field include `new` and `update`.", - "type": "text/plain" - }, - "key": "type", - "value": "new" - }, - { - "disabled": true, - "description": { - "content": "A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller so it can call this endpoint.", - "type": "text/plain" - }, - "key": "seller", - "value": "" - }, - { - "disabled": true, - "description": { - "content": "Narrow down you search, filtering by status. Values allowed on this field include: `accepted`, `pending` and `denied.`", - "type": "text/plain" - }, - "key": "status", - "value": "accepted" - }, - { - "disabled": true, - "description": { - "content": "This field allows you to filter SKUs that have mapping or not. Insert `true` to filter SKUs that have mapping, or `false` to retrieve SKUs that aren't mapped.", - "type": "text/plain" - }, - "key": "hasmapping", - "value": "true" - }, - { - "disabled": true, - "description": { - "content": "Identifies the matching entity. It can be either VTEX's matcher, or an external matcher developed by partners, for example. The `matcherId`'s value can be obtained through the [Get SKU Suggestion by ID](https://developers.vtex.com/vtex-rest-api/reference/getsuggestion) endpoint.", - "type": "text/plain" - }, - "key": "matcherid", - "value": "vtex-matcher" - }, - { - "disabled": true, - "description": { - "content": "Define your pagination range, by adding the pagination starting value. Values should be bigger than 0, with a maximum of 50 records per page.", - "type": "text/plain" - }, - "key": "_from", - "value": "1" - }, - { - "disabled": true, - "description": { - "content": "Define your pagination range, by adding the pagination ending value. Values should be bigger than 0, with a maximum of 50 records per page.", - "type": "text/plain" - }, - "key": "_to", - "value": "50" - } - ], + "query": [], "variable": [] }, "header": [ @@ -1530,11 +1303,15 @@ { "disabled": false, "description": { - "content": "(Required) Type of the content being sent.", + "content": "(Required) Describes the type of the content being sent.", "type": "text/plain" }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], "method": "GET", @@ -1542,7 +1319,13 @@ }, "status": "OK", "code": 200, - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"Score\": {\n \"Approve\": 80,\n \"Reject\": 30\n },\n \"Matchers\": [\n {\n \"MatcherId\": \"vtex-matcher\",\n \"hook-base-address\": \"http://portal.vtexinternal.com/api/ssm/hooks\",\n \"IsActive\": true,\n \"UpdatesNotificationEndpoint\": \"https://example.com/updates/notifications\",\n \"Description\": \"This matcher is configured to handle specific product categories and has been optimized for high accuracy.\"\n }\n ],\n \"Rules\": {\n \"Item\": [],\n \"Product\": []\n },\n \"SpecificationsMapping\": [],\n \"MatchFlux\": \"Default\"\n}", "cookie": [] } ], @@ -1550,10 +1333,13 @@ { "listen": "test", "script": { - "id": "a2193251-81da-4702-aaa0-724f26003d75", + "id": "3fa9d3d5-8d5f-4178-81e5-4d6ed4bbe4a4", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[GET]::/suggestions - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" + "// Validate status 2xx \npm.test(\"[GET]::/suggestions/configuration - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[GET]::/suggestions/configuration - 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]::/suggestions/configuration - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", + "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"Score\":{\"type\":\"object\",\"description\":\"Matcher scores for approving and rejecting SKUs received from sellers.\"},\"Matchers\":{\"type\":\"array\",\"description\":\"All Matchers configured on the marketplace, and their respective details.\",\"items\":{\"type\":\"object\",\"description\":\"Details of a single matcher configured in the marketplace.\",\"properties\":{\"MatcherId\":{\"type\":\"string\",\"description\":\"Identifies the matching entity, either VTEX's matcher or an external matcher.\"},\"hook-base-address\":{\"type\":\"string\",\"description\":\"The base address for the Matcher's API endpoint.\"},\"IsActive\":{\"type\":\"boolean\",\"description\":\"Indicates whether the matcher is active (`true`) or inactive (`false`).\"},\"UpdatesNotificationEndpoint\":{\"type\":\"string\",\"description\":\"Endpoint for receiving notifications about updates from the matcher.\"},\"Description\":{\"type\":\"string\",\"description\":\"Description or notes about the matcher.\"}}}},\"Rules\":{\"type\":\"object\",\"description\":\"Items and products.\"},\"SpecificationsMapping\":{\"type\":\"array\",\"description\":\"Mapping of product and SKU specifications between the marketplace and the seller.\",\"items\":{\"type\":\"object\",\"description\":\"Mapping details for a single specification.\",\"properties\":{\"fieldName\":{\"type\":\"string\",\"description\":\"Name of the specification field in the seller's catalog.\"},\"marketplaceField\":{\"type\":\"string\",\"description\":\"Corresponding name of the specification field in the marketplace's catalog.\"}}}},\"MatchFlux\":{\"type\":\"string\",\"description\":\"This field determines the type of approval configuration applied to SKUs received from a seller.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/suggestions/configuration - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -1563,19 +1349,18 @@ } }, { - "id": "2b69e481-2aea-468c-ab05-59402ab10a14", - "name": "Get SKU suggestion by ID", + "id": "e259c088-81e5-463d-ae26-e66c5f779120", + "name": "Save account's approval settings", "request": { - "name": "Get SKU suggestion by ID", + "name": "Save account's approval settings", "description": { - "content": "This endpoint retrieves the data of a specific SKU sent by the seller, to the marketplace. Marketplaces or external matchers can call this endpoint when they want to check the information about a single SKU. \n\nNote that all the information sent by the seller will be in the [content] object. All remaining information in this endpoint's response is given by the Matcher. \n\nMatcher rates received SKUs by correlating the data sent by sellers, to existing fields in the marketplace. The calculation of these scores determines whether the product has been: \n\n`Approved`: score equal to or greater than 80 points. \n\n`Pending`: from 31 to 79 points.\n\n`Denied`: from 0 to 30 points. \n\nNote that if the autoApprove setting is enabled, the SKUs will be approved, regardless of the Score.\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| Channels | UI resources | **Send marketplace suggestion** |\r\n| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion | Suggestion resources | **Main** |\r\n\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "Marketplaces use this endpoint to create or update approval settings on their Received SKUs module. \n\nThe request includes all the details necessary to implement the chosen approval settings.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - ":sellerId", - ":sellerSkuId" + "configuration" ], "host": [ "{{baseUrl}}" @@ -1585,27 +1370,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", - "type": "text/plain" - }, - "type": "any", - "value": "seller123", - "key": "sellerId" - }, - { - "disabled": false, - "description": { - "content": "(Required) A string that identifies the SKU in the marketplace. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", - "type": "text/plain" - }, - "type": "any", - "value": "1234", - "key": "sellerSkuId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Name of the VTEX account. Used as part of the URL", + "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", "type": "text/plain" }, "type": "any", @@ -1632,24 +1397,40 @@ }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "GET", - "body": {} + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"Score\": {\n \"Approve\": 80,\n \"Reject\": 30\n },\n \"Matchers\": [\n {\n \"MatcherId\": \"vtex-matcher\",\n \"hook-base-address\": \"http://simple-suggestion-matcher.vtex.com.br\",\n \"IsActive\": true,\n \"UpdatesNotificationEndpoint\": null,\n \"Description\": null\n }\n ],\n \"SpecificationsMapping\": [\n \"color=red\",\n \"size=L\"\n ],\n \"MatchFlux\": \"autoApprove\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } }, "response": [ { "_": { - "postman_previewlanguage": "text" + "postman_previewlanguage": "json" }, - "id": "f308f6d8-74e4-45ad-859a-d7dc6ebd7a45", + "id": "ceea15fb-4bf6-46e8-8f10-77a2948bedaa", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - ":sellerId", - ":sellerSkuId" + "configuration" ], "host": [ "{{baseUrl}}" @@ -1675,14 +1456,37 @@ }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"Score\": {\n \"Approve\": 80,\n \"Reject\": 30\n },\n \"Matchers\": [\n {\n \"MatcherId\": \"vtex-matcher\",\n \"hook-base-address\": \"http://simple-suggestion-matcher.vtex.com.br\",\n \"IsActive\": true,\n \"UpdatesNotificationEndpoint\": null,\n \"Description\": null\n }\n ],\n \"SpecificationsMapping\": [\n \"color=red\",\n \"size=L\"\n ],\n \"MatchFlux\": \"autoApprove\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } } - ], - "method": "GET", - "body": {} + } }, "status": "OK", "code": 200, - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"Score\": {\n \"Approve\": 80,\n \"Reject\": 30\n },\n \"Matchers\": [\n {\n \"MatcherId\": \"vtex-matcher\",\n \"hook-base-address\": \"http://simple-suggestion-matcher.vtex.com.br\",\n \"IsActive\": true,\n \"UpdatesNotificationEndpoint\": \"notification.endpoint\",\n \"Description\": \"Note\"\n }\n ],\n \"Rules\": {\n \"Item\": [\n 1\n ],\n \"Product\": [\n \"Shirt\"\n ]\n },\n \"SpecificationsMapping\": [\n {\n \"SellerId\": \"Store1\",\n \"Mapping\": {\n \"Yellow\": \"Light yellow\"\n }\n }\n ],\n \"MatchFlux\": \"autoApprove\"\n}", "cookie": [] } ], @@ -1690,10 +1494,13 @@ { "listen": "test", "script": { - "id": "847f8081-26ce-4e51-8468-5b9852c5b7c6", + "id": "2a65e714-36a6-455f-9da6-03d459569f7f", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[GET]::/suggestions/:sellerId/:sellerSkuId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" + "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/configuration - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[PUT]::/suggestions/configuration - 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]::/suggestions/configuration - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", + "// Response Validation\nconst schema = {\"type\":\"object\",\"description\":\"Response object for the Save Accounts Approval Settings endpoint.\",\"properties\":{\"Score\":{\"type\":\"object\",\"description\":\"[Matcher's rates](https://help.vtex.com/en/tutorial/understanding-vtex-matcher-scoring) to approve or reject [received SKUs](https://help.vtex.com/en/tutorial/cataloging-received-skus--tutorials_396) sent by sellers.\",\"properties\":{\"Approve\":{\"type\":\"integer\",\"description\":\"Score to approve SKUs sent by sellers.\"},\"Reject\":{\"type\":\"integer\",\"description\":\"Score to reject SKUs sent by sellers.\"}}},\"Matchers\":{\"type\":\"array\",\"description\":\"[Matchers](https://help.vtex.com/en/tutorial/understanding-vtex-matcher-scoring) configurations for approving and rejecting [received SKUs](https://help.vtex.com/en/tutorial/cataloging-received-skus--tutorials_396) sent by sellers.\",\"items\":{\"type\":\"object\",\"description\":\"Details of a matcher used for scoring and managing SKUs approvals and rejections.\",\"properties\":{\"MatcherId\":{\"type\":\"string\",\"description\":\"Identifies the matching entity. It can be either [VTEX's matcher](https://help.vtex.com/en/tutorial/understanding-vtex-matcher-scoring), or an external matcher.\"},\"hook-base-address\":{\"type\":\"string\",\"description\":\"The given matcher's URL.\"},\"IsActive\":{\"type\":\"boolean\",\"description\":\"Whether the matcher is active in the account (`true`), or not (`false`).\"},\"UpdatesNotificationEndpoint\":{\"type\":\"string\",\"description\":\"The [received SKUs](https://help.vtex.com/en/tutorial/cataloging-received-skus--tutorials_396) module calls this endpoint for matcher's suggestions updates.\"},\"Description\":{\"type\":\"string\",\"description\":\"The note inserted on the request body.\"}}}},\"Rules\":{\"type\":\"object\",\"description\":\"Items and products that belong to sellers.\",\"properties\":{\"Item\":{\"type\":\"array\",\"description\":\"SKUs' ID.\",\"items\":{\"type\":\"integer\",\"description\":\"SKU ID.\"}},\"Product\":{\"type\":\"array\",\"description\":\"Product's name.\",\"items\":{\"type\":\"string\",\"description\":\"Product name.\"}}}},\"SpecificationsMapping\":{\"type\":\"array\",\"description\":\"This attribute maps product and SKU's specifications between the marketplace and the seller.\",\"items\":{\"type\":\"object\",\"description\":\"Object representing a single specification mapping between the marketplace and the seller.\",\"properties\":{\"SellerId\":{\"type\":\"string\",\"description\":\"The seller ID.\"},\"Mapping\":{\"type\":\"object\",\"description\":\"The attributes and values mapped between the marketplace and the seller.\"}}}},\"MatchFlux\":{\"type\":\"string\",\"description\":\"Type of approval configuration that apply to received SKUs sent by sellers. The possible values are: \\n\\n`default`: The matcher approves the SKU. \\n\\n`manual`: Manual SKU's approvals. \\n\\n`AutoApprove`: Automatic SKU's approvals.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[PUT]::/suggestions/configuration - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -1701,32 +1508,22 @@ "protocolProfileBehavior": { "disableBodyPruning": true } - } - ], - "event": [] - }, - { - "id": "7a7fcead-65d0-4e56-a419-d944919400f5", - "name": "Manage Suggestions", - "description": { - "content": "", - "type": "text/plain" - }, - "item": [ + }, { - "id": "a5393323-4d60-407f-b9bd-29b0b55a7dff", - "name": "Send SKU suggestion", + "id": "30e2446a-6668-4fe5-86ff-5a07af77a8f4", + "name": "Get account's matcher settings", "request": { - "name": "Send SKU suggestion", + "name": "Get account's matcher settings", "description": { - "content": "This request is used by the seller when it wants to suggest that one of their SKUs is sold in the marketplace.\n\nBefore using this request, the seller should always use the [Change Notification](https://developers.vtex.com/vtex-rest-api/reference/catalog-api-get-seller-sku-notification) request in order to check if the SKU already exists in the marketplace. If it doesn't, then this is the next call in the SKU integration flow.\n\nIn the Send Suggestion request, the seller must send information about the SKU, such as the product and SKU name, the seller ID, and the image URL. All parameters are explained below.\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| Channels | UI resources | **Send marketplace suggestion** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "This endpoint will be used by the marketplace to query the matcher's current approval settings on their incoming SKUs module. If the account has no matcher configured, the response will be `404 Not Found`. \n\nFor account approval configuration information, with response including specification information, see [Get Account Approval Settings](https://developers.vtex.com/docs/api-reference/marketplace-apis-suggestions#get-/suggestions/configuration) terminal. \n\nThe [VTEX matcher](https://help.vtex.com/pt/tutorial/entendendo-a-punctuacao-do-vtex-matcher--tutorials_424) is a tool used by marketplaces to evaluate SKUs corresponding to information from an advertisement of the seller, with those of items already present in the marketplace catalog.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - ":sellerId", - ":sellerSkuId" + "configuration", + "account", + "config" ], "host": [ "{{baseUrl}}" @@ -1736,27 +1533,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", - "type": "text/plain" - }, - "type": "any", - "value": "seller123", - "key": "sellerId" - }, - { - "disabled": false, - "description": { - "content": "(Required) A string that identifies the SKU in the seller. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", - "type": "text/plain" - }, - "type": "any", - "value": "1234", - "key": "sellerSkuId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Name of the VTEX account to which the seller wants to suggest a new SKU. It is used as part of the request URL.", + "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", "type": "text/plain" }, "type": "any", @@ -1769,7 +1546,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -1785,35 +1562,27 @@ "value": "application/json" }, { - "key": "Content-Type", + "key": "Accept", "value": "application/json" } ], - "method": "PUT", - "body": { - "mode": "raw", - "raw": "{\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"NameComplete\": \"Complete product name\",\n \"ProductDescription\": \"sample\",\n \"BrandName\": \"Brand 1\",\n \"SkuName\": \"Sku sample\",\n \"SellerId\": \"string\",\n \"Height\": 1,\n \"Width\": 1,\n \"Length\": 1,\n \"Weight\": 1,\n \"Updated\": null,\n \"RefId\": \"REFID123\",\n \"SellerStockKeepingUnitId\": 567,\n \"CategoryFullPath\": \"Category 1\",\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"EAN\": \"EAN123\",\n \"MeasurementUnit\": \"un\",\n \"UnitMultiplier\": 1,\n \"AvailableQuantity\": 111,\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"SalePrice\": 399,\n \"CurrencySymbol\": \"R$\"\n }\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - } + "method": "GET", + "body": {} }, "response": [ { "_": { - "postman_previewlanguage": "text" + "postman_previewlanguage": "json" }, - "id": "6c28e532-ef29-4b03-93f6-2ae5bda11986", + "id": "18aa4149-ac69-4789-be65-76e606a01fc1", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - ":sellerId", - ":sellerSkuId" + "configuration", + "account", + "config" ], "host": [ "{{baseUrl}}" @@ -1825,7 +1594,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -1841,25 +1610,22 @@ "value": "application/json" }, { - "key": "Content-Type", + "key": "Accept", "value": "application/json" } ], - "method": "PUT", - "body": { - "mode": "raw", - "raw": "{\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"NameComplete\": \"Complete product name\",\n \"ProductDescription\": \"sample\",\n \"BrandName\": \"Brand 1\",\n \"SkuName\": \"Sku sample\",\n \"SellerId\": \"string\",\n \"Height\": 1,\n \"Width\": 1,\n \"Length\": 1,\n \"Weight\": 1,\n \"Updated\": null,\n \"RefId\": \"REFID123\",\n \"SellerStockKeepingUnitId\": 567,\n \"CategoryFullPath\": \"Category 1\",\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"EAN\": \"EAN123\",\n \"MeasurementUnit\": \"un\",\n \"UnitMultiplier\": 1,\n \"AvailableQuantity\": 111,\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"SalePrice\": 399,\n \"CurrencySymbol\": \"R$\"\n }\n}", - "options": { - "raw": { - "headerFamily": "json", - "language": "json" - } - } - } + "method": "GET", + "body": {} }, "status": "OK", "code": 200, - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"score\": {\n \"approve\": 85,\n \"pending\": 31,\n \"reject\": 30\n },\n \"matchers\": [\n {\n \"matcherId\": \"example-matcher\",\n \"hook-base-address\": \"http://portal.vtexinternal.com.br/api/u90/hooks\",\n \"isActive\": true,\n \"updatesNotificationEndpoint\": null,\n \"description\": null\n }\n ],\n \"rules\": {\n \"item\": [],\n \"product\": []\n },\n \"specificationsMapping\": [],\n \"matchFlux\": \"Default\"\n}", "cookie": [] } ], @@ -1867,10 +1633,13 @@ { "listen": "test", "script": { - "id": "77597860-7f06-4467-a737-f373c67bf3de", + "id": "02ae1b35-f88c-41b7-bb92-5868204ed40f", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/:sellerId/:sellerSkuId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" + "// Validate status 2xx \npm.test(\"[GET]::/suggestions/configuration/account/config - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[GET]::/suggestions/configuration/account/config - 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]::/suggestions/configuration/account/config - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", + "// Response Validation\nconst schema = {\"description\":\"Response from Get Account's Matcher Settings endpoint with information about current matcher score setting, rules, spec mapping, and matchFlux.\",\"type\":\"object\",\"properties\":{\"score\":{\"description\":\"[Matcher](https://help.vtex.com/pt/tutorial/entendendo-a-pontuacao-do-vtex-matcher--tutorials_424) rates received SKUs by comparing the data sent by sellers to existing fields in the marketplace. The calculation of these scores determines whether the product has been: `Approved`, `Pending` or `Denied`.\",\"type\":\"object\",\"properties\":{\"approve\":{\"type\":\"integer\",\"description\":\"Minimum approval score set by the marketplace.\",\"default\":80},\"pending\":{\"type\":\"integer\",\"description\":\"Minimum value for the ad to be pending.\",\"default\":31},\"reject\":{\"type\":\"integer\",\"description\":\"Bounce score set by marketplace.\",\"default\":30}}},\"matchers\":{\"description\":\"Array of objects that presents a list of matchers configured in the marketplace. If the marketplace has more than one matcher configured in the account, an array will be displayed for each matcher.\\n\\n By default, the VTEX Matcher is set up automatically in VTEX account.\",\"type\":\"array\",\"items\":{\"type\":\"object\",\"description\":\"An object representing a single matcher configuration.\",\"properties\":{\"matcherId\":{\"type\":\"string\",\"description\":\"The Matcher Id.\"},\"hook-base-address\":{\"type\":\"string\",\"description\":\"The base address of the Matcher hook.\"},\"isActive\":{\"type\":\"boolean\",\"description\":\"Indicates if Matcher is active or not. `TRUE` = Matcher is active or `FALSE` = Matcher is inactive.\"}}}},\"rules\":{\"description\":\"Arrays object that contains the rules defined for product approval.\",\"type\":\"object\",\"properties\":{\"item\":{\"type\":\"array\",\"description\":\"A list of rules for items.\",\"items\":{\"type\":\"object\",\"description\":\"A rule for items.\"}},\"product\":{\"type\":\"array\",\"description\":\"A list of rules for products.\",\"items\":{\"type\":\"object\",\"description\":\"A rule for products.\"}}}},\"SpecificationsMapping\":{\"type\":\"array\",\"description\":\"List of product specifications and SKU attributes configured for mapping.\",\"items\":{\"type\":\"object\",\"description\":\"A specification mapping entry.\"}},\"matchFlux\":{\"type\":\"string\",\"description\":\"This field shows what type of approval setting is being applied to SKUs received from a seller. \\n\\nPossible values include: \\n\\n-`default`: where Matcher reviews the SKU and approves it based on its score. \\n\\n-`manual`: for manual approvals via incoming SKU UI or mailing API. \\n\\n-`autoApprove`: so that every SKU received from a given seller is automatically approved, regardless of its Matcher Score.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/suggestions/configuration/account/config - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -1880,19 +1649,20 @@ } }, { - "id": "983ecb8b-7646-4d90-bf33-7cacf6c996d3", - "name": "Delete SKU suggestion", + "id": "dd0275ee-6b07-4328-874d-c1ca4092142f", + "name": "Get seller's approval settings", "request": { - "name": "Delete SKU suggestion", + "name": "Get seller's approval settings", "description": { - "content": "This endpoint deletes a chosen SKU suggestion. Only one SKU should be deleted per request. This action cannot be undone. A workaround to revert a deletion is to send the suggestion again, through the Send Suggestion API.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion | Suggestion resources | **Main** |\r\n\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "This endpoint retrieves the current Received SKUs approval settings applied to a specific seller. Its response includes: \n\n- `sellerId`: A string that identifies the seller in the marketplace. \n\n- `accountId`: Marketplace’s account ID. \n\n- `accountName`: Marketplace’s account name. \n\n- `mapping`: Mapping of SKU and product Specifications. \n\n- `matchFlux`: This field determines the type of approval configuration applied to SKUs received from a seller. \n\nThe possible values include: \n\n-`default`, where the Matcher reviews the SKU, and approves it based on its score. \n\n-`manual`, for manual approvals through the Received SKU UI and Match API. \n\n-`autoApprove`, for every SKU received from a given seller to be approved automatically, regardless of the Matcher Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\r\n|Mapper| Suggestion resources| **Mapper**|\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - ":sellerId", - ":sellerSkuId" + "configuration", + "seller", + ":sellerId" ], "host": [ "{{baseUrl}}" @@ -1902,7 +1672,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", "type": "text/plain" }, "type": "any", @@ -1912,17 +1682,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the SKU in the marketplace. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", - "type": "text/plain" - }, - "type": "any", - "value": "1234", - "key": "sellerSkuId" - }, - { - "disabled": false, - "description": { - "content": "(Required) Name of the VTEX account. Used as part of the URL.", + "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", "type": "text/plain" }, "type": "any", @@ -1949,24 +1709,29 @@ }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "DELETE", + "method": "GET", "body": {} }, "response": [ { "_": { - "postman_previewlanguage": "text" + "postman_previewlanguage": "json" }, - "id": "48050612-1093-41c3-8477-27e8f3744a52", + "id": "1fd1c3fb-e463-4406-add4-715efee47395", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - ":sellerId", - ":sellerSkuId" + "configuration", + "seller", + ":sellerId" ], "host": [ "{{baseUrl}}" @@ -1992,14 +1757,24 @@ }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" } ], - "method": "DELETE", + "method": "GET", "body": {} }, "status": "OK", "code": 200, - "header": [], + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"sellerId\": \"sellerexample\",\n \"accountId\": \"d74dau71f-325a-4463-bd53-ae8b0453186ca\",\n \"accountName\": \"marketplaceexample\",\n \"mapping\": {\n \"defaultColor\": \"white /black\",\n \"searchColor\": \"color1, color2\",\n \"color1\": \"black\",\n \"color2\": \"white\",\n \"color\": \"black\",\n \"size\": \"EUR44\"\n },\n \"matchFlux\": \"autoApprove\"\n}", "cookie": [] } ], @@ -2007,10 +1782,13 @@ { "listen": "test", "script": { - "id": "79cc6a3f-faa3-4d80-862d-1ea10630cd3d", + "id": "c1c8927c-e9ea-4e95-b3c3-a4f1189100ca", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[DELETE]::/suggestions/:sellerId/:sellerSkuId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" + "// Validate status 2xx \npm.test(\"[GET]::/suggestions/configuration/seller/:sellerId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[GET]::/suggestions/configuration/seller/:sellerId - 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]::/suggestions/configuration/seller/:sellerId - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", + "// Response Validation\nconst schema = {\"type\":\"object\",\"description\":\"Represents the approval settings configured for a specific seller within the marketplace. This object includes details about the seller, their account, and how SKUs are mapped and approved.\",\"properties\":{\"sellerId\":{\"type\":\"string\",\"description\":\"A string that identifies the seller in the marketplace.\"},\"accountId\":{\"type\":\"string\",\"description\":\"Marketplace’s account ID.\"},\"accountName\":{\"type\":\"string\",\"description\":\"Marketplace’s account name.\"},\"mapping\":{\"type\":\"object\",\"default\":{},\"description\":\"SKU mapping information and product [specifications](https://developers.vtex.com/docs/guides/catalog-overview#configuring-initial-settings-mandatory).\\n\\n The properties included within `mapping` can change according to the product type, the `color` specification and its variations described in this example are just one of the possibilities. The values received in this call's payload for those properties depend on the seller's catalog architecture, and are not default. \\n\\nSee some examples of specifications: \\n\\n- Voltage \\n\\n- Power \\n\\n- Size \\n\\n- Height \\n\\n- Width.\",\"properties\":{\"defaultColor\":{\"type\":\"string\",\"description\":\"The field will indicate the default color predefined by the seller in cases where specific product colors are not defined. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"searchColor\":{\"type\":\"string\",\"description\":\"Field that provides the available colors to filter searches. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"color1\":{\"type\":\"string\",\"description\":\"`color1` available for search filter. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"color2\":{\"type\":\"string\",\"description\":\"`color2` available for search filter. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"color\":{\"type\":\"string\",\"description\":\"Indicates the predominant or main color of the product. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"},\"size\":{\"type\":\"string\",\"description\":\"Indicates the size of the product. This field is neither mandatory nor default, it will depend on the architecture of the seller's catalog.\"}}},\"matchFlux\":{\"type\":\"string\",\"description\":\"This field determines the type of [approval configuration applied to SKUs received from a seller](https://developers.vtex.com/docs/api-reference/marketplace-apis-suggestions#put-/suggestions/configuration/seller/-sellerId-). \\n\\nThe possible values include: \\n\\n-`default`, where the Matcher reviews the SKU, and approves it based on its score. \\n\\n-`manual`, for manual approvals through the Received SKU UI and Match API. \\n\\n-`autoApprove`, for every SKU received from a given seller to be approved automatically, regardless of the Matcher Score.\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/suggestions/configuration/seller/:sellerId - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" ] } } @@ -2018,33 +1796,22 @@ "protocolProfileBehavior": { "disableBodyPruning": true } - } - ], - "event": [] - }, - { - "id": "6aa8db90-c7d7-43a8-bbf1-fafcd91d21a1", - "name": "Get Versions", - "description": { - "content": "", - "type": "text/plain" - }, - "item": [ + }, { - "id": "91ce20cc-4261-4108-ba75-0c428042d3e2", - "name": "Get all versions", + "id": "9695d3e7-41bf-4f22-a015-68f464d7116c", + "name": "Save seller's approval settings", "request": { - "name": "Get all versions", + "name": "Save seller's approval settings", "description": { - "content": "Whenever a SKU suggestion is updated or changed, a new version of the original one is created. All versions are logged, so you can search for previous our current states of SKU suggestions. \n\nThis endpoint retrieves the data of *all* previous and latest versions of a specific SKU suggestion, sent by the seller. Whenever a SKU is updated, it is important to map previous versions, to compare and identify changes. \n\nThe response's object [latestversion] provides the information of the most recent version of that SKU suggestion.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion | Suggestion resources | **Main** |\r\n\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "Marketplaces use this endpoint to create or update approval settings to a specific seller, on the Received SKUs module. \n\nThe request includes all the details necessary to implement the chosen approval settings.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - ":sellerId", - ":sellerskuid", - "versions" + "configuration", + "seller", + ":sellerId" ], "host": [ "{{baseUrl}}" @@ -2054,7 +1821,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", "type": "text/plain" }, "type": "any", @@ -2064,17 +1831,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the SKU in the marketplace. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", - "type": "text/plain" - }, - "type": "any", - "value": "1234", - "key": "sellerskuid" - }, - { - "disabled": false, - "description": { - "content": "(Required) Name of the VTEX account. Used as part of the URL", + "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", "type": "text/plain" }, "type": "any", @@ -2087,7 +1844,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -2101,25 +1858,38 @@ }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" } ], - "method": "GET", - "body": {} + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"sellerId\": \"1a\",\n \"mapping\": null,\n \"matchFlux\": \"Default\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } }, "response": [ { "_": { "postman_previewlanguage": "text" }, - "id": "52815855-c2c4-4029-b021-40d882a88809", + "id": "49e9ccc5-0392-41d1-8f47-edf45d958707", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - ":sellerId", - ":sellerskuid", - "versions" + "configuration", + "seller", + ":sellerId" ], "host": [ "{{baseUrl}}" @@ -2131,7 +1901,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -2145,10 +1915,23 @@ }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" } ], - "method": "GET", - "body": {} + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"sellerId\": \"1a\",\n \"mapping\": null,\n \"matchFlux\": \"Default\"\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } }, "status": "OK", "code": 200, @@ -2160,10 +1943,10 @@ { "listen": "test", "script": { - "id": "96208e9f-05ff-452b-ad5a-f1e4e4ba04cc", + "id": "acdabc31-1a4d-4fac-9a24-13702a004264", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[GET]::/suggestions/:sellerId/:sellerskuid/versions - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" + "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/configuration/seller/:sellerId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" ] } } @@ -2173,21 +1956,22 @@ } }, { - "id": "e7e2c9f8-7256-480b-ad27-c93cd33464cc", - "name": "Get version by ID", + "id": "7876fd76-0140-4bdb-af37-ef77b5f4823c", + "name": "Activate autoApprove setting for a seller", "request": { - "name": "Get version by ID", + "name": "Activate autoApprove setting for a seller", "description": { - "content": "Whenever a SKU suggestion is updated or changed, a new version of the original one is created. All versions are logged, so you can search for previous our current states of SKU suggestions. \n\n This endpoint retrieves a specific *version* of a chosen SKU sent by the seller. Add the Seller's ID, Seller's SKU ID, and version ID in the path to detail your search.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion | Suggestion resources | **Main** |\r\n\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "This endpoint enables the auto approve setting to received SKUs from a specific seller. Be aware that once enabling the rule through this request, all received SKUs from that seller will be automatically approved on your store, regardless of the Matcher Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { "path": [ "suggestions", - ":sellerId", - ":sellerskuid", - "versions", - ":version" + "configuration", + "autoapproval", + "toggle", + "seller", + ":sellerId" ], "host": [ "{{baseUrl}}" @@ -2197,7 +1981,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace and informed to the seller before the integration is built.", + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", "type": "text/plain" }, "type": "any", @@ -2207,27 +1991,7 @@ { "disabled": false, "description": { - "content": "(Required) A string that identifies the SKU in the marketplace. This is the ID that the marketplace will use for future references to this SKU, such as price and inventory notifications.", - "type": "text/plain" - }, - "type": "any", - "value": "1234", - "key": "sellerskuid" - }, - { - "disabled": false, - "description": { - "content": "(Required) Whenever an SKU Suggestion is updated or changed, a new version of the original one is created. All versions are logged, so you can search for previous our current states of SKU suggestions. This field is the `versionId` associated to the version you choose to search for. You can get this field's value through the [Get SKU Suggestion by ID](https://developers.vtex.com/vtex-rest-api/reference/getsuggestion). through the `latestVersionId` field.", - "type": "text/plain" - }, - "type": "any", - "value": "09072021142808277", - "key": "version" - }, - { - "disabled": false, - "description": { - "content": "(Required) Name of the VTEX account. Used as part of the URL", + "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", "type": "text/plain" }, "type": "any", @@ -2240,7 +2004,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -2254,26 +2018,40 @@ }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" } ], - "method": "GET", - "body": {} + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"Enabled\": true\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } }, "response": [ { "_": { "postman_previewlanguage": "text" }, - "id": "9a2d3c1c-a615-451b-a626-69497af9e3d7", + "id": "3d50c350-54e2-4261-9051-57b8f8449bb9", "name": "OK", "originalRequest": { "url": { "path": [ "suggestions", - ":sellerId", - ":sellerskuid", - "versions", - ":version" + "configuration", + "autoapproval", + "toggle", + "seller", + ":sellerId" ], "host": [ "{{baseUrl}}" @@ -2285,7 +2063,7 @@ { "disabled": false, "description": { - "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand", + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", "type": "text/plain" }, "key": "Accept", @@ -2299,10 +2077,23 @@ }, "key": "Content-Type", "value": "application/json" + }, + { + "key": "Content-Type", + "value": "application/json" } ], - "method": "GET", - "body": {} + "method": "PUT", + "body": { + "mode": "raw", + "raw": "{\n \"Enabled\": true\n}", + "options": { + "raw": { + "headerFamily": "json", + "language": "json" + } + } + } }, "status": "OK", "code": 200, @@ -2314,10 +2105,10 @@ { "listen": "test", "script": { - "id": "8a9e6895-f028-49ec-bf60-bb4811a89496", + "id": "30c4b07a-78db-48e2-ada2-7dd0febb9d55", "type": "text/javascript", "exec": [ - "// Validate status 2xx \npm.test(\"[GET]::/suggestions/:sellerId/:sellerskuid/versions/:version - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" + "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/configuration/autoapproval/toggle/seller/:sellerId - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n" ] } } @@ -2330,15 +2121,15 @@ "event": [] }, { - "id": "71fcfa98-ae61-4a0d-9429-e02c7d7fa436", - "name": "Match Received SKUs", + "id": "82731e0f-e06a-430f-89ae-26f20759b21a", + "name": "Match received SKUs", "description": { - "content": "", + "content": "Match SKU suggestions received in the marketplace.", "type": "text/plain" }, "item": [ { - "id": "8b28fb96-9072-4310-bb7d-48db54ef6d77", + "id": "f10992ad-d66a-4780-94b6-a60f930b9256", "name": "Match received SKUs individually", "request": { "name": "Match received SKUs individually", @@ -2398,7 +2189,7 @@ "type": "text/plain" }, "type": "any", - "value": "sed id", + "value": "officia in", "key": "matchid" }, { @@ -2458,7 +2249,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "f9f6cd10-d0f4-4fe1-8b26-64a9d5bb2919", + "id": "144fccb5-c1c8-42e4-af2c-6fb7dc20e407", "name": "OK", "originalRequest": { "url": { @@ -2533,7 +2324,7 @@ { "listen": "test", "script": { - "id": "80c87626-d24f-4ff4-a4e2-766cf04781c9", + "id": "f37b6b6d-f7fd-4495-9162-da2d069a41ac", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2549,7 +2340,7 @@ } }, { - "id": "c128309b-168e-48f6-bae0-0df531746f8e", + "id": "c9a4a75d-178f-4b22-a6a6-51fc2ac48ebb", "name": "Match multiple received SKUs", "request": { "name": "Match multiple received SKUs", @@ -2636,7 +2427,7 @@ "_": { "postman_previewlanguage": "json" }, - "id": "8ff806f5-4286-4e59-b46b-5950b429fd99", + "id": "b097b850-38df-4900-920a-001c98d2bbbc", "name": "OK", "originalRequest": { "url": { @@ -2708,7 +2499,7 @@ { "listen": "test", "script": { - "id": "04bc1741-52c2-4b61-93c3-3ce2e2610323", + "id": "12568612-175e-4222-bae7-d9929b6d1a1a", "type": "text/javascript", "exec": [ "// Validate status 2xx \npm.test(\"[PUT]::/suggestions/matches/action/:actionName - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", @@ -2725,6 +2516,176 @@ } ], "event": [] + }, + { + "id": "761f7cab-aedd-4ed2-af8d-c904d3844de4", + "name": "SKU Approval settings", + "description": { + "content": "", + "type": "text/plain" + }, + "item": [ + { + "id": "3c3b5021-5866-4517-af30-637f30babf8a", + "name": "Get autoApprove status in account settings", + "request": { + "name": "Get autoApprove status in account settings", + "description": { + "content": "This endpoint can be used to check whether the autoapprove setting is active or not, for a specific seller. \n\nIf the response is `true`, the autoapprove setting is active. If the response is `false`, it is inactive.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { + "path": [ + "suggestions", + "configuration", + "autoapproval", + "toggle" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", + "type": "text/plain" + }, + "key": "sellerId", + "value": "seller123" + } + ], + "variable": [ + { + "disabled": false, + "description": { + "content": "(Required) Name of the VTEX account that belongs to the marketplace. All data extracted, and changes added will be posted into this account.", + "type": "text/plain" + }, + "type": "any", + "value": "apiexamples", + "key": "accountName" + } + ] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", + "type": "text/plain" + }, + "key": "Accept", + "value": "application/json" + }, + { + "disabled": false, + "description": { + "content": "(Required) Describes the type of the content being sent.", + "type": "text/plain" + }, + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "response": [ + { + "_": { + "postman_previewlanguage": "json" + }, + "id": "c44f4571-d385-49d8-bb42-2009fdf992dc", + "name": "OK", + "originalRequest": { + "url": { + "path": [ + "suggestions", + "configuration", + "autoapproval", + "toggle" + ], + "host": [ + "{{baseUrl}}" + ], + "query": [ + { + "disabled": false, + "description": { + "content": "(Required) A string that identifies the seller in the marketplace. This ID must be created by the marketplace.", + "type": "text/plain" + }, + "key": "sellerId", + "value": "seller123" + } + ], + "variable": [] + }, + "header": [ + { + "disabled": false, + "description": { + "content": "(Required) HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.", + "type": "text/plain" + }, + "key": "Accept", + "value": "application/json" + }, + { + "disabled": false, + "description": { + "content": "(Required) Describes the type of the content being sent.", + "type": "text/plain" + }, + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "method": "GET", + "body": {} + }, + "status": "OK", + "code": 200, + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": "{\n \"Enabled\": false\n}", + "cookie": [] + } + ], + "event": [ + { + "listen": "test", + "script": { + "id": "fcf3f9c6-977c-4db9-b5a3-dd25848d5b36", + "type": "text/javascript", + "exec": [ + "// Validate status 2xx \npm.test(\"[GET]::/suggestions/configuration/autoapproval/toggle - Status code is 2xx\", function () {\n pm.response.to.be.success;\n});\n", + "// Validate if response header has matching content-type\npm.test(\"[GET]::/suggestions/configuration/autoapproval/toggle - 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]::/suggestions/configuration/autoapproval/toggle - Response has JSON Body\", function () {\n pm.response.to.have.jsonBody();\n});\n", + "// Response Validation\nconst schema = {\"type\":\"object\",\"properties\":{\"Enabled\":{\"type\":\"boolean\",\"description\":\"If the autoapprove setting is active for a given seller (`true`) or not (`false`).\"}}}\n\n// Validate if response matches JSON schema \npm.test(\"[GET]::/suggestions/configuration/autoapproval/toggle - Schema is valid\", function() {\n pm.response.to.have.jsonSchema(schema,{unknownFormats: [\"int32\", \"int64\", \"float\", \"double\"]});\n});\n" + ] + } + } + ], + "protocolProfileBehavior": { + "disableBodyPruning": true + } + } + ], + "event": [] } ], "event": [], @@ -2741,7 +2702,7 @@ } ], "info": { - "_postman_id": "2ad7a3e9-aca7-4156-b921-7edf011d0b7b", + "_postman_id": "9814dee9-6718-4b02-b95d-b7a492f596be", "name": "Suggestions", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "description": { From 77a1e161ff1c15706ef510938041c5dbb90e9124 Mon Sep 17 00:00:00 2001 From: Ana Barbosa Date: Fri, 14 Mar 2025 11:31:19 -0300 Subject: [PATCH 3/3] Update VTEX - Marketplace APIs - Suggestions.json --- PostmanCollections/VTEX - Marketplace APIs - Suggestions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PostmanCollections/VTEX - Marketplace APIs - Suggestions.json b/PostmanCollections/VTEX - Marketplace APIs - Suggestions.json index 8c4a9b580..ce9f5d1f6 100644 --- a/PostmanCollections/VTEX - Marketplace APIs - Suggestions.json +++ b/PostmanCollections/VTEX - Marketplace APIs - Suggestions.json @@ -17,7 +17,7 @@ "request": { "name": "Get all SKU suggestions", "description": { - "content": "This endpoint retrieves a list of all SKUs sent by the seller for the marketplace's approval. Marketplace operators should use this endpoint whenever they want to check the full list of received SKUs and their information. \n\nNote that all the information sent by the seller will be in the [content] object. All remaining information in this endpoint's response is given by the Matcher. \n\nMatcher rates received SKUs by correlating the data sent by sellers, to existing fields in the marketplace. The calculation of these scores determines whether the product has been: \n\n`Approved`: Score equal to or greater than 80 points. \n\n`Pending`: From 31 to 79 points.\n\n`Denied`: From 0 to 30 points. \n\nNote that if the autoApprove setting is enabled, the SKUs will be approved, regardless of the Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": "This endpoint retrieves a list of all SKUs sent by the seller for the marketplace's approval. Marketplace operators should use this endpoint whenever they want to check the full list of received SKUs and their information. \n\nNote that all the information sent by the seller will be in the [content] object. All remaining information in this endpoint's response is given by the Matcher. \n\nMatcher rates received SKUs by correlating the data sent by sellers, to existing fields in the marketplace. The calculation of these scores determines whether the product has been: \n\n`Approved`: Score equal to or greater than 80 points. \n\n`Pending`: From 31 to 79 points.\n\n`Denied`: From 0 to 30 points. \n\nNote that if the autoApprove setting is enabled, the SKUs will be approved, regardless of the Score.\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| Channels | UI resources | **Save suggestion rules** |\r\n| Suggestion| Suggestion resources | **Main access** |\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.\r\n\r\nTo learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication-overview#machine-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": { @@ -2710,4 +2710,4 @@ "type": "text/plain" } } -} \ No newline at end of file +}