Create Production Run from Sales Order
Beta/v1/sales/sales-orders/{id}/actions/create-production-runIdempotent with Idempotency-Key header. Learn more
Creates a production run from a sales order.
Creates a batch for each of the order's item-backed lines, reserves the material inventory required to produce them, and links the run to the order. An order can have at most one production run.
idstringSales order ID.
include[]optional arrayenumValues:responsible_userresponsible_user.userSub-objects to expand in the response. When omitted, sub-objects are returned as null.
idstringProduction run ID.
objectstringenumValues:production_runResource type identifier.
numberstringProduction run number, unique per account.
Assigned automatically at creation as the next sequential number for the account; can be changed via update.
Account user accountable for executing the run.
idstringAccount user ID.
objectstringenumValues:account_userResource type identifier.
statusstringenumValues:activedisabledremovedAccount user status.
active: the user can access the account.disabled: the user is locked out of the account.removed: the user has been removed (soft-deleted) from the account.
Assigned role.
null in this endpoint.departmentdepartmentnullableAssigned department.
null in this endpoint.useruserExpandablenullableUnderlying user.
idstringUser ID.
objectstringenumValues:userResource type identifier.
emailstringnullableEmail address.
namestringnullableUser's full display name.
usernamestringnullableUsername.
email_verified_atstring (date-time)nullableWhen the user verified their email address.
image_urlstringnullableURL of the user's profile image.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
last_used_atstring (date-time)nullableWhen the user last accessed this account.
created_atstring (date-time)When the account user was created.
updated_atstring (date-time)When the account user was last updated.
batch_countintegerNumber of batches currently recorded against this run.
started_atstring (date-time)nullableTime the run started production.
Set automatically when the first batch in the run is scanned, and unset until then.
completed_atstring (date-time)nullableTime the run was marked complete.
Set automatically once every batch in the run has been scanned or deleted, and unset while the run is still in progress. Once set, the run can no longer be updated and new batches can no longer be added.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last-updated timestamp.
Responses
Successful response for Create Production Run from Sales Order