Toys R Us · Capability

Toys R Us Commerce API — Invoices

Toys R Us Commerce API — Invoices. 2 operations. Lead operation: Get Invoices. Self-contained Naftiko capability covering one Toys R Us business surface.

Run with Naftiko Toys R UsInvoices

What You Can Do

GET
Getinvoices — Get Invoices
/v1/api/v2/invoices
POST
Createinvoice — Create Invoice
/v1/api/v2/invoices/import

MCP Tools

get-invoices

Get Invoices

read-only idempotent
create-invoice

Create Invoice

Capability Spec

commerce-invoices.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Toys R Us Commerce API — Invoices
  description: 'Toys R Us Commerce API — Invoices. 2 operations. Lead operation: Get Invoices. Self-contained Naftiko capability
    covering one Toys R Us business surface.'
  tags:
  - Toys R Us
  - Invoices
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TOYS_R_US_API_KEY: TOYS_R_US_API_KEY
capability:
  consumes:
  - type: http
    namespace: commerce-invoices
    baseUri: https://commerceapi.io
    description: Toys R Us Commerce API — Invoices business capability. Self-contained, no shared references.
    resources:
    - name: api-v2-invoices
      path: /api/v2/invoices
      operations:
      - name: getinvoices
        method: GET
        description: Get Invoices
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: status
          in: query
          type: integer
          description: Filter invoices by status code.
        - name: page
          in: query
          type: integer
          description: Page number for paginated results.
    - name: api-v2-invoices-import
      path: /api/v2/invoices/import
      operations:
      - name: createinvoice
        method: POST
        description: Create Invoice
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: apikey
      key: subscription-key
      value: '{{env.TOYS_R_US_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: commerce-invoices-rest
    port: 8080
    description: REST adapter for Toys R Us Commerce API — Invoices. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/v2/invoices
      name: api-v2-invoices
      description: REST surface for api-v2-invoices.
      operations:
      - method: GET
        name: getinvoices
        description: Get Invoices
        call: commerce-invoices.getinvoices
        with:
          status: rest.status
          page: rest.page
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v2/invoices/import
      name: api-v2-invoices-import
      description: REST surface for api-v2-invoices-import.
      operations:
      - method: POST
        name: createinvoice
        description: Create Invoice
        call: commerce-invoices.createinvoice
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: commerce-invoices-mcp
    port: 9090
    transport: http
    description: MCP adapter for Toys R Us Commerce API — Invoices. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: get-invoices
      description: Get Invoices
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: commerce-invoices.getinvoices
      with:
        status: tools.status
        page: tools.page
      outputParameters:
      - type: object
        mapping: $.
    - name: create-invoice
      description: Create Invoice
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: commerce-invoices.createinvoice
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.