VTEX · Capability

VTex Master Data API - v2 — Versions

VTex Master Data API - v2 — Versions. 3 operations. Lead operation: VTex List versions. Self-contained Naftiko capability covering one Vtex business surface.

Run with Naftiko VtexVersions

What You Can Do

GET
Listversions — VTex List versions
/v1/api/dataentities/{dataentityname}/documents/{id}/versions
GET
Getversion — VTex Get version
/v1/api/dataentities/{dataentityname}/documents/{id}/versions/{versionid}
PUT
Putversion — VTex Update version
/v1/api/dataentities/{dataentityname}/documents/{id}/versions/{versionid}

MCP Tools

vtex-list-versions

VTex List versions

read-only idempotent
vtex-get-version

VTex Get version

read-only idempotent
vtex-update-version

VTex Update version

idempotent

Capability Spec

master-data-versions.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: VTex Master Data API - v2 — Versions
  description: 'VTex Master Data API - v2 — Versions. 3 operations. Lead operation: VTex List versions. Self-contained Naftiko
    capability covering one Vtex business surface.'
  tags:
  - Vtex
  - Versions
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    VTEX_API_KEY: VTEX_API_KEY
capability:
  consumes:
  - type: http
    namespace: master-data-versions
    baseUri: https://{accountName}.{environment}.com.br
    description: VTex Master Data API - v2 — Versions business capability. Self-contained, no shared references.
    resources:
    - name: api-dataentities-dataEntityName-documents-id-versions
      path: /api/dataentities/{dataEntityName}/documents/{id}/versions
      operations:
      - name: listversions
        method: GET
        description: VTex List versions
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: load
          in: query
          type: boolean
          description: If true, return all the fields in each version of the document.
        - name: fields
          in: query
          type: string
          description: If `load` is true, the response will return only these specific fields.
    - name: api-dataentities-dataEntityName-documents-id-versions-versionId
      path: /api/dataentities/{dataEntityName}/documents/{id}/versions/{versionId}
      operations:
      - name: getversion
        method: GET
        description: VTex Get version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: putversion
        method: PUT
        description: VTex Update version
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: versionId
          in: path
          type: string
          description: ID of the version to update
          required: true
    authentication:
      type: apikey
      key: X-VTEX-API-AppKey
      value: '{{env.VTEX_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: master-data-versions-rest
    port: 8080
    description: REST adapter for VTex Master Data API - v2 — Versions. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/dataentities/{dataentityname}/documents/{id}/versions
      name: api-dataentities-dataentityname-documents-id-versions
      description: REST surface for api-dataentities-dataEntityName-documents-id-versions.
      operations:
      - method: GET
        name: listversions
        description: VTex List versions
        call: master-data-versions.listversions
        with:
          load: rest.load
          fields: rest.fields
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/dataentities/{dataentityname}/documents/{id}/versions/{versionid}
      name: api-dataentities-dataentityname-documents-id-versions-versionid
      description: REST surface for api-dataentities-dataEntityName-documents-id-versions-versionId.
      operations:
      - method: GET
        name: getversion
        description: VTex Get version
        call: master-data-versions.getversion
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: putversion
        description: VTex Update version
        call: master-data-versions.putversion
        with:
          versionId: rest.versionId
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: master-data-versions-mcp
    port: 9090
    transport: http
    description: MCP adapter for VTex Master Data API - v2 — Versions. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: vtex-list-versions
      description: VTex List versions
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: master-data-versions.listversions
      with:
        load: tools.load
        fields: tools.fields
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-get-version
      description: VTex Get version
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: master-data-versions.getversion
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-update-version
      description: VTex Update version
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: master-data-versions.putversion
      with:
        versionId: tools.versionId
      outputParameters:
      - type: object
        mapping: $.