Update Order

🔒

Requires write_order access scope. More access scope

The Update Order Details API allows users to update the details of an existing order. This includes fields like the order note, tags, buyer marketing preferences, and shipping address.

This API is especially useful for:

  1. Updating order details post-creation.
  2. Modifying customer shipping information.
  3. Ensuring marketing preferences align with customer consent.

Note: The operation is scoped to a specific shop, identified by its unique order ID, ensuring the correct order is updated.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Path Parameters

FieldTypeRequiredDescriptionExample
idstringYesUnique identifier for the order.1965351157616135991222

Body Parameters

FieldTypeDescriptionExample
notestringOrder's note.Updated order note
tagsstringOrder tags, separated by commas.tag1,tag2
buyer_accepts_marketingbooleanWhether the customer accepts marketing.true
shipping_address.first_namestringFirst name of consignee.John
shipping_address.last_namestringLast name of consignee.Doe
shipping_address.emailstringEmail of consignee.[email protected]
shipping_address.phonestringPhone number of consignee.+123456789
shipping_address.countrystringCountry name.United States
shipping_address.country_codestringISO country code.US
shipping_address.provincestringProvince or state name.California
shipping_address.province_codestringProvince code.CA
shipping_address.citystringCity name.Los Angeles
shipping_address.address1stringPrimary address line.123 Main St
shipping_address.address2stringSecondary address line.Apt 4B
shipping_address.zipstringZIP or postal code.90001
shipping_address.companystringCompany name (optional).ABC Corp
shipping_address.latitudestringLatitude of the delivery address.34.0522
shipping_address.longitudestringLongitude of the delivery address.-118.2437

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

📘

[The relationships between entities.]

ObjectFieldsTypeDesc
OrderidstringUnique identifier for the order.
numberstring Order number, intended to simplify merchant references.
notestringA custom note input by the merchant regarding the order.
statusstringThe current Order status
financial_statusstringIndicates the payment status of the order
fulfillment_statusstringRepresents the shipping or fulfillment progress of the order
email_statusstringThe status of recall emails for the order.
waiting means “pending to send”
send means “sent”
cancel_reasonstring Reason for order cancellation, if applicable.
recovery_statusstringThe recovery_status field tracks the progress of an order recall process
waiting means “Waiting to be recalled”
sending means “Recall notification in progress”
recalling means “Recall in progress)”
failed means “Recall failed)”
success means “Recall successful)”
payment_methodstringThe payment method used for the order (e.g., apple_pay, credit_card, online).
discount_codestring@Deprecated.
discount_applicationsstringDetails of discounts
customer_notestringA note provided by the customer during checkout.
landing_sitestring@Deprecated.
buyer_accepts_marketingbool Indicates whether the customer has agreed to receive marketing promotions.
currencystring Currency code for the order
total_pricestringThe final price paid by the customer, including taxes, discounts, tips, additional fee and shipping fees.
sub_totalstringThe sum of the prices for all line items in the order.

- If order.config.product_tax_included is true, the amount includes total_tax (excluding shipping_tax_total); otherwise, it excludes tax.
- Formula: sub_total = sum(line_item.price * line_item.quantity).
total_discountstringTotal amount of discounts applied to the order, including product, shipping, and payment discounts.
total_taxstringTotal tax amount applied to the products in the order, excluding shipping tax.
total_shippingstringTotal shipping fee for the order.
code_discount_totalstringTotal discount from discount codes applied to the order.
line_item_discount_totalstring@Deprecated.total Product discount, numeric string, for example: "9.99",includes code_discount_total
gift_card_totalstringGift card discount amount, numeric string, for example: "9.99"
total_refund_pricestringTotal refund amount has been successfully processed, numeric string, for example: "9.99"
total_refund_discountstring@Deprecated.Total discount refunded, numeric string, for example: "9.99"
additional_totalstringTotal amount of additional charges, numeric string, for example: "9.99"
addtional_pricesarray of objectthe detail list of additional charges
addtional_prices.namestringName of the additional charge.
addtional_prices.pricestringAmount of the additional charge.
total_refund_taxstring@Deprecated.
shipping_tax_totalstringTotal shipping tax amount of the order.
customer_deleted_atstringTimestamp indicating when the customer associated with the order was deleted.
created_atstringTimestamp indicating when the order was created.
updated_atstringTimestamp indicating when the order was updated.
deleted_atstringTimestamp indicating when the order was deleted.
canceled_atstringTimestamp indicating when the order was canceled.
placed_atstringTimestamp indicating when the order was paid.
total_tip_receivedstringTotal amount of tips received for the order.
tagsstring Custom tags added to the order by merchants or the system.
browser_ipstring@Deprecated. IP address of the customer who placed the order.
last_landing_urlstring@Deprecated. URL of the last page visited by the customer before checkout.
total_paidstringTotal amount paid by the customer for the order.
sourcestring@Deprecated.Product source url
source_nameobject@Deprecated. Product source
source_name.datastring@Deprecated. Product source
source_name.created_atstring@Deprecated. Timestamp of the creation
last_referrer_showobject@Deprecated. Last interaction source
last_referrer_show.datastring@Deprecated. Interaction source data.
last_referrer_show.created_atstring@Deprecated. Timestamp of the last interaction.
shipping_lineobjectInformation about the shipping plan selected for the order.
shipping_line.namestringName of the shipping plan.
customerCustomerCustomer details
shipping_addressAddressDelivery address
billing_addressAddressBilling address
payment_linePaymentLinePayment details
line_itemsarray of LineItemList of purchased products
fulfillmentsarray of FulfillmentList of fulfillments
logistics_codestringLogistics code
refer_infostringVisit information
configOrderConfigOrder configuration information
sales_platformstring@Deprecated. Platform where the order was placed
checkout_urlstringThe checkout page url for the order with storeDomain
location_lineLocationLineMerchant's warehouse address.
invoice_urlstringThe checkout page url for the order without storeDomain

Error Response

Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.

FieldTypeExampleDescription
errorsArray[ "file number error"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

ErrorCodeDescriptionPossible reasons
Record not found
422StatusUnprocessableEntity1.InvalidArgument
2.FailedPrecondition
3.AlreadyExists
500StatusInternalServerErrorAborted
499deadline is exceeded
authentication metadata is invalid or a Credentials callback fails

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!