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

# Unlink a drop-ship sales-order line

> Clears a sales-order line's link to its drop-ship purchase order so the line can be
re-sourced. With `mode: "resource"` (default) the line stays a drop-ship line (keeps its
vendor) and can be re-sourced by re-running the drop-ship creation wizard -- this is the
vendor-swap recovery path. With `mode: "stock"` the line also drops its drop-ship flag
and becomes an ordinary locally-sourced line that can be fulfilled from warehouse stock.
Idempotent (a no-op when the line is not currently linked to a PO). Requires
`orders:write` scope. Idempotent via Idempotency-Key header.




## OpenAPI

````yaml /openapi.yaml post /orders/{id}/lines/{lineId}/unlink-drop-ship
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}/lines/{lineId}/unlink-drop-ship:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: lineId
        in: path
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Orders
      summary: Unlink a drop-ship sales-order line
      description: >
        Clears a sales-order line's link to its drop-ship purchase order so the
        line can be

        re-sourced. With `mode: "resource"` (default) the line stays a drop-ship
        line (keeps its

        vendor) and can be re-sourced by re-running the drop-ship creation
        wizard -- this is the

        vendor-swap recovery path. With `mode: "stock"` the line also drops its
        drop-ship flag

        and becomes an ordinary locally-sourced line that can be fulfilled from
        warehouse stock.

        Idempotent (a no-op when the line is not currently linked to a PO).
        Requires

        `orders:write` scope. Idempotent via Idempotency-Key header.
      operationId: unlinkOrderDropShipLine
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                mode:
                  type: string
                  enum:
                    - resource
                    - stock
                  default: resource
                  description: >
                    `resource` keeps the line drop-ship (re-source via the
                    wizard); `stock` makes

                    it locally sourceable (fulfill from warehouse inventory).
      responses:
        '200':
          description: Line unlinked (or already unlinked)
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      order_id:
                        type: string
                        format: uuid
                      order_item_id:
                        type: string
                        format: uuid
                      unlinked:
                        type: boolean
                      mode:
                        type: string
                        enum:
                          - resource
                          - stock
        '404':
          description: Line not found
      security:
        - ApiKeyAuth: []
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: |
        Client-generated unique key for idempotent POST/PATCH/DELETE operations.
        Alias for the Idempotency parameter. Max 255 chars. On retry with the
        same key, the original response is returned without re-executing the
        operation. Keys expire after 24 hours.
      schema:
        type: string
        maxLength: 255
  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.

````