{
  "opencollection": "1.0.0",
  "info": {
    "name": "VTex Anti-fraud Provider Account Trade Policy API",
    "version": "1.0"
  },
  "items": [
    {
      "info": {
        "name": "Trade Policy",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "VTex Get Trade Policies by product ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{providerApiEndpoint}/api/catalog/pvt/product/:productId/salespolicy",
            "headers": [
              {
                "name": "Content-Type",
                "value": ""
              },
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "productId",
                "value": "",
                "type": "path",
                "description": "Product's unique numerical identifier."
              }
            ]
          },
          "docs": "Retrieves a list of Trade Policies associated to a product based on the product's ID. \r\n## Response body example\r\n\r\n```json\r\n[\r\n    {\r\n        \"ProductId\": 1,\r\n        \"StoreId\": 1\r\n    },\r\n    {\r\n        \"ProductId\": 1,\r\n        \"StoreId\": 2\r\n    },\r\n    {\r\n        \"ProductId\": 1,\r\n        \"StoreId\": 3\r\n    },\r\n    {\r\n        \"ProductId\": 1,\r\n        \"StoreId\": 4\r\n    }\r\n]\r\n```"
        },
        {
          "info": {
            "name": "VTex Associate product with trade policy",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://{providerApiEndpoint}/api/catalog/pvt/product/:productId/salespolicy/:tradepolicyId",
            "headers": [
              {
                "name": "Content-Type",
                "value": ""
              },
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "productId",
                "value": "",
                "type": "path",
                "description": "Product's unique numerical identifier."
              },
              {
                "name": "tradepolicyId",
                "value": "",
                "type": "path",
                "description": "Trade policy's unique numerical identifier."
              }
            ]
          },
          "docs": "Associates an existing trade policy with a product."
        },
        {
          "info": {
            "name": "VTex Remove product from trade policy",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://{providerApiEndpoint}/api/catalog/pvt/product/:productId/salespolicy/:tradepolicyId",
            "headers": [
              {
                "name": "Content-Type",
                "value": ""
              },
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "productId",
                "value": "",
                "type": "path",
                "description": "Product's unique numerical identifier."
              },
              {
                "name": "tradepolicyId",
                "value": "",
                "type": "path",
                "description": "Trade policy's unique numerical identifier."
              }
            ]
          },
          "docs": "Disassociates a trade policy of a product."
        },
        {
          "info": {
            "name": "VTex List all SKUs of a trade policy",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://{providerApiEndpoint}/api/catalog_system/pvt/sku/stockkeepingunitidsbysaleschannel",
            "headers": [
              {
                "name": "Content-Type",
                "value": ""
              },
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "sc",
                "value": "",
                "type": "query",
                "description": "Trade policy's unique numerical identifier."
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Page number."
              },
              {
                "name": "pageSize",
                "value": "",
                "type": "query",
                "description": "Number of items in the page."
              },
              {
                "name": "onlyAssigned",
                "value": "",
                "type": "query",
                "description": "If set as `false`, it allows the user to decide if the SKUs that are not assigned to a specific trade policy should be also returned."
              }
            ]
          },
          "docs": "Retrieves a list of SKU IDs of a trade policy."
        }
      ]
    }
  ],
  "bundled": true
}