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

# Record a shopper's agent checkout approval

> Records the shopper's consent to buy the cart at the exact quoted total, so an AI agent can start checkout within `ttl_seconds`. Only a trusted partner server API key with `agents:manage` and `checkout:write` (and the agent commerce feature) may call it; dashboard users and agents get `403`. `key` makes the call idempotent; `409 approval_mismatch` if the terms differ from the current active quote.



## OpenAPI

````yaml /agents-api.json post /v1/carts/{cart_id}/agent-approvals
openapi: 3.1.0
info:
  description: >-
    Multi-merchant checkout infrastructure (808labs). UAE/AED first on Stripe;
    Saudi/SAR follows separate certification. OpenAPI is canonical; customers
    can integrate without an SDK. Customer dashboard authentication uses
    verified OIDC; workspace access requires an invitation or explicitly enabled
    Sandbox self-registration; machine integrations use scoped API keys. Plans
    and usage are defined in the developer guide. Internal operator and provider
    callback contracts are excluded.
  title: Ignyt Agents API
  version: 0.1.0
servers:
  - url: https://sandbox.ignite-checkout.ai
    description: 'Planned Sandbox host: use assigned deployment URL until activated'
  - url: https://api.ignite-checkout.ai
    description: 'Planned Production host: separate approval and Live credentials required'
security: []
tags:
  - name: Grants and approval
    description: Partner-server calls that issue shopper grants and record exact approvals.
  - name: Agent identity
    description: The current delegation and its effective capabilities.
  - name: Discovery
    description: Merchants, products and variants the shopper may buy.
  - name: Checkout
    description: Read approval and start or follow delegated checkout.
  - name: Carts and quotes
    description: Shopper carts, lines, address, coupons and quotes.
  - name: Purchases
    description: The delegated shopper's purchase history.
paths:
  /v1/carts/{cart_id}/agent-approvals:
    post:
      tags:
        - Grants and approval
      summary: Record a shopper's agent checkout approval
      description: >-
        Records the shopper's consent to buy the cart at the exact quoted total,
        so an AI agent can start checkout within `ttl_seconds`. Only a trusted
        partner server API key with `agents:manage` and `checkout:write` (and
        the agent commerce feature) may call it; dashboard users and agents get
        `403`. `key` makes the call idempotent; `409 approval_mismatch` if the
        terms differ from the current active quote.
      operationId: approve_v1_carts__cart_id__agent_approvals_post
      parameters:
        - in: path
          name: cart_id
          required: true
          schema:
            title: Cart Id
            type: string
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ignite-app-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ignite-App-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApprovalIn'
        required: true
      responses:
        '201':
          content:
            application/json:
              example:
                cart_id: crt_01JDX3M8Q4RZ7V2K9T5N6B8C1D
                currency: AED
                expires_at: '2026-12-01T10:10:00+00:00'
                id: apr_01JDX3Q8H1K4N7R1T4W7Z1B4DK
                partial_order_policy: allow_partial
                quote_id: quo_01JDX3P5S8V1X4Z7B2D5F8H1KC
                total_minor: 25106
              schema:
                $ref: '#/components/schemas/ApprovalReceipt'
          description: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: Missing, expired or invalid credentials (`unauthorized`).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            The credential is valid but lacks the required scope, role,
            environment or ownership for this resource (`forbidden` or a more
            specific code).
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            The resource does not exist or is not visible to this credential
            (`not_found`).
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            The request conflicts with the resource's current state, repeats an
            idempotency key with a different body, or is not available here
            (`conflict`, `unsupported_operation` or a more specific code). Read
            the resource again before deciding how to proceed.
        '422':
          content:
            application/json:
              schema:
                properties:
                  error:
                    properties:
                      code:
                        type: string
                      details:
                        anyOf:
                          - items:
                              properties:
                                loc:
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: integer
                                  type: array
                                msg:
                                  type: string
                                type:
                                  type: string
                              required:
                                - type
                                - loc
                                - msg
                              type: object
                            type: array
                          - type: object
                      message:
                        type: string
                      request_id:
                        type: string
                    required:
                      - code
                      - message
                      - details
                      - request_id
                    type: object
                required:
                  - error
                type: object
          description: Validation Error
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgniteErrorEnvelope'
          description: >-
            A plan allowance, rate limit or resource limit was reached. For
            `rate_limited` (a per-second ceiling) or the monthly API allowance
            (`plan_quota_exceeded`), wait for the `Retry-After` interval before
            retrying. A specific `*_rate_limited` code, such as
            `invitation_email_rate_limited`, is an hourly limit sent without
            `Retry-After`: retry later with bounded backoff. A resource limit
            described by the operation, such as active merchant requests or
            uploads, does not clear by waiting: complete or withdraw existing
            items first. Monthly allowance and cost limits never block servicing
            of accepted orders; per-second ceilings still apply to servicing
            routes.
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying, sent only when the monthly API
                allowance is exhausted (`plan_quota_exceeded`) or a per-second
                rate limit (`rate_limited`) is reached; specific
                `*_rate_limited` codes omit it.
              schema:
                type: integer
      security:
        - MachineKey: []
