shipmentCreate
The shipmentCreate mutation is used by the seller to dispatch line items on an order.
2 minute read
Key Information
Use-Case
Following the receipt of an order that requires shipment this mutation is used to facilitate that. Multi-line or multi-quantity orders can be split-shipped.
Further Points of Note
N/a
Availability
- Operator API: Yes
- Seller API: Yes
Example
mutation dispatchLineItems {
shipmentCreate(
input: {
invoiceId: "SW52b2ljZS0xMzczNw=="
dispatchedAt: "2024-03-27T00:08:29.581Z"
note: "Leave at front door"
postageCarrierId: "U2hpcG1lbnRDYXJyaWVyLTY4"
trackingNumber: "85b2693f-44c2-4248-b631-eb191dfe287d"
shippedItems: [{ lineItemId: "TGluZUl0ZW0tNDA5Nw==", quantity: 2 }]
}
) {
errors {
field
messages
}
shipment {
id
}
}
}
Arguments
Name | Type |
---|---|
input | ShipmentCreateMutationInput |
Response
Returns ShipmentCreateMutationPayload
Error Responses
HTTP Error | Error Message | Meaning |
---|---|---|
401 | Unauthorized | You don’t have access to the endpoint, likely Basic Authentication credentials are missing |
401 | API Token has expired | You don’t have access to the endpoint, likely that you are either not supplying an API Key, or the key you are supplying is invalid |
200 | Dispatched at is before shipped items were ordered | The value for dispatchedAt is earlier than when the order was created |
200 | Variable $input of type ShipmentCreateMutationInput! was provided invalid value for dispatchedAt (Could not coerce value "2024-06-21T00" to ISO8601Date) | The date format you have provided is invalid |
200 | Shipped items quantity exceeds the maximum number of undispatched items. | You have attempted to ship more items that are available to ship on the invoice |