Update an order

patch
/orders/{id}

Update an order by ID

id
string
required

Order ID

as-store-id
string

The identifier of your store. You need to generate it yourself. Note that this value must consist of numbers and letters (A-Z, a-z, 0-9), and special characters can only be hyphens (-) or underscores (_). For example, if you have a store called "soft life", you can fill in soft-life or soft_life for the value.

note
string

An optional note that a shop owner can attach to the order.

<= 5000 characters
source_updated_at
string

The date and time when the product was last modified. ISO 8601.

customer
Customer
Example:
{"source_id":"5127837778090","first_name":"teddy","last_name":"chan","emails":["[email protected]"],"locale":"en-US","phones":["+8613265883816"]}
source_id
string

A unique identifier for the customer.

<= 32 characters
first_name
string

The customer's first name.

<= 256 characters
last_name
string

The customer's last name.

<= 256 characters
emails
array[string]

The customer's email.

<= 100 items
phones
array[string]

The customer's phone number.

<= 100 items
locale
string

The language code of the customer, eg: en-US.

<= 128 characters
shipping_address
Address
Example:
{"source_id":"1","description":"My Home Address","company":"aftership","first_name":"teddy","last_name":"chan","email":"[email protected]","address_line_1":"address2","address_line_2":"1233","address_line_3":null,"city":"HongKong","state":"HKG","country_region":"HKG","postal_code":"12323","phone":"+8613265883816","type":null,"tax_number":null}
description
string

The name or description of this address.

<= 256 characters
company
string

The company of the person associated with this address.

<= 256 characters
first_name
string

The customer’s first name.

<= 256 characters
last_name
string

The customer’s last name.

<= 256 characters
email
string

The unique email address of the customer.

<= 256 characters
address_line_1
string

The customer's mailing address.

<= 256 characters
address_line_2
string

An additional field for the customer's mailing address.

<= 256 characters
address_line_3
string

An additional field for the customer's mailing address.

<= 256 characters
city
string

The customer’s city, town, or village.

<= 256 characters
state
string

The customer’s region name. Typically a province, a state, or a prefecture.

<= 256 characters
country_region
string

The customer's country.

<= 3 characters
postal_code
string

The customer’s postal code, also known as zip, postcode, Eircode, etc.

<= 256 characters
phone
string

The customer’s phone number at this address.

<= 256 characters
type
string

The type of address (Eg: My home address, My office address).

Allowed values:
businessresidential
tax_number
string

Tax number for the address.

<= 256 characters
source_id
string

A unique identifier for the address.

<= 32 characters
billing_address
Address
Example:
{"source_id":"1","description":"My Home Address","company":"aftership","first_name":"teddy","last_name":"chan","email":"[email protected]","address_line_1":"address2","address_line_2":"1233","address_line_3":null,"city":"HongKong","state":"HKG","country_region":"HKG","postal_code":"12323","phone":"+8613265883816","type":null,"tax_number":null}
tags
array[string]

Tags attached to the order.

<= 100 items
shipments
array[Shipment]

Order Shipments.
When using this API to update shipments, the shipments field will be treated as an override update. This means that when sending an update request, you need to provide the complete shipments data, not just the fields you want to change.
If you only provide partial shipments data, the missing parts will be considered cleared or deleted.

<= 100 items
tracking_number
string

Tracking number.

<= 256 characters
Example:
2591043243
slug
string

Unique code of the courier. Get couriers here: https://www.aftership.com/couriers.

<= 256 characters
Example:
dhl
additional_fields
object
items
array[object]

A list of line item objects, each containing information about an item in the shipment.

<= 100 items
source_id
string
required

The ID of shipment.

<= 32 characters
Example:
12
source_created_at
string

The date and time (ISO 8601 format) when shipment was created.

Example:
2021-04-15T20:02:09Z
source_delivered_at
string

The date and time (ISO 8601 format) when shipment was delivered.

Example:
2021-04-20T12:05:04Z
service_type
string

The type of logistics service selected for this shipment, e.g. FedEx, SmartPost.

Example:
FedEx
ship_from_address
Address
Example:
{"source_id":"1","description":"My Home Address","company":"aftership","first_name":"teddy","last_name":"chan","email":"[email protected]","address_line_1":"address2","address_line_2":"1233","address_line_3":null,"city":"HongKong","state":"HKG","country_region":"HKG","postal_code":"12323","phone":"+8613265883816","type":null,"tax_number":null}
custom_fields
object

Custom fields that accept an object with string field.Show all...

status
string

The status of this order.

Allowed values:
openclosedcanceled
financial_status
string

The status of payments associated with the order.

Allowed values:
unpaidpartially_paidpaidpartially_refundedrefunded
fulfillment_status
string

The status of fulfillment associated with the order.

Allowed values:
unfulfilledpartially_fulfilledfulfilled
Auth
:
Parameters
:
:
Body
preparing...