Update Production Schedule Line
Beta/v1/operations/production-schedules/{id}/lines/{line_id}Idempotent with Idempotency-Key header. Learn more
Edits a campaign on a schedule.
Every change is written to the deviation log with a full before-and-after snapshot, and the line becomes manual so a regenerate can tell it apart from solver output. A change that touches a frozen week — including moving a campaign out of one — requires a reason.
Only a draft or a published version can be edited; a superseded or archived version is history. An edit that changes several things at once is logged under the single most significant one, in the order machine, week, quantity, position — that being the change a planner has to react to first.
idstringID of the production schedule.
line_idstringID of the schedule line.
week_indexoptional integerHorizon week to move the campaign to, zero-based.
Must fall inside the horizon this version was planned over.
machine_idoptional stringID of the machine to move the campaign to.
quantityoptional numberUnits to build over the campaign.
Changing this re-derives lots and run_hours from the rate and lot size this version was solved with, so the campaign never keeps claiming its old share of machine time; send either alongside it to override what is derived. A campaign builds something by definition, so use delete rather than a quantity of zero to take it off the plan.
lotsoptional integerHow many lots the quantity is built in.
What a release actually splits batches by is the lot size the campaign was planned at, which this does not change.
run_hoursoptional numberMachine hours the campaign will take.
sequence_indexoptional integerPosition within the week's run order, lowest first.
statusoptional stringenumValues:plannedreleasedin_progressProgress of the campaign.
Setting released here only labels the campaign; it does not create a production run or any batches — releasing a week to the floor is its own action. Setting cancelled leaves the campaign on the plan but excludes it from any later release of its week.
reasonoptional stringnullableenumValues:machine_downmaterial_shortagerush_orderWhy the campaign changed.
Required when the change touches a frozen week, including moving a campaign out of one. Send null to clear.
reason_noteoptional stringFree-form explanation of the change.
idstringLine ID.
objectstringenumValues:production_schedule_lineResource type identifier.
production_scheduleentitynullableThe schedule version this line belongs to.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
week_indexintegerZero-based week offset from the start of the horizon.
week_starts_atstring (date-time)First instant of the week this campaign runs in.
machineentitynullableThe machine assigned to the campaign.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
production_stepentitynullableThe production step the campaign runs at.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
departmententitynullableThe department the machine belongs to.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
itementitynullableThe item to produce.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
planned_quantitynumberQuantity to produce.
planned_unitentitynullableUnit the quantity is expressed in.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
planned_unit_abbreviationstringnullableAbbreviation of the unit every quantity on this line is counted in, for display.
A campaign of 360 means 360 pairs or 360 eaches depending on this, so the two are never meaningful apart.
planned_lotsintegerWhole lots the quantity rounds to.
planned_lot_unitsnumberUnits in one lot, which is the batch size the week is released to the floor in.
planned_run_hoursnumberConstraint hours the campaign consumes.
planned_changeover_minutesnumberModelled changeover time before the campaign.
sequence_indexintegerOrder the campaign runs within its week.
projected_on_hand_beforenumberProjected stock before the campaign lands.
projected_on_hand_afternumberProjected stock after the campaign lands and the week's demand is drawn down.
statusstringenumValues:plannedreleasedin_progressWhere the line is in its lifecycle.
A campaign becomes released when its week is issued to the floor as a production run, and goes back to planned if that run is deleted.
sourcestringenumValues:solvermanualWhether the solver or a person created the line.
Editing a solver-placed campaign turns it manual, and a regenerate that preserves hand work keeps exactly the campaigns marked that way.
reasonstringnullableenumValues:machine_downmaterial_shortagerush_orderWhy the campaign was placed or last changed by hand.
Only hand changes record a reason, and a change that touches a frozen week has to supply one.
freeze_statusstringenumValues:frozenflexibleWhether the line is inside the frozen window, where changing it requires a reason for the deviation log.
production_runentitynullableThe production run this campaign's week was released as.
One run carries the whole week, so every campaign released alongside this one points at the same run.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe resource kind that this entity references, as an object-type value (e.g. user, account).
Unlike object — which is always entity — this names the underlying resource the id points to.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
released_batch_countintegerBatches this campaign issued to the floor when its week was released.
scanned_batch_countintegerBatches of this campaign the floor has scanned.
scanned_quantitynumberQuantity scanned so far, in the planned unit.
Measured from the run the week was released as, matched on this campaign's item, so a run holding several SKUs credits each campaign with only its own work.
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last updated timestamp.
Responses
Successful response for Update Production Schedule Line