Manufacturing Orders Mutations

CreateManufacturingOrder

Creates a new manufacturing order.

Parameters:

ParameterTypeDescription
inputManufacturingOrderInput!Manufacturing order data.
mutation CreateManufacturingOrder($input: ManufacturingOrderInput!) {
  CreateManufacturingOrder(input: $input) {
    id
    label
    status
    quantity
    variant {
      id
      label
    }
  }
}

CreateManufacturingOrderFrom

Creates a manufacturing order from a sales order.

Parameters:

ParameterTypeDescription
inputManufacturingOrderFromInput!Source order data.

UpdateManufacturingOrder

Updates an existing manufacturing order.

Parameters:

ParameterTypeDescription
idID!Manufacturing order ID.
inputManufacturingOrderInput!Updated fields.

DeleteManufacturingOrder

Deletes a manufacturing order.

Parameters:

ParameterTypeDescription
idID!Manufacturing order ID.

GenerateManufacturingOrderNumber

Generates the next manufacturing order number.

Parameters:

ParameterTypeDescription
location_idIDLocation ID (optional).

TransitionManufacturingOrderStep

Transitions a manufacturing order step to a new status.

Parameters:

ParameterTypeDescription
idID!Manufacturing order ID.
inputTransitionManufacturingOrderStepInput!Step transition data.

TransitionManufacturingOrderBatchStep

Transitions a manufacturing order batch step to a new status.

Parameters:

ParameterTypeDescription
idID!Batch ID.
inputTransitionManufacturingOrderBatchStepInput!Step transition data.

CreateManufacturingOrderSendComponentsStockAdjustment

Creates a stock adjustment for sending components to manufacturing.

Parameters:

ParameterTypeDescription
idID!Manufacturing order ID.

CreateManufacturingOrderBatchReturnStockAdjustment

Creates a stock adjustment for returning unused components from a batch.

Parameters:

ParameterTypeDescription
idID!Batch ID.

CreateManufacturingOrderBatch

Creates a new manufacturing order batch.

Parameters:

ParameterTypeDescription
inputManufacturingOrderBatchInput!Batch data.

UpdateManufacturingOrderBatch

Updates an existing manufacturing order batch.

Parameters:

ParameterTypeDescription
idID!Batch ID.
inputManufacturingOrderBatchInput!Updated fields.

PostManufacturingOrderBatch

Posts a manufacturing order batch (confirms production).

Parameters:

ParameterTypeDescription
idID!Batch ID.

ManufacturingOrderInput data type

FieldTypeDescription
idIDID for updates.
labelStringOrder number.
notesStringInternal notes.
statusManufacturingOrderStatusOrder status.
operation_typeManufacturingOrderOperationTypeBuild or split.
on_hold_reasonManufacturingOrderOnHoldReasonReason for hold.
on_hold_noteStringNote for hold.
quantityFloatOrdered quantity.
unit_manufacturing_costFloatCost per unit.
exceptional_manufacturing_costFloatExceptional costs.
due_atDateDue date.
planned_start_atDatePlanned start date.
planned_end_atDatePlanned end date.
actual_start_atDateActual start date.
actual_end_atDateActual end date.
variantProductVariantIDInputProduct variant.
supplierManufacturingOrderEntityIDInputSubcontractor.
bill_of_materialManufacturingOrderEntityIDInputBOM to use.
manufacturing_routingManufacturingOrderEntityIDInputRouting to use.
order_line_item_idIDSource order line item ID.
locationLocationInputManufacturing location.
steps[ManufacturingOrderStepInput]Manufacturing steps.
lines[ManufacturingOrderLineInput]Production lines.
dependencies[ManufacturingOrderDependencyInput]Dependent orders.

TransitionManufacturingOrderStepInput data type

FieldTypeDescription
step_idID!Step ID.
statusManufacturingOrderStepStatus!New status.
transitioned_atDateTimeTransition timestamp.
exceptional_manufacturing_costFloatExceptional costs.

ManufacturingOrderBatchInput data type

FieldTypeDescription
manufacturing_orderManufacturingOrderEntityIDInput!Parent order.
locationLocationInput!Production location.
produced_quantityFloat!Produced quantity.
produced_atDateTimeProduction date.
enable_finished_batch_trackingBooleanEnable batch tracking.
finished_batch_numberAssemblyBatchNumberInputBatch number.
finished_serial_numbers[SerialNumberInput]Finished serial numbers.
finished_serial_number_textStringFinished serial number text.
notesStringBatch notes.
lines[ManufacturingOrderBatchLineInput]Batch lines.

TransitionManufacturingOrderBatchStepInput data type

FieldTypeDescription
step_idID!Batch step ID.
statusManufacturingOrderStepStatus!New status.
transitioned_atDateTimeTransition timestamp.
exceptional_manufacturing_costFloatExceptional costs.

ManufacturingOrderBatchLineInput data type

FieldTypeDescription
manufacturing_order_line_idID!Parent line ID.
actual_quantityFloat!Actually produced quantity.
batch_numbers[AssemblyBatchNumberInput]Batch numbers for this line.
serial_numbers[SerialNumberInput]Serial numbers for this line.
serial_number_textStringSerial number text.

ManufacturingOrderStepInput data type

FieldTypeDescription
idIDStep ID (for updates).
manufacturing_routing_step_idID!Routing step ID.
statusManufacturingOrderStepStatusStep status.
started_atDateTimeStep start time.
completed_atDateTimeStep completion time.

ManufacturingOrderLineInput data type

FieldTypeDescription
idIDLine ID (for updates).
variantProductVariantIDInput!Product variant.
planned_quantityFloat!Planned quantity.
weightIntWeight.

ManufacturingOrderDependencyInput data type

FieldTypeDescription
idID!Dependency ID (for removal).

ManufacturingOrderFromInput data type

FieldTypeDescription
Order[ID]Source order IDs.
order_line_item_idIDSource order line item ID.

ManufacturingOrderEntityIDInput data type

FieldTypeDescription
idID!Entity identifier.

ProductVariantIDInput data type

FieldTypeDescription
idID!Variant ID.
labelStringVariant label.