Docs

Split Resource

POST /procurement-resources/{resourceId}/split

POST/procurement-resources/{resourceId}/split

Splits a need of whole quantity N into N needs of quantity 1 in one clone group (the source's, or a new one), each with the source's blocks, area, collaborator and rule sets, at consecutive positions after the source. labels (optional, N long, blank = no label) names the units in order. Each order line of q becomes q lines of 1 in the same group and order, and coverage is dealt onto the lowest units first; an order already sent reports it as changed, and no revision is created. Refused (400) for a fractional quantity, a quantity of 1, a composite or component, a checked-in hold of more than one, order lines that don't divide into whole units, coverage above the quantity, or a need linked to an event role (unlink it first). Need ids come from Procurements_GetProcurements. Returns the unit ids in order and the changed orders. Works the same on an organization-level need (org token, resource inventory edit); no order revision is minted there.

Path Parameters

FieldTypeRequiredDescription
resourceIduuidRequired

Request Body

FieldTypeRequiredDescription
labelsstring[]Optional

Response

FieldTypeDescription
unitIdsuuid[]| null
changedOrdersSplitProcurementResourceResponseChangedOrder[]| null

SplitProcurementResourceResponseChangedOrder

FieldTypeDescription
iduuid
namestring| null
versionNumberinteger