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

# Get order

> Retrieves full details for an order including line items.



## OpenAPI

````yaml /openapi.json get /api/v1/orders/{id}
openapi: 3.1.0
info:
  title: Shelfforce API
  version: 1.0.0
  description: >-
    Shelfforce turns shelf photos into structured retail data. Submit images for
    AI-powered shelf analysis, manage tasks and inventory, and retrieve
    compliance and share-of-shelf reports.


    All API requests require a Bearer token (API key with `sf_live_` prefix).
    Rate limits are enforced per tier using a fixed 60-second window.
    Idempotency is supported on POST and PATCH via the `Idempotency-Key` header
    (24h TTL).


    1 credit = 1 image analysis. Batch submissions consume 1 credit per image
    (max batch size depends on plan tier: 20-200). Tag analyses with
    `externalId` and `metadata` for B2B tracking, and use `callbackUrl` for
    per-request completion notifications.
  termsOfService: https://shelfforce.ai/terms
  contact:
    name: Shelfforce Support
    url: https://shelfforce.ai/support
    email: hey@shelfforce.ai
  license:
    name: Proprietary
    url: https://shelfforce.ai/terms
servers:
  - url: https://shelfforce.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Analyses
    description: Submit images for AI shelf analysis and retrieve results.
  - name: Products
    description: Browse products detected across analyses.
  - name: Places
    description: Manage store locations tied to your organisation.
  - name: Tasks
    description: Create and manage field data-collection tasks.
  - name: Inventory
    description: Maintain a master catalogue of expected SKUs.
  - name: Reports
    description: 'Aggregated analytics: share of shelf and store performance.'
  - name: Webhooks
    description: Register endpoints to receive real-time event notifications.
  - name: Usage
    description: Check credit balance, plan details, and rate-limit status.
  - name: Orders
    description: Create and manage purchase orders with line items.
  - name: Accounts
    description: Manage brand, supplier, distributor, and partner accounts.
  - name: Alerts
    description: >-
      Read and manage system-generated alerts. Alerts are created automatically
      — no POST endpoint.
  - name: Members
    description: >-
      List, invite, update, and remove organisation members. Admin role required
      for writes.
paths:
  /api/v1/orders/{id}:
    get:
      tags:
        - Orders
      summary: Get order
      description: Retrieves full details for an order including line items.
      operationId: getOrder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Order ID
      responses:
        '200':
          description: Order with line items.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/OrderDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    OrderDetail:
      type: object
      required:
        - id
        - orderNumber
        - status
        - orderDate
        - items
        - createdAt
      properties:
        id:
          type: string
          examples:
            - ord_a1b2c3
        orderNumber:
          type: string
          examples:
            - ORD-2026-0042
        status:
          type: string
          enum:
            - draft
            - pending
            - confirmed
            - shipped
            - delivered
            - cancelled
          examples:
            - pending
        supplierName:
          type:
            - string
            - 'null'
          examples:
            - UNFI
        customerName:
          type:
            - string
            - 'null'
          examples:
            - 'Target #1234'
        accountId:
          type:
            - string
            - 'null'
          examples:
            - acc_d4e5f6
        storeId:
          type:
            - string
            - 'null'
          examples:
            - str_g7h8i9
        orderDate:
          type: string
          format: date-time
          examples:
            - '2026-02-20T00:00:00Z'
        expectedDeliveryDate:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2026-02-27T00:00:00Z'
        actualDeliveryDate:
          type:
            - string
            - 'null'
          format: date-time
          description: Actual delivery date.
        subtotal:
          type:
            - number
            - 'null'
          description: Order subtotal before tax.
          examples:
            - 1136.36
        taxLabel:
          type:
            - string
            - 'null'
          description: Tax label (e.g., GST, VAT, Sales Tax).
          examples:
            - Sales Tax
        taxRate:
          type:
            - number
            - 'null'
          description: Tax rate as percentage.
          examples:
            - 10
        tax:
          type:
            - number
            - 'null'
          description: Total tax amount.
          examples:
            - 113.64
        total:
          type:
            - number
            - 'null'
          description: Order total.
          examples:
            - 1250
        currency:
          type:
            - string
            - 'null'
          examples:
            - USD
        notes:
          type:
            - string
            - 'null'
          description: Order notes.
          examples:
            - Rush delivery requested.
        sourceType:
          type:
            - string
            - 'null'
          enum:
            - manual
            - invoice
            - receipt
            - csv
            - null
          description: How the order was created.
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderLineItem'
          description: Line items in this order.
        createdAt:
          type: string
          format: date-time
          examples:
            - '2026-02-20T10:30:00Z'
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2026-02-20T11:00:00Z'
    OrderLineItem:
      type: object
      required:
        - id
        - sku
        - name
        - quantity
      properties:
        id:
          type: string
          description: Line item identifier.
          examples:
            - oli_j1k2l3
        expectationId:
          type:
            - string
            - 'null'
          description: Linked expectation item ID.
          examples:
            - inv_a1b2c3
        sku:
          type: string
          description: SKU code.
          examples:
            - CC-330ML-CAN
        name:
          type: string
          description: Product name.
          examples:
            - Coca-Cola Original 330ml Can
        quantity:
          type: number
          description: Quantity ordered.
          examples:
            - 48
        unitPrice:
          type:
            - number
            - 'null'
          description: Price per unit.
          examples:
            - 0.89
        taxPercent:
          type:
            - number
            - 'null'
          description: Tax rate for this line (percentage).
          examples:
            - 10
        taxAmount:
          type:
            - number
            - 'null'
          description: Tax amount for this line.
          examples:
            - 4.27
        totalPrice:
          type:
            - number
            - 'null'
          description: Total price for this line.
          examples:
            - 42.72
  responses:
    Unauthorized:
      description: Authentication failed. Provide a valid API key as a Bearer token.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    enum:
                      - AUTH_REQUIRED
                      - INVALID_API_KEY
                    examples:
                      - INVALID_API_KEY
                  message:
                    type: string
                    examples:
                      - The provided API key is invalid or has been revoked.
    NotFound:
      description: The requested resource does not exist.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    const: NOT_FOUND
                    examples:
                      - NOT_FOUND
                  message:
                    type: string
                    examples:
                      - Analysis 'an_g7h8j9k0' not found.
    RateLimited:
      description: Too many requests. Wait until the rate-limit window resets.
      headers:
        Retry-After:
          description: Seconds until the rate-limit window resets.
          schema:
            type: integer
            examples:
              - 12
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    const: RATE_LIMITED
                    examples:
                      - RATE_LIMITED
                  message:
                    type: string
                    examples:
                      - Rate limit exceeded. Retry after 12 seconds.
    InternalError:
      description: An unexpected server error occurred.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    const: INTERNAL_ERROR
                    examples:
                      - INTERNAL_ERROR
                  message:
                    type: string
                    examples:
                      - >-
                        An unexpected error occurred. Please try again or
                        contact support with request ID.
  headers:
    X-Request-Id:
      description: Unique identifier for this request. Include in support tickets.
      schema:
        type: string
        format: uuid
        examples:
          - 550e8400-e29b-41d4-a716-446655440000
    X-RateLimit-Limit:
      description: Maximum number of requests allowed in the current 60-second window.
      schema:
        type: integer
        examples:
          - 120
    X-RateLimit-Remaining:
      description: Number of requests remaining in the current window.
      schema:
        type: integer
        examples:
          - 117
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) when the current rate-limit window resets.
      schema:
        type: integer
        examples:
          - 1740300060
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key with `sf_live_` prefix. Pass as `Authorization: Bearer
        sf_live_...`

````