Update order by ID

patch
/orders/{id}

Update an order by ID.

id
string
required

The ID of the order.

as-store-id
string
required

This value equals to store.id of Store Resource. You can obtain this id by making a GET /stores call to get existing stores or a POST /stores to create a new store.

note
string

A note that the shop owner can optionally attach to the order.

<= 5000 characters
Example:
created by AfterShip
source_updated_at
string

The date and time, formatted in ISO 8601, indicating when the order was updated in your e-commerce system.

Example:
2021-04-16T20:02:09Z
customer
Customer

Customer information of the order.

Example:
{"id":"5127837778090","first_name":"John","last_name":"Doe","emails":["john.doe@example.com"],"locale":"en-US","phones":["+13525554500"]}
id
string

A unique identifier for the customer of your store platform. It could be the customer ID of your system, or a URL friendly name or slug which is unique in your system.

<= 32 characters
Example:
5127837778090
first_name
string

The customer's first name.

<= 256 characters
Example:
John
last_name
string

The customer's last name.

<= 256 characters
Example:
Doe
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
Example:
en-US
shipping_address
Address

Shipping address of the order.

Example:
{"type":"business","street_1":"1234 Elm Street","street_2":"Apt 5","street_3":null,"city":"New York","state":"NY","postal_code":"10001","country_region":"USA","company":"My Company","first_name":"John","last_name":"Doe","email":"john.doe@example.com","phone":"+13525554500"}
type
string

The type of address.

Allowed values:
businessresidential
street_1
string
required

First line of the street address.

<= 256 characters
street_2
string or null

Second line of the street address.

<= 256 characters
street_3
string or null

Third line of the street address.

<= 256 characters
city
string

The location's city, town, or village.

<= 256 characters
state
string
required

The state or region of the location, such as a province, state, or prefecture.

<= 256 characters
postal_code
string

The postal code of the location (also known as zip code, postcode, Eircode, etc.).

<= 256 characters
country_region
string
required

The address country/region in ISO 3166-1 alpha-3 format. API will automatically convert input to uppercase.

Example:
USA
Match pattern:
^[A-Z]{3}$
company
string

The name of the company associated to the address.

<= 256 characters
first_name
string

The first name of the person associated to the address.

<= 256 characters
last_name
string

The last name of the person associated to the address.

<= 256 characters
email
string

The email address of the person associated to the address.

<= 256 characters
phone
string

The phone number of the person associated to the address.

<= 256 characters
billing_address
Address

Billing address of the order.

Example:
{"type":"business","street_1":"1234 Elm Street","street_2":"Apt 5","street_3":null,"city":"New York","state":"NY","postal_code":"10001","country_region":"USA","company":"My Company","first_name":"John","last_name":"Doe","email":"john.doe@example.com","phone":"+13525554500"}
type
string

The type of address.

Allowed values:
businessresidential
street_1
string
required

First line of the street address.

<= 256 characters
street_2
string or null

Second line of the street address.

<= 256 characters
street_3
string or null

Third line of the street address.

<= 256 characters
city
string

The location's city, town, or village.

<= 256 characters
state
string
required

The state or region of the location, such as a province, state, or prefecture.

<= 256 characters
postal_code
string

The postal code of the location (also known as zip code, postcode, Eircode, etc.).

<= 256 characters
country_region
string
required

The address country/region in ISO 3166-1 alpha-3 format. API will automatically convert input to uppercase.

Example:
USA
Match pattern:
^[A-Z]{3}$
company
string

The name of the company associated to the address.

<= 256 characters
first_name
string

The first name of the person associated to the address.

<= 256 characters
last_name
string

The last name of the person associated to the address.

<= 256 characters
email
string

The email address of the person associated to the address.

<= 256 characters
phone
string

The phone number of the person associated to the address.

<= 256 characters
tags
array[string]

Tags attached to the order.

<= 100 items
status
string

The status of this order.

Allowed values:
openclosedcanceled
financial_status
string or null

The status of payments associated with the order.

Allowed values:
unpaidpartially_paidpaidpartially_refundedrefunded
fulfillment_status
string or null

The status of fulfillment associated with the order.

Allowed values:
unfulfilledpartially_fulfilledfulfilled
status_timestamps
StatusTimestamps

This object tracks the timestamps for each status change.Show all...

opened_at
string<date-time> or null

Datetime when the status was set to open.

canceled_at
string<date-time> or null

Datetime when the status was set to canceld.

closed_at
string<date-time> or null

Datetime when the status was set to closed.

custom_fields
OrderCustomFields

Custom fields that accept an object with string field. In order to protect the privacy of your customers, do not include any personal data in custom fields.Show all...

currency
string

Specifies the currency for the order, adhering to the ISO 4217 Currency Codes standard

order_total
string

The total price of the order.

shipping_total
string

The total shipping fee applied to the price of the order.

tax_total
string

The sum of all the taxes applied to the order.

discount_total
string

The total discounts applied to the order. The value should be equal to the sum of all item discounts.

subtotal
string

The price of the order after discounts but before shipping and taxes.

Auth
:
Parameters
:
:
Body
preparing...