shipmentCreate

The shipmentCreate mutation is used by the seller to dispatch line items on an order.

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

NameType
inputShipmentCreateMutationInput

Response

Returns ShipmentCreateMutationPayload


Error Responses

HTTP ErrorError MessageMeaning
401UnauthorizedYou don’t have access to the endpoint, likely Basic Authentication credentials are missing
401API Token has expiredYou 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
200Dispatched at is before shipped items were orderedThe value for dispatchedAt is earlier than when the order was created
200Variable $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
200Shipped items quantity exceeds the maximum number of undispatched items.You have attempted to ship more items that are available to ship on the invoice

Further Reading