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

# List order drafts

> Returns order drafts for one offer. `?offer=` is required in v1; `?status=` can further filter by wizard phase. With a workspace context (token-implied or `Akua-Context`), only workspace-member-visible drafts are returned and `field_values` is omitted.



## OpenAPI

````yaml /openapi-public.json get /order_drafts
openapi: 3.1.0
info:
  title: Akua API
  version: 1.0.0
  description: >-
    Public API for managing Akua workspaces, clusters, products, and installs.


    Authenticate with a workspace API token via the `Authorization: Bearer
    sk_akua_...` header.


    A workspace-owned token implies its workspace. Broad tokens select the
    active workspace via the optional `Akua-Context` header.
  contact:
    name: Akua API support
    email: support@akua.dev
    url: https://akua.dev/docs
servers:
  - url: https://api.akua.dev/v1
    description: Production
security: []
tags:
  - name: Auth
    description: Authentication and token management.
  - name: Agents
    description: Agent identities and configuration.
  - name: Agent sessions
    description: Durable agent conversations and tasks.
  - name: Agent turns
    description: Submitted agent work and event emission.
  - name: Agent events
    description: Normalized agent event history and streams.
  - name: Custom domains
    description: Workspace custom domains and routing targets.
  - name: Cloudflare
    description: Cloudflare account credentials and gateway control.
  - name: Clusters
    description: Kubernetes clusters and cluster access operations.
  - name: ComputeConfigs
    description: Workspace compute provider configurations.
  - name: Entitlements
    description: Effective workspace capabilities and limits.
  - name: Dashboards
    description: Dashboard and widget resources.
  - name: Installs
    description: Installation and render operations.
  - name: Machines
    description: Compute machines and lifecycle events.
  - name: Notifications
    description: User notification state.
  - name: Offer Channels
    description: Private offer channels and policy versions.
  - name: Offers
    description: Marketplace offers and redemption tracking.
  - name: Operations
    description: Long-running operation status and controls.
  - name: Order Drafts
    description: Draft checkout orders and checkout sessions.
  - name: Organizations
    description: Organizations, memberships, and managed workspaces.
  - name: Packages
    description: Software packages, versions, and input schemas.
  - name: Products
    description: Marketplace product catalog resources.
  - name: Preview hostnames
    description: Install preview hostnames and routing state.
  - name: Quotas
    description: Workspace quota limits and usage.
  - name: Regions
    description: Available deployment regions.
  - name: Registry
    description: Container registry credentials and repositories.
  - name: Repository change requests
    description: Fork-backed repository change reviews and lifecycle actions.
  - name: Repositories
    description: Source repositories available to the workspace.
  - name: Secrets
    description: Workspace secrets and secret versions.
  - name: Snippets
    description: Reusable snippets and snippet runs.
  - name: Workspace subdomains
    description: Workspace subdomain identity.
  - name: Workspaces
    description: Workspace resources, members, and billing state.
