Create Production Schedule Line
Beta/v1/operations/production-schedules/{id}/linesIdempotent with Idempotency-Key header. Learn more
Adds a campaign to a schedule by hand.
The line is recorded as manual, so a later regenerate can tell it apart from what the solver produced, and the change is written to the deviation log. Adding into a frozen week requires a reason.
Only a draft or a published version can be edited; a superseded or archived version is history. The campaign is appended to the end of its week's run order.
idstringID of the production schedule.
week_indexintegerHorizon week to plan the campaign in, zero-based.
Week 0 is the week the schedule's horizon starts in. The week must fall inside the horizon this version was planned over.
machine_idstringID of the machine that will run the campaign.
The machine's production step and department are copied onto the campaign, which is what department-level attainment rolls it up by. The schedule's derived department work is not re-exploded for a hand-added campaign; it is rebuilt the next time the version is regenerated.
item_idstringID of the item to build.
quantitynumberUnits to build over the campaign.
lotsoptional integerHow many lots the quantity is built in.
Left unset, it is derived from the quantity and the account's default lot size. The lot size itself is taken from that account default and is not settable per campaign, so this is a record of the lot count rather than what a release splits batches by.
run_hoursoptional numberMachine hours the campaign will take.
Left unset, it is estimated from the rate this version was solved with for this item, so the week's utilisation still reflects the added work. An item the version holds no policy for estimates to zero.
reasonoptional stringenumValues:machine_downmaterial_shortagerush_orderWhy the campaign was added.
Required when the campaign lands inside a frozen week, since that is a commitment being changed.
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 Create Production Schedule Line