VTEX · Capability

VTex Subscriptions API (v3) — Cycles

VTex Subscriptions API (v3) — Cycles. 3 operations. Lead operation: VTex List cycles. Self-contained Naftiko capability covering one Vtex business surface.

Run with Naftiko VtexCycles

What You Can Do

GET
Get — VTex List cycles
/v1/api/rns/pub/cycles
GET
Get — VTex Get cycle details
/v1/api/rns/pub/cycles/{cycleid}
POST
Post — VTex Retry cycle
/v1/api/rns/pub/cycles/{cycleid}/retry

MCP Tools

vtex-list-cycles

VTex List cycles

read-only idempotent
vtex-get-cycle-details

VTex Get cycle details

read-only idempotent
vtex-retry-cycle

VTex Retry cycle

Capability Spec

subscriptions-cycles.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: VTex Subscriptions API (v3) — Cycles
  description: 'VTex Subscriptions API (v3) — Cycles. 3 operations. Lead operation: VTex List cycles. Self-contained Naftiko
    capability covering one Vtex business surface.'
  tags:
  - Vtex
  - Cycles
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    VTEX_API_KEY: VTEX_API_KEY
capability:
  consumes:
  - type: http
    namespace: subscriptions-cycles
    baseUri: https://{accountName}.{environment}.com.br
    description: VTex Subscriptions API (v3) — Cycles business capability. Self-contained, no shared references.
    resources:
    - name: api-rns-pub-cycles
      path: /api/rns/pub/cycles
      operations:
      - name: get
        method: GET
        description: VTex List cycles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: beginDate
          in: query
          type: string
          description: Lower limit for the date of creation of the cycle
        - name: endDate
          in: query
          type: string
          description: Upper limit for the date of creation of the cycle
        - name: subscriptionId
          in: query
          type: string
          description: Id from the subscription that generated the cycle
        - name: customerEmail
          in: query
          type: string
          description: Customer that owns the subscription. Defaults to the current logged user
        - name: status
          in: query
          type: string
          description: Current cycle status
        - name: page
          in: query
          type: integer
          description: Page used for pagination
        - name: size
          in: query
          type: integer
          description: Page size used for pagination
        - name: Content-Type
          in: header
          type: string
          description: Type of the content being sent.
          required: true
        - name: Accept
          in: header
          type: string
          description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.
          required: true
    - name: api-rns-pub-cycles-cycleId
      path: /api/rns/pub/cycles/{cycleId}
      operations:
      - name: get
        method: GET
        description: VTex Get cycle details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: cycleId
          in: path
          type: string
          description: ID from the desired cycle.
          required: true
        - name: Content-Type
          in: header
          type: string
          description: Type of the content being sent.
          required: true
        - name: Accept
          in: header
          type: string
          description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.
          required: true
    - name: api-rns-pub-cycles-cycleId-retry
      path: /api/rns/pub/cycles/{cycleId}/retry
      operations:
      - name: post
        method: POST
        description: VTex Retry cycle
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: cycleId
          in: path
          type: string
          description: Id from the cycle that will be retried
          required: true
        - name: Content-Type
          in: header
          type: string
          description: Type of the content being sent.
          required: true
        - name: Accept
          in: header
          type: string
          description: HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.
          required: true
    authentication:
      type: apikey
      key: X-VTEX-API-AppKey
      value: '{{env.VTEX_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: subscriptions-cycles-rest
    port: 8080
    description: REST adapter for VTex Subscriptions API (v3) — Cycles. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/rns/pub/cycles
      name: api-rns-pub-cycles
      description: REST surface for api-rns-pub-cycles.
      operations:
      - method: GET
        name: get
        description: VTex List cycles
        call: subscriptions-cycles.get
        with:
          beginDate: rest.beginDate
          endDate: rest.endDate
          subscriptionId: rest.subscriptionId
          customerEmail: rest.customerEmail
          status: rest.status
          page: rest.page
          size: rest.size
          Content-Type: rest.Content-Type
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/rns/pub/cycles/{cycleid}
      name: api-rns-pub-cycles-cycleid
      description: REST surface for api-rns-pub-cycles-cycleId.
      operations:
      - method: GET
        name: get
        description: VTex Get cycle details
        call: subscriptions-cycles.get
        with:
          cycleId: rest.cycleId
          Content-Type: rest.Content-Type
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/rns/pub/cycles/{cycleid}/retry
      name: api-rns-pub-cycles-cycleid-retry
      description: REST surface for api-rns-pub-cycles-cycleId-retry.
      operations:
      - method: POST
        name: post
        description: VTex Retry cycle
        call: subscriptions-cycles.post
        with:
          cycleId: rest.cycleId
          Content-Type: rest.Content-Type
          Accept: rest.Accept
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: subscriptions-cycles-mcp
    port: 9090
    transport: http
    description: MCP adapter for VTex Subscriptions API (v3) — Cycles. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: vtex-list-cycles
      description: VTex List cycles
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: subscriptions-cycles.get
      with:
        beginDate: tools.beginDate
        endDate: tools.endDate
        subscriptionId: tools.subscriptionId
        customerEmail: tools.customerEmail
        status: tools.status
        page: tools.page
        size: tools.size
        Content-Type: tools.Content-Type
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-get-cycle-details
      description: VTex Get cycle details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: subscriptions-cycles.get
      with:
        cycleId: tools.cycleId
        Content-Type: tools.Content-Type
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.
    - name: vtex-retry-cycle
      description: VTex Retry cycle
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: subscriptions-cycles.post
      with:
        cycleId: tools.cycleId
        Content-Type: tools.Content-Type
        Accept: tools.Accept
      outputParameters:
      - type: object
        mapping: $.