> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vaultgraph.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List orders for the caller



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/commerce/orders
openapi: 3.1.0
info:
  title: VaultGraph Portal API
  version: 0.1.1
  description: Server-to-server endpoints exposed by the VaultGraph portal (beta).
servers:
  - url: https://app.vaultgraph.com
    description: Production
security: []
tags:
  - name: Shops
    description: Shop management endpoints.
  - name: Commerce
    description: >-
      Deployment-scoped commerce endpoints (catalog, checkout, order).
      Authenticated with a deployment (`dk_`) API key. Internal plumbing between
      the hosted MCP server and the merchant adapter — merchants integrate via
      the MCP, not these REST routes.
paths:
  /api/commerce/orders:
    get:
      tags:
        - Commerce
      summary: List orders for the caller
      operationId: listOrders
      parameters:
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
          description: Maximum orders to return on this page.
        - in: query
          name: cursor
          required: false
          schema:
            type: string
          description: >-
            Opaque cursor from a previous response's `pagination.cursor`. Omit
            for the first page.
      responses:
        '200':
          description: One page of orders, with optional next-page pagination
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/OrderPage'
        '400':
          description: Invalid pagination parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: >-
            The caller must authenticate before listing orders
            (`authentication_required`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    OrderPage:
      type: object
      required:
        - orders
      properties:
        orders:
          type: array
          items:
            $ref: '#/components/schemas/Order'
        pagination:
          type: object
          required:
            - has_next_page
          properties:
            cursor:
              type: string
              description: Opaque next-page token. Present iff has_next_page is true.
            has_next_page:
              type: boolean
            total_count:
              type: integer
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        detail:
          type: string
    Order:
      type: object
      required:
        - id
        - created_at
        - checkout_id
        - currency
        - permalink_url
        - line_items
        - totals
        - fulfillment
        - ucp
      properties:
        id:
          type: string
        display_id:
          type: string
          description: >-
            Short, customer-facing order reference shown on receipts and emails.
            Distinct from the opaque `id`; for display only. Absent when the
            store has no separate reference.
          example: ORD_1042
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the order was placed.
          example: '2026-06-23T10:15:00.000Z'
        checkout_id:
          type: string
        currency:
          type: string
          description: ISO 4217 currency code of the order's monetary amounts.
          example: GBP
        permalink_url:
          type: string
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/OrderLineItem'
        totals:
          type: array
          items:
            $ref: '#/components/schemas/Total'
        fulfillment:
          $ref: '#/components/schemas/OrderFulfillment'
        messages:
          type: array
          description: Optional store-to-customer notes about the order
          items:
            $ref: '#/components/schemas/OrderMessage'
        ucp:
          $ref: '#/components/schemas/UcpEnvelope'
    OrderLineItem:
      type: object
      properties:
        id:
          type: string
        item:
          type: object
          properties:
            id:
              type: string
            image_url:
              type: string
            price:
              type: number
            title:
              type: string
          required:
            - id
            - price
            - title
          additionalProperties: false
        parent_id:
          type: string
        quantity:
          type: object
          properties:
            fulfilled:
              type: number
            total:
              type: number
          required:
            - fulfilled
            - total
          additionalProperties: false
        status:
          type: string
          enum:
            - fulfilled
            - partial
            - processing
        totals:
          type: array
          items:
            type: object
            properties:
              amount:
                type: number
              display_text:
                type: string
              type:
                type: string
                enum:
                  - discount
                  - fee
                  - fulfillment
                  - items_discount
                  - subtotal
                  - tax
                  - total
            required:
              - amount
              - type
            additionalProperties: false
        properties:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                minLength: 1
              value:
                type: string
            required:
              - name
              - value
            additionalProperties: false
      required:
        - id
        - item
        - quantity
        - status
        - totals
      additionalProperties: false
    Total:
      type: object
      required:
        - type
        - amount
      properties:
        type:
          type: string
          enum:
            - subtotal
            - discount
            - items_discount
            - fulfillment
            - tax
            - fee
            - total
        amount:
          type: integer
        display_text:
          type: string
    OrderFulfillment:
      type: object
      properties:
        expectations:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              method:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  method_type:
                    type: string
                    enum:
                      - shipping
                      - pickup
                      - digital
                required:
                  - id
                  - name
                  - method_type
                additionalProperties: false
              line_items:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    quantity:
                      type: integer
                      minimum: 0
                  required:
                    - id
                    - quantity
                  additionalProperties: false
              destination:
                type: object
                properties:
                  full_name:
                    type: string
                  first_name:
                    type: string
                  last_name:
                    type: string
                  phone_number:
                    type: string
                  street_address:
                    type: string
                  extended_address:
                    type: string
                  address_locality:
                    type: string
                  address_region:
                    type: string
                  postal_code:
                    type: string
                  address_country:
                    type: string
                  instructions:
                    type: string
                additionalProperties: false
              fulfillable_on:
                type: string
            required:
              - id
              - method
              - line_items
              - destination
            additionalProperties: false
        events:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
              occurred_at:
                type: string
              line_items:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    quantity:
                      type: integer
                      minimum: 0
                  required:
                    - id
                    - quantity
                  additionalProperties: false
              description:
                type: string
              carrier:
                type: string
              tracking_number:
                type: string
              tracking_url:
                type: string
            required:
              - id
              - type
              - occurred_at
              - line_items
            additionalProperties: false
      additionalProperties: false
    OrderMessage:
      type: object
      properties:
        id:
          type: string
        body:
          type: string
        created_at:
          type: string
      required:
        - id
        - body
        - created_at
      additionalProperties: false
    UcpEnvelope:
      type: object
      properties:
        capabilities:
          type: array
          items:
            type: object
            properties:
              config:
                type: object
                additionalProperties: {}
              extends:
                type: string
              name:
                type: string
              schema:
                type: string
              spec:
                type: string
              version:
                type: string
            required:
              - name
              - version
            additionalProperties: false
        version:
          type: string
      required:
        - capabilities
        - version
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````