Skip to main content
PATCH
Spree Admin SDK

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Bearer token for admin authentication

Path Parameters

id
string
required

Order ID

Body

application/json
external_references
object

Identities the record has in external systems, keyed by system: the same { system: external_id } map the Admin API renders, so what you read can be sent straight back. Systems you do not name keep the reference they have. A list of { system, external_id } entries is accepted too.

email
string
Example:

"customer@example.com"

customer_id
string | null

Null detaches the customer, leaving a guest order under its email.

currency
enum<string>
Available options:
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BYR,
BZD,
CAD,
CDF,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EEK,
EGP,
ERN,
ETB,
EUR,
FJD,
FKP,
GBP,
GEL,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
INR,
IQD,
IRR,
ISK,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LTL,
LVL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MRU,
MTL,
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,
SKK,
SLE,
SLL,
SOS,
SRD,
SSP,
STD,
STN,
SVC,
SYP,
SZL,
THB,
TJS,
TMM,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
USD,
UYI,
UYU,
UYW,
UZS,
VED,
VEF,
VES,
VND,
VUV,
WST,
XAF,
XCD,
XCG,
XOF,
XPF,
YER,
ZAR,
ZMK,
ZMW,
ZWD,
ZWG,
ZWL,
ZWN,
ZWR
Example:

"USD"

market_id
string
channel_id
string

Defaults to the store primary channel when omitted.

locale
enum<string>
Available options:
aa,
ab,
ae,
af,
ak,
am,
an,
ar,
as,
av,
ay,
az,
ba,
be,
bg,
bh,
bi,
bm,
bn,
bo,
br,
bs,
ca,
ce,
ch,
co,
cr,
cs,
cu,
cv,
cy,
da,
de,
de-AT,
de-CH,
dv,
dz,
ee,
el,
en,
en-AU,
en-CA,
en-GB,
en-IN,
en-NZ,
en-US,
eo,
es,
es-419,
es-CL,
es-EC,
es-MX,
et,
eu,
fa,
ff,
fi,
fj,
fo,
fr,
fr-CA,
fy,
ga,
gd,
gl,
gn,
gu,
gv,
ha,
he,
hi,
ho,
hr,
ht,
hu,
hy,
hz,
ia,
id,
ie,
ig,
ii,
ik,
io,
is,
it,
iu,
ja,
jv,
ka,
kg,
ki,
kj,
kk,
kl,
km,
kn,
ko,
kr,
ks,
ku,
kv,
kw,
ky,
la,
lb,
lg,
li,
ln,
lo,
lt,
lu,
lv,
mg,
mh,
mi,
mk,
ml,
mn,
mr,
ms,
mt,
my,
na,
nb,
nd,
ne,
ng,
nl,
nn,
no,
nr,
nv,
ny,
oc,
oj,
om,
or,
os,
pa,
pi,
pl,
ps,
pt,
pt-BR,
pt-PT,
qu,
rm,
rn,
ro,
ru,
rw,
sa,
sc,
sd,
se,
sg,
si,
sk,
sl,
sl-SI,
sm,
sn,
so,
sq,
sr,
ss,
st,
su,
sv,
sw,
ta,
te,
tg,
th,
ti,
tk,
tl,
tn,
to,
tr,
ts,
tt,
tw,
ty,
ug,
uk,
ur,
uz,
ve,
vi,
vo,
wa,
wo,
xh,
yi,
yo,
za,
zh-CN,
zh-HK,
zh-TW,
zu
Example:

"en-US"

customer_note
string

Public, customer-visible note.

internal_note
string

Staff-only note. Rich text HTML; reads come back as this plus internal_note_html.

po_number
string

The buyer's own purchase-order reference. Searchable alongside the order number, and rendered on every order-facing document.

po_document_signed_id
string | null

The signed_id of the buyer's purchase order, from files.upload() with visibility: 'private'. Null removes the document the order carries.

preferred_stock_location_id
string

Stock location to prefer for fulfillment. Order Routing's built-in preferred-location rule ranks it first; routing falls back to the next rule when the location can't cover the cart.

company_id
string | null

Makes the order a company purchase, with that company's catalog prices and tax treatment. Null makes a draft a plain customer order again.

metadata
object
tags
string[]
shipping_address
object
billing_address
object
use_shipping
boolean

When true, copies the shipping address to the billing address.

items
object[]

Line items to upsert, keyed by variant. An entry sets that variant's quantity, creating the line item when the order has none; quantity: 0 removes it. Variants you do not send are left alone.

Response

200 - application/json

order updated