Skip to main content

changeOrderCourier

Requires permission sales:sales_order:ship.

Change the courier on an order before it is invoiced. The server re-rates the order and takes the chosen service's price itself; the client never sends an amount.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation ChangeOrderCourier($input: ChangeOrderCourierInput!) {
changeOrderCourier(input: $input) {
id
customerPoNumber
orderNumber
sourceQuoteNumber
trackingNumber
creatorName
billingAddress {
postalCode
city
country
state
street1
street2
}
}
}

Variables:

{
"input": {
"carrierName": "string",
"deliveryPartnerConfigId": "id",
"policy": "KEEP_CUSTOMER_PRICE",
"salesOrderId": "id",
"serviceLevelCode": "string"
}
}

Response:

{
"data": {
"changeOrderCourier": {
"id": "id",
"customerPoNumber": "string",
"orderNumber": "string",
"sourceQuoteNumber": "string",
"trackingNumber": "string",
"creatorName": "string",
"billingAddress": {
"postalCode": "string",
"city": "string",
"country": "string",
"state": "string",
"street1": "string",
"street2": "string"
}
}
}
}
changeOrderCourier(
input: ChangeOrderCourierInput!
): SalesOrder!

Arguments​

changeOrderCourier.input ● ChangeOrderCourierInput! non-null input​

The order and the courier service to use.

Type​

SalesOrder object​

A confirmed demand from a customer to ship goods, usually converted from a quote. Moves through confirmation, shipment, invoicing and payment.