> ## 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 decision on a partial purchase

> After a partial outcome, record the shopper's choice: `continue` with the merchant orders that stand, or `cancel_remaining`, which asks each store to cancel its `placed` or `confirmed` order and refunds the ones that are cancelled; a store can refuse, so check `decision_outcomes` for `not_cancelled` before telling the shopper. Shipped orders stay and follow the return flow. A repeat of a completed decision returns the purchase without `decision_outcomes`; read each order's `status` in `merchant_orders` instead. One decision per purchase: repeating the same decision is safe and resumes an interrupted cancellation, a different one returns `409`, and `409` is also returned when no review is offered. Requires the `orders:write` scope.



## OpenAPI

````yaml /api-reference.json post /v1/purchases/{purchase_id}/decision
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 Platform 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: Integration
    description: Identity, usage and the public schema for the calling integration.
  - name: Merchants
    description: Discover merchants, manage enrollments and invite stores.
  - name: Catalog
    description: Products, variants, categories and synchronization.
  - name: Carts and checkout
    description: >-
      Build carts, freeze quotes, submit purchases and manage optional Sandbox
      buyer sharing.
  - name: Webhooks and events
    description: Endpoints, deliveries, retries and the event feed.
  - name: Refunds
    description: Request and follow refunds on merchant orders.
  - name: Purchases and orders
    description: Purchases, merchant orders, cancellations and returns.
  - name: Payments and finance
    description: Payment breakdowns, statements and disputes.
  - name: Custom fields
    description: Approved custom field schemas and order extensions.
paths:
  /v1/purchases/{purchase_id}/decision:
    post:
      tags:
        - Purchases and orders
      summary: Record a shopper decision on a partial purchase
      description: >-
        After a partial outcome, record the shopper's choice: `continue` with
        the merchant orders that stand, or `cancel_remaining`, which asks each
        store to cancel its `placed` or `confirmed` order and refunds the ones
        that are cancelled; a store can refuse, so check `decision_outcomes` for
        `not_cancelled` before telling the shopper. Shipped orders stay and
        follow the return flow. A repeat of a completed decision returns the
        purchase without `decision_outcomes`; read each order's `status` in
        `merchant_orders` instead. One decision per purchase: repeating the same
        decision is safe and resumes an interrupted cancellation, a different
        one returns `409`, and `409` is also returned when no review is offered.
        Requires the `orders:write` scope.
      operationId: purchase_decision_v1_purchases__purchase_id__decision_post
      parameters:
        - in: path
          name: purchase_id
          required: true
          schema:
            title: Purchase 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/DecisionIn'
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                all_children_resolved: true
                app_id: app_example
                cart_id: crt_example
                created_at: '2026-11-30T09:31:10.912204+00:00'
                currency: AED
                decision_outcomes: []
                environment: sandbox
                extensions: {}
                failure_reason: null
                id: pur_example
                merchant_orders:
                  - cancellation_status: null
                    connection_id: con_example
                    connector_release: v1
                    coupon_codes: []
                    currency: AED
                    custom_fields_state: {}
                    discount_minor: 0
                    external_order_id: SB-EXAMPLE-1001
                    failure_reason: null
                    id: mord_example
                    last_observed_at: null
                    lines:
                      - line_id: lin_example
                        line_total_minor: 24900
                        qty: 1
                        sku: OUD-50
                        title: Royal Oud Perfume 50ml — 50ml
                        unit_price_minor: 24900
                        variant_external_id: v-oud-50
                        variant_id: var_example
                    merchant_id: mer_example
                    placed_at: '2026-11-30T09:31:10.988884+00:00'
                    purchase_id: pur_example
                    references:
                      connection_id: con_example
                      environment: sandbox
                      ignite_order_id: mord_example
                      merchant_id: mer_example
                      merchant_order_id: SB-EXAMPLE-1001
                      purchase_id: pur_example
                      tenant_id: ten_example
                    revision: 2
                    route: direct_api
                    shipments: []
                    shipping_minor: 1500
                    source_metadata: {}
                    status: placed
                    subtotal_minor: 24900
                    tax_minor: 1320
                    total_minor: 27720
                  - cancellation_status: null
                    connection_id: con_example_2
                    connector_release: v1
                    coupon_codes: []
                    currency: AED
                    custom_fields_state: {}
                    discount_minor: 0
                    external_order_id: null
                    failure_reason: >-
                      merchant rejected order: item cannot be shipped to this
                      address
                    id: mord_example_2
                    last_observed_at: null
                    lines:
                      - line_id: lin_example_2
                        line_total_minor: 8900
                        qty: 1
                        sku: DATES-L
                        title: Dates Gift Box — Large 1kg
                        unit_price_minor: 8900
                        variant_external_id: v-dates-l
                        variant_id: var_example_2
                    merchant_id: mer_example_2
                    placed_at: null
                    purchase_id: pur_example
                    references:
                      connection_id: con_example_2
                      environment: sandbox
                      ignite_order_id: mord_example_2
                      merchant_id: mer_example_2
                      merchant_order_id: null
                      purchase_id: pur_example
                      tenant_id: ten_example
                    revision: 2
                    route: direct_api
                    shipments: []
                    shipping_minor: 1500
                    source_metadata: {}
                    status: failed
                    subtotal_minor: 8900
                    tax_minor: 520
                    total_minor: 10920
                notification_owner: ignite
                partial_order_policy: allow_partial
                quote_id: quo_example
                review_offered_at: '2026-11-30T09:31:13.204215+00:00'
                shopper_decision: continue
                shopper_options: []
                shopper_ref: shopper-ref-1
                status: partially_placed
                submission_id: sub_example
                tenant_id: ten_example
                total_minor: 38640
              schema:
                $ref: '#/components/schemas/PurchaseDecisionView'
          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: []
        - CustomerOIDC: []
