VTEX · Capability

VTex Catalog API — Trade Policy

VTex Catalog API — Trade Policy. 4 operations. Lead operation: VTex Get Trade Policies by product ID. Self-contained Naftiko capability covering one Vtex business surface.

Run with Naftiko VtexTrade Policy

What You Can Do

GET
Get — VTex Get Trade Policies by product ID
/v1/api/catalog/pvt/product/{productid}/salespolicy
POST
Post — VTex Associate product with trade policy
/v1/api/catalog/pvt/product/{productid}/salespolicy/{tradepolicyid}
DELETE
Delete — VTex Remove product from trade policy
/v1/api/catalog/pvt/product/{productid}/salespolicy/{tradepolicyid}
GET
Get — VTex List all SKUs of a trade policy
/v1/api/catalog-system/pvt/sku/stockkeepingunitidsbysaleschannel

MCP Tools

vtex-get-trade-policies-product

VTex Get Trade Policies by product ID

read-only idempotent
vtex-associate-product-trade-policy

VTex Associate product with trade policy

vtex-remove-product-trade-policy

VTex Remove product from trade policy

idempotent
vtex-list-all-skus-trade

VTex List all SKUs of a trade policy

read-only idempotent

Capability Spec

catalog-trade-policy.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: VTex Catalog API — Trade Policy
  description: 'VTex Catalog API — Trade Policy. 4 operations. Lead operation: VTex Get Trade Policies by product ID. Self-contained
    Naftiko capability covering one Vtex business surface.'
  tags:
  - Vtex
  - Trade Policy
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    VTEX_API_KEY: VTEX_API_KEY
capability:
  consumes:
  - type: http
    namespace: catalog-trade-policy
    baseUri: https://{accountName}.{environment}.com.br
    description: VTex Catalog API — Trade Policy business capability. Self-contained, no shared references.
    resources:
    - name: api-catalog-pvt-product-productId-salespolicy
      path: /api/catalog/pvt/product/{productId}/salespolicy
      operations:
      - name: get
        method: GET
        description: VTex Get Trade Policies by product ID
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: productId
          in: path
          type: integer
          description: Product's unique numerical identifier.
          required: true
    - name: api-catalog-pvt-product-productId-salespolicy-tradepolicyId
      path: /api/catalog/pvt/product/{productId}/salespolicy/{tradepolicyId}
      operations:
      - name: post
        method: POST
        description: VTex Associate product with trade policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: productId
          in: path
          type: integer
          description: Product's unique numerical identifier.
          required: true
        - name: tradepolicyId
          in: path
          type: integer
          description: Trade policy's unique numerical identifier.
          required: true
      - name: delete
        method: DELETE
        description: VTex Remove product from trade policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: productId
          in: path
          type: integer
          description: Product's unique numerical identifier.
          required: true
        - name: tradepolicyId
          in: path
          type: integer
          description: Trade policy's unique numerical identifier.
          required: true
    - name: api-catalog_system-pvt-sku-stockkeepingunitidsbysaleschannel
      path: /api/catalog_system/pvt/sku/stockkeepingunitidsbysaleschannel
      operations:
      - name: get
        method: GET
        description: VTex List all SKUs of a trade policy
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: sc
          in: query
          type: integer
          description: Trade policy's unique numerical identifier.
          required: true
        - name: page
          in: query
          type: integer
          description: Page number.
        - name: pageSize
          in: query
          type: integer
          description: Number of items in the page.
        - name: onlyAssigned
          in: query
          type: boolean
          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.
    authentication:
      type: apikey
      key: X-VTEX-API-AppKey
      value: '{{env.VTEX_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: catalog-trade-policy-rest
    port: 8080
    description: REST adapter for VTex Catalog API — Trade Policy. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/catalog/pvt/product/{productid}/salespolicy
      name: api-catalog-pvt-product-productid-salespolicy
      description: REST surface for api-catalog-pvt-product-productId-salespolicy.
      operations:
      - method: GET
        name: get
        description: VTex Get Trade Policies by product ID
        call: catalog-trade-policy.get
        with:
          productId: rest.productId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/catalog/pvt/product/{productid}/salespolicy/{tradepolicyid}
      name: api-catalog-pvt-product-productid-salespolicy-tradepolicyid
      description: REST surface for api-catalog-pvt-product-productId-salespolicy-tradepolicyId.
      operations:
      - method: POST
        name: post
        description: VTex Associate product with trade policy
        call: catalog-trade-policy.post
        with:
          productId: rest.productId
          tradepolicyId: rest.tradepolicyId
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: VTex Remove product from trade policy
        call: catalog-trade-policy.delete
        with:
          productId: rest.productId
          tradepolicyId: rest.tradepolicyId
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/catalog-system/pvt/sku/stockkeepingunitidsbysaleschannel
      name: api-catalog-system-pvt-sku-stockkeepingunitidsbysaleschannel
      description: REST surface for api-catalog_system-pvt-sku-stockkeepingunitidsbysaleschannel.
      operations:
      - method: GET
        name: get
        description: VTex List all SKUs of a trade policy
        call: catalog-trade-policy.get
        with:
          sc: rest.sc
          page: rest.page
          pageSize: rest.pageSize
          onlyAssigned: rest.onlyAssigned
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: catalog-trade-policy-mcp
    port: 9090
    transport: http
    description: MCP adapter for VTex Catalog API — Trade Policy. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: vtex-get-trade-policies-product
      description: VTex Get Trade Policies by product ID
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: catalog-trade-policy.get
      with:
        productId: tools.productId
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-associate-product-trade-policy
      description: VTex Associate product with trade policy
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: catalog-trade-policy.post
      with:
        productId: tools.productId
        tradepolicyId: tools.tradepolicyId
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-remove-product-trade-policy
      description: VTex Remove product from trade policy
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: catalog-trade-policy.delete
      with:
        productId: tools.productId
        tradepolicyId: tools.tradepolicyId
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-list-all-skus-trade
      description: VTex List all SKUs of a trade policy
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: catalog-trade-policy.get
      with:
        sc: tools.sc
        page: tools.page
        pageSize: tools.pageSize
        onlyAssigned: tools.onlyAssigned
      outputParameters:
      - type: object
        mapping: $.