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 ininventory_allocations) — ID of the allocation to update.assignments.*.supplier_id(required, integer, exists insuppliers) — 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_receiptare counted asskipped. - 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
- 200
- 422
OK
Response Headers
Content-Type
Unprocessable Entity
Response Headers
Content-Type