Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Extracted Store SDK examples from integration tests to actual TypeScr… (#14023)

Damian Legawiec82f37cb4348a
diff --git a/docs/api-reference/admin-api/authentication.mdx b/docs/api-reference/admin-api/authentication.mdx
index c733200257..6978811563 100644
--- a/docs/api-reference/admin-api/authentication.mdx
+++ b/docs/api-reference/admin-api/authentication.mdx
@@ -70,8 +70,10 @@ const { token, user } = await client.auth.login({
password: 'secret123',
})
-// Use the token for authenticated requests
-const orders = await client.orders.list({}, { bearerToken: token })
+// Reuse the JWT for subsequent requests. setToken is sticky — every
+// later call on `client` carries the bearer header automatically.
+client.setToken(token)
+const orders = await client.orders.list()
```
```bash cURL
diff --git a/docs/api-reference/admin.yaml b/docs/api-reference/admin.yaml
index e74aa45f20..4deb8a02c2 100644
--- a/docs/api-reference/admin.yaml
+++ b/docs/api-reference/admin.yaml
@@ -82,11 +82,11 @@ paths:
example:
data:
- id: admin_UkLWZg9DAJ
- first_name: Lulu
- last_name: Barrows
- created_at: '2026-05-12T13:52:20.745Z'
- updated_at: '2026-05-12T13:52:20.745Z'
+ first_name: Daphne
+ last_name: Christiansen
+ created_at: '2026-05-12T15:41:05.425Z'
+ updated_at: '2026-05-12T15:41:05.425Z'
roles:
- id: role_UkLWZg9DAJ
name: admin
@@ -144,11 +144,11 @@ paths:
application/json:
example:
id: admin_UkLWZg9DAJ
- first_name: Gwen
- last_name: Cronin
- created_at: '2026-05-12T13:52:21.120Z'
- updated_at: '2026-05-12T13:52:21.120Z'
+ first_name: Aleisha
+ last_name: Greenholt
+ created_at: '2026-05-12T15:41:05.808Z'
+ updated_at: '2026-05-12T15:41:05.808Z'
roles:
- id: role_UkLWZg9DAJ
name: admin
@@ -201,11 +201,11 @@ paths:
application/json:
example:
id: admin_UkLWZg9DAJ
first_name: Renamed
- last_name: Hettinger
- created_at: '2026-05-12T13:52:21.405Z'
- updated_at: '2026-05-12T13:52:21.421Z'
+ last_name: Kiehn
+ created_at: '2026-05-12T15:41:06.102Z'
+ updated_at: '2026-05-12T15:41:06.121Z'
roles:
- id: role_UkLWZg9DAJ
name: admin
@@ -314,32 +314,32 @@ paths:
key_type: publishable
token_prefix:
scopes: []
- created_at: '2026-05-12T13:52:21.721Z'
- updated_at: '2026-05-12T13:52:21.721Z'
+ created_at: '2026-05-12T15:41:06.440Z'
+ updated_at: '2026-05-12T15:41:06.440Z'
revoked_at:
last_used_at:
- plaintext_token: pk_MsEw4niGffKQWWXZqMwhs5WE
+ plaintext_token: pk_jKVzZwbvkzchauqmbJmd2CMG
created_by_email:
- id: key_gbHJdmfrXB
name: Backend integration
key_type: secret
- token_prefix: sk_qw4d7jxhy
+ token_prefix: sk_StMUYSTST
scopes:
- write_all
- created_at: '2026-05-12T13:52:21.724Z'
- updated_at: '2026-05-12T13:52:21.724Z'
+ created_at: '2026-05-12T15:41:06.443Z'
+ updated_at: '2026-05-12T15:41:06.443Z'
revoked_at:
last_used_at:
plaintext_token:
created_by_email:
- id: key_EfhxLZ9ck8
- name: nihil
+ name: a
key_type: secret
- token_prefix: sk_5onu8GphS
+ token_prefix: sk_GA9X4e3RP
scopes:
- write_all
- created_at: '2026-05-12T13:52:21.725Z'
- updated_at: '2026-05-12T13:52:21.725Z'
+ created_at: '2026-05-12T15:41:06.445Z'
+ updated_at: '2026-05-12T15:41:06.445Z'
revoked_at:
last_used_at:
plaintext_token:
@@ -402,15 +402,15 @@ paths:
id: key_VqXmZF31wY
name: CI key
key_type: secret
- token_prefix: sk_pbB3mHVDa
+ token_prefix: sk_BRJoZksgA
scopes:
- read_orders
- created_at: '2026-05-12T13:52:22.318Z'
- updated_at: '2026-05-12T13:52:22.318Z'
+ created_at: '2026-05-12T15:41:07.048Z'
+ updated_at: '2026-05-12T15:41:07.048Z'
revoked_at:
last_used_at:
- plaintext_token: sk_pbB3mHVDaFZHB1yThP7eCsbF
- created_by_email: [email protected]
+ plaintext_token: sk_BRJoZksgADgQ8NyzU34wu2Hp
+ created_by_email: [email protected]
'422':
description: validation error
content:
@@ -496,11 +496,11 @@ paths:
key_type: publishable
token_prefix:
scopes: []
- created_at: '2026-05-12T13:52:22.629Z'
- updated_at: '2026-05-12T13:52:22.629Z'
+ created_at: '2026-05-12T15:41:07.358Z'
+ updated_at: '2026-05-12T15:41:07.358Z'
revoked_at:
last_used_at:
- plaintext_token: pk_oVSDZkT6qSMJ6DpPzrdnbbNs
+ plaintext_token: pk_y6gNHkYF8JSjRtiewZmu38qZ
created_by_email:
delete:
summary: Delete an API key
@@ -590,12 +590,12 @@ paths:
id: key_gbHJdmfrXB
name: Backend integration
key_type: secret
- token_prefix: sk_7SKcTvp8w
+ token_prefix: sk_QzQZugAG5
scopes:
- write_all
- created_at: '2026-05-12T13:52:23.206Z'
- updated_at: '2026-05-12T13:52:23.487Z'
- revoked_at: '2026-05-12T13:52:23.486Z'
+ created_at: '2026-05-12T15:41:07.927Z'
+ updated_at: '2026-05-12T15:41:08.206Z'
+ revoked_at: '2026-05-12T15:41:08.205Z'
last_used_at:
plaintext_token:
created_by_email:
@@ -650,15 +650,15 @@ paths:
- id: coupon_UkLWZg9DAJ
code: AAA111
state: unused
- created_at: '2026-05-12T13:52:23.503Z'
- updated_at: '2026-05-12T13:52:23.503Z'
+ created_at: '2026-05-12T15:41:08.223Z'
+ updated_at: '2026-05-12T15:41:08.223Z'
promotion_id: promo_UkLWZg9DAJ
order_id:
- id: coupon_gbHJdmfrXB
code: BBB222
state: unused
- created_at: '2026-05-12T13:52:23.504Z'
- updated_at: '2026-05-12T13:52:23.504Z'
+ created_at: '2026-05-12T15:41:08.224Z'
+ updated_at: '2026-05-12T15:41:08.224Z'
promotion_id: promo_UkLWZg9DAJ
order_id:
meta:
@@ -736,8 +736,8 @@ paths:
field_type: short_text
resource_type: Spree::Product
storefront_visible: true
- created_at: '2026-05-12T13:52:23.795Z'
- updated_at: '2026-05-12T13:52:23.795Z'
+ created_at: '2026-05-12T15:41:08.522Z'
+ updated_at: '2026-05-12T15:41:08.522Z'
- id: cfdef_gbHJdmfrXB
namespace: custom
key: order_notes
@@ -745,8 +745,8 @@ paths:
field_type: short_text
resource_type: Spree::Order
storefront_visible: true
- created_at: '2026-05-12T13:52:23.796Z'
- updated_at: '2026-05-12T13:52:23.796Z'
+ created_at: '2026-05-12T15:41:08.523Z'
+ updated_at: '2026-05-12T15:41:08.523Z'
meta:
page: 1
limit: 25
@@ -809,8 +809,8 @@ paths:
field_type: short_text
resource_type: Spree::Product
storefront_visible: true
- created_at: '2026-05-12T13:52:24.351Z'
- updated_at: '2026-05-12T13:52:24.351Z'
+ created_at: '2026-05-12T15:41:09.089Z'
+ updated_at: '2026-05-12T15:41:09.089Z'
requestBody:
content:
application/json:
@@ -893,8 +893,8 @@ paths:
field_type: short_text
resource_type: Spree::Product
storefront_visible: true
- created_at: '2026-05-12T13:52:24.354Z'
- updated_at: '2026-05-12T13:52:24.354Z'
+ created_at: '2026-05-12T15:41:09.092Z'
+ updated_at: '2026-05-12T15:41:09.092Z'
patch:
summary: Update a custom field definition
tags:
@@ -933,8 +933,8 @@ paths:
field_type: short_text
resource_type: Spree::Product
storefront_visible: false
- created_at: '2026-05-12T13:52:24.630Z'
- updated_at: '2026-05-12T13:52:24.908Z'
+ created_at: '2026-05-12T15:41:09.370Z'
+ updated_at: '2026-05-12T15:41:09.673Z'
requestBody:
content:
application/json:
@@ -1056,8 +1056,8 @@ paths:
state_name: New York
label:
metadata: {}
- created_at: '2026-05-12T13:52:25.472Z'
- updated_at: '2026-05-12T13:52:25.472Z'
+ created_at: '2026-05-12T15:41:10.269Z'
+ updated_at: '2026-05-12T15:41:10.269Z'
customer_id: cus_UkLWZg9DAJ
meta:
page: 1
@@ -1145,8 +1145,8 @@ paths:
state_name: New York
label: Office
metadata: {}
- created_at: '2026-05-12T13:52:26.816Z'
- updated_at: '2026-05-12T13:52:26.816Z'
+ created_at: '2026-05-12T15:41:11.677Z'
+ updated_at: '2026-05-12T15:41:11.677Z'
customer_id: cus_UkLWZg9DAJ
requestBody:
content:
@@ -1257,8 +1257,8 @@ paths:
state_name: New York
label:
metadata: {}
- created_at: '2026-05-12T13:52:27.086Z'
- updated_at: '2026-05-12T13:52:27.631Z'
+ created_at: '2026-05-12T15:41:11.949Z'
+ updated_at: '2026-05-12T15:41:12.493Z'
customer_id: cus_UkLWZg9DAJ
requestBody:
content:
@@ -1391,8 +1391,8 @@ paths:
customer_id: cus_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
metadata: {}
- created_at: '2026-05-12T13:52:28.723Z'
- updated_at: '2026-05-12T13:52:28.723Z'
+ created_at: '2026-05-12T15:41:13.610Z'
+ updated_at: '2026-05-12T15:41:13.610Z'
meta:
page: 1
limit: 25
@@ -1479,8 +1479,8 @@ paths:
customer_id: cus_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
metadata: {}
- created_at: '2026-05-12T13:52:29.271Z'
- updated_at: '2026-05-12T13:52:29.271Z'
+ created_at: '2026-05-12T15:41:14.166Z'
+ updated_at: '2026-05-12T15:41:14.166Z'
delete:
summary: Delete a customer credit card
tags:
@@ -1599,8 +1599,8 @@ paths:
currency: USD
memo:
metadata: {}
- created_at: '2026-05-12T13:52:30.629Z'
- updated_at: '2026-05-12T13:52:30.629Z'
+ created_at: '2026-05-12T15:41:15.590Z'
+ updated_at: '2026-05-12T15:41:15.590Z'
customer_id: cus_UkLWZg9DAJ
created_by_id: admin_UkLWZg9DAJ
category_id: sccat_UkLWZg9DAJ
@@ -1675,8 +1675,8 @@ paths:
currency: USD
memo: Goodwill
metadata: {}
- created_at: '2026-05-12T13:52:31.749Z'
- updated_at: '2026-05-12T13:52:31.749Z'
+ created_at: '2026-05-12T15:41:16.692Z'
+ updated_at: '2026-05-12T15:41:16.692Z'
customer_id: cus_UkLWZg9DAJ
created_by_id: admin_gbHJdmfrXB
category_id: sccat_UkLWZg9DAJ
@@ -1767,8 +1767,8 @@ paths:
currency: USD
memo: Updated
metadata: {}
- created_at: '2026-05-12T13:52:32.281Z'
- updated_at: '2026-05-12T13:52:32.557Z'
+ created_at: '2026-05-12T15:41:17.225Z'
+ updated_at: '2026-05-12T15:41:17.502Z'
customer_id: cus_UkLWZg9DAJ
created_by_id: admin_UkLWZg9DAJ
category_id: sccat_UkLWZg9DAJ
@@ -1922,8 +1922,8 @@ paths:
metadata: {}
last_sign_in_at:
current_sign_in_at:
- created_at: '2026-05-12T13:52:33.836Z'
- updated_at: '2026-05-12T13:52:33.836Z'
+ created_at: '2026-05-12T15:41:18.571Z'
+ updated_at: '2026-05-12T15:41:18.571Z'
sign_in_count: 0
failed_attempts: 0
last_sign_in_ip:
@@ -2006,8 +2006,8 @@ paths:
metadata: {}
last_sign_in_at:
current_sign_in_at:
- created_at: '2026-05-12T13:52:34.706Z'
- updated_at: '2026-05-12T13:52:34.706Z'
+ created_at: '2026-05-12T15:41:19.407Z'
+ updated_at: '2026-05-12T15:41:19.407Z'
sign_in_count: 0
failed_attempts: 0
last_sign_in_ip:
@@ -2123,8 +2123,8 @@ paths:
metadata: {}
last_sign_in_at:
current_sign_in_at:
- created_at: '2026-05-12T13:52:34.985Z'
- updated_at: '2026-05-12T13:52:34.985Z'
+ created_at: '2026-05-12T15:41:19.681Z'
+ updated_at: '2026-05-12T15:41:19.681Z'
sign_in_count: 0
failed_attempts: 0
last_sign_in_ip:
@@ -2198,8 +2198,8 @@ paths:
metadata: {}
last_sign_in_at:
current_sign_in_at:
- created_at: '2026-05-12T13:52:35.524Z'
- updated_at: '2026-05-12T13:52:35.811Z'
+ created_at: '2026-05-12T15:41:20.333Z'
+ updated_at: '2026-05-12T15:41:20.634Z'
sign_in_count: 0
failed_attempts: 0
last_sign_in_ip:
@@ -2321,11 +2321,11 @@ paths:
example:
data:
- id: exp_UkLWZg9DAJ
- number: EF490857990
+ number: EF315034692
type: Spree::Exports::Products
format: csv
- created_at: '2026-05-12T13:52:36.786Z'
- updated_at: '2026-05-12T13:52:36.786Z'
+ created_at: '2026-05-12T15:41:21.502Z'
+ updated_at: '2026-05-12T15:41:21.502Z'
user_id: admin_UkLWZg9DAJ
done: false
filename:
@@ -2392,11 +2392,11 @@ paths:
application/json:
example:
id: exp_gbHJdmfrXB
- number: EF670540679
+ number: EF324584741
type: Spree::Exports::Products
format: csv
- created_at: '2026-05-12T13:52:37.137Z'
- updated_at: '2026-05-12T13:52:37.137Z'
+ created_at: '2026-05-12T15:41:21.806Z'
+ updated_at: '2026-05-12T15:41:21.806Z'
user_id: admin_UkLWZg9DAJ
done: false
filename:
@@ -2483,11 +2483,11 @@ paths:
application/json:
example:
id: exp_UkLWZg9DAJ
- number: EF081938224
+ number: EF509004231
type: Spree::Exports::Products
format: csv
- created_at: '2026-05-12T13:52:37.456Z'
- updated_at: '2026-05-12T13:52:37.456Z'
+ created_at: '2026-05-12T15:41:22.079Z'
+ updated_at: '2026-05-12T15:41:22.079Z'
user_id: admin_UkLWZg9DAJ
done: false
filename:
@@ -2638,15 +2638,15 @@ paths:
example:
data:
- id: inv_UkLWZg9DAJ
status: pending
- created_at: '2026-05-12T13:52:38.323Z'
- updated_at: '2026-05-12T13:52:38.323Z'
- expires_at: '2026-05-26T13:52:38.320Z'
+ created_at: '2026-05-12T15:41:22.943Z'
+ updated_at: '2026-05-12T15:41:22.943Z'
+ expires_at: '2026-05-26T15:41:22.940Z'
role_id: role_UkLWZg9DAJ
role_name: admin
- inviter_email: [email protected]
- acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=BEKdzA4XX8ArfFNpekJPb93e"
+ inviter_email: [email protected]
+ acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=mkssPJxRfyR9p2cMBPayqGvh"
meta:
page: 1
limit: 25
@@ -2703,13 +2703,13 @@ paths:
id: inv_gbHJdmfrXB
status: pending
- created_at: '2026-05-12T13:52:38.644Z'
- updated_at: '2026-05-12T13:52:38.644Z'
- expires_at: '2026-05-26T13:52:38.641Z'
+ created_at: '2026-05-12T15:41:23.270Z'
+ updated_at: '2026-05-12T15:41:23.270Z'
+ expires_at: '2026-05-26T15:41:23.268Z'
role_id: role_UkLWZg9DAJ
role_name: admin
- inviter_email: [email protected]
- acceptance_url: "/accept-invitation/inv_gbHJdmfrXB?token=4Sc9HqfZgPB9npnRtjzVBUKB"
+ inviter_email: [email protected]
+ acceptance_url: "/accept-invitation/inv_gbHJdmfrXB?token=UK2kCcL4H9jyeZqpi1V5MgVV"
requestBody:
content:
application/json:
@@ -2812,15 +2812,15 @@ paths:
application/json:
example:
id: inv_UkLWZg9DAJ
status: pending
- created_at: '2026-05-12T13:52:39.200Z'
- updated_at: '2026-05-12T13:52:39.200Z'
- expires_at: '2026-05-26T13:52:39.198Z'
+ created_at: '2026-05-12T15:41:23.833Z'
+ updated_at: '2026-05-12T15:41:23.833Z'
+ expires_at: '2026-05-26T15:41:23.831Z'
role_id: role_UkLWZg9DAJ
role_name: admin
- inviter_email: [email protected]
- acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=Xo4eyJtBEXxZLodS9RjcgEMC"
+ inviter_email: [email protected]
+ acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=MffdKHE7w3FgQegh6P3LkGZx"
"/api/v3/admin/me":
get:
summary: Get current admin user and permissions
@@ -2866,11 +2866,11 @@ paths:
example:
user:
id: admin_UkLWZg9DAJ
- first_name: Albertha
- last_name: Legros
- created_at: '2026-05-12T13:52:39.480Z'
- updated_at: '2026-05-12T13:52:39.480Z'
+ first_name: Bryanna
+ last_name: Rau
+ created_at: '2026-05-12T15:41:24.119Z'
+ updated_at: '2026-05-12T15:41:24.119Z'
roles:
- id: role_UkLWZg9DAJ
name: admin
@@ -3019,8 +3019,8 @@ paths:
position: 1
kind: dropdown
metadata: {}
- created_at: '2026-05-12T13:52:39.522Z'
- updated_at: '2026-05-12T13:52:39.522Z'
+ created_at: '2026-05-12T15:41:24.161Z'
+ updated_at: '2026-05-12T15:41:24.161Z'
option_values: []
meta:
page: 1
@@ -3111,8 +3111,8 @@ paths:
position: 2
kind: dropdown
metadata: {}
- created_at: '2026-05-12T13:52:40.097Z'
- updated_at: '2026-05-12T13:52:40.097Z'
+ created_at: '2026-05-12T15:41:24.749Z'
+ updated_at: '2026-05-12T15:41:24.749Z'
option_values: []
schema:
"$ref": "#/components/schemas/OptionType"
@@ -3233,8 +3233,8 @@ paths:
position: 1
kind: dropdown
metadata: {}
- created_at: '2026-05-12T13:52:40.384Z'
- updated_at: '2026-05-12T13:52:40.384Z'
+ created_at: '2026-05-12T15:41:25.035Z'
+ updated_at: '2026-05-12T15:41:25.035Z'
option_values: []
schema:
"$ref": "#/components/schemas/OptionType"
@@ -3306,8 +3306,8 @@ paths:
position: 1
kind: dropdown
metadata: {}
- created_at: '2026-05-12T13:52:40.943Z'
- updated_at: '2026-05-12T13:52:41.222Z'
+ created_at: '2026-05-12T15:41:25.596Z'
+ updated_at: '2026-05-12T15:41:25.875Z'
option_values: []
schema:
"$ref": "#/components/schemas/OptionType"
@@ -3467,7 +3467,7 @@ paths:
example:
data:
- id: ful_UkLWZg9DAJ
- number: H09289059947
+ number: H51342253225
tracking: U10000
tracking_url:
cost: '10.0'
@@ -3492,8 +3492,8 @@ paths:
metadata: {}
adjustment_total: '0.0'
pre_tax_amount: '0.0'
- created_at: '2026-05-12T13:52:42.185Z'
- updated_at: '2026-05-12T13:52:42.284Z'
+ created_at: '2026-05-12T15:41:26.846Z'
+ updated_at: '2026-05-12T15:41:26.940Z'
order_id: or_UkLWZg9DAJ
stock_location_id: sloc_UkLWZg9DAJ
meta:
@@ -3576,7 +3576,7 @@ paths:
application/json:
example:
id: ful_UkLWZg9DAJ
- number: H83635081160
+ number: H13748328641
tracking: U10000
tracking_url:
cost: '10.0'
@@ -3601,8 +3601,8 @@ paths:
metadata: {}
adjustment_total: '0.0'
pre_tax_amount: '0.0'
- created_at: '2026-05-12T13:52:42.905Z'
- updated_at: '2026-05-12T13:52:42.964Z'
+ created_at: '2026-05-12T15:41:27.567Z'
+ updated_at: '2026-05-12T15:41:27.621Z'
order_id: or_UkLWZg9DAJ
stock_location_id: sloc_UkLWZg9DAJ
patch:
@@ -3661,7 +3661,7 @@ paths:
application/json:
example:
id: ful_UkLWZg9DAJ
- number: H88161575537
+ number: H13201336954
tracking: 1Z999AA10123456784
tracking_url: https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=1Z999AA10123456784
cost: '10.0'
@@ -3686,8 +3686,8 @@ paths:
metadata: {}
adjustment_total: '0.0'
pre_tax_amount: '0.0'
- created_at: '2026-05-12T13:52:43.682Z'
- updated_at: '2026-05-12T13:52:44.248Z'
+ created_at: '2026-05-12T15:41:28.283Z'
+ updated_at: '2026-05-12T15:41:28.658Z'
order_id: or_UkLWZg9DAJ
stock_location_id: sloc_UkLWZg9DAJ
requestBody:
@@ -3756,7 +3756,7 @@ paths:
application/json:
example:
id: ful_UkLWZg9DAJ
- number: H77493159128
+ number: H32116251674
tracking: U10000
tracking_url:
cost: '10.0'
@@ -3773,7 +3773,7 @@ paths:
display_tax_total: "$0.00"
status: shipped
fulfillment_type: shipping
- fulfilled_at: '2026-05-12T13:52:45Z'
+ fulfilled_at: '2026-05-12T15:41:29Z'
items:
- item_id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
@@ -3781,8 +3781,8 @@ paths:
metadata: {}
adjustment_total: '0.0'
pre_tax_amount: '0.0'
- created_at: '2026-05-12T13:52:44.612Z'
- updated_at: '2026-05-12T13:52:45.169Z'
+ created_at: '2026-05-12T15:41:28.977Z'
+ updated_at: '2026-05-12T15:41:29.545Z'
order_id: or_UkLWZg9DAJ
stock_location_id: sloc_UkLWZg9DAJ
"/api/v3/admin/orders/{order_id}/fulfillments/{id}/cancel":
@@ -3840,7 +3840,7 @@ paths:
application/json:
example:
id: ful_UkLWZg9DAJ
- number: H50748707414
+ number: H57891080010
tracking: U10000
tracking_url:
cost: '10.0'
@@ -3865,8 +3865,8 @@ paths:
metadata: {}
adjustment_total: '0.0'
pre_tax_amount: '0.0'
- created_at: '2026-05-12T13:52:45.587Z'
- updated_at: '2026-05-12T13:52:46.030Z'
+ created_at: '2026-05-12T15:41:29.969Z'
+ updated_at: '2026-05-12T15:41:30.334Z'
order_id: or_UkLWZg9DAJ
stock_location_id: sloc_UkLWZg9DAJ
"/api/v3/admin/orders/{order_id}/fulfillments/{id}/resume":
@@ -3924,7 +3924,7 @@ paths:
application/json:
example:
id: ful_UkLWZg9DAJ
- number: H95632621030
+ number: H30149034538
tracking: U10000
tracking_url:
cost: '10.0'
@@ -3949,8 +3949,8 @@ paths:
metadata: {}
adjustment_total: '0.0'
pre_tax_amount: '0.0'
- created_at: '2026-05-12T13:52:46.355Z'
- updated_at: '2026-05-12T13:52:46.710Z'
+ created_at: '2026-05-12T15:41:30.918Z'
+ updated_at: '2026-05-12T15:41:31.356Z'
order_id: or_UkLWZg9DAJ
stock_location_id: sloc_UkLWZg9DAJ
"/api/v3/admin/orders/{order_id}/fulfillments/{id}/split":
@@ -4011,7 +4011,7 @@ paths:
example:
data:
- id: ful_gbHJdmfrXB
- number: H46349262750
+ number: H07859495409
tracking:
tracking_url:
cost: '10.0'
@@ -4036,8 +4036,8 @@ paths:
metadata: {}
adjustment_total: '0.0'
pre_tax_amount: '0.0'
- created_at: '2026-05-12T13:52:47.409Z'
- updated_at: '2026-05-12T13:52:47.463Z'
+ created_at: '2026-05-12T15:41:32.224Z'
+ updated_at: '2026-05-12T15:41:32.275Z'
order_id: or_UkLWZg9DAJ
stock_location_id: sloc_gbHJdmfrXB
requestBody:
@@ -4109,7 +4109,7 @@ paths:
application/json:
example:
id: gc_UkLWZg9DAJ
- code: B55F3FDE33B25D26
+ code: 8D0710D485587387
status: active
currency: USD
amount: '10.0'
@@ -4123,8 +4123,8 @@ paths:
redeemed_at:
expired: false
active: true
- created_at: '2026-05-12T13:52:47.836Z'
- updated_at: '2026-05-12T13:52:48.148Z'
+ created_at: '2026-05-12T15:41:32.726Z'
+ updated_at: '2026-05-12T15:41:33.020Z'
requestBody:
content:
application/json:
@@ -4255,8 +4255,8 @@ paths:
variant_id: variant_gbHJdmfrXB
quantity: 2
currency: USD
- name: Product 102850
- slug: product-102850
+ name: Product 108038
+ slug: product-108038
options_text: 'Size: S'
price: '10.0'
display_price: "$10.00"
@@ -4288,12 +4288,12 @@ paths:
option_type_label: Size
image_url:
metadata: {}
- created_at: '2026-05-12T13:52:48.863Z'
- updated_at: '2026-05-12T13:52:48.863Z'
+ created_at: '2026-05-12T15:41:33.710Z'
+ updated_at: '2026-05-12T15:41:33.710Z'
digital_links: []
metadata: {}
- created_at: '2026-05-12T13:52:49.187Z'
- updated_at: '2026-05-12T13:52:49.187Z'
+ created_at: '2026-05-12T15:41:34.009Z'
+ updated_at: '2026-05-12T15:41:34.009Z'
cost_price: '17.0'
tax_category_id: taxcat_UkLWZg9DAJ
meta:
@@ -4360,8 +4360,8 @@ paths:
variant_id: variant_VqXmZF31wY
quantity: 3
currency: USD
- name: Product 126661
- slug: product-126661
+ name: Product 122515
+ slug: product-122515
options_text: 'Size: S'
price: '19.99'
display_price: "$19.99"
@@ -4393,12 +4393,12 @@ paths:
option_type_label: Size
image_url:
metadata: {}
- created_at: '2026-05-12T13:52:50.283Z'
- updated_at: '2026-05-12T13:52:50.283Z'
+ created_at: '2026-05-12T15:41:34.931Z'
+ updated_at: '2026-05-12T15:41:34.931Z'
digital_links: []
metadata: {}
- created_at: '2026-05-12T13:52:50.551Z'
- updated_at: '2026-05-12T13:52:50.551Z'
+ created_at: '2026-05-12T15:41:34.963Z'
+ updated_at: '2026-05-12T15:41:34.963Z'
cost_price: '17.0'
tax_category_id: taxcat_UkLWZg9DAJ
requestBody:
@@ -4487,8 +4487,8 @@ paths:
variant_id: variant_gbHJdmfrXB
quantity: 2
currency: USD
- name: Product 138760
- slug: product-138760
+ name: Product 136843
+ slug: product-136843
options_text: 'Size: S'
price: '10.0'
display_price: "$10.00"
@@ -4520,12 +4520,12 @@ paths:
option_type_label: Size
image_url:
metadata: {}
- created_at: '2026-05-12T13:52:50.629Z'
- updated_at: '2026-05-12T13:52:50.629Z'
+ created_at: '2026-05-12T15:41:35.038Z'
+ updated_at: '2026-05-12T15:41:35.038Z'
digital_links: []
metadata: {}
- created_at: '2026-05-12T13:52:50.920Z'
- updated_at: '2026-05-12T13:52:50.920Z'
+ created_at: '2026-05-12T15:41:35.329Z'
+ updated_at: '2026-05-12T15:41:35.329Z'
cost_price: '17.0'
tax_category_id: taxcat_UkLWZg9DAJ
patch:
@@ -4587,8 +4587,8 @@ paths:
variant_id: variant_gbHJdmfrXB
quantity: 5
currency: USD
- name: Product 148537
- slug: product-148537
+ name: Product 148513
+ slug: product-148513
options_text: 'Size: S'
price: '19.99'
display_price: "$19.99"
@@ -4620,12 +4620,12 @@ paths:
option_type_label: Size
image_url:
metadata: {}
- created_at: '2026-05-12T13:52:51.242Z'
- updated_at: '2026-05-12T13:52:51.242Z'
+ created_at: '2026-05-12T15:41:35.655Z'
+ updated_at: '2026-05-12T15:41:35.655Z'
digital_links: []
metadata: {}
- created_at: '2026-05-12T13:52:51.531Z'
- updated_at: '2026-05-12T13:52:51.951Z'
+ created_at: '2026-05-12T15:41:35.943Z'
+ updated_at: '2026-05-12T15:41:36.240Z'
cost_price: '17.0'
tax_category_id: taxcat_UkLWZg9DAJ
requestBody:
@@ -4751,8 +4751,8 @@ paths:
data:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: BGS-def187403c5d
- number: P33KWFRB
+ response_code: BGS-528c08cffff3
+ number: PWHYMGUG
amount: '110.0'
display_amount: "$110.00"
status: completed
@@ -4770,14 +4770,14 @@ paths:
customer_id:
payment_method_id: pm_gbHJdmfrXB
metadata: {}
- created_at: '2026-05-12T13:52:53.007Z'
- updated_at: '2026-05-12T13:52:53.012Z'
+ created_at: '2026-05-12T15:41:37.247Z'
+ updated_at: '2026-05-12T15:41:37.253Z'
metadata: {}
avs_response:
cvv_response_code:
cvv_response_message:
- created_at: '2026-05-12T13:52:53.010Z'
- updated_at: '2026-05-12T13:52:53.010Z'
+ created_at: '2026-05-12T15:41:37.250Z'
+ updated_at: '2026-05-12T15:41:37.250Z'
captured_amount: '0.0'
order_id: or_UkLWZg9DAJ
meta:
@@ -4844,7 +4844,7 @@ paths:
id: py_gbHJdmfrXB
payment_method_id: pm_EfhxLZ9ck8
response_code:
- number: PCM1VIMO
+ number: P6O1K9QG
amount: '110.0'
display_amount: "$110.00"
status: checkout
@@ -4855,8 +4855,8 @@ paths:
avs_response:
cvv_response_code:
cvv_response_message:
- created_at: '2026-05-12T13:52:54.512Z'
- updated_at: '2026-05-12T13:52:54.512Z'
+ created_at: '2026-05-12T15:41:38.586Z'
+ updated_at: '2026-05-12T15:41:38.586Z'
captured_amount: '0.0'
order_id: or_gbHJdmfrXB
requestBody:
@@ -4946,8 +4946,8 @@ paths:
example:
id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: BGS-0e1ae0134be4
- number: PQBU2BJL
+ response_code: BGS-d3662d14f064
+ number: PNTYSMON
amount: '110.0'
display_amount: "$110.00"
status: completed
@@ -4965,14 +4965,14 @@ paths:
customer_id:
payment_method_id: pm_gbHJdmfrXB
metadata: {}
- created_at: '2026-05-12T13:52:54.910Z'
- updated_at: '2026-05-12T13:52:54.913Z'
+ created_at: '2026-05-12T15:41:38.953Z'
+ updated_at: '2026-05-12T15:41:38.956Z'
metadata: {}
avs_response:
cvv_response_code:
cvv_response_message:
- created_at: '2026-05-12T13:52:54.912Z'
- updated_at: '2026-05-12T13:52:54.912Z'
+ created_at: '2026-05-12T15:41:38.955Z'
+ updated_at: '2026-05-12T15:41:38.955Z'
captured_amount: '0.0'
order_id: or_UkLWZg9DAJ
"/api/v3/admin/orders/{order_id}/payments/{id}/capture":
@@ -5031,8 +5031,8 @@ paths:
example:
id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: BGS-1761630c1fa3
- number: P9JGM2QJ
+ response_code: BGS-3fdde78ccc7d
+ number: PMBO6VJI
amount: '110.0'
display_amount: "$110.00"
status: completed
@@ -5050,14 +5050,14 @@ paths:
customer_id:
payment_method_id: pm_gbHJdmfrXB
metadata: {}
- created_at: '2026-05-12T13:52:55.693Z'
- updated_at: '2026-05-12T13:52:55.701Z'
+ created_at: '2026-05-12T15:41:39.610Z'
+ updated_at: '2026-05-12T15:41:39.612Z'
metadata: {}
avs_response:
cvv_response_code:
cvv_response_message:
- created_at: '2026-05-12T13:52:55.699Z'
- updated_at: '2026-05-12T13:52:56.070Z'
+ created_at: '2026-05-12T15:41:39.611Z'
+ updated_at: '2026-05-12T15:41:39.939Z'
captured_amount: '110.0'
order_id: or_UkLWZg9DAJ
'422':
@@ -5126,8 +5126,8 @@ paths:
example:
id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: void-BGS-819e3f798e82
- number: PR43WTXS
+ response_code: void-BGS-223a84acbef4
+ number: PWAF6R43
amount: '110.0'
display_amount: "$110.00"
status: void
@@ -5145,14 +5145,14 @@ paths:
customer_id:
payment_method_id: pm_gbHJdmfrXB
metadata: {}
- created_at: '2026-05-12T13:52:57.393Z'
- updated_at: '2026-05-12T13:52:57.396Z'
+ created_at: '2026-05-12T15:41:41.397Z'
+ updated_at: '2026-05-12T15:41:41.400Z'
metadata: {}
avs_response:
cvv_response_code:
cvv_response_message:
- created_at: '2026-05-12T13:52:57.395Z'
- updated_at: '2026-05-12T13:52:57.738Z'
+ created_at: '2026-05-12T15:41:41.399Z'
+ updated_at: '2026-05-12T15:41:41.710Z'
captured_amount: '0.0'
order_id: or_UkLWZg9DAJ
"/api/v3/admin/orders/{order_id}/refunds":
@@ -5280,14 +5280,14 @@ paths:
application/json:
example:
id: re_UkLWZg9DAJ
- transaction_id: BGS-951b7f624e1d
+ transaction_id: BGS-99dfc498efd5
amount: '5.0'
payment_id: py_UkLWZg9DAJ
refund_reason_id: rr_UkLWZg9DAJ
reimbursement_id:
metadata: {}
- created_at: '2026-05-12T13:52:59.158Z'
- updated_at: '2026-05-12T13:52:59.158Z'
+ created_at: '2026-05-12T15:41:43.075Z'
+ updated_at: '2026-05-12T15:41:43.075Z'
requestBody:
content:
application/json:
@@ -5359,8 +5359,8 @@ paths:
id: or_UkLWZg9DAJ
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R980291368
+ number: R844257999
customer_note:
currency: USD
locale: en
@@ -5403,8 +5403,8 @@ paths:
metadata: {}
canceled_at:
approved_at:
- created_at: '2026-05-12T13:52:59.462Z'
- updated_at: '2026-05-12T13:52:59.520Z'
+ created_at: '2026-05-12T15:41:43.378Z'
+ updated_at: '2026-05-12T15:41:43.429Z'
preferred_stock_location_id:
tags: []
internal_note:
@@ -5575,8 +5575,8 @@ paths:
- id: or_UkLWZg9DAJ
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R433237846
+ number: R504430383
customer_note:
currency: USD
locale: en
@@ -5619,8 +5619,8 @@ paths:
metadata: {}
canceled_at:
approved_at:
- created_at: '2026-05-12T13:53:01.302Z'
- updated_at: '2026-05-12T13:53:01.302Z'
+ created_at: '2026-05-12T15:41:45.190Z'
+ updated_at: '2026-05-12T15:41:45.190Z'
preferred_stock_location_id:
tags: []
internal_note:
@@ -5763,7 +5763,7 @@ paths:
id: or_gbHJdmfrXB
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R331514986
+ number: R511524698
customer_note:
currency: USD
@@ -5807,8 +5807,8 @@ paths:
metadata: {}
canceled_at:
approved_at:
- created_at: '2026-05-12T13:53:03.002Z'
- updated_at: '2026-05-12T13:53:03.005Z'
+ created_at: '2026-05-12T15:41:46.882Z'
+ updated_at: '2026-05-12T15:41:46.886Z'
preferred_stock_location_id: sloc_UkLWZg9DAJ
tags: []
internal_note:
@@ -5992,8 +5992,8 @@ paths:
id: or_UkLWZg9DAJ
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R055386525
+ number: R444014133
customer_note:
currency: USD
locale: en
@@ -6036,8 +6036,8 @@ paths:
metadata: {}
canceled_at:
approved_at:
- created_at: '2026-05-12T13:53:03.283Z'
- updated_at: '2026-05-12T13:53:03.283Z'
+ created_at: '2026-05-12T15:41:47.164Z'
+ updated_at: '2026-05-12T15:41:47.164Z'
preferred_stock_location_id:
tags: []
internal_note:
@@ -6108,7 +6108,7 @@ paths:
id: or_UkLWZg9DAJ
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R715802260
+ number: R569202968
customer_note:
currency: USD
@@ -6152,8 +6152,8 @@ paths:
metadata: {}
canceled_at:
approved_at:
- created_at: '2026-05-12T13:53:04.378Z'
- updated_at: '2026-05-12T13:53:04.673Z'
+ created_at: '2026-05-12T15:41:48.395Z'
+ updated_at: '2026-05-12T15:41:48.694Z'
preferred_stock_location_id:
tags: []
internal_note:
@@ -6334,8 +6334,8 @@ paths:
id: or_UkLWZg9DAJ
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R870176568
+ number: R581145957
customer_note:
currency: USD
locale: en
@@ -6362,7 +6362,7 @@ paths:
display_delivery_total: "$100.00"
fulfillment_status: ready
payment_status: paid
- completed_at: '2026-05-12T13:53:05.593Z'
+ completed_at: '2026-05-12T15:41:49.745Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -6378,8 +6378,8 @@ paths:
metadata: {}
canceled_at:
approved_at:
- created_at: '2026-05-12T13:53:05.519Z'
- updated_at: '2026-05-12T13:53:05.619Z'
+ created_at: '2026-05-12T15:41:49.675Z'
+ updated_at: '2026-05-12T15:41:49.773Z'
preferred_stock_location_id:
tags: []
internal_note:
@@ -6460,8 +6460,8 @@ paths:
id: or_UkLWZg9DAJ
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R758905493
+ number: R850664384
customer_note:
currency: USD
locale: en
@@ -6488,7 +6488,7 @@ paths:
display_delivery_total: "$10.00"
fulfillment_status: canceled
payment_status: void
- completed_at: '2026-05-12T13:53:06.868Z'
+ completed_at: '2026-05-12T15:41:51.190Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -6502,10 +6502,10 @@ paths:
payment_total: '0.0'
display_payment_total: "$0.00"
metadata: {}
- canceled_at: '2026-05-12T13:53:07.162Z'
+ canceled_at: '2026-05-12T15:41:51.481Z'
approved_at:
- created_at: '2026-05-12T13:53:06.812Z'
- updated_at: '2026-05-12T13:53:07.215Z'
+ created_at: '2026-05-12T15:41:51.129Z'
+ updated_at: '2026-05-12T15:41:51.549Z'
preferred_stock_location_id:
tags: []
internal_note:
@@ -6564,8 +6564,8 @@ paths:
id: or_UkLWZg9DAJ
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R066309680
+ number: R249496300
customer_note:
currency: USD
locale: en
@@ -6592,7 +6592,7 @@ paths:
display_delivery_total: "$100.00"
fulfillment_status:
payment_status:
- completed_at: '2026-05-12T13:53:07.579Z'
+ completed_at: '2026-05-12T15:41:51.942Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -6607,9 +6607,9 @@ paths:
display_payment_total: "$0.00"
metadata: {}
canceled_at:
- approved_at: '2026-05-12T13:53:07.875Z'
- created_at: '2026-05-12T13:53:07.521Z'
- updated_at: '2026-05-12T13:53:07.579Z'
+ approved_at: '2026-05-12T15:41:52.245Z'
+ created_at: '2026-05-12T15:41:51.884Z'
+ updated_at: '2026-05-12T15:41:51.942Z'
preferred_stock_location_id:
tags: []
internal_note:
@@ -6668,8 +6668,8 @@ paths:
id: or_UkLWZg9DAJ
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R076714967
+ number: R267272415
customer_note:
currency: USD
locale: en
@@ -6696,13 +6696,13 @@ paths:
display_delivery_total: "$10.00"
fulfillment_status: canceled
payment_status: void
- completed_at: '2026-05-12T13:53:08.214Z'
+ completed_at: '2026-05-12T15:41:52.641Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
gift_card:
market:
- status: canceled
+ status: placed
last_ip_address:
considered_risky: false
confirmation_delivered: false
@@ -6710,10 +6710,10 @@ paths:
payment_total: '0.0'
display_payment_total: "$0.00"
metadata: {}
- canceled_at: '2026-05-12T13:53:08.496Z'
+ canceled_at: '2026-05-12T15:41:52.920Z'
approved_at:
- created_at: '2026-05-12T13:53:08.157Z'
- updated_at: '2026-05-12T13:53:08.587Z'
+ created_at: '2026-05-12T15:41:52.584Z'
+ updated_at: '2026-05-12T15:41:52.999Z'
preferred_stock_location_id:
tags: []
internal_note:
@@ -6772,8 +6772,8 @@ paths:
id: or_UkLWZg9DAJ
market_id:
channel_id: ch_UkLWZg9DAJ
- number: R141869974
+ number: R064932481
customer_note:
currency: USD
locale: en
@@ -6800,7 +6800,7 @@ paths:
display_delivery_total: "$100.00"
fulfillment_status:
payment_status:
- completed_at: '2026-05-12T13:53:08.937Z'
+ completed_at: '2026-05-12T15:41:53.359Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -6816,8 +6816,8 @@ paths:
metadata: {}
canceled_at:
approved_at:
- created_at: '2026-05-12T13:53:08.868Z'
- updated_at: '2026-05-12T13:53:08.937Z'
+ created_at: '2026-05-12T15:41:53.296Z'
+ updated_at: '2026-05-12T15:41:53.358Z'
preferred_stock_location_id:
tags: []
internal_note:
@@ -6892,8 +6892,8 @@ paths:
auto_capture:
display_on: both
position: 1
- created_at: '2026-05-12T13:53:09.238Z'
- updated_at: '2026-05-12T13:53:09.239Z'
+ created_at: '2026-05-12T15:41:53.695Z'
+ updated_at: '2026-05-12T15:41:53.697Z'
preferences: {}
preference_schema: []
meta:
@@ -7033,8 +7033,8 @@ paths:
auto_capture:
display_on: both
position: 1
- created_at: '2026-05-12T13:53:09.813Z'
- updated_at: '2026-05-12T13:53:09.814Z'
+ created_at: '2026-05-12T15:41:54.336Z'
+ updated_at: '2026-05-12T15:41:54.337Z'
preferences: {}
preference_schema: []
"/api/v3/admin/products/{product_id}/custom_fields":
@@ -7104,8 +7104,8 @@ paths:
field_type: short_text
key: custom.title
value: wool
- created_at: '2026-05-12T13:53:10.133Z'
- updated_at: '2026-05-12T13:53:10.133Z'
+ created_at: '2026-05-12T15:41:54.701Z'
+ updated_at: '2026-05-12T15:41:54.701Z'
storefront_visible: true
custom_field_definition_id: cfdef_UkLWZg9DAJ
meta:
@@ -7172,8 +7172,8 @@ paths:
field_type: long_text
key: custom.description
value: A longer description
- created_at: '2026-05-12T13:53:10.741Z'
- updated_at: '2026-05-12T13:53:10.741Z'
+ created_at: '2026-05-12T15:41:55.313Z'
+ updated_at: '2026-05-12T15:41:55.313Z'
storefront_visible: true
custom_field_definition_id: cfdef_gbHJdmfrXB
'422':
@@ -7257,8 +7257,8 @@ paths:
field_type: short_text
key: custom.title
value: wool
- created_at: '2026-05-12T13:53:11.118Z'
- updated_at: '2026-05-12T13:53:11.118Z'
+ created_at: '2026-05-12T15:41:55.806Z'
+ updated_at: '2026-05-12T15:41:55.806Z'
storefront_visible: true
custom_field_definition_id: cfdef_UkLWZg9DAJ
patch:
@@ -7305,8 +7305,8 @@ paths:
field_type: short_text
key: custom.title
value: cotton
- created_at: '2026-05-12T13:53:11.441Z'
- updated_at: '2026-05-12T13:53:11.718Z'
+ created_at: '2026-05-12T15:41:56.133Z'
+ updated_at: '2026-05-12T15:41:56.422Z'
storefront_visible: true
custom_field_definition_id: cfdef_UkLWZg9DAJ
requestBody:
@@ -7444,24 +7444,35 @@ paths:
example:
data:
- id: prod_UkLWZg9DAJ
- name: Product 393215
- slug: product-393215
+ name: Product 394321
+ slug: product-394321
meta_description:
meta_keywords:
variant_count: 0
- available_on: '2025-05-12T13:53:12.038Z'
+ available_on: '2025-05-12T15:41:56.751Z'
purchasable: true
in_stock: false
backorderable: true
available: true
- description: Voluptatum placeat enim saepe provident. Provident
- illo reprehenderit ut illum rem voluptas nemo. Quia voluptas consequatur
- rerum quam repellendus quis a eveniet. Magnam dicta ea dolorum
- fuga voluptatem et beatae ab.
- description_html: Voluptatum placeat enim saepe provident. Provident
- illo reprehenderit ut illum rem voluptas nemo. Quia voluptas consequatur
- rerum quam repellendus quis a eveniet. Magnam dicta ea dolorum
- fuga voluptatem et beatae ab.
+ description: Est excepturi illum recusandae error similique minima
+ expedita magnam. Quod quae impedit corrupti tempora eum iste quisquam
+ tempore. Commodi voluptatem possimus dolorem tempora a hic fugit.
+ Consectetur ad dolor voluptatibus voluptate. Necessitatibus veritatis
+ dolores soluta atque eos ipsa placeat. Fuga harum quo rem voluptates
+ aperiam. Magnam labore ut nulla vero hic facere rerum. Deserunt
+ neque debitis illum doloribus quis. Quibusdam ad ipsam tenetur
+ natus qui optio quidem cumque. Tenetur debitis maxime mollitia
+ numquam asperiores vel. Aliquam voluptatibus nisi nobis repellat
+ praesentium alias a. Atque libero labore ratione voluptas provident
+ ex. Saepe quo repudiandae quas minus. Omnis explicabo saepe nihil
+ consequatur. Esse omnis mollitia exercitationem cupiditate explicabo
+ qui. Dolores et doloribus perferendis commodi quidem non. Fuga
+ officiis perspiciatis praesentium animi voluptates quis quia soluta.
+ description_html: |-
+ Est excepturi illum recusandae error similique minima expedita magnam. Quod quae impedit corrupti tempora eum iste quisquam tempore. Commodi voluptatem possimus dolorem tempora a hic fugit. Consectetur ad dolor voluptatibus voluptate.
+ Necessitatibus veritatis dolores soluta atque eos ipsa placeat. Fuga harum quo rem voluptates aperiam. Magnam labore ut nulla vero hic facere rerum. Deserunt neque debitis illum doloribus quis. Quibusdam ad ipsam tenetur natus qui optio quidem cumque.
+ Tenetur debitis maxime mollitia numquam asperiores vel. Aliquam voluptatibus nisi nobis repellat praesentium alias a. Atque libero labore ratione voluptas provident ex. Saepe quo repudiandae quas minus.
+ Omnis explicabo saepe nihil consequatur. Esse omnis mollitia exercitationem cupiditate explicabo qui. Dolores et doloribus perferendis commodi quidem non. Fuga officiis perspiciatis praesentium animi voluptates quis quia soluta.
default_variant_id: variant_UkLWZg9DAJ
thumbnail_url:
tags: []
@@ -7476,16 +7487,16 @@ paths:
display_compare_at_amount:
price_list_id:
variant_id: variant_UkLWZg9DAJ
- created_at: '2026-05-12T13:53:12.063Z'
- updated_at: '2026-05-12T13:53:12.063Z'
+ created_at: '2026-05-12T15:41:56.777Z'
+ updated_at: '2026-05-12T15:41:56.777Z'
original_price:
status: active
- make_active_at: '2025-05-12T13:53:12.038Z'
+ make_active_at: '2025-05-12T15:41:56.751Z'
discontinue_on:
metadata: {}
deleted_at:
- created_at: '2026-05-12T13:53:12.051Z'
- updated_at: '2026-05-12T13:53:12.064Z'
+ created_at: '2026-05-12T15:41:56.763Z'
+ updated_at: '2026-05-12T15:41:56.778Z'
cost_price: '17.0'
cost_currency: USD
meta:
@@ -7624,16 +7635,16 @@ paths:
display_compare_at_amount:
price_list_id:
variant_id: variant_gbHJdmfrXB
- created_at: '2026-05-12T13:53:12.739Z'
- updated_at: '2026-05-12T13:53:12.739Z'
+ created_at: '2026-05-12T15:41:57.485Z'
+ updated_at: '2026-05-12T15:41:57.485Z'
original_price:
status: draft
make_active_at:
discontinue_on:
metadata: {}
deleted_at:
- created_at: '2026-05-12T13:53:12.737Z'
- updated_at: '2026-05-12T13:53:12.744Z'
+ created_at: '2026-05-12T15:41:57.483Z'
+ updated_at: '2026-05-12T15:41:57.489Z'
cost_price:
cost_currency: USD
schema:
@@ -7820,24 +7831,25 @@ paths:
application/json:
example:
id: prod_UkLWZg9DAJ
- name: Product 432135
- slug: product-432135
+ name: Product 436125
+ slug: product-436125
meta_description:
meta_keywords:
variant_count: 0
- available_on: '2025-05-12T13:53:13.100Z'
+ available_on: '2025-05-12T15:41:57.841Z'
purchasable: true
in_stock: false
backorderable: true
available: true
- description: Dolorum animi deleniti soluta nostrum. Iusto excepturi
- eos pariatur veniam eligendi sapiente numquam. Impedit expedita
- eveniet animi voluptatibus perspiciatis distinctio fugiat. Praesentium
- corporis laboriosam unde harum eaque pariatur.
- description_html: Dolorum animi deleniti soluta nostrum. Iusto excepturi
- eos pariatur veniam eligendi sapiente numquam. Impedit expedita
- eveniet animi voluptatibus perspiciatis distinctio fugiat. Praesentium
- corporis laboriosam unde harum eaque pariatur.
+ description: Voluptatum autem ratione est odio animi dolores ex. Recusandae
+ doloribus est accusantium modi deserunt qui sint. Fuga illum cupiditate
+ dolorum expedita sequi. Minus aut accusantium nobis aspernatur expedita
+ non. Corrupti praesentium totam cupiditate id occaecati quod debitis.
+ Blanditiis perspiciatis ea officiis incidunt voluptate mollitia
+ impedit perferendis.
+ description_html: |-
+ Voluptatum autem ratione est odio animi dolores ex. Recusandae doloribus est accusantium modi deserunt qui sint. Fuga illum cupiditate dolorum expedita sequi.
+ Minus aut accusantium nobis aspernatur expedita non. Corrupti praesentium totam cupiditate id occaecati quod debitis. Blanditiis perspiciatis ea officiis incidunt voluptate mollitia impedit perferendis.
default_variant_id: variant_UkLWZg9DAJ
thumbnail_url:
tags: []
@@ -7852,16 +7864,16 @@ paths:
display_compare_at_amount:
price_list_id:
variant_id: variant_UkLWZg9DAJ
- created_at: '2026-05-12T13:53:13.129Z'
- updated_at: '2026-05-12T13:53:13.129Z'
+ created_at: '2026-05-12T15:41:57.904Z'
+ updated_at: '2026-05-12T15:41:57.904Z'
original_price:
status: active
- make_active_at: '2025-05-12T13:53:13.100Z'
+ make_active_at: '2025-05-12T15:41:57.841Z'
discontinue_on:
metadata: {}
deleted_at:
- created_at: '2026-05-12T13:53:13.115Z'
- updated_at: '2026-05-12T13:53:13.131Z'
+ created_at: '2026-05-12T15:41:57.884Z'
+ updated_at: '2026-05-12T15:41:57.905Z'
cost_price: '17.0'
cost_currency: USD
schema:
@@ -7929,23 +7941,30 @@ paths:
example:
id: prod_UkLWZg9DAJ
name: Updated Name
- slug: product-457382
+ slug: product-451921
meta_description:
meta_keywords:
variant_count: 0
- available_on: '2025-05-12T13:53:13.752Z'
+ available_on: '2025-05-12T15:41:58.582Z'
purchasable: true
in_stock: false
backorderable: true
available: true
- description: Esse a explicabo quibusdam qui. Facilis dolorum totam
- porro odio amet aspernatur consequuntur. Architecto provident itaque
- quis voluptatem quisquam tempore quae. Ipsum et voluptate a consequatur
- voluptas consequuntur ex pariatur.
- description_html: Esse a explicabo quibusdam qui. Facilis dolorum
- totam porro odio amet aspernatur consequuntur. Architecto provident
- itaque quis voluptatem quisquam tempore quae. Ipsum et voluptate
- a consequatur voluptas consequuntur ex pariatur.
+ description: Tempore autem sit placeat eum eveniet doloribus. Neque
+ laboriosam excepturi facere maiores enim cum vitae. Sapiente nam
+ labore ullam eligendi quas sed eos quidem. Omnis explicabo molestias
+ nesciunt aspernatur eius ut. Ipsam ex officiis iste dolorem mollitia
+ modi sapiente expedita. Explicabo occaecati magnam dolorum corrupti
+ pariatur earum sed. Quis et quo laborum expedita illo labore ab
+ voluptas. Consectetur deserunt accusamus inventore earum laborum
+ exercitationem. Exercitationem sit ipsam enim illo nihil ipsum.
+ Facere voluptatem officia pariatur sed omnis qui. Eveniet deserunt
+ cupiditate architecto voluptatibus sed possimus ab quos. Vitae quod
+ iste deserunt aliquam ab.
+ description_html: |-
+ Tempore autem sit placeat eum eveniet doloribus. Neque laboriosam excepturi facere maiores enim cum vitae. Sapiente nam labore ullam eligendi quas sed eos quidem. Omnis explicabo molestias nesciunt aspernatur eius ut.
+ Ipsam ex officiis iste dolorem mollitia modi sapiente expedita. Explicabo occaecati magnam dolorum corrupti pariatur earum sed. Quis et quo laborum expedita illo labore ab voluptas. Consectetur deserunt accusamus inventore earum laborum exercitationem.
+ Exercitationem sit ipsam enim illo nihil ipsum. Facere voluptatem officia pariatur sed omnis qui. Eveniet deserunt cupiditate architecto voluptatibus sed possimus ab quos. Vitae quod iste deserunt aliquam ab.
default_variant_id: variant_UkLWZg9DAJ
thumbnail_url:
tags: []
@@ -7960,16 +7979,16 @@ paths:
display_compare_at_amount:
price_list_id:
variant_id: variant_UkLWZg9DAJ
- created_at: '2026-05-12T13:53:13.783Z'
- updated_at: '2026-05-12T13:53:13.783Z'
+ created_at: '2026-05-12T15:41:58.615Z'
+ updated_at: '2026-05-12T15:41:58.615Z'
original_price:
status: active
- make_active_at: '2025-05-12T13:53:13.752Z'
+ make_active_at: '2025-05-12T15:41:58.582Z'
discontinue_on:
metadata: {}
deleted_at:
- created_at: '2026-05-12T13:53:13.768Z'
- updated_at: '2026-05-12T13:53:14.073Z'
+ created_at: '2026-05-12T15:41:58.598Z'
+ updated_at: '2026-05-12T15:41:58.907Z'
cost_price: '17.0'
cost_currency: USD
schema:
@@ -8178,8 +8197,8 @@ paths:
example:
data:
- id: pact_UkLWZg9DAJ
- created_at: '2026-05-12T13:53:14.779Z'
- updated_at: '2026-05-12T13:53:14.779Z'
+ created_at: '2026-05-12T15:41:59.593Z'
+ updated_at: '2026-05-12T15:41:59.593Z'
type: free_shipping
promotion_id: promo_UkLWZg9DAJ
preferences: {}
@@ -8240,8 +8259,8 @@ paths:
application/json:
example:
id: pact_UkLWZg9DAJ
- created_at: '2026-05-12T13:53:15.357Z'
- updated_at: '2026-05-12T13:53:15.357Z'
+ created_at: '2026-05-12T15:42:00.160Z'
+ updated_at: '2026-05-12T15:42:00.160Z'
type: free_shipping
promotion_id: promo_UkLWZg9DAJ
preferences: {}
@@ -8351,8 +8370,8 @@ paths:
example:
data:
- id: prorule_UkLWZg9DAJ
- created_at: '2026-05-12T13:53:15.957Z'
- updated_at: '2026-05-12T13:53:15.957Z'
+ created_at: '2026-05-12T15:42:00.756Z'
+ updated_at: '2026-05-12T15:42:00.756Z'
type: currency
promotion_id: promo_UkLWZg9DAJ
preferences:
@@ -8419,8 +8438,8 @@ paths:
application/json:
example:
id: prorule_UkLWZg9DAJ
- created_at: '2026-05-12T13:53:16.539Z'
- updated_at: '2026-05-12T13:53:16.539Z'
+ created_at: '2026-05-12T15:42:01.326Z'
+ updated_at: '2026-05-12T15:42:01.326Z'
type: currency
promotion_id: promo_UkLWZg9DAJ
preferences:
@@ -8493,8 +8512,8 @@ paths:
application/json:
example:
id: prorule_UkLWZg9DAJ
- created_at: '2026-05-12T13:53:16.832Z'
- updated_at: '2026-05-12T13:53:17.109Z'
+ created_at: '2026-05-12T15:42:01.616Z'
+ updated_at: '2026-05-12T15:42:01.901Z'
type: currency
promotion_id: promo_UkLWZg9DAJ
preferences:
@@ -8584,7 +8603,7 @@ paths:
name: Summer Sale
description:
code: summer
- starts_at: '2026-05-12T13:53:17.399Z'
+ starts_at: '2026-05-12T15:42:02.197Z'
expires_at:
usage_limit:
match_policy: all
@@ -8595,8 +8614,8 @@ paths:
code_prefix:
promotion_category_id:
metadata: {}
- created_at: '2026-05-12T13:53:17.400Z'
- updated_at: '2026-05-12T13:53:17.401Z'
+ created_at: '2026-05-12T15:42:02.198Z'
+ updated_at: '2026-05-12T15:42:02.200Z'
store_ids:
- store_UkLWZg9DAJ
action_ids: []
@@ -8702,7 +8721,7 @@ paths:
name: Black Friday
description:
code: blackfriday-os
- starts_at: '2026-05-12T13:53:18.339Z'
+ starts_at: '2026-05-12T15:42:03.110Z'
expires_at:
usage_limit:
match_policy: all
@@ -8713,8 +8732,8 @@ paths:
code_prefix:
promotion_category_id:
metadata: {}
- created_at: '2026-05-12T13:53:18.340Z'
- updated_at: '2026-05-12T13:53:18.365Z'
+ created_at: '2026-05-12T15:42:03.112Z'
+ updated_at: '2026-05-12T15:42:03.142Z'
store_ids:
- store_UkLWZg9DAJ
action_ids:
@@ -8867,7 +8886,7 @@ paths:
name: Summer Sale
description:
code: summer
- starts_at: '2026-05-12T13:53:18.668Z'
+ starts_at: '2026-05-12T15:42:03.438Z'
expires_at:
usage_limit:
match_policy: all
@@ -8878,8 +8897,8 @@ paths:
code_prefix:
promotion_category_id:
metadata: {}
- created_at: '2026-05-12T13:53:18.669Z'
- updated_at: '2026-05-12T13:53:18.670Z'
+ created_at: '2026-05-12T15:42:03.439Z'
+ updated_at: '2026-05-12T15:42:03.440Z'
store_ids:
- store_UkLWZg9DAJ
action_ids: []
@@ -8975,7 +8994,7 @@ paths:
name: Summer Sale
description:
code: summer
- starts_at: '2026-05-12T13:53:19.541Z'
+ starts_at: '2026-05-12T15:42:04.319Z'
expires_at:
usage_limit:
match_policy: all
@@ -8986,8 +9005,8 @@ paths:
code_prefix:
promotion_category_id:
metadata: {}
- created_at: '2026-05-12T13:53:19.541Z'
- updated_at: '2026-05-12T13:53:19.821Z'
+ created_at: '2026-05-12T15:42:04.320Z'
+ updated_at: '2026-05-12T15:42:04.602Z'
store_ids:
- store_UkLWZg9DAJ
action_ids: []
@@ -9154,20 +9173,20 @@ paths:
application/json:
example:
data:
- - type: create_adjustment
- label: Create Adjustment
+ - type: create_line_items
+ label: Create line items
description:
preference_schema: []
- type: create_item_adjustments
- label: Create Item Adjustments
+ label: Create per-line-item adjustment
description:
preference_schema: []
- - type: create_line_items
- label: Create Line Items
+ - type: create_adjustment
+ label: Create whole-order adjustment
description:
preference_schema: []
- type: free_shipping
- label: Free Shipping
+ label: Free shipping
description:
preference_schema: []
"/api/v3/admin/promotion_rules/types":
@@ -9212,6 +9231,13 @@ paths:
application/json:
example:
data:
+ - type: category
+ label: Categories
+ description:
+ preference_schema:
+ - key: match_policy
+ type: string
+ default: any
- type: country
label: Country
description:
@@ -9233,18 +9259,22 @@ paths:
type: string
default:
- type: customer_group
- label: Customer Group
+ label: Customer Group(s)
description:
preference_schema:
- key: customer_group_ids
type: array
default: []
+ - type: user
+ label: Customers
+ description:
+ preference_schema: []
- type: first_order
- label: First Order
+ label: First order
description:
preference_schema: []
- type: item_total
- label: Item Total
+ label: Item total
description:
preference_schema:
- key: operator_min
@@ -9263,8 +9293,12 @@ paths:
label: One Use Per User
description:
preference_schema: []
+ - type: user_logged_in
+ label: Only logged in customers
+ description:
+ preference_schema: []
- type: option_value
- label: Option Value
+ label: Option Value(s)
description:
preference_schema:
- key: eligible_values
@@ -9274,27 +9308,12 @@ paths:
type: string
default: any
- type: product
- label: Product
+ label: Product(s)
description:
preference_schema:
- key: match_policy
type: string
default: any
- - type: category
- label: Taxon
- description:
- preference_schema:
- - key: match_policy
- type: string
- default: any
- - type: user
- label: User
- description:
- preference_schema: []
- - type: user_logged_in
- label: User Logged In
- description:
- preference_schema: []
"/api/v3/admin/roles":
get:
summary: List roles
@@ -9339,8 +9358,8 @@ paths:
data:
- id: role_UkLWZg9DAJ
name: admin
- created_at: '2026-05-12T13:53:20.690Z'
- updated_at: '2026-05-12T13:53:20.690Z'
+ created_at: '2026-05-12T15:42:05.475Z'
+ updated_at: '2026-05-12T15:42:05.475Z'
meta:
page: 1
limit: 25
@@ -9475,8 +9494,8 @@ paths:
pickup_stock_policy: local
pickup_ready_in_minutes:
pickup_instructions:
- created_at: '2026-05-12T13:53:20.970Z'
- updated_at: '2026-05-12T13:53:20.970Z'
+ created_at: '2026-05-12T15:42:05.762Z'
+ updated_at: '2026-05-12T15:42:05.762Z'
meta:
page: 1
limit: 25
@@ -9587,8 +9606,8 @@ paths:
pickup_stock_policy: local
pickup_ready_in_minutes: 30
pickup_instructions:
- created_at: '2026-05-12T13:53:21.554Z'
- updated_at: '2026-05-12T13:53:21.554Z'
+ created_at: '2026-05-12T15:42:06.355Z'
+ updated_at: '2026-05-12T15:42:06.355Z'
schema:
"$ref": "#/components/schemas/StockLocation"
'422':
@@ -9762,8 +9781,8 @@ paths:
pickup_stock_policy: local
pickup_ready_in_minutes:
pickup_instructions:
- created_at: '2026-05-12T13:53:21.845Z'
- updated_at: '2026-05-12T13:53:21.845Z'
+ created_at: '2026-05-12T15:42:06.644Z'
+ updated_at: '2026-05-12T15:42:06.644Z'
schema:
"$ref": "#/components/schemas/StockLocation"
'404':
@@ -9848,8 +9867,8 @@ paths:
pickup_stock_policy: local
pickup_ready_in_minutes: 45
pickup_instructions:
- created_at: '2026-05-12T13:53:22.405Z'
- updated_at: '2026-05-12T13:53:22.681Z'
+ created_at: '2026-05-12T15:42:07.216Z'
+ updated_at: '2026-05-12T15:42:07.494Z'
schema:
"$ref": "#/components/schemas/StockLocation"
'422':
@@ -10052,8 +10071,8 @@ paths:
data:
- id: sccat_UkLWZg9DAJ
name: Goodwill
- created_at: '2026-05-12T13:53:23.259Z'
- updated_at: '2026-05-12T13:53:23.259Z'
+ created_at: '2026-05-12T15:42:08.066Z'
+ updated_at: '2026-05-12T15:42:08.066Z'
non_expiring: false
meta:
page: 1
@@ -10144,8 +10163,8 @@ paths:
example:
id: sccat_UkLWZg9DAJ
name: Goodwill
- created_at: '2026-05-12T13:53:23.572Z'
- updated_at: '2026-05-12T13:53:23.572Z'
+ created_at: '2026-05-12T15:42:08.372Z'
+ updated_at: '2026-05-12T15:42:08.372Z'
non_expiring: false
schema:
"$ref": "#/components/schemas/StoreCreditCategory"
@@ -10210,8 +10229,8 @@ paths:
preferred_timezone: UTC
preferred_weight_unit: lb
preferred_unit_system: imperial
- created_at: '2026-05-12T13:52:20.414Z'
- updated_at: '2026-05-12T13:53:24.223Z'
+ created_at: '2026-05-12T15:41:05.083Z'
+ updated_at: '2026-05-12T15:42:09.411Z'
url: http://www.example.com:3000
supported_currencies:
- USD
@@ -10282,8 +10301,8 @@ paths:
preferred_timezone: UTC
preferred_weight_unit: lb
preferred_unit_system: imperial
- created_at: '2026-05-12T13:52:20.414Z'
- updated_at: '2026-05-12T13:53:24.935Z'
+ created_at: '2026-05-12T15:41:05.083Z'
+ updated_at: '2026-05-12T15:42:10.208Z'
url: http://www.example.com:3000
supported_currencies:
- USD
@@ -10501,12 +10520,12 @@ paths:
cost_price: '17.0'
cost_currency: USD
deleted_at:
- created_at: '2026-05-12T13:53:26.396Z'
- updated_at: '2026-05-12T13:53:26.411Z'
+ created_at: '2026-05-12T15:42:11.710Z'
+ updated_at: '2026-05-12T15:42:11.724Z'
available_stock: 0
reserved_quantity: 0
total_on_hand: 0
- product_name: Product 506322
+ product_name: Product 504118
display_price: "$0.00"
- id: variant_gbHJdmfrXB
product_id: prod_UkLWZg9DAJ
@@ -10518,10 +10537,10 @@ paths:
purchasable: true
in_stock: false
backorderable: true
- weight: 137.36
- height: 56.41
- width: 110.33
- depth: 98.46
+ weight: 170.3
+ height: 194.33
+ width: 122.7
+ depth: 112.1
price:
id: price_gbHJdmfrXB
amount: '19.99'
@@ -10544,20 +10563,20 @@ paths:
option_type_label: Size
image_url:
metadata: {}
- created_at: '2026-05-12T13:53:26.424Z'
- updated_at: '2026-05-12T13:53:26.424Z'
+ created_at: '2026-05-12T15:42:11.735Z'
+ updated_at: '2026-05-12T15:42:11.735Z'
metadata: {}
position: 2
tax_category_id: 1
cost_price: '17.0'
cost_currency: USD
deleted_at:
- created_at: '2026-05-12T13:53:26.421Z'
- updated_at: '2026-05-12T13:53:26.436Z'
+ created_at: '2026-05-12T15:42:11.733Z'
+ updated_at: '2026-05-12T15:42:11.747Z'
available_stock: 0
reserved_quantity: 0
total_on_hand: 0
- product_name: Product 506322
+ product_name: Product 504118
display_price: "$19.99"
meta:
page: 1
@@ -10669,20 +10688,20 @@ paths:
option_type_label: Size
image_url:
metadata: {}
- created_at: '2026-05-12T13:53:27.099Z'
- updated_at: '2026-05-12T13:53:27.099Z'
+ created_at: '2026-05-12T15:42:12.405Z'
+ updated_at: '2026-05-12T15:42:12.405Z'
metadata: {}
position: 3
tax_category_id: 1
cost_price:
cost_currency: USD
deleted_at:
- created_at: '2026-05-12T13:53:27.103Z'
- updated_at: '2026-05-12T13:53:27.104Z'
+ created_at: '2026-05-12T15:42:12.409Z'
+ updated_at: '2026-05-12T15:42:12.410Z'
available_stock: 0
reserved_quantity: 0
total_on_hand: 0
- product_name: Product 515143
+ product_name: Product 51909
display_price: "$24.99"
'422':
description: validation error
@@ -10870,10 +10889,10 @@ paths:
purchasable: true
in_stock: false
backorderable: true
- weight: 82.29
- height: 43.48
- width: 55.32
- depth: 41.2
+ weight: 65.43
+ height: 186.57
+ width: 43.37
+ depth: 32.5
price:
id: price_gbHJdmfrXB
amount: '19.99'
@@ -10896,20 +10915,20 @@ paths:
option_type_label: Size
image_url:
metadata: {}
- created_at: '2026-05-12T13:53:27.536Z'
- updated_at: '2026-05-12T13:53:27.536Z'
+ created_at: '2026-05-12T15:42:12.827Z'
+ updated_at: '2026-05-12T15:42:12.827Z'
metadata: {}
position: 2
tax_category_id: 1
cost_price: '17.0'
cost_currency: USD
deleted_at:
- created_at: '2026-05-12T13:53:27.533Z'
- updated_at: '2026-05-12T13:53:27.549Z'
+ created_at: '2026-05-12T15:42:12.824Z'
+ updated_at: '2026-05-12T15:42:12.839Z'
available_stock: 0
reserved_quantity: 0
total_on_hand: 0
- product_name: Product 532781
+ product_name: Product 534046
display_price: "$19.99"
'404':
description: variant not found
@@ -10989,10 +11008,10 @@ paths:
purchasable: true
in_stock: false
backorderable: true
- weight: 118.18
- height: 48.83
- width: 38.67
- depth: 171.32
+ weight: 140.98
+ height: 81.91
+ width: 10.57
+ depth: 158.7
price:
id: price_gbHJdmfrXB
amount: '19.99'
@@ -11015,20 +11034,20 @@ paths:
option_type_label: Size
image_url:
metadata: {}
- created_at: '2026-05-12T13:53:28.228Z'
- updated_at: '2026-05-12T13:53:28.228Z'
+ created_at: '2026-05-12T15:42:13.522Z'
+ updated_at: '2026-05-12T15:42:13.522Z'
metadata: {}
position: 2
tax_category_id: 1
cost_price: '17.0'
cost_currency: USD
deleted_at:
- created_at: '2026-05-12T13:53:28.225Z'
- updated_at: '2026-05-12T13:53:28.540Z'
+ created_at: '2026-05-12T15:42:13.518Z'
+ updated_at: '2026-05-12T15:42:13.823Z'
available_stock: 0
reserved_quantity: 0
total_on_hand: 0
- product_name: Product 554685
+ product_name: Product 554352
display_price: "$19.99"
requestBody:
content:
diff --git a/docs/api-reference/store.yaml b/docs/api-reference/store.yaml
index cbe98219ad..4bf8829d2e 100644
--- a/docs/api-reference/store.yaml
+++ b/docs/api-reference/store.yaml
@@ -61,7 +61,7 @@ paths:
})
const addresses = await client.customer.addresses.list({}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -102,7 +102,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 71 Lovely Street
+ address1: 72 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -120,7 +120,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 70 Lovely Street
+ address1: 71 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -138,7 +138,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 69 Lovely Street
+ address1: 70 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -210,7 +210,7 @@ paths:
state_abbr: 'NY',
phone: '+1 555 123 4567',
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -352,7 +352,7 @@ paths:
})
const address = await client.customer.addresses.get('addr_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -387,7 +387,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 83 Lovely Street
+ address1: 84 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -434,7 +434,7 @@ paths:
const address = await client.customer.addresses.update('addr_abc123', {
city: 'Los Angeles',
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -462,7 +462,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 89 Lovely Street
+ address1: 90 Lovely Street
address2: Northwest
postal_code: '10118'
city: Los Angeles
@@ -523,7 +523,7 @@ paths:
})
await client.customer.addresses.delete('addr_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -590,16 +590,16 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImExM2U3ZDc1LTM0ZTMtNDE3Ni1hZWZmLTI5YWUwMDM2YTY3ZSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc3ODg2MzM1fQ.ycgE7nPpvVrjC-dY5YVS1ULTNSneBeoLPR4TMScSGdI
- refresh_token: 8rovZTJMREzNzgUStfy9pgKu
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjYzZDllNTc2LTkwNjItNGQzYi1iNGJhLWNkZjc5NjIxYzk5ZSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc4NjA0MTM5fQ.HwKYWOuEq1izkI7_Z4fx7ti9DP3Of8DcURC2kW_ISDo
+ refresh_token: z8UMPL3CjvQHUAixLjp9oGnE
user:
id: cus_UkLWZg9DAJ
- first_name: Malisa
- last_name: Leuschke
+ first_name: Freeda
+ last_name: Boyer
phone:
accepts_email_marketing: false
- full_name: Malisa Leuschke
+ full_name: Freeda Boyer
available_store_credit_total: '0'
display_available_store_credit_total: "$0.00"
addresses: []
@@ -672,16 +672,16 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjQ2MDRhNjg5LTAwNDQtNGMyYS1iOGM5LWE3ZDk1MTYwYzJhMCIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc3ODg2MzM2fQ.h2SgrmNk88Vmbf7DMy7gRx_JwCBtWBvt3MO578_cAwE
- refresh_token: FHiHaeJnXuFSAvh9LRvQL3bB
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjdkMThhMDg1LTQ5ZTMtNDViZi05OGQ4LTJkZDE0NDJmNDhiNiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc4NjA0MTQxfQ.74MtiuXlIgpD6SP1y_1NrWyb32ynJmC6D-ENvyITYBQ
+ refresh_token: 7mwM7BLiJqACho9mTdqsx3UX
user:
id: cus_UkLWZg9DAJ
- first_name: Anneliese
- last_name: Balistreri
+ first_name: Elyse
+ last_name: Funk
phone:
accepts_email_marketing: false
- full_name: Anneliese Balistreri
+ full_name: Elyse Funk
available_store_credit_total: '0'
display_available_store_credit_total: "$0.00"
addresses: []
@@ -777,7 +777,7 @@ paths:
})
const carts = await client.carts.list({
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -845,9 +845,9 @@ paths:
data:
- id: cart_gbHJdmfrXB
market_id:
- number: R618887686
- token: SdM2BkjKUA6XPWqzhwZoZvmBGHFfGaXRpfK
+ number: R022289206
+ token: p9wuKJNomwoWRhAGqoCFcqzyWa7mc8GE9dT
customer_note:
currency: USD
locale: en
@@ -889,8 +889,8 @@ paths:
variant_id: variant_gbHJdmfrXB
quantity: 1
currency: USD
- name: Product 565163
- slug: product-565163
+ name: Product 582369
+ slug: product-582369
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -915,7 +915,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_gbHJdmfrXB
- number: H29558440573
+ number: H01169315518
tracking: U10000
tracking_url:
cost: '100.0'
@@ -944,7 +944,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Evelyne Stiedemann
+ name: Kayla West
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -976,7 +976,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 104 Lovely Street
+ address1: 105 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -995,7 +995,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 105 Lovely Street
+ address1: 106 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -1014,9 +1014,9 @@ paths:
market:
- id: cart_UkLWZg9DAJ
market_id:
- number: R580209874
- token: 258t3vNeWcMi9BBqqiFH1xsnLaWrH2kZSzt
+ number: R190642310
+ token: GLrYYQUJ1BPJwF2PFo95g2VAjmi56ZgD8s4
customer_note:
currency: USD
locale: en
@@ -1058,8 +1058,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 557480
- slug: product-557480
+ name: Product 573153
+ slug: product-573153
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -1084,7 +1084,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H03632429641
+ number: H18339296147
tracking: U10000
tracking_url:
cost: '100.0'
@@ -1113,7 +1113,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Evelyne Stiedemann
+ name: Kayla West
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -1145,7 +1145,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 102 Lovely Street
+ address1: 103 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -1164,7 +1164,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 103 Lovely Street
+ address1: 104 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -1256,8 +1256,8 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R512988572
- token: Jzia2KJwSNKSxQVpnDvKMfaxuHvVkmmHrhT
+ number: R751484398
+ token: kcReZ9WuHhUwm71YcTfsBZWjphrpUXWqsjD
email:
customer_note:
currency: USD
@@ -1365,7 +1365,7 @@ paths:
})
const cart = await client.carts.get('cart_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -1412,9 +1412,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R832102444
- token: ouoSYizfBMrzkSPKEgu8QUVvWQ9HDHYa7FA
+ number: R047288101
+ token: kBgmtnLYFb6fePVEXWh2enqxGY96vJF8WBK
customer_note:
currency: USD
locale: en
@@ -1441,7 +1441,7 @@ paths:
display_delivery_total: "$0.00"
warnings:
- code: line_item_removed
- message: Product 604133 was removed because it was sold out
+ message: Product 628389 was removed because it was sold out
line_item_id: li_UkLWZg9DAJ
variant_id: variant_UkLWZg9DAJ
store_credit_total: '0.0'
@@ -1466,7 +1466,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 112 Lovely Street
+ address1: 113 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -1485,7 +1485,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 113 Lovely Street
+ address1: 114 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -1546,7 +1546,7 @@ paths:
state_abbr: 'NY',
},
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -1583,9 +1583,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R906855847
- token: YXZMcqYT6ywxEpj9S5GPjFRnUPpJrqVLaCn
+ number: R531662112
+ token: sqz1mLKCdUcimQsSp9zohLLS4iorVyxySyd
customer_note: Leave at door
currency: USD
locale: en
@@ -1629,8 +1629,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 613243
- slug: product-613243
+ name: Product 637659
+ slug: product-637659
options_text: ''
price: '19.99'
display_price: "$19.99"
@@ -1655,7 +1655,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_gbHJdmfrXB
- number: H78556410272
+ number: H46257825114
tracking:
tracking_url:
cost: '10.0'
@@ -1684,7 +1684,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Angla Cassin
+ name: Benita Harvey
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -1716,7 +1716,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 116 Lovely Street
+ address1: 117 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -1735,7 +1735,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 117 Lovely Street
+ address1: 118 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -1844,7 +1844,7 @@ paths:
})
await client.carts.delete('cart_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -1894,7 +1894,7 @@ paths:
})
const cart = await client.carts.associate('cart_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -1921,9 +1921,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R931173712
- token: 7uLnCxRpQs3Sa1DMRyojktddwi1E4dueJZU
+ number: R599563678
+ token: 7eGLSN4CLsf8rVQxDPJ9uPuVYcwHmLiWdNp
customer_note:
currency: USD
locale: en
@@ -1965,8 +1965,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 631338
- slug: product-631338
+ name: Product 656279
+ slug: product-656279
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -1991,7 +1991,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H42747051940
+ number: H12078080684
tracking: U10000
tracking_url:
cost: '100.0'
@@ -2020,7 +2020,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Tana Runolfsdottir
+ name: George Wunsch
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -2052,7 +2052,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 122 Lovely Street
+ address1: 123 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -2071,7 +2071,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 123 Lovely Street
+ address1: 124 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -2122,7 +2122,7 @@ paths:
})
const order = await client.carts.complete('cart_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -2154,8 +2154,9 @@ paths:
example:
id: or_UkLWZg9DAJ
market_id:
- number: R719386816
+ channel_id: ch_UkLWZg9DAJ
+ number: R951937435
customer_note:
currency: USD
locale: en
@@ -2182,7 +2183,7 @@ paths:
display_delivery_total: "$10.00"
fulfillment_status: backorder
payment_status: paid
- completed_at: '2026-05-04T08:19:02.460Z'
+ completed_at: '2026-05-12T15:42:27.408Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -2192,8 +2193,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 654923
- slug: product-654923
+ name: Product 679737
+ slug: product-679737
options_text: ''
price: '19.99'
display_price: "$19.99"
@@ -2218,7 +2219,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_gbHJdmfrXB
- number: H79182010537
+ number: H80921293616
tracking:
tracking_url:
cost: '10.0'
@@ -2247,7 +2248,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Sunday Nicolas
+ name: Blanca Hermann
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -2276,8 +2277,8 @@ paths:
payments:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: BGS-a3e2563c9b7a
- number: P8OVW6DM
+ response_code: BGS-d4ee5d02ce1b
+ number: P8ECYI7W
amount: '29.99'
display_amount: "$29.99"
status: completed
@@ -2296,7 +2297,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Check
description:
- type: Spree::PaymentMethod::Check
+ type: check
session_required: false
source_required: false
billing_address:
@@ -2304,7 +2305,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 130 Lovely Street
+ address1: 131 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -2323,7 +2324,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 131 Lovely Street
+ address1: 132 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -2510,7 +2511,7 @@ paths:
})
const category = await client.categories.get('categories/clothing/shirts', {
- expand: 'children',
+ expand: ['children'],
})
parameters:
- name: x-spree-api-key
@@ -2625,7 +2626,7 @@ paths:
example:
data:
- iso: DE
- iso3: IS35
+ iso3: IS39
name: Germany
states_required: false
zipcode_required: true
@@ -2754,7 +2755,7 @@ paths:
})
const cards = await client.customer.creditCards.list({}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -2849,7 +2850,7 @@ paths:
})
const card = await client.customer.creditCards.get('card_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -2920,7 +2921,7 @@ paths:
})
await client.customer.creditCards.delete('card_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -3133,16 +3134,16 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6Ijg5YTBiOTc4LWY1N2ItNDY3NS04YmVmLTY4YTdlNzRjZDExNSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc3ODg2MzQ4fQ.-FGWXSNp-4ISSXmKEgFL8v0E2Kh-e_EmZ9Fk6aimgTM
- refresh_token: Rij6tnvCbRznq1sSJzoSGiUK
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6Ijc5NzE3YzgzLTc0ZWUtNDY4OC1hNjZiLTFkZjgxYTA3NDQwMiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc4NjA0MTUzfQ.CifBMXlwI8kNQkc42vdWVmQ55TfDDWepPmMu3U9QzOY
+ refresh_token: TXWU7v2o2vR9bE8FtP5dt6T9
user:
id: cus_UkLWZg9DAJ
- first_name: Stasia
- last_name: Daniel
+ first_name: Glennie
+ last_name: Robel
phone:
accepts_email_marketing: false
- full_name: Stasia Daniel
+ full_name: Glennie Robel
available_store_credit_total: '0'
display_available_store_credit_total: "$0.00"
addresses: []
@@ -3210,11 +3211,13 @@ paths:
publishableKey: '<api-key>',
})
- const orders = await client.customer.orders.list({
- bearerToken: '<token>',
- completed_at_gt: '2026-01-01',
- sort: '-completed_at',
- })
+ const orders = await client.customer.orders.list(
+ {
+ completed_at_gt: '2026-01-01',
+ sort: '-completed_at',
+ },
+ { token: '<token>' },
+ )
parameters:
- name: x-spree-api-key
in: header
@@ -3312,8 +3315,9 @@ paths:
data:
- id: or_UkLWZg9DAJ
market_id:
- number: R035435259
+ channel_id: ch_UkLWZg9DAJ
+ number: R248567929
customer_note:
currency: USD
locale: en
@@ -3340,7 +3344,7 @@ paths:
display_delivery_total: "$100.00"
fulfillment_status:
payment_status:
- completed_at: '2026-05-04T08:19:09.595Z'
+ completed_at: '2026-05-12T15:42:34.712Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -3350,8 +3354,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 746357
- slug: product-746357
+ name: Product 761567
+ slug: product-761567
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -3376,7 +3380,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H28466111211
+ number: H97241969307
tracking: U10000
tracking_url:
cost: '100.0'
@@ -3405,7 +3409,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Deandrea Wilkinson
+ name: Tammi Hyatt
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -3437,7 +3441,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 150 Lovely Street
+ address1: 151 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -3456,7 +3460,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 151 Lovely Street
+ address1: 152 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -3524,8 +3528,8 @@ paths:
publishableKey: '<api-key>',
})
- const order = await client.customer.orders.get('or_abc123', {
- bearerToken: '<token>',
+ const order = await client.customer.orders.get('or_abc123', {}, {
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -3567,8 +3571,9 @@ paths:
example:
id: or_UkLWZg9DAJ
market_id:
- number: R460046994
+ channel_id: ch_UkLWZg9DAJ
+ number: R452671995
customer_note:
currency: USD
locale: en
@@ -3595,7 +3600,7 @@ paths:
display_delivery_total: "$100.00"
fulfillment_status:
payment_status:
- completed_at: '2026-05-04T08:19:10.292Z'
+ completed_at: '2026-05-12T15:42:35.421Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -3605,8 +3610,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 762732
- slug: product-762732
+ name: Product 782615
+ slug: product-782615
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -3631,7 +3636,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H17519938428
+ number: H92621732693
tracking: U10000
tracking_url:
cost: '100.0'
@@ -3660,7 +3665,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Erlinda Ferry
+ name: Cassy Murray
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -3692,7 +3697,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 156 Lovely Street
+ address1: 157 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -3711,7 +3716,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 157 Lovely Street
+ address1: 158 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -3780,8 +3785,8 @@ paths:
content:
application/json:
example:
- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjAzMTE0NThjLWJkYzctNGU4OC1iY2YwLWQ1MjMyNGM0ZTE0ZSIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc3ODg2MzUxfQ.H9YYGr4aXBMrbWFE9Kyi2IyPoJUaY0A8O9yEWAxQqbg
- refresh_token: amBVTCe49MBLT5yVXcTP7rJD
+ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6Ijk3NWYwZjIxLThmM2UtNDE5ZC1hYzY2LTQ1NGYzMmNkN2Q3MCIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzc4NjA0MTU2fQ.kjWltx1PK2crb-2oAYiChU-v-Z3ytRWZLOQQWn0RqNk
+ refresh_token: eqwUHj57waAUngBU8NWchC62
user:
id: cus_UkLWZg9DAJ
@@ -3867,7 +3872,7 @@ paths:
})
const customer = await client.customer.get({
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -3895,12 +3900,12 @@ paths:
application/json:
example:
id: cus_UkLWZg9DAJ
- first_name: Lynell
- last_name: West
+ first_name: Avis
+ last_name: Howell
phone: 555-555-0199
accepts_email_marketing: false
- full_name: Lynell West
+ full_name: Avis Howell
available_store_credit_total: '0'
display_available_store_credit_total: "$0.00"
addresses:
@@ -3908,7 +3913,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 163 Lovely Street
+ address1: 164 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -3926,7 +3931,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 162 Lovely Street
+ address1: 163 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -3945,7 +3950,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 163 Lovely Street
+ address1: 164 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -3964,7 +3969,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 162 Lovely Street
+ address1: 163 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4014,7 +4019,7 @@ paths:
last_name: 'Doe',
metadata: { preferred_contact: 'email' },
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -4034,7 +4039,7 @@ paths:
application/json:
example:
id: cus_UkLWZg9DAJ
first_name: Updated
last_name: Name
phone: 555-555-0199
@@ -4047,7 +4052,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 165 Lovely Street
+ address1: 166 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4065,7 +4070,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 164 Lovely Street
+ address1: 165 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4084,7 +4089,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 165 Lovely Street
+ address1: 166 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4103,7 +4108,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 164 Lovely Street
+ address1: 165 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4234,7 +4239,7 @@ paths:
})
const cart = await client.carts.discountCodes.apply('cart_abc123', 'SAVE10', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -4274,9 +4279,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R215796217
- token: BBdNFUTVzy83u24enuPFKhbgh5dk51wWWEB
+ number: R340393669
+ token: BYCjeHC9fpsaGcyitUdopq87WbuQfLCodtn
customer_note:
currency: USD
locale: en
@@ -4325,8 +4330,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 848009
- slug: product-848009
+ name: Product 868087
+ slug: product-868087
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -4351,7 +4356,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H98606593694
+ number: H80286576217
tracking: U10000
tracking_url:
cost: '100.0'
@@ -4380,7 +4385,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Mana Hirthe
+ name: Nathaniel Gerhold
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -4412,7 +4417,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 182 Lovely Street
+ address1: 183 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4431,7 +4436,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 183 Lovely Street
+ address1: 184 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4494,7 +4499,7 @@ paths:
})
const cart = await client.carts.discountCodes.remove('cart_abc123', 'SAVE10', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -4534,9 +4539,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R769106477
- token: 4o4VZZGUXJmyKLQSe9KN1cJm9pcrfd9gqQ7
+ number: R746162141
+ token: 2ZmydARzpg6XXhaB7QweK2teniEWVmmZUjU
customer_note:
currency: USD
locale: en
@@ -4578,8 +4583,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 862500
- slug: product-862500
+ name: Product 881465
+ slug: product-881465
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -4604,7 +4609,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H13342204637
+ number: H65084033901
tracking: U10000
tracking_url:
cost: '100.0'
@@ -4633,7 +4638,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Dolly Koepp
+ name: Kiera Jacobs
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -4665,7 +4670,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 190 Lovely Street
+ address1: 191 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4684,7 +4689,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 191 Lovely Street
+ address1: 192 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4737,7 +4742,7 @@ paths:
const cart = await client.carts.fulfillments.update('cart_abc123', 'ful_abc123', {
selected_delivery_rate_id: 'dr_abc123',
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -4776,9 +4781,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R557817101
- token: 9xquwSgjHp1uzfydK6j3c8w1VSA9E9VKQxZ
+ number: R168118336
+ token: E5uf6JDpWgMRq6T7EAqpR52iBYvp41d6zLA
customer_note:
currency: USD
locale: en
@@ -4822,8 +4827,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 886097
- slug: product-886097
+ name: Product 903926
+ slug: product-903926
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -4848,7 +4853,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H98772230904
+ number: H83658115233
tracking: U10000
tracking_url:
cost: '100.0'
@@ -4877,7 +4882,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Cedrick Smitham
+ name: Wen Kautzer
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -4909,7 +4914,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 198 Lovely Street
+ address1: 199 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4928,7 +4933,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 199 Lovely Street
+ address1: 200 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -4994,7 +4999,7 @@ paths:
})
const cart = await client.carts.giftCards.apply('cart_abc123', 'GC-ABCD-1234', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -5034,9 +5039,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R726947393
- token: Khad7phz9S8A5xjfqQw38waD9HfpEyNKnHV
+ number: R178625990
+ token: BUUL1mczxZq6hmaFccBwrVeAhHLwg42VjL7
customer_note:
currency: USD
locale: en
@@ -5075,8 +5080,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 903701
- slug: product-903701
+ name: Product 928451
+ slug: product-928451
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -5101,7 +5106,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H17628770254
+ number: H71248046308
tracking: U10000
tracking_url:
cost: '100.0'
@@ -5130,7 +5135,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Abbie Nitzsche
+ name: Marcia Kirlin
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -5159,8 +5164,8 @@ paths:
payments:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: 1-SC-20260504081919984006
- number: P0XK3WL3
+ response_code: 1-SC-20260512154245003877
+ number: PZU2PALW
amount: '50.0'
display_amount: "$50.00"
status: checkout
@@ -5179,7 +5184,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Store Credit
description:
- type: Spree::PaymentMethod::StoreCredit
+ type: store_credit
session_required: false
source_required: true
billing_address:
@@ -5187,7 +5192,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 206 Lovely Street
+ address1: 207 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -5206,7 +5211,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 207 Lovely Street
+ address1: 208 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -5224,7 +5229,7 @@ paths:
- id: pm_UkLWZg9DAJ
name: Store Credit
description:
- type: Spree::PaymentMethod::StoreCredit
+ type: store_credit
session_required: false
source_required: true
gift_card:
@@ -5299,7 +5304,7 @@ paths:
})
const cart = await client.carts.giftCards.remove('cart_abc123', 'gc_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -5339,9 +5344,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R773580298
- token: SCQJkkKqTF1VQmLY8oHgueJuWw6TZnxiv73
+ number: R548104755
+ token: N46zRYmw5h1BzERAh8GEUceM8YFnkNfymrd
customer_note:
currency: USD
locale: en
@@ -5383,8 +5388,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 945451
- slug: product-945451
+ name: Product 963559
+ slug: product-963559
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -5409,7 +5414,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H38060487694
+ number: H77144632583
tracking: U10000
tracking_url:
cost: '100.0'
@@ -5438,7 +5443,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Aide O'Connell
+ name: Florinda Feil
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -5467,8 +5472,8 @@ paths:
payments:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: 1-SC-20260504081922520413
- number: P1T1EVFA
+ response_code: 1-SC-20260512154247474786
+ number: PTOIK4VL
amount: '50.0'
display_amount: "$50.00"
status: invalid
@@ -5487,7 +5492,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Store Credit
description:
- type: Spree::PaymentMethod::StoreCredit
+ type: store_credit
session_required: false
source_required: true
billing_address:
@@ -5495,7 +5500,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 222 Lovely Street
+ address1: 223 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -5514,7 +5519,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 223 Lovely Street
+ address1: 224 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -5554,7 +5559,7 @@ paths:
})
const giftCards = await client.customer.giftCards.list({}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -5592,7 +5597,7 @@ paths:
example:
data:
- id: gc_UkLWZg9DAJ
- code: 2EEC2C0A144AA41E
+ code: 02EF937C04E97347
status: active
currency: USD
amount: '10.0'
@@ -5656,7 +5661,7 @@ paths:
})
const giftCard = await client.customer.giftCards.get('gc_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -5688,7 +5693,7 @@ paths:
application/json:
example:
id: gc_UkLWZg9DAJ
- code: B032500DFD566D52
+ code: D7753E0A2D7BDC8C
status: active
currency: USD
amount: '10.0'
@@ -5739,7 +5744,7 @@ paths:
variant_id: 'variant_abc123',
quantity: 2,
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -5779,9 +5784,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R215627740
- token: ukn3dovsVnSmp7ZzUQAXcU9Uy5L6KPcUgJ4
+ number: R905034947
+ token: vpiPL5sXcZVdhXh2rCoCPdhvUcEyCVM6fsC
customer_note:
currency: USD
locale: en
@@ -5829,8 +5834,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 972562
- slug: product-972562
+ name: Product 99340
+ slug: product-99340
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -5857,8 +5862,8 @@ paths:
variant_id: variant_gbHJdmfrXB
quantity: 1
currency: USD
- name: Product 98775
- slug: product-98775
+ name: Product 1007428
+ slug: product-1007428
options_text: ''
price: '19.99'
display_price: "$19.99"
@@ -5888,7 +5893,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 237 Lovely Street
+ address1: 238 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -5963,7 +5968,7 @@ paths:
const cart = await client.carts.items.update('cart_abc123', 'li_abc123', {
quantity: 5,
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -6001,9 +6006,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R770436707
- token: oZ4bd4hojS9S32t8AhgeYNmdy2RWDt3q8z4
+ number: R371137090
+ token: n7fpCp5mPgBmKV8jaFFvnSsYDfAK7eoqbKC
customer_note:
currency: USD
locale: en
@@ -6048,8 +6053,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 101922
- slug: product-101922
+ name: Product 1031098
+ slug: product-1031098
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -6079,7 +6084,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 246 Lovely Street
+ address1: 247 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -6135,7 +6140,7 @@ paths:
})
const cart = await client.carts.items.delete('cart_abc123', 'li_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -6172,9 +6177,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R959911711
- token: fGLqoT7RVigFuCMbZQ64wR7nZdt6mV8bLj6
+ number: R009334378
+ token: hKQJVnQggeNryCz5wwSz9Hyk1tnssyvqfRV
customer_note:
currency: USD
locale: en
@@ -6225,7 +6230,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 249 Lovely Street
+ address1: 250 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -6386,12 +6391,12 @@ paths:
- fr
countries:
- iso: DE
- iso3: IS62
+ iso3: IS66
name: Germany
states_required: false
zipcode_required: true
- iso: FR
- iso3: IS63
+ iso3: IS67
name: France
states_required: false
zipcode_required: true
@@ -6470,12 +6475,12 @@ paths:
- fr
countries:
- iso: DE
- iso3: IS66
+ iso3: IS70
name: Germany
states_required: false
zipcode_required: true
- iso: FR
- iso3: IS67
+ iso3: IS71
name: France
states_required: false
zipcode_required: true
@@ -6550,12 +6555,12 @@ paths:
- fr
countries:
- iso: DE
- iso3: IS70
+ iso3: IS74
name: Germany
states_required: false
zipcode_required: true
- iso: FR
- iso3: IS71
+ iso3: IS75
name: France
states_required: false
zipcode_required: true
@@ -6619,12 +6624,12 @@ paths:
example:
data:
- iso: FR
- iso3: IS75
+ iso3: IS79
name: France
states_required: false
zipcode_required: true
- iso: DE
- iso3: IS74
+ iso3: IS78
name: Germany
states_required: false
zipcode_required: true
@@ -6725,8 +6730,8 @@ paths:
publishableKey: '<api-key>',
})
- const order = await client.orders.get('or_abc123', {
- bearerToken: '<token>',
+ const order = await client.orders.get('or_abc123', {}, {
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -6775,7 +6780,8 @@ paths:
example:
id: or_UkLWZg9DAJ
market_id:
- number: R099312823
+ channel_id: ch_UkLWZg9DAJ
+ number: R772794141
customer_note:
currency: USD
@@ -6803,7 +6809,7 @@ paths:
display_delivery_total: "$100.00"
fulfillment_status:
payment_status:
- completed_at: '2026-05-04T08:19:30.457Z'
+ completed_at: '2026-05-12T15:42:55.125Z'
store_credit_total: '0.0'
display_store_credit_total: "$0.00"
covered_by_store_credit: false
@@ -6813,8 +6819,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 1051611
- slug: product-1051611
+ name: Product 1079903
+ slug: product-1079903
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -6839,7 +6845,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H29105448841
+ number: H90863984759
tracking: U10000
tracking_url:
cost: '100.0'
@@ -6868,7 +6874,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Lupe Welch
+ name: Christin Harber
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -6900,7 +6906,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 257 Lovely Street
+ address1: 258 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -6919,7 +6925,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 258 Lovely Street
+ address1: 259 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -6972,7 +6978,7 @@ paths:
const session = await client.carts.paymentSessions.create('cart_abc123', {
payment_method_id: 'pm_abc123',
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -7013,9 +7019,9 @@ paths:
id: ps_gbHJdmfrXB
status: pending
currency: USD
- external_id: bogus_1cd883ef85a581926b812bf5
+ external_id: bogus_bf3baf9d938cbc32bf728c44
external_data:
- client_secret: bogus_secret_c7d9d655c9959cd8
+ client_secret: bogus_secret_27c1d9adfb8847cf
customer_external_id:
expires_at:
amount: '110.0'
@@ -7025,7 +7031,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Credit Card
description:
- type: Spree::Gateway::Bogus
+ type: bogus
session_required: true
source_required: true
schema:
@@ -7102,7 +7108,7 @@ paths:
})
const session = await client.carts.paymentSessions.get('cart_abc123', 'ps_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
responses:
'200':
@@ -7113,7 +7119,7 @@ paths:
id: ps_UkLWZg9DAJ
status: pending
currency: USD
- external_id: bogus_d12a4c4449ea25cafcca4b0b
+ external_id: bogus_44e7b7e652599c3b083d76fd
external_data:
client_secret: secret_123
customer_external_id:
@@ -7125,7 +7131,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Credit Card
description:
- type: Spree::Gateway::Bogus
+ type: bogus
session_required: true
source_required: true
schema:
@@ -7163,7 +7169,7 @@ paths:
const session = await client.carts.paymentSessions.update('cart_abc123', 'ps_abc123', {
amount: '50.00',
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters: []
responses:
@@ -7175,7 +7181,7 @@ paths:
id: ps_UkLWZg9DAJ
status: pending
currency: USD
- external_id: bogus_3906af62cca5c291d50963e3
+ external_id: bogus_944622f02786473ace96ce29
external_data:
client_secret: secret_123
customer_external_id:
@@ -7187,7 +7193,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Credit Card
description:
- type: Spree::Gateway::Bogus
+ type: bogus
session_required: true
source_required: true
schema:
@@ -7259,7 +7265,7 @@ paths:
const session = await client.carts.paymentSessions.complete('cart_abc123', 'ps_abc123', {
session_result: 'success',
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: Idempotency-Key
@@ -7277,7 +7283,7 @@ paths:
id: ps_UkLWZg9DAJ
status: completed
currency: USD
- external_id: bogus_d18c75a6fd035f585624d7fa
+ external_id: bogus_a53bb088bea0babef31ae9c6
external_data:
client_secret: secret_123
customer_external_id:
@@ -7289,7 +7295,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Credit Card
description:
- type: Spree::Gateway::Bogus
+ type: bogus
session_required: true
source_required: true
schema:
@@ -7341,7 +7347,7 @@ paths:
const session = await client.customer.paymentSetupSessions.create({
payment_method_id: 'pm_abc123',
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -7362,8 +7368,8 @@ paths:
example:
id: pss_gbHJdmfrXB
status: pending
- external_id: bogus_seti_f561720992e188ca83fe6437
- external_client_secret: bogus_seti_secret_99f60ae80c94b07b
+ external_id: bogus_seti_24e07dbed1e60f5cfdfca618
+ external_client_secret: bogus_seti_secret_690bc4fc883d7045
external_data: {}
payment_method_id: pm_UkLWZg9DAJ
payment_source_id:
@@ -7373,7 +7379,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Credit Card
description:
- type: Spree::Gateway::Bogus
+ type: bogus
session_required: true
source_required: true
schema:
@@ -7452,7 +7458,7 @@ paths:
})
const session = await client.customer.paymentSetupSessions.get('pss_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
responses:
'200':
@@ -7462,8 +7468,8 @@ paths:
example:
id: pss_UkLWZg9DAJ
status: pending
- external_id: seti_test_ac2adbf49a51de7bbd63247f
- external_client_secret: seti_secret_4632ebeed41691d82c291f4c
+ external_id: seti_test_5e543f27455fb5578cd18444
+ external_client_secret: seti_secret_64fc9b8d53cda30031ba6b75
external_data:
client_secret: secret_123
payment_method_id: pm_UkLWZg9DAJ
@@ -7474,7 +7480,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Credit Card
description:
- type: Spree::Gateway::Bogus
+ type: bogus
session_required: true
source_required: true
schema:
@@ -7528,7 +7534,7 @@ paths:
})
const session = await client.customer.paymentSetupSessions.complete('pss_abc123', {}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters: []
responses:
@@ -7539,8 +7545,8 @@ paths:
example:
id: pss_UkLWZg9DAJ
status: completed
- external_id: seti_test_336c94146c6a51ba0194f2e3
- external_client_secret: seti_secret_90f14bb01966cba00ff4b199
+ external_id: seti_test_e9c3bc383d45f02e85af2f88
+ external_client_secret: seti_secret_48cc175d1ee04ff3851bf97c
external_data:
client_secret: secret_123
payment_method_id: pm_UkLWZg9DAJ
@@ -7551,7 +7557,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Credit Card
description:
- type: Spree::Gateway::Bogus
+ type: bogus
session_required: true
source_required: true
schema:
@@ -7600,7 +7606,7 @@ paths:
const payment = await client.carts.payments.create('cart_abc123', {
payment_method_id: 'pm_abc123',
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -7634,7 +7640,7 @@ paths:
id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
response_code:
- number: PIIEW65X
+ number: PA6ELZRO
amount: '110.0'
display_amount: "$110.00"
status: checkout
@@ -7645,7 +7651,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Check
description:
- type: Spree::PaymentMethod::Check
+ type: check
session_required: false
source_required: false
schema:
@@ -7730,7 +7736,7 @@ paths:
body_html: ''
- id: pol_OIJLhNcSbf
name: Privacy Policy
- slug: privacy-policy-96e1ecce-0357-480b-909e-d684265f3ec5
+ slug: privacy-policy-959e696a-c89c-4300-b106-721aa99a32a0
body: We respect your privacy.
body_html: |
<div class="trix-content">
@@ -7974,12 +7980,12 @@ paths:
example:
data:
- id: prod_UkLWZg9DAJ
- name: Product 1158874
- slug: product-1158874
+ name: Product 1178152
+ slug: product-1178152
meta_description:
meta_keywords:
variant_count: 1
- available_on: '2025-05-04T08:19:40.720Z'
+ available_on: '2025-05-12T15:43:05.381Z'
purchasable: true
in_stock: false
backorderable: true
@@ -8001,22 +8007,24 @@ paths:
price_list_id:
original_price:
- id: prod_gbHJdmfrXB
- name: Product 1162830
- slug: product-1162830
+ name: Product 118181
+ slug: product-118181
meta_description:
meta_keywords:
variant_count: 0
- available_on: '2025-05-04T08:19:40.780Z'
+ available_on: '2025-05-12T15:43:05.442Z'
purchasable: true
in_stock: false
backorderable: true
available: true
- description: Minus earum explicabo amet nihil pariatur. Saepe sint
- molestias at vero animi sequi cumque quis. Nam temporibus tempora
- quam libero.
- description_html: Minus earum explicabo amet nihil pariatur. Saepe
- sint molestias at vero animi sequi cumque quis. Nam temporibus
- tempora quam libero.
+ description: Deleniti necessitatibus ipsum quibusdam quas ad incidunt
+ saepe perferendis. Amet vero illum voluptas rerum. Incidunt et
+ iure voluptatem animi provident earum vel cum. Sequi repellat
+ quaerat natus tempore molestias qui enim quibusdam.
+ description_html: Deleniti necessitatibus ipsum quibusdam quas ad
+ incidunt saepe perferendis. Amet vero illum voluptas rerum. Incidunt
+ et iure voluptatem animi provident earum vel cum. Sequi repellat
+ quaerat natus tempore molestias qui enim quibusdam.
default_variant_id: variant_EfhxLZ9ck8
thumbnail_url:
tags: []
@@ -8118,12 +8126,12 @@ paths:
application/json:
example:
id: prod_UkLWZg9DAJ
- name: Product 1434230
- slug: product-1434230
+ name: Product 14568
+ slug: product-14568
meta_description:
meta_keywords:
variant_count: 1
- available_on: '2025-05-04T08:19:42.365Z'
+ available_on: '2025-05-12T15:43:06.944Z'
purchasable: true
in_stock: false
backorderable: true
@@ -8150,7 +8158,7 @@ paths:
amount_in_cents: 999
currency: USD
display_amount: "$9.99"
- recorded_at: '2026-04-19T08:19:42Z'
+ recorded_at: '2026-04-27T15:43:06Z'
schema:
"$ref": "#/components/schemas/Product"
'404':
@@ -8321,7 +8329,7 @@ paths:
})
const credits = await client.customer.storeCredits.list({}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -8415,7 +8423,7 @@ paths:
})
const credit = await client.customer.storeCredits.get('credit_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -8487,7 +8495,7 @@ paths:
})
const cart = await client.carts.storeCredits.apply('cart_abc123', 10.0, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -8525,9 +8533,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R945566384
- token: pd95wgtA8uoLj2dVyav9nBsjUbopiEtiouS
+ number: R510174060
+ token: 9q7RtN7dYas6qeBrDJ3jMCnhHASqpGurh2P
customer_note:
currency: USD
locale: en
@@ -8566,8 +8574,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 1631788
- slug: product-1631788
+ name: Product 1652863
+ slug: product-1652863
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -8592,7 +8600,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H72649836525
+ number: H18772267392
tracking: U10000
tracking_url:
cost: '100.0'
@@ -8621,7 +8629,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Natividad Hamill
+ name: Yong Metz
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -8650,8 +8658,8 @@ paths:
payments:
- id: py_UkLWZg9DAJ
payment_method_id: pm_UkLWZg9DAJ
- response_code: 1-SC-20260504081947644571
- number: PH7LEI1P
+ response_code: 1-SC-20260512154312155111
+ number: PR0T38Y7
amount: '10.0'
display_amount: "$10.00"
status: checkout
@@ -8670,7 +8678,7 @@ paths:
id: pm_UkLWZg9DAJ
name: Store Credit
description: Store Credit
- type: Spree::PaymentMethod::StoreCredit
+ type: store_credit
session_required: false
source_required: true
billing_address:
@@ -8678,7 +8686,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 321 Lovely Street
+ address1: 322 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -8697,7 +8705,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 322 Lovely Street
+ address1: 323 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -8715,7 +8723,7 @@ paths:
- id: pm_UkLWZg9DAJ
name: Store Credit
description: Store Credit
- type: Spree::PaymentMethod::StoreCredit
+ type: store_credit
session_required: false
source_required: true
gift_card:
@@ -8762,7 +8770,7 @@ paths:
})
const cart = await client.carts.storeCredits.remove('cart_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -8794,9 +8802,9 @@ paths:
example:
id: cart_UkLWZg9DAJ
market_id:
- number: R971986124
- token: EBUj579M5ZLmTAozTeeFz1UkKUo1PqYU51o
+ number: R239213958
+ token: vb5kVadtmTNypRAxbC3uLryhAepLReVhmkV
customer_note:
currency: USD
locale: en
@@ -8838,8 +8846,8 @@ paths:
variant_id: variant_UkLWZg9DAJ
quantity: 1
currency: USD
- name: Product 1658215
- slug: product-1658215
+ name: Product 167660
+ slug: product-167660
options_text: ''
price: '10.0'
display_price: "$10.00"
@@ -8864,7 +8872,7 @@ paths:
digital_links: []
fulfillments:
- id: ful_UkLWZg9DAJ
- number: H95990973054
+ number: H72935924297
tracking: U10000
tracking_url:
cost: '100.0'
@@ -8893,7 +8901,7 @@ paths:
stock_location:
id: sloc_UkLWZg9DAJ
state_abbr: NY
- name: Linh Casper
+ name: Magan Stiedemann
address1: 1600 Pennsylvania Ave NW
city: Washington
zipcode: '20500'
@@ -8925,7 +8933,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 329 Lovely Street
+ address1: 330 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -8944,7 +8952,7 @@ paths:
first_name: John
last_name: Doe
full_name: John Doe
- address1: 330 Lovely Street
+ address1: 331 Lovely Street
address2: Northwest
postal_code: '10118'
city: New York
@@ -8984,7 +8992,7 @@ paths:
})
const wishlists = await client.wishlists.list({}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -9023,7 +9031,7 @@ paths:
data:
- id: wl_UkLWZg9DAJ
name: My Wishlist
- token: XVznyCqcTCE652qaPsdvEiUB
+ token: JV6fti7aSf66KLKjgu2TfAPE
is_default: false
is_private: true
meta:
@@ -9078,7 +9086,7 @@ paths:
name: 'Birthday Ideas',
is_private: true,
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -9099,7 +9107,7 @@ paths:
example:
id: wl_gbHJdmfrXB
name: Birthday Ideas
- token: QovG4j4AcaMhZU8SaUvXcLaj
+ token: EiZHDNwzFvN6ZeHBYhYUcfBz
is_default: false
is_private: true
schema:
@@ -9154,9 +9162,9 @@ paths:
})
const wishlist = await client.wishlists.get('wl_abc123', {
- expand: 'wished_items',
+ expand: ['wished_items'],
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -9195,7 +9203,7 @@ paths:
example:
id: wl_UkLWZg9DAJ
name: My Wishlist
- token: P35Ve31uYuQ4ciNbAx4u3yLw
+ token: Yr7a1DV9BceYqLKR1xUiXPsK
is_default: false
is_private: true
schema:
@@ -9231,7 +9239,7 @@ paths:
const wishlist = await client.wishlists.update('wl_abc123', {
name: 'Updated Name',
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -9257,7 +9265,7 @@ paths:
example:
id: wl_UkLWZg9DAJ
name: Updated Name
- token: rWAv6WURLxPYHfpCnTFLKUKi
+ token: YmjbaE4qM55Dq48fDXeM5ZN1
is_default: false
is_private: true
schema:
@@ -9296,7 +9304,7 @@ paths:
})
await client.wishlists.delete('wl_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -9341,7 +9349,7 @@ paths:
variant_id: 'variant_abc123',
quantity: 1,
}, {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -9372,7 +9380,7 @@ paths:
variant:
id: variant_gbHJdmfrXB
product_id: prod_gbHJdmfrXB
- sku: SKU-200
+ sku: SKU-202
options_text: ''
track_inventory: true
media_count: 0
@@ -9432,7 +9440,7 @@ paths:
})
await client.wishlists.items.delete('wl_abc123', 'wi_abc123', {
- bearerToken: '<token>',
+ token: '<token>',
})
parameters:
- name: x-spree-api-key
@@ -9734,6 +9742,79 @@ components:
- item_id
- variant_id
- quantity
+ AdminUserRoleAssignment:
+ type: object
+ description: A role assignment for the current store on a staff member
+ properties:
+ id:
+ type: string
+ description: Prefixed role ID
+ example: role_abc123
+ name:
+ type: string
+ description: Role name
+ example: admin
+ required:
+ - id
+ - name
+ PreferenceField:
+ type: object
+ description: A single configurable preference on a payment method, promotion
+ rule/action, or calculator. The frontend uses `type` + `default` to render
+ a sensible input.
+ properties:
+ key:
+ type: string
+ example: amount_min
+ type:
+ type: string
+ example: decimal
+ description: string | text | password | integer | decimal | boolean | array
+ | hash
+ default:
+ description: Default value (any JSON type), null when there is no default
+ nullable: true
+ required:
+ - key
+ - type
+ PromotionActionCalculator:
+ type: object
+ description: The action's nested calculator (when the action carries one — null
+ for actions like `free_shipping`)
+ properties:
+ type:
+ type: string
+ example: flat_rate
+ description: Wire shorthand for the calculator subclass
+ label:
+ type: string
+ example: Flat Rate
+ preferences:
+ type: object
+ additionalProperties: true
+ preference_schema:
+ type: array
+ items:
+ "$ref": "#/components/schemas/PreferenceField"
+ required:
+ - type
+ - label
+ - preferences
+ - preference_schema
+ PromotionActionLineItem:
+ type: object
+ description: One row in a `create_line_items` action — the variant added to
+ the order and how many
+ properties:
+ variant_id:
+ type: string
+ example: variant_abc123
+ quantity:
+ type: integer
+ example: 1
+ required:
+ - variant_id
+ - quantity
Address:
type: object
properties:
@@ -10059,6 +10140,23 @@ components:
- is_child
- is_leaf
x-typelizer: true
+ Channel:
+ type: object
+ properties:
+ id:
+ type: string
+ name:
+ type: string
+ code:
+ type: string
+ active:
+ type: boolean
+ required:
+ - id
+ - name
+ - code
+ - active
+ x-typelizer: true
Country:
type: object
properties:
@@ -10875,6 +10973,9 @@ components:
market_id:
type: string
nullable: true
+ channel_id:
+ type: string
+ nullable: true
number:
type: string
email:
@@ -10979,6 +11080,7 @@ components:
required:
- id
- market_id
+ - channel_id
- number
- email
- customer_note
@@ -11547,6 +11649,14 @@ components:
- country_name
- state_text
x-typelizer: true
+ StockReservation:
+ type: object
+ properties:
+ id:
+ type: string
+ required:
+ - id
+ x-typelizer: true
StoreCredit:
type: object
properties:
diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md
index 57e63c03da..38ad01e31b 100644
--- a/packages/sdk/CHANGELOG.md
+++ b/packages/sdk/CHANGELOG.md
@@ -412,7 +412,7 @@ Stable release of `@spree/sdk` for Spree Commerce 5.4.0. No breaking changes fro
{
line_items: [{ variant_id: "variant_abc123", quantity: 3 }],
},
- { bearerToken: "<token>" }
+ { token: "<token>" }
);
```
diff --git a/packages/sdk/examples/auth/login.ts b/packages/sdk/examples/auth/login.ts
new file mode 100644
index 0000000000..b27b72744d
--- /dev/null
+++ b/packages/sdk/examples/auth/login.ts
@@ -0,0 +1,15 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const auth = await client.auth.login({
+ email: '[email protected]',
+ password: 'password123',
+})
+// endregion:example
+
+export { auth }
diff --git a/packages/sdk/examples/auth/logout.ts b/packages/sdk/examples/auth/logout.ts
new file mode 100644
index 0000000000..394f95f82c
--- /dev/null
+++ b/packages/sdk/examples/auth/logout.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+await client.auth.logout({
+ refresh_token: 'rt_xxx',
+})
+// endregion:example
diff --git a/packages/sdk/examples/auth/refresh.ts b/packages/sdk/examples/auth/refresh.ts
new file mode 100644
index 0000000000..e71e8d411f
--- /dev/null
+++ b/packages/sdk/examples/auth/refresh.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const auth = await client.auth.refresh({
+ refresh_token: 'rt_xxx',
+})
+// endregion:example
+
+export { auth }
diff --git a/packages/sdk/examples/carts/associate.ts b/packages/sdk/examples/carts/associate.ts
new file mode 100644
index 0000000000..74511fee99
--- /dev/null
+++ b/packages/sdk/examples/carts/associate.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.associate('cart_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/complete.ts b/packages/sdk/examples/carts/complete.ts
new file mode 100644
index 0000000000..60f9750e7e
--- /dev/null
+++ b/packages/sdk/examples/carts/complete.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const order = await client.carts.complete('cart_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { order }
diff --git a/packages/sdk/examples/carts/create.ts b/packages/sdk/examples/carts/create.ts
new file mode 100644
index 0000000000..8f8ad3156b
--- /dev/null
+++ b/packages/sdk/examples/carts/create.ts
@@ -0,0 +1,20 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+// Create an empty cart
+const cart = await client.carts.create()
+
+// Create a cart with items
+const cartWithItems = await client.carts.create({
+ items: [
+ { variant_id: 'variant_abc123', quantity: 2 },
+ ],
+})
+// endregion:example
+
+export { cart, cartWithItems }
diff --git a/packages/sdk/examples/carts/delete.ts b/packages/sdk/examples/carts/delete.ts
new file mode 100644
index 0000000000..c8fe462f7b
--- /dev/null
+++ b/packages/sdk/examples/carts/delete.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+await client.carts.delete('cart_abc123', {
+ token: '<token>',
+})
+// endregion:example
diff --git a/packages/sdk/examples/carts/discount-codes-apply.ts b/packages/sdk/examples/carts/discount-codes-apply.ts
new file mode 100644
index 0000000000..4680bebd23
--- /dev/null
+++ b/packages/sdk/examples/carts/discount-codes-apply.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.discountCodes.apply('cart_abc123', 'SAVE10', {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/discount-codes-remove.ts b/packages/sdk/examples/carts/discount-codes-remove.ts
new file mode 100644
index 0000000000..f370398140
--- /dev/null
+++ b/packages/sdk/examples/carts/discount-codes-remove.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.discountCodes.remove('cart_abc123', 'SAVE10', {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/fulfillments-update.ts b/packages/sdk/examples/carts/fulfillments-update.ts
new file mode 100644
index 0000000000..71b687ebd2
--- /dev/null
+++ b/packages/sdk/examples/carts/fulfillments-update.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.fulfillments.update('cart_abc123', 'ful_abc123', {
+ selected_delivery_rate_id: 'dr_abc123',
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/get.ts b/packages/sdk/examples/carts/get.ts
new file mode 100644
index 0000000000..38a47287bc
--- /dev/null
+++ b/packages/sdk/examples/carts/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.get('cart_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/gift-cards-apply.ts b/packages/sdk/examples/carts/gift-cards-apply.ts
new file mode 100644
index 0000000000..dc67d9ce98
--- /dev/null
+++ b/packages/sdk/examples/carts/gift-cards-apply.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.giftCards.apply('cart_abc123', 'GC-ABCD-1234', {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/gift-cards-remove.ts b/packages/sdk/examples/carts/gift-cards-remove.ts
new file mode 100644
index 0000000000..994f72de10
--- /dev/null
+++ b/packages/sdk/examples/carts/gift-cards-remove.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.giftCards.remove('cart_abc123', 'gc_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/items-create.ts b/packages/sdk/examples/carts/items-create.ts
new file mode 100644
index 0000000000..7a7d666ec0
--- /dev/null
+++ b/packages/sdk/examples/carts/items-create.ts
@@ -0,0 +1,17 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.items.create('cart_abc123', {
+ variant_id: 'variant_abc123',
+ quantity: 2,
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/items-delete.ts b/packages/sdk/examples/carts/items-delete.ts
new file mode 100644
index 0000000000..e79f228b87
--- /dev/null
+++ b/packages/sdk/examples/carts/items-delete.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.items.delete('cart_abc123', 'li_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/items-update.ts b/packages/sdk/examples/carts/items-update.ts
new file mode 100644
index 0000000000..db4a47953b
--- /dev/null
+++ b/packages/sdk/examples/carts/items-update.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.items.update('cart_abc123', 'li_abc123', {
+ quantity: 5,
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/list.ts b/packages/sdk/examples/carts/list.ts
new file mode 100644
index 0000000000..77c725fc6c
--- /dev/null
+++ b/packages/sdk/examples/carts/list.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const carts = await client.carts.list({
+ token: '<token>',
+})
+// endregion:example
+
+export { carts }
diff --git a/packages/sdk/examples/carts/payment-sessions-complete.ts b/packages/sdk/examples/carts/payment-sessions-complete.ts
new file mode 100644
index 0000000000..6690431dc3
--- /dev/null
+++ b/packages/sdk/examples/carts/payment-sessions-complete.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const session = await client.carts.paymentSessions.complete('cart_abc123', 'ps_abc123', {
+ session_result: 'success',
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { session }
diff --git a/packages/sdk/examples/carts/payment-sessions-create.ts b/packages/sdk/examples/carts/payment-sessions-create.ts
new file mode 100644
index 0000000000..068c32361f
--- /dev/null
+++ b/packages/sdk/examples/carts/payment-sessions-create.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const session = await client.carts.paymentSessions.create('cart_abc123', {
+ payment_method_id: 'pm_abc123',
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { session }
diff --git a/packages/sdk/examples/carts/payment-sessions-get.ts b/packages/sdk/examples/carts/payment-sessions-get.ts
new file mode 100644
index 0000000000..85a83c3f49
--- /dev/null
+++ b/packages/sdk/examples/carts/payment-sessions-get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const session = await client.carts.paymentSessions.get('cart_abc123', 'ps_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { session }
diff --git a/packages/sdk/examples/carts/payment-sessions-update.ts b/packages/sdk/examples/carts/payment-sessions-update.ts
new file mode 100644
index 0000000000..3aa729a3ba
--- /dev/null
+++ b/packages/sdk/examples/carts/payment-sessions-update.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const session = await client.carts.paymentSessions.update('cart_abc123', 'ps_abc123', {
+ amount: '50.00',
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { session }
diff --git a/packages/sdk/examples/carts/payments-create.ts b/packages/sdk/examples/carts/payments-create.ts
new file mode 100644
index 0000000000..a1c1fa4aee
--- /dev/null
+++ b/packages/sdk/examples/carts/payments-create.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const payment = await client.carts.payments.create('cart_abc123', {
+ payment_method_id: 'pm_abc123',
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { payment }
diff --git a/packages/sdk/examples/carts/store-credits-apply.ts b/packages/sdk/examples/carts/store-credits-apply.ts
new file mode 100644
index 0000000000..7a49e59523
--- /dev/null
+++ b/packages/sdk/examples/carts/store-credits-apply.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.storeCredits.apply('cart_abc123', 10.0, {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/store-credits-remove.ts b/packages/sdk/examples/carts/store-credits-remove.ts
new file mode 100644
index 0000000000..6d43806771
--- /dev/null
+++ b/packages/sdk/examples/carts/store-credits-remove.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.storeCredits.remove('cart_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/carts/update.ts b/packages/sdk/examples/carts/update.ts
new file mode 100644
index 0000000000..3d1c9eef48
--- /dev/null
+++ b/packages/sdk/examples/carts/update.ts
@@ -0,0 +1,25 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cart = await client.carts.update('cart_abc123', {
+ email: '[email protected]',
+ shipping_address: {
+ first_name: 'John',
+ last_name: 'Doe',
+ address1: '123 Main St',
+ city: 'New York',
+ postal_code: '10001',
+ country_iso: 'US',
+ state_abbr: 'NY',
+ },
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { cart }
diff --git a/packages/sdk/examples/categories/get.ts b/packages/sdk/examples/categories/get.ts
new file mode 100644
index 0000000000..221c96d580
--- /dev/null
+++ b/packages/sdk/examples/categories/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const category = await client.categories.get('categories/clothing/shirts', {
+ expand: ['children'],
+})
+// endregion:example
+
+export { category }
diff --git a/packages/sdk/examples/categories/list.ts b/packages/sdk/examples/categories/list.ts
new file mode 100644
index 0000000000..ed003c81d4
--- /dev/null
+++ b/packages/sdk/examples/categories/list.ts
@@ -0,0 +1,15 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const categories = await client.categories.list({
+ page: 1,
+ limit: 25,
+})
+// endregion:example
+
+export { categories }
diff --git a/packages/sdk/examples/countries/get.ts b/packages/sdk/examples/countries/get.ts
new file mode 100644
index 0000000000..becd62b01c
--- /dev/null
+++ b/packages/sdk/examples/countries/get.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const country = await client.countries.get('US')
+// endregion:example
+
+export { country }
diff --git a/packages/sdk/examples/countries/list.ts b/packages/sdk/examples/countries/list.ts
new file mode 100644
index 0000000000..53457653ff
--- /dev/null
+++ b/packages/sdk/examples/countries/list.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const countries = await client.countries.list()
+// endregion:example
+
+export { countries }
diff --git a/packages/sdk/examples/currencies/list.ts b/packages/sdk/examples/currencies/list.ts
new file mode 100644
index 0000000000..821c7996c2
--- /dev/null
+++ b/packages/sdk/examples/currencies/list.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const currencies = await client.currencies.list()
+// endregion:example
+
+export { currencies }
diff --git a/packages/sdk/examples/customer-addresses/create.ts b/packages/sdk/examples/customer-addresses/create.ts
new file mode 100644
index 0000000000..332fb3dafa
--- /dev/null
+++ b/packages/sdk/examples/customer-addresses/create.ts
@@ -0,0 +1,23 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const address = await client.customer.addresses.create({
+ first_name: 'John',
+ last_name: 'Doe',
+ address1: '123 Main St',
+ city: 'New York',
+ postal_code: '10001',
+ country_iso: 'US',
+ state_abbr: 'NY',
+ phone: '+1 555 123 4567',
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { address }
diff --git a/packages/sdk/examples/customer-addresses/delete.ts b/packages/sdk/examples/customer-addresses/delete.ts
new file mode 100644
index 0000000000..503f709857
--- /dev/null
+++ b/packages/sdk/examples/customer-addresses/delete.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+await client.customer.addresses.delete('addr_abc123', {
+ token: '<token>',
+})
+// endregion:example
diff --git a/packages/sdk/examples/customer-addresses/get.ts b/packages/sdk/examples/customer-addresses/get.ts
new file mode 100644
index 0000000000..5e7d1478ad
--- /dev/null
+++ b/packages/sdk/examples/customer-addresses/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const address = await client.customer.addresses.get('addr_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { address }
diff --git a/packages/sdk/examples/customer-addresses/list.ts b/packages/sdk/examples/customer-addresses/list.ts
new file mode 100644
index 0000000000..b6cfce4969
--- /dev/null
+++ b/packages/sdk/examples/customer-addresses/list.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const addresses = await client.customer.addresses.list({}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { addresses }
diff --git a/packages/sdk/examples/customer-addresses/update.ts b/packages/sdk/examples/customer-addresses/update.ts
new file mode 100644
index 0000000000..4371b28287
--- /dev/null
+++ b/packages/sdk/examples/customer-addresses/update.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const address = await client.customer.addresses.update('addr_abc123', {
+ city: 'Los Angeles',
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { address }
diff --git a/packages/sdk/examples/customer-credit-cards/delete.ts b/packages/sdk/examples/customer-credit-cards/delete.ts
new file mode 100644
index 0000000000..37fb1e5c06
--- /dev/null
+++ b/packages/sdk/examples/customer-credit-cards/delete.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+await client.customer.creditCards.delete('card_abc123', {
+ token: '<token>',
+})
+// endregion:example
diff --git a/packages/sdk/examples/customer-credit-cards/get.ts b/packages/sdk/examples/customer-credit-cards/get.ts
new file mode 100644
index 0000000000..a0e56c4bd5
--- /dev/null
+++ b/packages/sdk/examples/customer-credit-cards/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const card = await client.customer.creditCards.get('card_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { card }
diff --git a/packages/sdk/examples/customer-credit-cards/list.ts b/packages/sdk/examples/customer-credit-cards/list.ts
new file mode 100644
index 0000000000..fdbec6002f
--- /dev/null
+++ b/packages/sdk/examples/customer-credit-cards/list.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const cards = await client.customer.creditCards.list({}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { cards }
diff --git a/packages/sdk/examples/customer-gift-cards/get.ts b/packages/sdk/examples/customer-gift-cards/get.ts
new file mode 100644
index 0000000000..6836330026
--- /dev/null
+++ b/packages/sdk/examples/customer-gift-cards/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const giftCard = await client.customer.giftCards.get('gc_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { giftCard }
diff --git a/packages/sdk/examples/customer-gift-cards/list.ts b/packages/sdk/examples/customer-gift-cards/list.ts
new file mode 100644
index 0000000000..fc9fd451ab
--- /dev/null
+++ b/packages/sdk/examples/customer-gift-cards/list.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const giftCards = await client.customer.giftCards.list({}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { giftCards }
diff --git a/packages/sdk/examples/customer-orders/get.ts b/packages/sdk/examples/customer-orders/get.ts
new file mode 100644
index 0000000000..d6fb013783
--- /dev/null
+++ b/packages/sdk/examples/customer-orders/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const order = await client.customer.orders.get('or_abc123', {}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { order }
diff --git a/packages/sdk/examples/customer-orders/list.ts b/packages/sdk/examples/customer-orders/list.ts
new file mode 100644
index 0000000000..9b64ff96f7
--- /dev/null
+++ b/packages/sdk/examples/customer-orders/list.ts
@@ -0,0 +1,18 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const orders = await client.customer.orders.list(
+ {
+ completed_at_gt: '2026-01-01',
+ sort: '-completed_at',
+ },
+ { token: '<token>' },
+)
+// endregion:example
+
+export { orders }
diff --git a/packages/sdk/examples/customer-password-resets/create.ts b/packages/sdk/examples/customer-password-resets/create.ts
new file mode 100644
index 0000000000..00b0ee7ff6
--- /dev/null
+++ b/packages/sdk/examples/customer-password-resets/create.ts
@@ -0,0 +1,13 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+await client.passwordResets.create({
+ email: '[email protected]',
+ redirect_url: 'https://myshop.com/reset-password',
+})
+// endregion:example
diff --git a/packages/sdk/examples/customer-password-resets/update.ts b/packages/sdk/examples/customer-password-resets/update.ts
new file mode 100644
index 0000000000..c3f51774cf
--- /dev/null
+++ b/packages/sdk/examples/customer-password-resets/update.ts
@@ -0,0 +1,18 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const auth = await client.passwordResets.update(
+ 'reset-token-from-email',
+ {
+ password: 'newsecurepassword',
+ password_confirmation: 'newsecurepassword',
+ }
+)
+// endregion:example
+
+export { auth }
diff --git a/packages/sdk/examples/customer-payment-setup-sessions/complete.ts b/packages/sdk/examples/customer-payment-setup-sessions/complete.ts
new file mode 100644
index 0000000000..960e4a1579
--- /dev/null
+++ b/packages/sdk/examples/customer-payment-setup-sessions/complete.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const session = await client.customer.paymentSetupSessions.complete('pss_abc123', {}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { session }
diff --git a/packages/sdk/examples/customer-payment-setup-sessions/create.ts b/packages/sdk/examples/customer-payment-setup-sessions/create.ts
new file mode 100644
index 0000000000..bc8b5d761f
--- /dev/null
+++ b/packages/sdk/examples/customer-payment-setup-sessions/create.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const session = await client.customer.paymentSetupSessions.create({
+ payment_method_id: 'pm_abc123',
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { session }
diff --git a/packages/sdk/examples/customer-payment-setup-sessions/get.ts b/packages/sdk/examples/customer-payment-setup-sessions/get.ts
new file mode 100644
index 0000000000..3a0555cb98
--- /dev/null
+++ b/packages/sdk/examples/customer-payment-setup-sessions/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const session = await client.customer.paymentSetupSessions.get('pss_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { session }
diff --git a/packages/sdk/examples/customer-store-credits/get.ts b/packages/sdk/examples/customer-store-credits/get.ts
new file mode 100644
index 0000000000..96808e8419
--- /dev/null
+++ b/packages/sdk/examples/customer-store-credits/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const credit = await client.customer.storeCredits.get('credit_abc123', {
+ token: '<token>',
+})
+// endregion:example
+
+export { credit }
diff --git a/packages/sdk/examples/customer-store-credits/list.ts b/packages/sdk/examples/customer-store-credits/list.ts
new file mode 100644
index 0000000000..50f0e56914
--- /dev/null
+++ b/packages/sdk/examples/customer-store-credits/list.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const credits = await client.customer.storeCredits.list({}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { credits }
diff --git a/packages/sdk/examples/customers/create.ts b/packages/sdk/examples/customers/create.ts
new file mode 100644
index 0000000000..05ffd55fe8
--- /dev/null
+++ b/packages/sdk/examples/customers/create.ts
@@ -0,0 +1,21 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const auth = await client.customers.create({
+ email: '[email protected]',
+ password: 'password123',
+ password_confirmation: 'password123',
+ first_name: 'John',
+ last_name: 'Doe',
+ phone: '+1234567890',
+ accepts_email_marketing: true,
+ metadata: { source: 'storefront' },
+})
+// endregion:example
+
+export { auth }
diff --git a/packages/sdk/examples/customers/get.ts b/packages/sdk/examples/customers/get.ts
new file mode 100644
index 0000000000..8683e5a10b
--- /dev/null
+++ b/packages/sdk/examples/customers/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const customer = await client.customer.get({
+ token: '<token>',
+})
+// endregion:example
+
+export { customer }
diff --git a/packages/sdk/examples/customers/update.ts b/packages/sdk/examples/customers/update.ts
new file mode 100644
index 0000000000..fb754a3ac8
--- /dev/null
+++ b/packages/sdk/examples/customers/update.ts
@@ -0,0 +1,18 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const customer = await client.customer.update({
+ first_name: 'John',
+ last_name: 'Doe',
+ metadata: { preferred_contact: 'email' },
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { customer }
diff --git a/packages/sdk/examples/locales/list.ts b/packages/sdk/examples/locales/list.ts
new file mode 100644
index 0000000000..ca3eb26063
--- /dev/null
+++ b/packages/sdk/examples/locales/list.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const locales = await client.locales.list()
+// endregion:example
+
+export { locales }
diff --git a/packages/sdk/examples/markets/countries-get.ts b/packages/sdk/examples/markets/countries-get.ts
new file mode 100644
index 0000000000..c61e9a554b
--- /dev/null
+++ b/packages/sdk/examples/markets/countries-get.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const country = await client.markets.countries.get('mkt_xxx', 'DE')
+// endregion:example
+
+export { country }
diff --git a/packages/sdk/examples/markets/countries-list.ts b/packages/sdk/examples/markets/countries-list.ts
new file mode 100644
index 0000000000..d961c4a0d6
--- /dev/null
+++ b/packages/sdk/examples/markets/countries-list.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const countries = await client.markets.countries.list('mkt_xxx')
+// endregion:example
+
+export { countries }
diff --git a/packages/sdk/examples/markets/get.ts b/packages/sdk/examples/markets/get.ts
new file mode 100644
index 0000000000..b22c1ba14d
--- /dev/null
+++ b/packages/sdk/examples/markets/get.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const market = await client.markets.get('mkt_xxx')
+// endregion:example
+
+export { market }
diff --git a/packages/sdk/examples/markets/list.ts b/packages/sdk/examples/markets/list.ts
new file mode 100644
index 0000000000..8301aaca34
--- /dev/null
+++ b/packages/sdk/examples/markets/list.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const markets = await client.markets.list()
+// endregion:example
+
+export { markets }
diff --git a/packages/sdk/examples/markets/resolve.ts b/packages/sdk/examples/markets/resolve.ts
new file mode 100644
index 0000000000..88984680aa
--- /dev/null
+++ b/packages/sdk/examples/markets/resolve.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const market = await client.markets.resolve('DE')
+// endregion:example
+
+export { market }
diff --git a/packages/sdk/examples/orders/get.ts b/packages/sdk/examples/orders/get.ts
new file mode 100644
index 0000000000..030886036c
--- /dev/null
+++ b/packages/sdk/examples/orders/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const order = await client.orders.get('or_abc123', {}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { order }
diff --git a/packages/sdk/examples/policies/get.ts b/packages/sdk/examples/policies/get.ts
new file mode 100644
index 0000000000..8c0a64f8f5
--- /dev/null
+++ b/packages/sdk/examples/policies/get.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const policy = await client.policies.get('return-policy')
+// endregion:example
+
+export { policy }
diff --git a/packages/sdk/examples/policies/list.ts b/packages/sdk/examples/policies/list.ts
new file mode 100644
index 0000000000..7bf17e8e57
--- /dev/null
+++ b/packages/sdk/examples/policies/list.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const policies = await client.policies.list()
+// endregion:example
+
+export { policies }
diff --git a/packages/sdk/examples/products/filters.ts b/packages/sdk/examples/products/filters.ts
new file mode 100644
index 0000000000..45aeead0d2
--- /dev/null
+++ b/packages/sdk/examples/products/filters.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const filters = await client.products.filters({
+ category_id: 'ctg_abc123',
+})
+// endregion:example
+
+export { filters }
diff --git a/packages/sdk/examples/products/get.ts b/packages/sdk/examples/products/get.ts
new file mode 100644
index 0000000000..baef6a1af3
--- /dev/null
+++ b/packages/sdk/examples/products/get.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const product = await client.products.get('spree-tote', {
+ expand: ['variants', 'media'],
+})
+// endregion:example
+
+export { product }
diff --git a/packages/sdk/examples/products/list.ts b/packages/sdk/examples/products/list.ts
new file mode 100644
index 0000000000..43f9f11e15
--- /dev/null
+++ b/packages/sdk/examples/products/list.ts
@@ -0,0 +1,21 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const products = await client.products.list({
+ page: 1,
+ limit: 25,
+ sort: 'price',
+ name_cont: 'shirt',
+ price_gte: 20,
+ price_lte: 100,
+ with_option_value_ids: ['optval_abc', 'optval_def'],
+ expand: ['variants', 'media'],
+})
+// endregion:example
+
+export { products }
diff --git a/packages/sdk/examples/wishlists/create.ts b/packages/sdk/examples/wishlists/create.ts
new file mode 100644
index 0000000000..a9b647a932
--- /dev/null
+++ b/packages/sdk/examples/wishlists/create.ts
@@ -0,0 +1,17 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const wishlist = await client.wishlists.create({
+ name: 'Birthday Ideas',
+ is_private: true,
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { wishlist }
diff --git a/packages/sdk/examples/wishlists/delete.ts b/packages/sdk/examples/wishlists/delete.ts
new file mode 100644
index 0000000000..8cbccbe368
--- /dev/null
+++ b/packages/sdk/examples/wishlists/delete.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+await client.wishlists.delete('wl_abc123', {
+ token: '<token>',
+})
+// endregion:example
diff --git a/packages/sdk/examples/wishlists/get.ts b/packages/sdk/examples/wishlists/get.ts
new file mode 100644
index 0000000000..56763b828a
--- /dev/null
+++ b/packages/sdk/examples/wishlists/get.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const wishlist = await client.wishlists.get('wl_abc123', {
+ expand: ['wished_items'],
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { wishlist }
diff --git a/packages/sdk/examples/wishlists/items-create.ts b/packages/sdk/examples/wishlists/items-create.ts
new file mode 100644
index 0000000000..d53c0f4bb8
--- /dev/null
+++ b/packages/sdk/examples/wishlists/items-create.ts
@@ -0,0 +1,17 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const item = await client.wishlists.items.create('wl_abc123', {
+ variant_id: 'variant_abc123',
+ quantity: 1,
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { item }
diff --git a/packages/sdk/examples/wishlists/items-delete.ts b/packages/sdk/examples/wishlists/items-delete.ts
new file mode 100644
index 0000000000..e54afba418
--- /dev/null
+++ b/packages/sdk/examples/wishlists/items-delete.ts
@@ -0,0 +1,12 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+await client.wishlists.items.delete('wl_abc123', 'wi_abc123', {
+ token: '<token>',
+})
+// endregion:example
diff --git a/packages/sdk/examples/wishlists/list.ts b/packages/sdk/examples/wishlists/list.ts
new file mode 100644
index 0000000000..c1a9dd8ca4
--- /dev/null
+++ b/packages/sdk/examples/wishlists/list.ts
@@ -0,0 +1,14 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const wishlists = await client.wishlists.list({}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { wishlists }
diff --git a/packages/sdk/examples/wishlists/update.ts b/packages/sdk/examples/wishlists/update.ts
new file mode 100644
index 0000000000..0e36eb1a0d
--- /dev/null
+++ b/packages/sdk/examples/wishlists/update.ts
@@ -0,0 +1,16 @@
+import { createClient } from '@spree/sdk'
+
+const client = createClient({
+ baseUrl: 'https://your-store.com',
+ publishableKey: '<api-key>',
+})
+
+// region:example
+const wishlist = await client.wishlists.update('wl_abc123', {
+ name: 'Updated Name',
+}, {
+ token: '<token>',
+})
+// endregion:example
+
+export { wishlist }
diff --git a/packages/sdk/package.json b/packages/sdk/package.json
index 85243c72cc..996c1c2d39 100644
--- a/packages/sdk/package.json
+++ b/packages/sdk/package.json
@@ -59,6 +59,7 @@
"dev": "tsup --watch",
"console": "tsx console.ts",
"typecheck": "tsc --noEmit",
+ "examples:typecheck": "tsc --noEmit -p tsconfig.examples.json",
"test": "vitest run",
"test:integration": "vitest run --config vitest.integration.config.ts",
"test:watch": "vitest",
diff --git a/packages/sdk/tsconfig.examples.json b/packages/sdk/tsconfig.examples.json
new file mode 100644
index 0000000000..c69da61b82
--- /dev/null
+++ b/packages/sdk/tsconfig.examples.json
@@ -0,0 +1,16 @@
+{
+ "extends": "./tsconfig.json",
+ "compilerOptions": {
+ "noEmit": true,
+ "rootDir": "./",
+ "noUnusedLocals": false,
+ "noUnusedParameters": false,
+ "paths": {
+ "@/types": ["./src/types/generated/index.ts"],
+ "@spree/sdk": ["./src/index.ts"],
+ "@spree/sdk/types": ["./src/types/generated/index.ts"]
+ }
+ },
+ "include": ["examples/**/*.ts", "src/**/*.ts"],
+ "exclude": ["node_modules", "dist", "tests"]
+}
diff --git a/spree/api/spec/integration/spree/api/v3/store/addresses_spec.rb b/spree/api/spec/integration/spree/api/v3/store/addresses_spec.rb
index 443bb26950..3aee1ef155 100644
--- a/spree/api/spec/integration/spree/api/v3/store/addresses_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/addresses_spec.rb
@@ -16,11 +16,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: [], bearer_auth: []]
description 'Returns all addresses in the customer address book'
- sdk_example <<~JS
- const addresses = await client.customer.addresses.list({}, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-addresses/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -62,20 +58,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: [], bearer_auth: []]
description 'Adds a new address to the customer address book'
- sdk_example <<~JS
- const address = await client.customer.addresses.create({
- first_name: 'John',
- last_name: 'Doe',
- address1: '123 Main St',
- city: 'New York',
- postal_code: '10001',
- country_iso: 'US',
- state_abbr: 'NY',
- phone: '+1 555 123 4567',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-addresses/create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -144,11 +127,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/stor
produces 'application/json'
security [api_key: [], bearer_auth: []]
- sdk_example <<~JS
- const address = await client.customer.addresses.get('addr_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-addresses/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -183,13 +162,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/stor
produces 'application/json'
security [api_key: [], bearer_auth: []]
- sdk_example <<~JS
- const address = await client.customer.addresses.update('addr_abc123', {
- city: 'Los Angeles',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-addresses/update'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -226,11 +199,7 @@ RSpec.describe 'Addresses API', type: :request, swagger_doc: 'api-reference/stor
produces 'application/json'
security [api_key: [], bearer_auth: []]
- sdk_example <<~JS
- await client.customer.addresses.delete('addr_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-addresses/delete'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
diff --git a/spree/api/spec/integration/spree/api/v3/store/auth_spec.rb b/spree/api/spec/integration/spree/api/v3/store/auth_spec.rb
index 3cffca8a5f..99aa459a69 100644
--- a/spree/api/spec/integration/spree/api/v3/store/auth_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/auth_spec.rb
@@ -15,12 +15,7 @@ RSpec.describe 'Authentication API', type: :request, swagger_doc: 'api-reference
security [api_key: []]
description 'Authenticates a customer with email/password and returns a JWT token'
- sdk_example <<~JS
- const auth = await client.auth.login({
- email: '[email protected]',
- password: 'password123',
- })
- JS
+ sdk_example 'auth/login'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :body, in: :body, schema: {
@@ -84,11 +79,7 @@ RSpec.describe 'Authentication API', type: :request, swagger_doc: 'api-reference
security [api_key: []]
description 'Exchanges a refresh token for a new access JWT and rotated refresh token. No Authorization header needed.'
- sdk_example <<~JS
- const auth = await client.auth.refresh({
- refresh_token: 'rt_xxx',
- })
- JS
+ sdk_example 'auth/refresh'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :body, in: :body, schema: {
@@ -133,11 +124,7 @@ RSpec.describe 'Authentication API', type: :request, swagger_doc: 'api-reference
security [api_key: [], bearer_auth: []]
description 'Revokes the refresh token, effectively logging the customer out.'
- sdk_example <<~JS
- await client.auth.logout({
- refresh_token: 'rt_xxx',
- })
- JS
+ sdk_example 'auth/logout'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
diff --git a/spree/api/spec/integration/spree/api/v3/store/carts_spec.rb b/spree/api/spec/integration/spree/api/v3/store/carts_spec.rb
index 7c53f58756..ef35fa1b8b 100644
--- a/spree/api/spec/integration/spree/api/v3/store/carts_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/carts_spec.rb
@@ -14,11 +14,7 @@ RSpec.describe 'Carts API', type: :request, swagger_doc: 'api-reference/store.ya
security [api_key: [], bearer_auth: []]
description 'Returns all active (incomplete) carts for the authenticated user.'
- sdk_example <<~JS
- const carts = await client.carts.list({
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -72,17 +68,7 @@ RSpec.describe 'Carts API', type: :request, swagger_doc: 'api-reference/store.ya
Returns a `token` that must be used for guest access to the cart.
DESC
- sdk_example <<~JS
- // Create an empty cart
- const cart = await client.carts.create()
-
- // Create a cart with items
- const cartWithItems = await client.carts.create({
- items: [
- { variant_id: 'variant_abc123', quantity: 2 },
- ],
- })
- JS
+ sdk_example 'carts/create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false,
@@ -135,11 +121,7 @@ RSpec.describe 'Carts API', type: :request, swagger_doc: 'api-reference/store.ya
Authorize via x-spree-token header (guest) or JWT Bearer token (authenticated user).
DESC
- sdk_example <<~JS
- const cart = await client.carts.get('cart_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false
@@ -203,22 +185,7 @@ RSpec.describe 'Carts API', type: :request, swagger_doc: 'api-reference/store.ya
security [api_key: [], bearer_auth: []]
description 'Updates cart info (email, addresses, customer note). When addresses change, the order state is reverted to address to ensure shipments are recalculated.'
- sdk_example <<~JS
- const cart = await client.carts.update('cart_abc123', {
- email: '[email protected]',
- shipping_address: {
- first_name: 'John',
- last_name: 'Doe',
- address1: '123 Main St',
- city: 'New York',
- postal_code: '10001',
- country_iso: 'US',
- state_abbr: 'NY',
- },
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/update'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false
@@ -279,11 +246,7 @@ RSpec.describe 'Carts API', type: :request, swagger_doc: 'api-reference/store.ya
security [api_key: [], bearer_auth: []]
description 'Deletes/abandons the cart.'
- sdk_example <<~JS
- await client.carts.delete('cart_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/delete'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false
@@ -311,11 +274,7 @@ RSpec.describe 'Carts API', type: :request, swagger_doc: 'api-reference/store.ya
Requires JWT authentication. The cart must not belong to another user.
DESC
- sdk_example <<~JS
- const cart = await client.carts.associate('cart_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/associate'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -356,11 +315,7 @@ RSpec.describe 'Carts API', type: :request, swagger_doc: 'api-reference/store.ya
security [api_key: [], bearer_auth: []]
description 'Completes the cart and finalizes the purchase. Returns an Order (not Cart).'
- sdk_example <<~JS
- const order = await client.carts.complete('cart_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/complete'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false
diff --git a/spree/api/spec/integration/spree/api/v3/store/categories_spec.rb b/spree/api/spec/integration/spree/api/v3/store/categories_spec.rb
index 20ff220254..f299425c96 100644
--- a/spree/api/spec/integration/spree/api/v3/store/categories_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/categories_spec.rb
@@ -21,12 +21,7 @@ RSpec.describe 'Categories API', type: :request, swagger_doc: 'api-reference/sto
security [api_key: []]
description 'Returns a paginated list of categories for the current store'
- sdk_example <<~JS
- const categories = await client.categories.list({
- page: 1,
- limit: 25,
- })
- JS
+ sdk_example 'categories/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :page, in: :query, type: :integer, required: false
@@ -72,11 +67,7 @@ RSpec.describe 'Categories API', type: :request, swagger_doc: 'api-reference/sto
security [api_key: []]
description 'Returns a single category by permalink or prefix ID'
- sdk_example <<~JS
- const category = await client.categories.get('categories/clothing/shirts', {
- expand: 'children',
- })
- JS
+ sdk_example 'categories/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :id, in: :path, type: :string, required: true,
diff --git a/spree/api/spec/integration/spree/api/v3/store/countries_spec.rb b/spree/api/spec/integration/spree/api/v3/store/countries_spec.rb
index 666b04970d..ffdfec2c95 100644
--- a/spree/api/spec/integration/spree/api/v3/store/countries_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/countries_spec.rb
@@ -20,9 +20,7 @@ RSpec.describe 'Countries API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: []]
description 'Returns countries available in the store. Use ?expand=market to include market details (currency, locale, tax_inclusive).'
- sdk_example <<~JS
- const countries = await client.countries.list()
- JS
+ sdk_example 'countries/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :fields, in: :query, type: :string, required: false,
@@ -71,9 +69,7 @@ RSpec.describe 'Countries API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: []]
description 'Returns a single country by ISO code. Supports ?expand=states for address forms and ?expand=market for market details.'
- sdk_example <<~JS
- const country = await client.countries.get('US')
- JS
+ sdk_example 'countries/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :iso, in: :path, type: :string, required: true,
diff --git a/spree/api/spec/integration/spree/api/v3/store/credit_cards_spec.rb b/spree/api/spec/integration/spree/api/v3/store/credit_cards_spec.rb
index 818b3747be..2c01912515 100644
--- a/spree/api/spec/integration/spree/api/v3/store/credit_cards_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/credit_cards_spec.rb
@@ -14,11 +14,7 @@ RSpec.describe 'Credit Cards API', type: :request, swagger_doc: 'api-reference/s
security [api_key: [], bearer_auth: []]
description 'Returns all saved credit cards for the authenticated customer'
- sdk_example <<~JS
- const cards = await client.customer.creditCards.list({}, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-credit-cards/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -62,11 +58,7 @@ RSpec.describe 'Credit Cards API', type: :request, swagger_doc: 'api-reference/s
security [api_key: [], bearer_auth: []]
description 'Returns a saved credit card by its ID'
- sdk_example <<~JS
- const card = await client.customer.creditCards.get('card_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-credit-cards/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -101,11 +93,7 @@ RSpec.describe 'Credit Cards API', type: :request, swagger_doc: 'api-reference/s
security [api_key: [], bearer_auth: []]
description 'Removes a saved credit card from the customer account'
- sdk_example <<~JS
- await client.customer.creditCards.delete('card_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-credit-cards/delete'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
diff --git a/spree/api/spec/integration/spree/api/v3/store/currencies_spec.rb b/spree/api/spec/integration/spree/api/v3/store/currencies_spec.rb
index 95030db83d..cd88a63d25 100644
--- a/spree/api/spec/integration/spree/api/v3/store/currencies_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/currencies_spec.rb
@@ -18,9 +18,7 @@ RSpec.describe 'Currencies API', type: :request, swagger_doc: 'api-reference/sto
security [api_key: []]
description 'Returns currencies supported by the store (derived from markets)'
- sdk_example <<~JS
- const currencies = await client.currencies.list()
- JS
+ sdk_example 'currencies/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :fields, in: :query, type: :string, required: false,
diff --git a/spree/api/spec/integration/spree/api/v3/store/customer/password_resets_spec.rb b/spree/api/spec/integration/spree/api/v3/store/customer/password_resets_spec.rb
index 6d45fe8bd9..7634a9e7f1 100644
--- a/spree/api/spec/integration/spree/api/v3/store/customer/password_resets_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/customer/password_resets_spec.rb
@@ -15,12 +15,7 @@ RSpec.describe 'Password Resets API', type: :request, swagger_doc: 'api-referenc
security [api_key: []]
description 'Sends a password reset email if an account exists for the given email address. Always returns 202 Accepted to prevent email enumeration.'
- sdk_example <<~JS
- await client.passwordResets.create({
- email: '[email protected]',
- redirect_url: 'https://myshop.com/reset-password',
- })
- JS
+ sdk_example 'customer-password-resets/create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :body, in: :body, schema: {
@@ -81,15 +76,7 @@ RSpec.describe 'Password Resets API', type: :request, swagger_doc: 'api-referenc
security [api_key: []]
description 'Resets the password using a token received via email. Returns a JWT token on success (auto-login).'
- sdk_example <<~JS
- const auth = await client.passwordResets.update(
- 'reset-token-from-email',
- {
- password: 'newsecurepassword',
- password_confirmation: 'newsecurepassword',
- }
- )
- JS
+ sdk_example 'customer-password-resets/update'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :token, in: :path, type: :string, required: true,
diff --git a/spree/api/spec/integration/spree/api/v3/store/customer_orders_spec.rb b/spree/api/spec/integration/spree/api/v3/store/customer_orders_spec.rb
index 6584d3c118..bf957f5dbf 100644
--- a/spree/api/spec/integration/spree/api/v3/store/customer_orders_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/customer_orders_spec.rb
@@ -14,13 +14,7 @@ RSpec.describe 'Customer Orders API', type: :request, swagger_doc: 'api-referenc
security [api_key: [], bearer_auth: []]
description 'Returns a paginated list of completed orders for the authenticated customer.'
- sdk_example <<~JS
- const orders = await client.customer.orders.list({
- bearerToken: '<token>',
- completed_at_gt: '2026-01-01',
- sort: '-completed_at',
- })
- JS
+ sdk_example 'customer-orders/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -86,11 +80,7 @@ RSpec.describe 'Customer Orders API', type: :request, swagger_doc: 'api-referenc
security [api_key: [], bearer_auth: []]
description 'Returns a single completed order for the authenticated customer.'
- sdk_example <<~JS
- const order = await client.customer.orders.get('or_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-orders/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
diff --git a/spree/api/spec/integration/spree/api/v3/store/customers_spec.rb b/spree/api/spec/integration/spree/api/v3/store/customers_spec.rb
index 702bcf186a..746c5d223a 100644
--- a/spree/api/spec/integration/spree/api/v3/store/customers_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/customers_spec.rb
@@ -15,18 +15,7 @@ RSpec.describe 'Customers API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: []]
description 'Creates a new customer account and returns a JWT token'
- sdk_example <<~JS
- const auth = await client.customers.create({
- email: '[email protected]',
- password: 'password123',
- password_confirmation: 'password123',
- first_name: 'John',
- last_name: 'Doe',
- phone: '+1234567890',
- accepts_email_marketing: true,
- metadata: { source: 'storefront' },
- })
- JS
+ sdk_example 'customers/create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :body, in: :body, schema: {
@@ -101,11 +90,7 @@ RSpec.describe 'Customers API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: [], bearer_auth: []]
description 'Returns the profile of the currently authenticated customer'
- sdk_example <<~JS
- const customer = await client.customer.get({
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customers/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true,
@@ -151,15 +136,7 @@ RSpec.describe 'Customers API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: [], bearer_auth: []]
description 'Updates the profile of the currently authenticated customer'
- sdk_example <<~JS
- const customer = await client.customer.update({
- first_name: 'John',
- last_name: 'Doe',
- metadata: { preferred_contact: 'email' },
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customers/update'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
diff --git a/spree/api/spec/integration/spree/api/v3/store/discount_codes_spec.rb b/spree/api/spec/integration/spree/api/v3/store/discount_codes_spec.rb
index 1470271c05..f492834b59 100644
--- a/spree/api/spec/integration/spree/api/v3/store/discount_codes_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/discount_codes_spec.rb
@@ -20,11 +20,7 @@ RSpec.describe 'Cart Discount Codes API', type: :request, swagger_doc: 'api-refe
For gift cards, use the dedicated `POST /carts/{cart_id}/gift_cards` endpoint instead.
DESC
- sdk_example <<~JS
- const cart = await client.carts.discountCodes.apply('cart_abc123', 'SAVE10', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/discount-codes-apply'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false,
@@ -79,11 +75,7 @@ RSpec.describe 'Cart Discount Codes API', type: :request, swagger_doc: 'api-refe
security [api_key: [], bearer_auth: []]
description 'Removes a previously applied discount code from the cart. The ID is the discount code string itself.'
- sdk_example <<~JS
- const cart = await client.carts.discountCodes.remove('cart_abc123', 'SAVE10', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/discount-codes-remove'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false,
diff --git a/spree/api/spec/integration/spree/api/v3/store/fulfillments_spec.rb b/spree/api/spec/integration/spree/api/v3/store/fulfillments_spec.rb
index 0003353d69..c19b703971 100644
--- a/spree/api/spec/integration/spree/api/v3/store/fulfillments_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/fulfillments_spec.rb
@@ -17,13 +17,7 @@ RSpec.describe 'Cart Fulfillments API', type: :request, swagger_doc: 'api-refere
security [api_key: [], bearer_auth: []]
description 'Selects a delivery rate for a specific fulfillment and auto-advances checkout.'
- sdk_example <<~JS
- const cart = await client.carts.fulfillments.update('cart_abc123', 'ful_abc123', {
- selected_delivery_rate_id: 'dr_abc123',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/fulfillments-update'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false
diff --git a/spree/api/spec/integration/spree/api/v3/store/gift_card_cart_spec.rb b/spree/api/spec/integration/spree/api/v3/store/gift_card_cart_spec.rb
index a3716e4473..90daf3a57c 100644
--- a/spree/api/spec/integration/spree/api/v3/store/gift_card_cart_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/gift_card_cart_spec.rb
@@ -21,11 +21,7 @@ RSpec.describe 'Cart Gift Card API', type: :request, swagger_doc: 'api-reference
For promotion discount codes, use the `POST /carts/{cart_id}/discount_codes` endpoint instead.
DESC
- sdk_example <<~JS
- const cart = await client.carts.giftCards.apply('cart_abc123', 'GC-ABCD-1234', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/gift-cards-apply'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false,
@@ -109,11 +105,7 @@ RSpec.describe 'Cart Gift Card API', type: :request, swagger_doc: 'api-reference
security [api_key: [], bearer_auth: []]
description 'Removes a previously applied gift card from the cart.'
- sdk_example <<~JS
- const cart = await client.carts.giftCards.remove('cart_abc123', 'gc_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/gift-cards-remove'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false,
diff --git a/spree/api/spec/integration/spree/api/v3/store/gift_cards_spec.rb b/spree/api/spec/integration/spree/api/v3/store/gift_cards_spec.rb
index 7a450acd48..7774ea3449 100644
--- a/spree/api/spec/integration/spree/api/v3/store/gift_cards_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/gift_cards_spec.rb
@@ -14,11 +14,7 @@ RSpec.describe 'Gift Cards API', type: :request, swagger_doc: 'api-reference/sto
security [api_key: [], bearer_auth: []]
description 'Returns all gift cards for the authenticated customer'
- sdk_example <<~JS
- const giftCards = await client.customer.giftCards.list({}, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-gift-cards/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -62,11 +58,7 @@ RSpec.describe 'Gift Cards API', type: :request, swagger_doc: 'api-reference/sto
security [api_key: [], bearer_auth: []]
description 'Returns a gift card by its ID'
- sdk_example <<~JS
- const giftCard = await client.customer.giftCards.get('gc_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-gift-cards/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
diff --git a/spree/api/spec/integration/spree/api/v3/store/line_items_spec.rb b/spree/api/spec/integration/spree/api/v3/store/line_items_spec.rb
index 03998e4b22..834d3d3c94 100644
--- a/spree/api/spec/integration/spree/api/v3/store/line_items_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/line_items_spec.rb
@@ -19,14 +19,7 @@ RSpec.describe 'Cart Items API', type: :request, swagger_doc: 'api-reference/sto
security [api_key: [], bearer_auth: []]
description 'Adds a variant to the cart. Creates a new line item or increases quantity if variant already in cart.'
- sdk_example <<~JS
- const cart = await client.carts.items.create('cart_abc123', {
- variant_id: 'variant_abc123',
- quantity: 2,
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/items-create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false,
@@ -96,13 +89,7 @@ RSpec.describe 'Cart Items API', type: :request, swagger_doc: 'api-reference/sto
security [api_key: [], bearer_auth: []]
description 'Updates the quantity of a line item in the cart'
- sdk_example <<~JS
- const cart = await client.carts.items.update('cart_abc123', 'li_abc123', {
- quantity: 5,
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/items-update'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false
@@ -151,11 +138,7 @@ RSpec.describe 'Cart Items API', type: :request, swagger_doc: 'api-reference/sto
security [api_key: [], bearer_auth: []]
description 'Removes a line item from the cart'
- sdk_example <<~JS
- const cart = await client.carts.items.delete('cart_abc123', 'li_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/items-delete'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false
diff --git a/spree/api/spec/integration/spree/api/v3/store/locales_spec.rb b/spree/api/spec/integration/spree/api/v3/store/locales_spec.rb
index f14a6165ab..cef0c51eab 100644
--- a/spree/api/spec/integration/spree/api/v3/store/locales_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/locales_spec.rb
@@ -18,9 +18,7 @@ RSpec.describe 'Locales API', type: :request, swagger_doc: 'api-reference/store.
security [api_key: []]
description 'Returns locales supported by the store (derived from markets)'
- sdk_example <<~JS
- const locales = await client.locales.list()
- JS
+ sdk_example 'locales/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :fields, in: :query, type: :string, required: false,
diff --git a/spree/api/spec/integration/spree/api/v3/store/markets_spec.rb b/spree/api/spec/integration/spree/api/v3/store/markets_spec.rb
index a707aadefd..177502c984 100644
--- a/spree/api/spec/integration/spree/api/v3/store/markets_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/markets_spec.rb
@@ -20,9 +20,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.
security [api_key: []]
description 'Returns all markets for the current store with their countries, currency, locales, and tax configuration.'
- sdk_example <<~JS
- const markets = await client.markets.list()
- JS
+ sdk_example 'markets/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :fields, in: :query, type: :string, required: false,
@@ -75,9 +73,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.
security [api_key: []]
description 'Returns a single market by prefixed ID with its countries, currency, locales, and tax configuration.'
- sdk_example <<~JS
- const market = await client.markets.get('mkt_xxx')
- JS
+ sdk_example 'markets/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :id, in: :path, type: :string, required: true,
@@ -119,9 +115,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.
security [api_key: []]
description 'Determine which market applies for a given country ISO code. Useful for auto-selecting the correct currency and locale when a customer\'s location is known.'
- sdk_example <<~JS
- const market = await client.markets.resolve('DE')
- JS
+ sdk_example 'markets/resolve'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :country, in: :query, type: :string, required: true,
@@ -162,9 +156,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.
security [api_key: []]
description 'Returns countries belonging to a specific market. Use this for address form country dropdowns during checkout.'
- sdk_example <<~JS
- const countries = await client.markets.countries.list('mkt_xxx')
- JS
+ sdk_example 'markets/countries-list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :market_id, in: :path, type: :string, required: true,
@@ -199,9 +191,7 @@ RSpec.describe 'Markets API', type: :request, swagger_doc: 'api-reference/store.
security [api_key: []]
description 'Returns a single country by ISO code within a market. Supports ?expand=states for address forms.'
- sdk_example <<~JS
- const country = await client.markets.countries.get('mkt_xxx', 'DE')
- JS
+ sdk_example 'markets/countries-get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :market_id, in: :path, type: :string, required: true,
diff --git a/spree/api/spec/integration/spree/api/v3/store/orders_spec.rb b/spree/api/spec/integration/spree/api/v3/store/orders_spec.rb
index feef136412..7b542c676c 100644
--- a/spree/api/spec/integration/spree/api/v3/store/orders_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/orders_spec.rb
@@ -14,11 +14,7 @@ RSpec.describe 'Orders API', type: :request, swagger_doc: 'api-reference/store.y
security [api_key: [], bearer_auth: []]
description 'Returns a single completed order by prefixed ID. Accessible via JWT (authenticated users) or order token header (guests).'
- sdk_example <<~JS
- const order = await client.orders.get('or_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'orders/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false,
diff --git a/spree/api/spec/integration/spree/api/v3/store/payment_sessions_spec.rb b/spree/api/spec/integration/spree/api/v3/store/payment_sessions_spec.rb
index ee703b16b6..02403edcf8 100644
--- a/spree/api/spec/integration/spree/api/v3/store/payment_sessions_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/payment_sessions_spec.rb
@@ -24,13 +24,7 @@ RSpec.describe 'Cart Payment Sessions API', type: :request, swagger_doc: 'api-re
security [api_key: [], bearer_auth: []]
description 'Creates a new payment session for the cart. Delegates to the payment gateway to initialize a provider-specific session (e.g. Stripe PaymentIntent, Adyen session, PayPal order).'
- sdk_example <<~JS
- const session = await client.carts.paymentSessions.create('cart_abc123', {
- payment_method_id: 'pm_abc123',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/payment-sessions-create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false,
@@ -82,11 +76,7 @@ RSpec.describe 'Cart Payment Sessions API', type: :request, swagger_doc: 'api-re
security [api_key: [], bearer_auth: []]
description 'Returns a single payment session with its current status and provider data.'
- sdk_example <<~JS
- const session = await client.carts.paymentSessions.get('cart_abc123', 'ps_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/payment-sessions-get'
response '200', 'payment session found' do
let(:'x-spree-api-key') { api_key.token }
@@ -119,13 +109,7 @@ RSpec.describe 'Cart Payment Sessions API', type: :request, swagger_doc: 'api-re
security [api_key: [], bearer_auth: []]
description 'Updates a payment session. Delegates to the payment gateway to sync changes with the provider.'
- sdk_example <<~JS
- const session = await client.carts.paymentSessions.update('cart_abc123', 'ps_abc123', {
- amount: '50.00',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/payment-sessions-update'
parameter name: :body, in: :body, schema: {
type: :object,
@@ -168,13 +152,7 @@ RSpec.describe 'Cart Payment Sessions API', type: :request, swagger_doc: 'api-re
security [api_key: [], bearer_auth: []]
description 'Completes a payment session by confirming the payment with the provider. This triggers payment capture/authorization and order completion.'
- sdk_example <<~JS
- const session = await client.carts.paymentSessions.complete('cart_abc123', 'ps_abc123', {
- session_result: 'success',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/payment-sessions-complete'
parameter name: :body, in: :body, schema: {
type: :object,
diff --git a/spree/api/spec/integration/spree/api/v3/store/payment_setup_sessions_spec.rb b/spree/api/spec/integration/spree/api/v3/store/payment_setup_sessions_spec.rb
index 9cce410ace..d5a3739214 100644
--- a/spree/api/spec/integration/spree/api/v3/store/payment_setup_sessions_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/payment_setup_sessions_spec.rb
@@ -21,13 +21,7 @@ RSpec.describe 'Payment Setup Sessions API', type: :request, swagger_doc: 'api-r
security [api_key: [], bearer_auth: []]
description 'Creates a new payment setup session for saving a payment method for future use. Delegates to the payment gateway to initialize a provider-specific setup flow (e.g. Stripe SetupIntent, Adyen zero-auth tokenization).'
- sdk_example <<~JS
- const session = await client.customer.paymentSetupSessions.create({
- payment_method_id: 'pm_abc123',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-payment-setup-sessions/create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -87,11 +81,7 @@ RSpec.describe 'Payment Setup Sessions API', type: :request, swagger_doc: 'api-r
security [api_key: [], bearer_auth: []]
description 'Returns a payment setup session with its current status and provider data.'
- sdk_example <<~JS
- const session = await client.customer.paymentSetupSessions.get('pss_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-payment-setup-sessions/get'
response '200', 'payment setup session found' do
let(:'x-spree-api-key') { api_key.token }
@@ -131,11 +121,7 @@ RSpec.describe 'Payment Setup Sessions API', type: :request, swagger_doc: 'api-r
security [api_key: [], bearer_auth: []]
description 'Completes a payment setup session by confirming the setup with the provider, resulting in a saved payment method.'
- sdk_example <<~JS
- const session = await client.customer.paymentSetupSessions.complete('pss_abc123', {}, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-payment-setup-sessions/complete'
parameter name: :body, in: :body, required: false, schema: {
type: :object,
diff --git a/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb b/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb
index 185b86939b..1493b6c026 100644
--- a/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/payments_spec.rb
@@ -18,13 +18,7 @@ RSpec.describe 'Cart Payments API', type: :request, swagger_doc: 'api-reference/
security [api_key: [], bearer_auth: []]
description 'Creates a payment for a non-session payment method (e.g. Check, Cash on Delivery, Bank Transfer). For payment methods that require a session (e.g. Stripe, PayPal), use the payment sessions endpoint instead.'
- sdk_example <<~JS
- const payment = await client.carts.payments.create('cart_abc123', {
- payment_method_id: 'pm_abc123',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/payments-create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: false
diff --git a/spree/api/spec/integration/spree/api/v3/store/policies_spec.rb b/spree/api/spec/integration/spree/api/v3/store/policies_spec.rb
index fd607e02b2..35648f1831 100644
--- a/spree/api/spec/integration/spree/api/v3/store/policies_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/policies_spec.rb
@@ -18,9 +18,7 @@ RSpec.describe 'Policies API', type: :request, swagger_doc: 'api-reference/store
Policies are managed in Spree Admin and contain rich text content.
DESC
- sdk_example <<~JS
- const policies = await client.policies.list()
- JS
+ sdk_example 'policies/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :fields, in: :query, type: :string, required: false,
@@ -62,9 +60,7 @@ RSpec.describe 'Policies API', type: :request, swagger_doc: 'api-reference/store
security [api_key: []]
description 'Returns a single policy by slug or prefixed ID. Includes the full rich text body.'
- sdk_example <<~JS
- const policy = await client.policies.get('return-policy')
- JS
+ sdk_example 'policies/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: :id, in: :path, type: :string, required: true,
diff --git a/spree/api/spec/integration/spree/api/v3/store/products_spec.rb b/spree/api/spec/integration/spree/api/v3/store/products_spec.rb
index b32693668d..2ad304262e 100644
--- a/spree/api/spec/integration/spree/api/v3/store/products_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/products_spec.rb
@@ -31,18 +31,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/store
security [api_key: []]
description 'Returns a paginated list of active products for the current store'
- sdk_example <<~JS
- const products = await client.products.list({
- page: 1,
- limit: 25,
- sort: 'price',
- name_cont: 'shirt',
- price_gte: 20,
- price_lte: 100,
- with_option_value_ids: ['optval_abc', 'optval_def'],
- expand: ['variants', 'media'],
- })
- JS
+ sdk_example 'products/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true,
description: 'Publishable API key'
@@ -108,11 +97,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/store
security [api_key: []]
description 'Returns a single product by slug or prefix ID'
- sdk_example <<~JS
- const product = await client.products.get('spree-tote', {
- expand: ['variants', 'media'],
- })
- JS
+ sdk_example 'products/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true,
description: 'Publishable API key'
@@ -235,11 +220,7 @@ RSpec.describe 'Products API', type: :request, swagger_doc: 'api-reference/store
relevant to products in that category are returned.
DESC
- sdk_example <<~JS
- const filters = await client.products.filters({
- category_id: 'ctg_abc123',
- })
- JS
+ sdk_example 'products/filters'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true,
description: 'Publishable API key'
diff --git a/spree/api/spec/integration/spree/api/v3/store/store_credits_customer_spec.rb b/spree/api/spec/integration/spree/api/v3/store/store_credits_customer_spec.rb
index d07ba2aa6a..36c9a2180f 100644
--- a/spree/api/spec/integration/spree/api/v3/store/store_credits_customer_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/store_credits_customer_spec.rb
@@ -14,11 +14,7 @@ RSpec.describe 'Customer Store Credits API', type: :request, swagger_doc: 'api-r
security [api_key: [], bearer_auth: []]
description 'Returns store credits for the authenticated customer, filtered by current store and currency. Supports Ransack filtering.'
- sdk_example <<~JS
- const credits = await client.customer.storeCredits.list({}, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-store-credits/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -61,11 +57,7 @@ RSpec.describe 'Customer Store Credits API', type: :request, swagger_doc: 'api-r
produces 'application/json'
security [api_key: [], bearer_auth: []]
- sdk_example <<~JS
- const credit = await client.customer.storeCredits.get('credit_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'customer-store-credits/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
diff --git a/spree/api/spec/integration/spree/api/v3/store/store_credits_spec.rb b/spree/api/spec/integration/spree/api/v3/store/store_credits_spec.rb
index 6afa4d89e9..cfaebb6412 100644
--- a/spree/api/spec/integration/spree/api/v3/store/store_credits_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/store_credits_spec.rb
@@ -17,11 +17,7 @@ RSpec.describe 'Cart Store Credits API', type: :request, swagger_doc: 'api-refer
security [api_key: [], bearer_auth: []]
description 'Applies store credit to the cart during checkout.'
- sdk_example <<~JS
- const cart = await client.carts.storeCredits.apply('cart_abc123', 10.0, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/store-credits-apply'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -70,11 +66,7 @@ RSpec.describe 'Cart Store Credits API', type: :request, swagger_doc: 'api-refer
security [api_key: [], bearer_auth: []]
description 'Removes store credit from the cart.'
- sdk_example <<~JS
- const cart = await client.carts.storeCredits.remove('cart_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'carts/store-credits-remove'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
diff --git a/spree/api/spec/integration/spree/api/v3/store/wishlists_spec.rb b/spree/api/spec/integration/spree/api/v3/store/wishlists_spec.rb
index 5e823d55c6..4600244b80 100644
--- a/spree/api/spec/integration/spree/api/v3/store/wishlists_spec.rb
+++ b/spree/api/spec/integration/spree/api/v3/store/wishlists_spec.rb
@@ -17,11 +17,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: [], bearer_auth: []]
description 'Returns all wishlists for the authenticated customer'
- sdk_example <<~JS
- const wishlists = await client.wishlists.list({}, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'wishlists/list'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -63,14 +59,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: [], bearer_auth: []]
description 'Creates a new wishlist for the customer'
- sdk_example <<~JS
- const wishlist = await client.wishlists.create({
- name: 'Birthday Ideas',
- is_private: true,
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'wishlists/create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -116,13 +105,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stor
produces 'application/json'
security [api_key: [], bearer_auth: []]
- sdk_example <<~JS
- const wishlist = await client.wishlists.get('wl_abc123', {
- expand: 'wished_items',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'wishlists/get'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -159,13 +142,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stor
produces 'application/json'
security [api_key: [], bearer_auth: []]
- sdk_example <<~JS
- const wishlist = await client.wishlists.update('wl_abc123', {
- name: 'Updated Name',
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'wishlists/update'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -198,11 +175,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stor
tags 'Wishlists'
security [api_key: [], bearer_auth: []]
- sdk_example <<~JS
- await client.wishlists.delete('wl_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'wishlists/delete'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -226,14 +199,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stor
security [api_key: [], bearer_auth: []]
description 'Adds a variant to the wishlist'
- sdk_example <<~JS
- const item = await client.wishlists.items.create('wl_abc123', {
- variant_id: 'variant_abc123',
- quantity: 1,
- }, {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'wishlists/items-create'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
@@ -267,11 +233,7 @@ RSpec.describe 'Wishlists API', type: :request, swagger_doc: 'api-reference/stor
tags 'Wishlists'
security [api_key: [], bearer_auth: []]
- sdk_example <<~JS
- await client.wishlists.items.delete('wl_abc123', 'wi_abc123', {
- bearerToken: '<token>',
- })
- JS
+ sdk_example 'wishlists/items-delete'
parameter name: 'x-spree-api-key', in: :header, type: :string, required: true
parameter name: 'Authorization', in: :header, type: :string, required: true
diff --git a/spree/api/spec/support/code_samples_helper.rb b/spree/api/spec/support/code_samples_helper.rb
index d9cc8310da..afed97fcb3 100644
--- a/spree/api/spec/support/code_samples_helper.rb
+++ b/spree/api/spec/support/code_samples_helper.rb
@@ -19,11 +19,14 @@ module CodeSamplesHelper
})
JS
+ SDK_EXAMPLES_ROOT = File.expand_path('../../../../packages/sdk/examples', __dir__)
ADMIN_SDK_EXAMPLES_ROOT = File.expand_path('../../../../packages/admin-sdk/examples', __dir__)
# Match `// region:example` / `// endregion:example` markers and extract
# the body between them. The markers can have arbitrary indentation.
- ADMIN_SDK_EXAMPLE_REGION = /^[ \t]*\/\/\s*region:example\s*\n(.*?)^[ \t]*\/\/\s*endregion:example/m
+ SDK_EXAMPLE_REGION = /^[ \t]*\/\/\s*region:example\s*\n(.*?)^[ \t]*\/\/\s*endregion:example/m
+
+ EXAMPLE_CACHE = {}
def code_samples(*samples)
metadata[:operation][:'x-codeSamples'] = samples.map do |sample|
@@ -31,30 +34,32 @@ module CodeSamplesHelper
end
end
- def sdk_example(source)
+ # Renders a Store SDK code sample from a typechecked example file under
+ # `packages/sdk/examples/`. The file must be a complete `.ts` module
+ # (imports + `createClient` initializer) so `tsc` can verify it against
+ # the live SDK types; the helper extracts only the body between
+ # `// region:example` / `// endregion:example` markers and re-prepends
+ # the canonical client init block so rendered docs stay consistent
+ # across endpoints.
+ #
+ # sdk_example 'products/list'
+ # → packages/sdk/examples/products/list.ts
+ def sdk_example(name)
+ source = EXAMPLE_CACHE[[:store, name]] ||= load_example_body(SDK_EXAMPLES_ROOT, name, 'Store SDK')
code_samples(
{
lang: 'javascript',
label: 'Spree SDK',
- source: "#{SDK_CLIENT_INIT}\n\n#{source.strip}\n"
+ source: "#{SDK_CLIENT_INIT}\n\n#{source}\n"
}
)
end
- ADMIN_SDK_EXAMPLE_CACHE = {}
-
- # Renders an admin SDK code sample from a typechecked example file under
- # `packages/admin-sdk/examples/`. The file must be a complete `.ts`
- # module (imports + `createAdminClient` initializer) so `tsc` can verify
- # it against the live SDK types; the helper extracts only the body
- # between `// region:example` / `// endregion:example` markers and
- # re-prepends the canonical client init block so rendered docs stay
- # consistent across endpoints.
- #
- # admin_sdk_example 'promotions/create'
- # → packages/admin-sdk/examples/promotions/create.ts
+ # Mirrors `sdk_example` for the admin SDK — examples live under
+ # `packages/admin-sdk/examples/` and the canonical init block uses
+ # `createAdminClient`.
def admin_sdk_example(name)
- source = ADMIN_SDK_EXAMPLE_CACHE[name] ||= load_admin_sdk_example(name)
+ source = EXAMPLE_CACHE[[:admin, name]] ||= load_example_body(ADMIN_SDK_EXAMPLES_ROOT, name, 'Admin SDK')
code_samples(
{
lang: 'javascript',
@@ -64,12 +69,12 @@ module CodeSamplesHelper
)
end
- def load_admin_sdk_example(name)
- path = File.join(ADMIN_SDK_EXAMPLES_ROOT, "#{name}.ts")
- raise "Admin SDK example not found: #{path}" unless File.exist?(path)
+ def load_example_body(root, name, label)
+ path = File.join(root, "#{name}.ts")
+ raise "#{label} example not found: #{path}" unless File.exist?(path)
- body = File.read(path).match(ADMIN_SDK_EXAMPLE_REGION)&.captures&.first
- raise "Admin SDK example #{name.inspect} has no `// region:example` marker" if body.nil?
+ body = File.read(path).match(SDK_EXAMPLE_REGION)&.captures&.first
+ raise "#{label} example #{name.inspect} has no `// region:example` marker" if body.nil?
body.rstrip.strip_heredoc.strip
end