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

# Cancel preview (census) for a sales order

> Server-enumerated cancel census for the guided cancel wizard. Read-only. Returns the
sales order's child drop-ship purchase orders classified by state (draft / sent /
received) with the resolution action each drives (a draft PO cancels silently with the
order; a sent PO offers one-click cancel + vendor notification; a vendor-shipped PO
pivots to the return flow), the child work orders, the active shipping labels that must
be voided first, a composed cancellation-fee preview, and the cancel/void eligibility
blockers. `requires_wizard` is true when there is at least one child PO or work order to
surface. Requires `orders:read` scope.




## OpenAPI

````yaml /openapi.yaml get /orders/{id}/cancel-preview
openapi: 3.1.0
info:
  title: Arcus ERP Public API
  version: 1.0.0
  description: >
    Arcus ERP public REST API. Designed for external integrations and data
    migration.


    **Authentication.** Bearer token (API key) via the `Authorization` header.

    Format: `Authorization: Bearer ark_live_ent_<code>_<random>` (or
    `ark_test_*` for sandbox).

    API keys are issued per-entity in **Settings > Developers > API Keys**.


    **Entity scoping.** The entity is encoded in the API key prefix; routes are
    flat

    (e.g. `/v1/accounts`, `/v1/orders`, `/v1/products`). A small set of platform
    endpoints

    (migration, reconciliation, events, webhook endpoints, API keys) use the

    `/v1/entities/{entity_id}/...` form -- those are noted in their tags.


    **Key capabilities.**
      - Related-resource hydration via `?expand[]=` (see `x-arcus-expand` on each resource).
      - Cursor-based pagination (`starting_after` / `ending_before` / `limit`).
      - Idempotency via the `Idempotency-Key` header.
      - Webhook events for asynchronous notification.
      - Conditional requests / ETag for cache validation.
servers:
  - url: https://api.arcuserp.com/v1
    description: Arcus ERP API (accepts both live `ark_live_*` and test `ark_test_*` keys)
  - url: https://dev-api.arcuserp.com/v1
    description: >-
      Dev sandbox API (test-only data, accepts `ark_test_*` keys against dev
      RDS)
security: []
paths:
  /orders/{id}/cancel-preview:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    get:
      tags:
        - Orders
      summary: Cancel preview (census) for a sales order
      description: >
        Server-enumerated cancel census for the guided cancel wizard. Read-only.
        Returns the

        sales order's child drop-ship purchase orders classified by state (draft
        / sent /

        received) with the resolution action each drives (a draft PO cancels
        silently with the

        order; a sent PO offers one-click cancel + vendor notification; a
        vendor-shipped PO

        pivots to the return flow), the child work orders, the active shipping
        labels that must

        be voided first, a composed cancellation-fee preview, and the
        cancel/void eligibility

        blockers. `requires_wizard` is true when there is at least one child PO
        or work order to

        surface. Requires `orders:read` scope.
      operationId: getOrderCancelPreview
      responses:
        '200':
          description: Cancel census
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      order:
                        type: object
                      child_drop_ship_pos:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              format: uuid
                            po_number:
                              type: string
                            order_status:
                              type: string
                            vendor_name:
                              type: string
                              nullable: true
                            sent_at:
                              type: string
                              nullable: true
                            has_receipts:
                              type: boolean
                            is_billed:
                              type: boolean
                            state:
                              type: string
                              enum:
                                - draft
                                - sent
                                - received
                            action:
                              type: string
                              enum:
                                - cancels_with_order
                                - cancel_and_notify
                                - handle_as_return
                      child_work_orders:
                        type: array
                        items:
                          type: object
                      packages_to_void:
                        type: array
                        items:
                          type: object
                      cancellation_fee:
                        type: object
                        nullable: true
                      eligibility:
                        type: object
                      requires_wizard:
                        type: boolean
        '404':
          description: Order not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: |
        API key issued per entity via Settings > Developers > API Keys.
        Each key carries scopes (e.g. orders:read, products:write).
        Bearer token format: Authorization: Bearer ark_live_ent_<code>_<random>
        Test keys use ark_test_ent_<code>_<random>. Both are issued per entity
        via Settings > Developers > API Keys.

````