Skip to main content
PATCH
Partially update existing orders
Update specific fields of existing orders. Only fields present in the request payload will be modified. Omitted fields retain their existing values. Use explicit null to clear optional field values. Note: The products and refunds fields currently cannot be patched. To modify products or refunds, re-submit the full order via POST. Array fields (order_tags, discount_codes) are replaced entirely when present - no per-item merging is performed. The entire batch fails if any order_id does not exist or any entry fails validation.

Headers

Body

Required array length: 1 - 2500 elementsPartial order update. Only order_id and customer_id are required.
FieldTypeDescriptionExample
order_id requiredstringThis must be a universal id that must be unique across all of your existing orders. It should exactly match the ID that you send using firePurchaseEvent if that is a part of your workflow. For documentation on firePurchaseEvent please review our Northbeam Pixel API. This must not be the customer ID.
Minimum string length: 1
”abc-123”
customer_id requiredstringThis must be a universal id that must be unique across all of your existing customers. The internal customer ID. This must not be the order ID. This should not be an email.
Minimum string length: 1
”def-456”
time_of_purchasestring (date-time)The time the order was placed by the customer. ISO-8601 timestamp.”2022-03-08T01:23:45-08:00”
customer_emailstring (email), nullableThe email associated with the customer. Cannot be provided if hashed_customer_email is present.”example@gmail.com”
hashed_customer_emailstring, nullablePre-hashed (SHA-256) email associated with the customer. Cannot be provided if customer_email is present.
Important: Email must be normalized before hashing. See the Hashing Customer Data guide for normalization rules and implementation examples.
”5d41402abc4b2a76b9719d911017c592ae5f7d09d5c8d0e9e3e5f4a8e5c5c5c5”
customer_phone_numberstring, nullableThe phone number associated with the customer. Cannot be provided if hashed_customer_phone_number is present.”1112223333”
hashed_customer_phone_numberstring, nullablePre-hashed (SHA-256) phone number associated with the customer. Cannot be provided if customer_phone_number is present.
Important: Phone number must be normalized to E.164 format before hashing. See the Hashing Customer Data guide for normalization rules and implementation examples.
”8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92”
customer_namestring, nullableThe name associated with the customer.”Jane Doe”
customer_ip_addressstring (ip), nullableThe IP address associated with the customer.”127.0.0.1”
discount_codesstring[], nullableA list of discount codes used in the order.
Items must be unique.
”Discount”
discount_amountnumber, nullableThe amount of money discounted due to discount codes in the currency of the order.
Required range: x <= 100000000000000
10
order_tagsstring[], nullableA list of internal tags describing the order.
Items must be unique.
”Special order”
taxnumber, nullableThe tax amount in the currency of the order.
Required range: x <= 100000000000000
1
is_recurring_orderboolean, nullableWhether or not this order is part of a recurring purchase.false
currencystring, nullableThe currency of the order. Note, all subsequent fields will assume that the currency is the one passed in this field. Please use standard ISO-4217 currency codes.
Minimum string length: 3
Pattern:
^AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYR|BZD|CAD|CDF|CHF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GGP|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|IMP|INR|IQD|IRR|ISK|JEP|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRO|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLL|SOS|SPL|SRD|STD|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TVD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VEF|VND|VUV|WST|XAF|XCD|XDR|XOF|XPF|YER|ZAR|ZMW|ZWD$
“USD”
purchase_totalnumber, nullableThe amount of money collected from the customer (including taxes, shipping, and other fees) in the currency of the order.
Required range: x <= 100000000000000
10000
customer_shipping_addressobject, nullable
Field
Type
Description
Example
address1
string
The street address of the customer’s shipping address.
Minimum string length: 1
”123 Main St.”
address2
string
An optional additional field for the street address.
”Apt. 1A”
city
string
The city or locality of the customer’s shipping address.
Minimum string length: 1
”Small town”
state
string
The state or region of the customer’s shipping address.
”CO”
zip required
string
The postal code (e.g. zip, postcode) of the customer’s shipping address.
”11111”
country_code required
string
The three-letter ISO 3166 country code of the customer’s shipping address.
Minimum string length: 1
Pattern:
^A(BW|FG|GO|IA|L[AB]|ND|R[EGM]|SM|T[AFG]|U[ST]|ZE)|B(DI|E[LNS]|FA|G[DR]|H[RS]|IH|L[MRZ]|MU|OL|R[ABN]|TN|VT|WA)|C(A[FN]|CK|H[ELN]|IV|MR|O[DGKLM]|PV|RI|U[BW]|XR|Y[MP]|ZE)|D(EU|JI|MA|NK|OM|ZA)|E(CU|GY|RI|S[HPT]|TH)|F(IN|JI|LK|R[AO]|SM)|G(AB|BR|EO|GY|HA|I[BN]|LP|MB|N[BQ]|R[CDL]|TM|U[FMY])|H(KG|MD|ND|RV|TI|UN)|I(DN|MN|ND|OT|R[LNQ]|S[LR]|TA)|J(AM|EY|OR|PN)|K(AZ|EN|GZ|HM|IR|NA|OR|WT)|L(AO|B[NRY]|CA|IE|KA|SO|TU|UX|VA)|M(A[CFR]|CO|D[AGV]|EX|HL|KD|L[IT]|MR|N[EGP]|OZ|RT|SR|TQ|US|WI|Y[ST])|N(AM|CL|ER|FK|GA|I[CU]|LD|OR|PL|RU|ZL)|OMN|P(A[KN]|CN|ER|HL|LW|NG|OL|R[IKTY]|SE|YF)|QAT|R(EU|OU|US|WA)|S(AU|DN|EN|G[PS]|HN|JM|L[BEV]|MR|OM|PM|RB|SD|TP|UR|V[KN]|W[EZ]|XM|Y[CR])|T(C[AD]|GO|HA|JK|K[LM]|LS|ON|TO|U[NRV]|WN|ZA)|U(GA|KR|MI|RY|SA|ZB)|V(AT|CT|EN|GB|IR|NM|UT)|W(LF|SM)|YEM|Z(AF|MB|WE)$
“USA”
shipping_costnumber, nullableThe amount that was paid for shipping for this order
Required range: x <= 100000000000000
10.99
alternate_order_idsobject[], nullableAlternate identifiers for this order
Field
Type
Description
Example
type required
string
Alias type identifier
Minimum string length: 1
”shopify_checkout_token”
id required
string
The alternate order ID value
Minimum string length: 1
”abc-xyz-123”

