Skip to main content

updateSalesOrder

Requires permission sales:sales_order:update.

Update an order. Header fields stay editable until the order is cancelled or returned. Lines, shipping and discount can be amended while the order is unpaid and not yet shipped or invoiced. Currency, rate and tax method are fixed once the order leaves DRAFT.

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 UpdateSalesOrder($id: ID!, $input: UpdateSalesOrderInput!) {
updateSalesOrder(id: $id, input: $input) {
id
customerPoNumber
orderNumber
sourceQuoteNumber
trackingNumber
creatorName
billingAddress {
postalCode
city
country
state
street1
street2
}
}
}

Variables:

{
"id": "id",
"input": {}
}

Response:

{
"data": {
"updateSalesOrder": {
"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"
}
}
}
}
updateSalesOrder(
id: ID!
input: UpdateSalesOrderInput!
): SalesOrder!

Arguments​

updateSalesOrder.id ● ID! non-null scalar​

The ID of the sales order.

updateSalesOrder.input ● UpdateSalesOrderInput! non-null input​

The order changes.

Type​

SalesOrder object​

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