UpdateSerialNumber
UpdateSerialNumberUpdates an existing serial number.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | ID of the serial number. |
input | SerialNumberInput! | Updated data. |
Example Query:
mutation UpdateSerialNumber($id: ID!, $input: SerialNumberInput!) {
UpdateSerialNumber(id: $id, input: $input) {
id
label
status
}
}Example Variables:
{
"id": 50001,
"input": {
"label": "SN-001-UPDATED",
"status": "sold"
}
}UpdateSerialNumbers
UpdateSerialNumbersUpdates multiple serial numbers at once.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | [SerialNumberInput!]! | List of updated serial number data. |
DeleteSerialNumber
DeleteSerialNumberDeletes a serial number.
Parameters:
| Parameter | Type | Description |
|---|---|---|
id | ID! | ID of the serial number to delete. |
Example Query:
mutation DeleteSerialNumber($id: ID!) {
DeleteSerialNumber(id: $id)
}AllocateSerialNumber
AllocateSerialNumberAllocates serial numbers to specific line items.
Parameters:
| Parameter | Type | Description |
|---|---|---|
input | [SerialNumberAllocationInput] | Allocation data. |
Example Query:
mutation AllocateSerialNumber($input: [SerialNumberAllocationInput]) {
AllocateSerialNumber(input: $input) {
id
label
status
}
}Example Variables:
{
"input": [
{
"location": { "id": 100245 },
"variant": { "id": 5001 },
"serial_number": { "label": "SN-001", "status": "active" },
"batch_number": { "id": 100010 }
}
]
}Input Data Types
SerialNumberInput
| Field | Type | Description |
|---|---|---|
id | ID | ID for updates. |
label | String | Serial number label. |
status | String | Status (e.g., active, sold, defective). |
variant | VariantInput | Linked product variant. |
location | LocationInput | Linked location. |
batch_number | BatchNumberInput | Linked batch number. |
SerialNumberAllocationInput
| Field | Type | Description |
|---|---|---|
location | LocationInput | Target location. |
variant | VariantInput | Product variant. |
serial_number | SerialNumberInput | Serial number data. |
batch_number | BatchNumberInput | Batch number data. |
serial_number_text | String | Raw serial number text (alternative to structured input). |
