AssemblyCreate
Create an assembly from its components
Note: This mutation can be used only for companies who use assemblies
Parameters
input - AssemblyInput |
---|
Data of the assembly |
Example
mutation{
AssemblyCreate
(
input:{
quantity:5
id:1840
batch_number:{
id:758493
quantity:5
}
location_id:100389
components:[
{
id:2890055
quantity:3
batch_numbers:[
{
id:654903
quantity:15
}
]
}
]
}
)
{
label
stock_levels{
data{
on_hand
}
}
}
}
Returned data
{
"data": {
"AssemblyCreate": {
"id": 1840,
"stock_levels":{
"data":[
{
"on_hand":5
}
]
}
}
}
}
AssemblyInput data type
id - Int |
---|
The id of the variant you want to assemble |
quantity - Int |
---|
The quantity you want to assemble |
location_id - Int |
---|
The location where the assembly creation takes placet |
batch_number - AssemblyBatchNumberInput - Subquery |
---|
The batch number of the assembly |
components - Array of AssemblyComponentInput |
---|
The components used to create the assembly |
AssemblyComponentInput data type
id - Int |
---|
The id of the variant you want to assemble |
quantity - Int |
---|
The quantity you want to assemble |
batch_number - Array of AssemblyBatchNumberInput - Subquery |
---|
The batch number of the assembly |
AssemblyBatchNumberInput data type
id - Int |
---|
The id of the variant you want to assemble |
quantity - Int |
---|
The quantity you want to assemble |
data - BatchNumberInput |
---|
The location where the assembly creation takes placet |