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

# Read the canonical order and payment projection for a cart

> Requires an organization API key with orders:read and access to the requested location. Guest cart capabilities and merchant sessions do not authorize this operation. Returns the minimal current aggregate, not customer details or provider payment payloads. A successful read does not authorize a checkout retry.



## OpenAPI

````yaml /generated/integration.openapi.json get /locations/{locationId}/carts/{cartId}/commerce-projection
openapi: 3.0.3
info:
  title: Crave Server-to-Server Integration API
  version: 1.0.0
  description: >-
    Organization-scoped integration operations. Never expose an organization API
    key to a browser or diner.
servers:
  - url: https://sandbox-api.craveup.com/api/v1
    description: Sandbox
  - url: https://api.craveup.com/api/v1
    description: Production
security: []
paths:
  /locations/{locationId}/carts/{cartId}/commerce-projection:
    get:
      summary: Read the canonical order and payment projection for a cart
      description: >-
        Requires an organization API key with orders:read and access to the
        requested location. Guest cart capabilities and merchant sessions do not
        authorize this operation. Returns the minimal current aggregate, not
        customer details or provider payment payloads. A successful read does
        not authorize a checkout retry.
      operationId: integrationGetOrderCommerceProjection
      parameters:
        - name: locationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: cartId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: 'Current canonical projection. Cache-Control: private, no-store.'
          headers:
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderCommerceProjection'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivateApiError'
        '401':
          description: >-
            Organization API key missing, invalid, or for a different
            environment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivateApiError'
        '403':
          description: Key scope or location assignment denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivateApiError'
        '404':
          description: No matching scoped cart/order projection is available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivateApiError'
        '429':
          description: Baseline API rate limit exceeded before route authentication.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
        '500':
          description: >-
            Projection could not be read. No payment or order mutation is
            performed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrivateApiError'
        '503':
          description: >-
            Rate-limit storage unavailable; request denied before the route
            handler.
          headers:
            Retry-After:
              schema:
                type: string
                enum:
                  - '1'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitStoreError'
      security:
        - OrganizationApiKey: []
components:
  schemas:
    OrderCommerceProjection:
      type: object
      properties:
        cartId:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        checkout:
          type: object
          properties:
            attemptId:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            collectionMode:
              type: string
              enum:
                - ONLINE
                - PAY_AT_STORE
            status:
              type: string
              enum:
                - PREPARING
                - ORDER_CREATED
                - AWAITING_CUSTOMER_ACTION
                - SUBMITTING
                - SUCCEEDED
                - FAILED
                - EXPIRED
                - ACTION_REQUIRED
          required:
            - attemptId
            - collectionMode
            - status
          additionalProperties: false
        order:
          type: object
          properties:
            id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            status:
              type: string
              minLength: 1
              maxLength: 64
          required:
            - id
            - status
          additionalProperties: false
        payment:
          type: object
          properties:
            reconciliationStatus:
              type: string
              enum:
                - CURRENT
                - RECONCILING
                - ACTION_REQUIRED
            status:
              type: string
              enum:
                - NO_PAYMENT_REQUIRED
                - DUE
                - PARTIALLY_PAID
                - PAID
                - PARTIALLY_REFUNDED
                - REFUNDED
                - CANCELED
          required:
            - reconciliationStatus
            - status
          additionalProperties: false
      required:
        - cartId
        - checkout
        - order
        - payment
      additionalProperties: false
    PrivateApiError:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
        code:
          type: string
        data:
          type: object
          additionalProperties: true
    RateLimitError:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: integer
          enum:
            - 429
        message:
          type: string
    RateLimitStoreError:
      type: object
      required:
        - status
        - code
        - message
      properties:
        status:
          type: integer
          enum:
            - 503
        code:
          type: string
          enum:
            - RATE_LIMIT_STORE_UNAVAILABLE
        message:
          type: string
  securitySchemes:
    OrganizationApiKey:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.