Responses

200 response body

FieldTypeDescriptionExample
messagestring”Orders received”

Authorizations

Authorization
string
header
required
Data-Client-ID
string
header
required

Body

application/json
Required array length: 1 - 2500 elements
order_id
string
required

This must be a universal id that must be unique across all of your existing orders. It should exactly match the ID that you send using firePurchaseEvent if that is a part of your workflow. For documentation on firePurchaseEvent please review our Northbeam Pixel API. This must not be the customer ID.

Minimum string length: 1
Example:

"abc-123"

customer_id
string
required

This must be a universal id that must be unique across all of your existing customers. The internal customer ID. This must not be the order ID. This should not be an email.

Minimum string length: 1
Example:

"def-456"

time_of_purchase
string<date-time>

The time the order was placed by the customer. ISO-8601 timestamp.

Example:

"2022-03-08T01:23:45-08:00"

customer_email
string<email> | null

The email associated with the customer. Cannot be provided if hashed_customer_email is present.

Example:

"example@gmail.com"

hashed_customer_email
string | null

Pre-hashed (SHA-256) email associated with the customer. Cannot be provided if customer_email is present.

Important: Email must be normalized before hashing. See the Hashing Customer Data guide for normalization rules and implementation examples.

Example:

"5d41402abc4b2a76b9719d911017c592ae5f7d09d5c8d0e9e3e5f4a8e5c5c5c5"

customer_phone_number
string | null

The phone number associated with the customer. Cannot be provided if hashed_customer_phone_number is present.

Example:

"1112223333"

hashed_customer_phone_number
string | null

Pre-hashed (SHA-256) phone number associated with the customer. Cannot be provided if customer_phone_number is present.

Important: Phone number must be normalized to E.164 format before hashing. See the Hashing Customer Data guide for normalization rules and implementation examples.

Example:

"8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92"

customer_name
string | null

The name associated with the customer.

Example:

"Jane Doe"

customer_ip_address
string<ip> | null

The IP address associated with the customer.

Example:

"127.0.0.1"

discount_codes
string[] | null

A list of discount codes used in the order.

Example:

"Discount"

discount_amount
number | null

The amount of money discounted due to discount codes in the currency of the order.

Required range: x <= 100000000000000
Example:

10

order_tags
string[] | null

A list of internal tags describing the order.

Example:

"Special order"

tax
number | null

The tax amount in the currency of the order.

Required range: x <= 100000000000000
Example:

1

is_recurring_order
boolean | null

Whether or not this order is part of a recurring purchase.

Example:

false

currency
string | null

The currency of the order. Note, all subsequent fields will assume that the currency is the one passed in this field. Please use standard ISO-4217 currency codes.

Minimum string length: 3
Pattern: ^AED|AFN|ALL|AMD|ANG|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BGN|BHD|BIF|BMD|BND|BOB|BRL|BSD|BTN|BWP|BYR|BZD|CAD|CDF|CHF|CLP|CNY|COP|CRC|CUC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GGP|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HRK|HTG|HUF|IDR|ILS|IMP|INR|IQD|IRR|ISK|JEP|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRO|MUR|MVR|MWK|MXN|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLL|SOS|SPL|SRD|STD|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TVD|TWD|TZS|UAH|UGX|USD|UYU|UZS|VEF|VND|VUV|WST|XAF|XCD|XDR|XOF|XPF|YER|ZAR|ZMW|ZWD$
Example:

"USD"

purchase_total
number | null

The amount of money collected from the customer (including taxes, shipping, and other fees) in the currency of the order.

Required range: x <= 100000000000000
Example:

10000

customer_shipping_address
object | null
shipping_cost
number | null

The amount that was paid for shipping for this order

Required range: x <= 100000000000000
Example:

10.99

alternate_order_ids
object[] | null

Alternate identifiers for this order

Response

Orders successfully queued for update

message
string
Example:

"Orders received"