> ## 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.

# Preview the multi-warehouse sourcing plan for an order (no reservation)

> Returns the proposed per-line multi-warehouse sourcing plan WITHOUT reserving any stock.
For each physical line, the system proposes which warehouse fills how much (preferred
order location first, then warehouses with the most available stock). Read-only: it
writes no inventory, creates no reservations, and posts no journal entry. Use it to
review a split before committing it via `POST /orders/{id}/allocate`. The manual
transfer path remains the override (ALLOCATION-MULTI-WAREHOUSE-SOURCING-AND-SOFT-VS-FIRM-RESERVATION).
Requires `orders:read` scope.




## OpenAPI

````yaml /openapi.yaml post /orders/{id}/allocation-plan
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}/allocation-plan:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Orders
      summary: Preview the multi-warehouse sourcing plan for an order (no reservation)
      description: >
        Returns the proposed per-line multi-warehouse sourcing plan WITHOUT
        reserving any stock.

        For each physical line, the system proposes which warehouse fills how
        much (preferred

        order location first, then warehouses with the most available stock).
        Read-only: it

        writes no inventory, creates no reservations, and posts no journal
        entry. Use it to

        review a split before committing it via `POST /orders/{id}/allocate`.
        The manual

        transfer path remains the override
        (ALLOCATION-MULTI-WAREHOUSE-SOURCING-AND-SOFT-VS-FIRM-RESERVATION).

        Requires `orders:read` scope.
      operationId: getOrderAllocationPlan
      responses:
        '200':
          description: The proposed allocation plan.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      order_id:
                        type: string
                        format: uuid
                      order_number:
                        type: string
                      preferred_location_id:
                        type: string
                        format: uuid
                      order_allocation_strategy:
                        type: string
                        enum:
                          - allocate_now
                          - allocate_at_pack
                      any_multi_location:
                        type: boolean
                      any_shortfall:
                        type: boolean
                      lines:
                        type: array
                        items:
                          type: object
                          properties:
                            order_item_id:
                              type: string
                              format: uuid
                            product_id:
                              type: string
                              format: uuid
                            product_title:
                              type: string
                              nullable: true
                            sku:
                              type: string
                              nullable: true
                            qty_needed:
                              type: integer
                            qty_plannable:
                              type: integer
                            shortfall:
                              type: integer
                            fully_sourceable:
                              type: boolean
                            multi_location:
                              type: boolean
                            allocation_strategy:
                              type: string
                              enum:
                                - allocate_now
                                - allocate_at_pack
                            plan:
                              type: array
                              items:
                                type: object
                                properties:
                                  location_id:
                                    type: string
                                    format: uuid
                                  location_name:
                                    type: string
                                  qty:
                                    type: integer
                                  available:
                                    type: integer
        '404':
          description: Order not found.
        '422':
          description: >-
            No resolvable location (order has no location and entity has no
            default).
      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.

````