components:
  schemas:
    DecisionIn:
      properties:
        decision:
          description: >-
            `continue` keeps the remaining merchant orders; `cancel_remaining`
            asks each store to cancel its `placed` or `confirmed` order, which a
            store can refuse, and refunds the ones cancelled.
          examples:
            - continue
          title: Decision
          type: string
      required:
        - decision
      title: DecisionIn
      type: object
    PurchaseDecisionView:
      properties:
        all_children_resolved:
          title: All Children Resolved
          type: boolean
        app_id:
          title: App Id
          type: string
        cart_id:
          title: Cart Id
          type: string
        created_at:
          title: Created At
          type: string
        currency:
          title: Currency
          type: string
        decision_outcomes:
          anyOf:
            - items:
                $ref: '#/components/schemas/DecisionOutcome'
              type: array
            - type: 'null'
          description: >-
            Per merchant order results of the decision just recorded; absent
            when the call only returns an already completed decision.
          title: Decision Outcomes
        environment:
          title: Environment
          type: string
        extensions:
          additionalProperties: true
          title: Extensions
          type: object
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Reason
        id:
          title: Id
          type: string
        merchant_orders:
          items:
            $ref: '#/components/schemas/PurchaseMerchantOrderView'
          title: Merchant Orders
          type: array
        notification_owner:
          title: Notification Owner
          type: string
        partial_order_policy:
          title: Partial Order Policy
          type: string
        payment:
          description: >-
            Present as null only when Ignyt proves coupon validation blocked the
            first payment.
          title: Payment
          type: 'null'
        quote_id:
          title: Quote Id
          type: string
        review_offered_at:
          anyOf:
            - type: string
            - type: 'null'
          description: Set when a partial outcome needs a shopper decision.
          title: Review Offered At
        shopper_decision:
          anyOf:
            - type: string
            - type: 'null'
          title: Shopper Decision
        shopper_options:
          description: 'Decisions still available: `continue`, `cancel_remaining`.'
          items:
            type: string
          title: Shopper Options
          type: array
        shopper_ref:
          title: Shopper Ref
          type: string
        status:
          description: >-
            `received`, `paying`, `placing`, `placed`, `partially_placed`,
            `failed`, `cancelled` or `completed`.
          title: Status
          type: string
        submission_id:
          title: Submission Id
          type: string
        tenant_id:
          title: Tenant Id
          type: string
        total_minor:
          title: Total Minor
          type: integer
      required:
        - id
        - review_offered_at
        - shopper_options
        - shopper_decision
        - tenant_id
        - app_id
        - environment
        - shopper_ref
        - status
        - currency
        - total_minor
        - partial_order_policy
        - cart_id
        - quote_id
        - submission_id
        - failure_reason
        - notification_owner
        - created_at
        - merchant_orders
        - extensions
        - all_children_resolved
      title: PurchaseDecisionView
      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
    DecisionOutcome:
      properties:
        child_id:
          title: Child Id
          type: string
        merchant_id:
          title: Merchant Id
          type: string
        outcome:
          description: '`cancelled`, `failed`, `not_cancelled` or `not_cancellable`.'
          title: Outcome
          type: string
        reason:
          anyOf:
            - type: string
            - type: 'null'
          description: Present when the merchant order was not cancelled.
          title: Reason
      required:
        - child_id
        - merchant_id
        - outcome
      title: DecisionOutcome
      type: object
    PurchaseMerchantOrderView:
      properties:
        cancellation_status:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            `executing`, `unknown`, `rejected` or `cancelled` after a
            cancellation request.
          title: Cancellation Status
        connection_id:
          title: Connection Id
          type: string
        connector_release:
          title: Connector Release
          type: string
        coupon_codes:
          items:
            type: string
          title: Coupon Codes
          type: array
        currency:
          title: Currency
          type: string
        custom_fields_state:
          additionalProperties: true
          title: Custom Fields State
          type: object
        discount_minor:
          title: Discount Minor
          type: integer
        external_order_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The store's order ID once it has been placed.
          title: External Order Id
        failure_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Reason
        id:
          title: Id
          type: string
        last_observed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Observed At
        lines:
          description: >-
            Lines as frozen at quote time; each carries `sku`, `qty`,
            `unit_price_minor` and `line_total_minor`.
          items:
            additionalProperties: true
            type: object
          title: Lines
          type: array
        merchant_id:
          title: Merchant Id
          type: string
        placed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Placed At
        purchase_id:
          title: Purchase Id
          type: string
        references:
          $ref: '#/components/schemas/MerchantOrderReferences'
        revision:
          title: Revision
          type: integer
        route:
          title: Route
          type: string
        shipments:
          items:
            $ref: '#/components/schemas/ShipmentView'
          title: Shipments
          type: array
        shipping_minor:
          title: Shipping Minor
          type: integer
        source_metadata:
          additionalProperties: true
          title: Source Metadata
          type: object
        status:
          description: >-
            `pending`, `placing`, `unknown`, `placed`, `confirmed`, `shipped`,
            `delivered`, `cancelled`, `failed` or `returned`.
          title: Status
          type: string
        subtotal_minor:
          title: Subtotal Minor
          type: integer
        tax_minor:
          title: Tax Minor
          type: integer
        total_minor:
          title: Total Minor
          type: integer
      required:
        - id
        - purchase_id
        - connection_id
        - merchant_id
        - route
        - connector_release
        - status
        - external_order_id
        - source_metadata
        - references
        - cancellation_status
        - lines
        - subtotal_minor
        - discount_minor
        - shipping_minor
        - tax_minor
        - total_minor
        - currency
        - coupon_codes
        - custom_fields_state
        - failure_reason
        - placed_at
        - last_observed_at
        - revision
        - shipments
      title: PurchaseMerchantOrderView
      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
    MerchantOrderReferences:
      properties:
        connection_id:
          title: Connection Id
          type: string
        environment:
          title: Environment
          type: string
        ignite_order_id:
          title: Ignite Order Id
          type: string
        merchant_id:
          title: Merchant Id
          type: string
        merchant_order_id:
          anyOf:
            - type: string
            - type: 'null'
          description: The store's order ID once it has been placed.
          title: Merchant Order Id
        purchase_id:
          title: Purchase Id
          type: string
        tenant_id:
          title: Tenant Id
          type: string
      required:
        - ignite_order_id
        - purchase_id
        - merchant_order_id
        - merchant_id
        - connection_id
        - tenant_id
        - environment
      title: MerchantOrderReferences
      type: object
    ShipmentView:
      properties:
        carrier:
          title: Carrier
          type: string
        id:
          title: Id
          type: string
        status:
          title: Status
          type: string
        tracking:
          title: Tracking
          type: string
      required:
        - id
        - carrier
        - tracking
        - status
      title: ShipmentView
      type: object
  securitySchemes:
    MachineKey:
      description: Server-side scoped Ignyt API key.
      scheme: bearer
      type: http
    CustomerOIDC:
      bearerFormat: JWT
      description: >-
        Customer access token; current membership, role and app selection are
        enforced. Protected actions use recent email-code verification in the
        configured Sandbox or recent authenticator verification in legacy
        password mode. Available when customer authentication is enabled.
      scheme: bearer
      type: http

````

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