Skip to main content

Switch Suppliers

POST 

//:domain/api/v2/inventory-allocations/switch-suppliers

Bulk updates the supplier on one or more inventory allocations. Each assignment is validated against supplier_products so the chosen supplier must already be configured for the allocation's product. Allocations not in planned or awaiting_receipt status are skipped.

Body:

  • assignments (required, array, min 1) — List of allocation/supplier pairs to apply.
  • assignments.*.allocation_id (required, integer, exists in inventory_allocations) — ID of the allocation to update.
  • assignments.*.supplier_id (required, integer, exists in suppliers) — ID of the supplier to assign.

Behavior:

  • Assignments where the new supplier matches the current supplier are counted as skipped (no-op).
  • Assignments referencing an allocation that is no longer in planned/awaiting_receipt are counted as skipped.
  • Assignments where the supplier is not configured for the product return per-row errors and do NOT update the allocation.
  • The endpoint is best-effort per row; partial success is normal (e.g., 3 updated, 1 skipped, 1 error).

Request

Responses

OK

Response Headers
    Content-Type