paths:
  /order_drafts:
    get:
      tags:
        - Order Drafts
      summary: List order drafts
      description: >-
        Returns order drafts for one offer. `?offer=` is required in v1;
        `?status=` can further filter by wizard phase. With a workspace context
        (token-implied or `Akua-Context`), only workspace-member-visible drafts
        are returned and `field_values` is omitted.
      operationId: orderDrafts.list
      parameters:
        - schema:
            type: string
            description: Pagination cursor from a previous response's `next_cursor`.
          required: false
          description: Pagination cursor from a previous response's `next_cursor`.
          name: cursor
          in: query
        - schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
            description: Items per page (1-100, default 50)
            example: 50
          required: false
          description: Items per page (1-100, default 50)
          name: limit
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 56
            description: Filter by offer ID
            example: offer_j572abc123def456
          required: false
          description: Filter by offer ID
          name: offer
          in: query
        - schema:
            $ref: '#/components/schemas/OrderDraftStatus'
          required: false
          description: >-
            Wizard phase. Driven by the order draft actor; mirrored on every
            patch to the row so reactive UIs render one column. `done` and
            `terminated` are terminal.
          name: status
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 53
            description: >-
              Optional workspace/scope context for the request. Carries a single
              workspace wire id (`ws_…`) today. Only needed for broad tokens — a
              workspace-owned token implies its workspace.
            example: ws_j572abc123def456
          required: false
          description: >-
            Optional workspace/scope context for the request. Carries a single
            workspace wire id (`ws_…`) today. Only needed for broad tokens — a
            workspace-owned token implies its workspace.
          name: akua-context
          in: header
      responses:
        '200':
          description: List of order drafts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDraftList'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    OrderDraftStatus:
      type: string
      enum:
        - auth
        - workspace
        - compute
        - compute_bootstrap
        - configure
        - payment
        - install
        - done
        - cleaning_up
        - terminated
      description: >-
        Wizard phase. Driven by the order draft actor; mirrored on every patch
        to the row so reactive UIs render one column. `done` and `terminated`
        are terminal.
    OrderDraftList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/OrderDraft'
        has_more:
          type: boolean
          description: True if more items exist after this page.
        next_cursor:
          type:
            - string
            - 'null'
          description: Opaque cursor for the next page, or null if no more pages.
      required:
        - data
        - has_more
        - next_cursor
    ApiErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorEntry'
        result:
          type: object
          properties: {}
          description: Always empty for error responses
      required:
        - success
        - errors
        - result
    OrderDraft:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 55
          description: Order draft ID
        offer_id:
          type: string
          minLength: 1
          maxLength: 56
          description: Offer this order draft is redeeming
        status:
          $ref: '#/components/schemas/OrderDraftStatus'
        termination_reason:
          $ref: '#/components/schemas/OrderDraftTerminationReason'
        user_id:
          type: string
          minLength: 1
          description: Authenticated customer
        customer_email:
          type: string
        workspace_id:
          type: string
          minLength: 1
          maxLength: 53
          description: Workspace selected/created during the workspace phase
        cluster_id:
          type: string
          minLength: 1
          maxLength: 54
          description: Cluster allocated during the compute phase
        cluster_ready:
          type: boolean
        server_joined:
          type: boolean
        payment_completed:
          type: boolean
        current_checkout_session:
          $ref: '#/components/schemas/CurrentOrderDraftCheckoutSession'
        install_operation_id:
          type: string
          minLength: 1
          maxLength: 53
          description: Operation tracking the spawned install workflow
        order:
          $ref: '#/components/schemas/OrderSummary'
        delivery:
          $ref: '#/components/schemas/OrderDeliverySummary'
        field_values:
          type: object
          additionalProperties: {}
          description: >-
            Customer-supplied configure values, including any pre-fills from the
            offer. Only returned to the order draft’s own customer; never to
            other authed callers.
        created_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
        updated_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
        etag:
          type: string
        ttl_expires_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
      required:
        - id
        - offer_id
        - status
        - cluster_ready
        - server_joined
        - payment_completed
        - created_at
        - updated_at
        - etag
        - ttl_expires_at
    ApiErrorEntry:
      type: object
      properties:
        code:
          type: integer
          example: 7002
          description: Machine-readable error code
        message:
          type: string
          example: Resource not found
          description: Human-readable error message
        path:
          type: array
          items:
            type: string
          example:
            - body
            - name
          description: Field path that caused the error, when applicable
        metadata:
          type: object
          additionalProperties:
            type: string
      required:
        - code
        - message
    OrderDraftTerminationReason:
      type: string
      enum:
        - timeout
        - revoked
        - offer_expired
        - install_failed
        - cluster_allocation_failed
        - quota_exceeded
      description: Set when status=terminated; explains why the order draft ended.
    CurrentOrderDraftCheckoutSession:
      type: object
      properties:
        stripe_environment:
          $ref: '#/components/schemas/StripeEnvironment'
        id:
          type: string
          description: Stripe Checkout Session ID
          example: cs_test_...
        draft_revision:
          type: integer
          minimum: 0
          description: Order draft revision this Checkout Session belongs to
        url:
          type: string
          format: uri
          description: Stripe-hosted Checkout URL
        expires_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
      required:
        - stripe_environment
        - id
        - draft_revision
    OrderSummary:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 54
          description: Order ID
        status:
          $ref: '#/components/schemas/OrderStatus'
        stripe_environment:
          allOf:
            - $ref: '#/components/schemas/StripeEnvironment'
            - description: Stripe payment environment for paid Stripe checkout orders.
        stripe_checkout_id:
          type: string
        draft_revision:
          type: integer
          minimum: 0
        cleanup_policy:
          $ref: '#/components/schemas/OrderCleanupPolicy'
        committed_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
      required:
        - id
        - status
        - stripe_checkout_id
        - draft_revision
        - cleanup_policy
        - committed_at
    OrderDeliverySummary:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 55
          description: Order delivery ID
        kind:
          type: string
          enum:
            - install
        authorization_kind:
          type: string
          enum:
            - paid_order
            - non_billable_test_order
        status:
          $ref: '#/components/schemas/OrderDeliveryStatus'
        cleanup_policy:
          $ref: '#/components/schemas/OrderCleanupPolicy'
        install_id:
          type: string
          minLength: 1
          maxLength: 55
        urls:
          type: array
          items:
            type: object
            properties:
              route_key:
                type: string
              hostname:
                type: string
              url:
                type: string
                format: uri
              protocol:
                type: string
                enum:
                  - http
                  - websocket
                  - grpc
                description: Transport class for route forwarding.
              routing_mode:
                type: string
                enum:
                  - through_dispatcher
                  - bypass_dispatcher
                description: Whether traffic uses the dispatcher Worker or bypasses it.
              status:
                type: string
                enum:
                  - pending
                  - provisioning
                  - active
                  - not_ready
                  - failed
                description: Customer-facing install URL routing state.
              error:
                type: string
              last_observed_at:
                type: integer
                minimum: 0
                description: Unix timestamp (seconds)
              updated_at:
                type: integer
                minimum: 0
                description: Unix timestamp (seconds)
            required:
              - route_key
              - hostname
              - url
              - protocol
              - routing_mode
              - status
              - updated_at
        install_operation_id:
          type: string
          minLength: 1
          maxLength: 53
          description: Operation tracking the spawned install workflow
        started_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
        completed_at:
          type: integer
          minimum: 0
          description: Unix timestamp (seconds)
      required:
        - id
        - kind
        - authorization_kind
        - status
        - cleanup_policy
        - urls
    StripeEnvironment:
      type: string
      enum:
        - live
        - sandbox
      description: Stripe payment environment for this Checkout Session.
    OrderStatus:
      type: string
      enum:
        - delivery_pending
        - delivery_running
        - delivered
        - delivery_failed
    OrderCleanupPolicy:
      oneOf:
        - type: object
          properties:
            kind:
              type: string
              enum:
                - none
          required:
            - kind
          additionalProperties: false
        - type: object
          properties:
            kind:
              type: string
              enum:
                - temporal_actor_ttl
            cleanup_at:
              type: integer
              minimum: 0
              description: Unix timestamp (seconds)
            removable_by:
              type: string
              enum:
                - platform_policy
                - platform_admin
            conversion_required:
              type: string
              enum:
                - paid_order
                - platform_approval
          required:
            - kind
            - cleanup_at
            - removable_by
            - conversion_required
          additionalProperties: false
      description: >-
        Cleanup policy attached to committed order resources. Demo/test policies
        are visible so customers and sellers can see when resources will be
        removed.
    OrderDeliveryStatus:
      type: string
      enum:
        - pending
        - running
        - succeeded
        - failed
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at
        https://akua.dev/developers/api-tokens

````