components:
  schemas:
    ApprovalIn:
      additionalProperties: false
      properties:
        approved_total_minor:
          description: >-
            The exact quote total the shopper approved, in integer minor units
            of `currency` (10050 = AED 100.50). It must equal the quote's
            `total_minor`.
          examples:
            - 10050
          minimum: 0
          title: Approved Total Minor
          type: integer
        currency:
          description: ISO 4217 currency of the quote.
          examples:
            - AED
          pattern: ^[A-Z]{3}$
          title: Currency
          type: string
        grant_id:
          description: The agent grant the shopper approved this purchase under.
          maxLength: 40
          minLength: 1
          title: Grant Id
          type: string
        key:
          description: >-
            Your idempotency key for this approval. Repeating it with the same
            terms returns the original approval; reusing it for different terms
            fails with `409`.
          pattern: ^[A-Za-z0-9_.:-]{1,80}$
          title: Key
          type: string
        partial_order_policy:
          description: >-
            `allow_partial` keeps accepted merchant orders if others fail;
            `all_or_cancel` is retained for historical approvals. Checkout of
            new purchases accepts only `allow_partial`.
          enum:
            - allow_partial
            - all_or_cancel
          title: Partial Order Policy
          type: string
        quote_id:
          description: The cart's current active quote.
          maxLength: 40
          minLength: 1
          title: Quote Id
          type: string
        shopper_contact:
          additionalProperties:
            type: string
          description: >-
            Contact details passed to merchants for fulfilment, for example
            `email` and `phone`.
          maxProperties: 5
          title: Shopper Contact
          type: object
        ttl_seconds:
          default: 300
          description: Seconds the approval stays usable for starting checkout.
          maximum: 900
          minimum: 30
          title: Ttl Seconds
          type: integer
      required:
        - grant_id
        - quote_id
        - approved_total_minor
        - currency
        - partial_order_policy
        - key
      title: ApprovalIn
      type: object
    ApprovalReceipt:
      description: >-
        Frozen consent terms safe for delegated clients; excludes
        contact/payment secrets.
      properties:
        cart_id:
          title: Cart Id
          type: string
        currency:
          description: ISO 4217 currency code.
          examples:
            - AED
          title: Currency
          type: string
        expires_at:
          description: Time after which checkout can no longer start from this approval.
          format: date-time
          title: Expires At
          type: string
        id:
          description: Approval identifier to pass to checkout.
          title: Id
          type: string
        partial_order_policy:
          description: Approved handling when only some merchants accept the order.
          enum:
            - allow_partial
            - all_or_cancel
          title: Partial Order Policy
          type: string
        quote_id:
          title: Quote Id
          type: string
        total_minor:
          description: >-
            Approved total in integer minor units of `currency` (10050 = AED
            100.50).
          examples:
            - 10050
          title: Total Minor
          type: integer
      required:
        - id
        - cart_id
        - quote_id
        - total_minor
        - currency
        - partial_order_policy
        - expires_at
      title: ApprovalReceipt
      type: object
    IgniteErrorEnvelope:
      description: Document the existing error handler without changing its serialization.
      properties:
        error:
          $ref: '#/components/schemas/IgniteErrorDetail'
      required:
        - error
      title: IgniteErrorEnvelope
      type: object
    IgniteErrorDetail:
      description: Stable error fields; details remain open to each domain's JSON evidence.
      properties:
        code:
          title: Code
          type: string
        details:
          title: Details
        message:
          title: Message
          type: string
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
      required:
        - code
        - message
        - details
        - request_id
      title: IgniteErrorDetail
      type: object
  securitySchemes:
    MachineKey:
      description: Server-side scoped Ignyt API key.
      scheme: bearer
      type: http

````

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