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.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Merge branch 'main' into 6-0-dev
Łukasz Adamczyk0c7943fd7316
diff --cc docs/api-reference/admin.yamlindex e790ba5b52,8139df6202..fc16ea5291--- a/docs/api-reference/admin.yaml+++ b/docs/api-reference/admin.yaml@@@ -92,16 -92,16 +92,16 @@@ pathscontent:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJhZG1pbiIsImp0aSI6ImM2NWJlOTMyLTA5NDItNDgxNi04YzVlLTQ4YTA4MTZkMzVkZiIsImlzcyI6InNwcmVlIiwiYXVkIjoiYWRtaW5fYXBpIiwiZXhwIjoxNzg0NTUxMzEzfQ.l8IjYMmR0cc6KB5Mt70U9Py7BB53qOWI0viv5rEGuQI- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJhZG1pbiIsImp0aSI6ImYzZmNiYTE4LWRiZDQtNGM4My1hYTUzLWNiZjk0NjFjMTA2MyIsImlzcyI6InNwcmVlIiwiYXVkIjoiYWRtaW5fYXBpIiwiZXhwIjoxNzg1MDc2MTUxfQ.SSuiZocV1bNTK2yUSZJZxFmBg3IZg289Hzb7fGpvYhI++ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJhZG1pbiIsImp0aSI6ImY1YTYxMzVjLTI2MzAtNDk5MS05YWJhLTk4Nzg1ZTRiMTA2NCIsImlzcyI6InNwcmVlIiwiYXVkIjoiYWRtaW5fYXBpIiwiZXhwIjoxNzg1MTQxNDY4fQ.S8rXgDP_rbbtISNKoTVDnyQxMDSETEEopgSOovg7blkuser:id: admin_UkLWZg9DAJemail: [email protected]- first_name: Luna- last_name: Runolfsdottir- full_name: Luna Runolfsdottir- first_name: Bruno- last_name: Goldner- full_name: Bruno Goldner++ first_name: Valentina++ last_name: McGlynn++ full_name: Valentina McGlynnselected_locale:- created_at: '2026-07-20T12:36:53.478Z'- updated_at: '2026-07-20T12:36:53.478Z'- created_at: '2026-07-26T14:24:11.494Z'- updated_at: '2026-07-26T14:24:11.494Z'++ created_at: '2026-07-27T08:32:47.927Z'++ updated_at: '2026-07-27T08:32:47.927Z'avatar_url:roles:- id: role_UkLWZg9DAJ@@@ -200,16 -204,16 +204,16 @@@content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJhZG1pbiIsImp0aSI6IjNlMWMzYTEwLTk2ZTEtNDJkZC05YjJhLWJhOGNkZmE5MDhhNCIsImlzcyI6InNwcmVlIiwiYXVkIjoiYWRtaW5fYXBpIiwiZXhwIjoxNzg0NTUxMzE0fQ.uNIc-Mh-DVG0Z2EHVYw7HEeEpzIY_0-Utba5pr9Jb-U- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJhZG1pbiIsImp0aSI6ImJkY2E4NzM1LWRmZTktNDNlZS04YWE5LWFmOGVkZGVjNjMzOSIsImlzcyI6InNwcmVlIiwiYXVkIjoiYWRtaW5fYXBpIiwiZXhwIjoxNzg1MDc2MTUyfQ.EVEXM-xRJlRs_MCwJT__O_iGNzrZJxOeF8RS_3FLl5M++ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJhZG1pbiIsImp0aSI6IjA0YmNiMGI2LWM4Y2UtNGY4Ni1iYjJhLTNjZDVlMjEyMWU3NSIsImlzcyI6InNwcmVlIiwiYXVkIjoiYWRtaW5fYXBpIiwiZXhwIjoxNzg1MTQxNDY4fQ.cFiU2tXey79df-bz5tHh4_GNsBfSR0smkoSk4h_60NIuser:id: admin_UkLWZg9DAJemail: [email protected]- first_name: Ferne- last_name: Rice- full_name: Ferne Rice- first_name: Melissa- last_name: Padberg- full_name: Melissa Padberg++ first_name: Elanor++ last_name: Breitenberg++ full_name: Elanor Breitenbergselected_locale:- created_at: '2026-07-20T12:36:54.478Z'- updated_at: '2026-07-20T12:36:54.478Z'- created_at: '2026-07-26T14:24:12.588Z'- updated_at: '2026-07-26T14:24:12.588Z'++ created_at: '2026-07-27T08:32:48.969Z'++ updated_at: '2026-07-27T08:32:48.969Z'avatar_url:roles:- id: role_UkLWZg9DAJ@@@ -307,13 -315,13 +315,13 @@@example:user:id: admin_UkLWZg9DAJ- email: [email protected]- first_name: Stephan- last_name: Hermann- full_name: Stephan Hermann- email: [email protected]- first_name: Jacque- last_name: Greenfelder- full_name: Jacque Greenfelder++ email: [email protected]++ first_name: Gladys++ last_name: Hettinger++ full_name: Gladys Hettingerselected_locale:- created_at: '2026-07-20T12:37:33.180Z'- updated_at: '2026-07-20T12:37:33.180Z'- created_at: '2026-07-26T14:24:52.577Z'- updated_at: '2026-07-26T14:24:52.577Z'++ created_at: '2026-07-27T08:33:28.193Z'++ updated_at: '2026-07-27T08:33:28.193Z'avatar_url:roles:- id: role_UkLWZg9DAJ@@@ -429,13 -441,13 +441,13 @@@example:user:id: admin_UkLWZg9DAJ- email: [email protected]- first_name: Christy- last_name: Grimes- full_name: Christy Grimes- email: [email protected]- first_name: Trudie- last_name: Collins- full_name: Trudie Collins++ email: [email protected]++ first_name: Glayds++ last_name: Wyman++ full_name: Glayds Wymanselected_locale: de- created_at: '2026-07-20T12:37:33.472Z'- updated_at: '2026-07-20T12:37:33.493Z'- created_at: '2026-07-26T14:24:52.895Z'- updated_at: '2026-07-26T14:24:52.920Z'++ created_at: '2026-07-27T08:33:28.486Z'++ updated_at: '2026-07-27T08:33:28.501Z'avatar_url:roles:- id: role_UkLWZg9DAJ@@@ -628,16 -644,16 +644,16 @@@content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJhZG1pbiIsImp0aSI6IjU5MjM2NTk4LTMyOWMtNGNiYy1iOGI0LTJiYTczYzU3Nzc3NSIsImlzcyI6InNwcmVlIiwiYXVkIjoiYWRtaW5fYXBpIiwiZXhwIjoxNzg0NTU0NjgxfQ.ozA7vpcKLnnn2L7SogcvVpBqDVb7ADLQ6FieW8ccgCc- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJhZG1pbiIsImp0aSI6ImJmYTMxNmRiLTdiZGMtNDlmYS1hYjc5LWEwMTMyYWE3YTg2MyIsImlzcyI6InNwcmVlIiwiYXVkIjoiYWRtaW5fYXBpIiwiZXhwIjoxNzg1MDc5NTI1fQ.E7O9oN3iCrpG8yNA8do9lFp-zwtn-SGJRlr_XK2tscE++ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJhZG1pbiIsImp0aSI6ImEyNDY0ZDQ3LWM5NmQtNDE4NC1iODQ3LWRlZGQxZmJiNjFhMCIsImlzcyI6InNwcmVlIiwiYXVkIjoiYWRtaW5fYXBpIiwiZXhwIjoxNzg1MTQ0ODM4fQ.CH7wMRK7twO9R-dG24v4ZZ4TullMWj063dw2R9ln1dkuser:id: admin_UkLWZg9DAJemail: [email protected]- first_name: Ami- last_name: Kirlin- full_name: Ami Kirlin- first_name: Chia- last_name: Wunsch- full_name: Chia Wunsch++ first_name: Lance++ last_name: Leuschke++ full_name: Lance Leuschkeselected_locale:- created_at: '2026-07-20T12:38:00.854Z'- updated_at: '2026-07-20T12:38:01.104Z'- created_at: '2026-07-26T14:25:25.201Z'- updated_at: '2026-07-26T14:25:25.479Z'++ created_at: '2026-07-27T08:33:57.795Z'++ updated_at: '2026-07-27T08:33:58.053Z'avatar_url:roles:- id: role_UkLWZg9DAJ@@@ -752,8 -772,8 +772,8 @@@data:- id: ao_UkLWZg9DAJorigin: https://shop.example.com- created_at: '2026-07-20T12:36:49.197Z'- updated_at: '2026-07-20T12:36:49.197Z'- created_at: '2026-07-26T14:24:06.578Z'- updated_at: '2026-07-26T14:24:06.578Z'++ created_at: '2026-07-27T08:32:43.672Z'++ updated_at: '2026-07-27T08:32:43.672Z'meta:page: 1limit: 25@@@ -837,8 -857,8 +857,8 @@@example:id: ao_gbHJdmfrXBorigin: https://admin.example.com- created_at: '2026-07-20T12:36:49.758Z'- updated_at: '2026-07-20T12:36:49.758Z'- created_at: '2026-07-26T14:24:07.168Z'- updated_at: '2026-07-26T14:24:07.168Z'++ created_at: '2026-07-27T08:32:44.246Z'++ updated_at: '2026-07-27T08:32:44.246Z'schema:"$ref": "#/components/schemas/AllowedOrigin"'422':@@@ -925,8 -945,8 +945,8 @@@example:id: ao_UkLWZg9DAJorigin: https://shop.example.com- created_at: '2026-07-20T12:36:50.029Z'- updated_at: '2026-07-20T12:36:50.029Z'- created_at: '2026-07-26T14:24:07.460Z'- updated_at: '2026-07-26T14:24:07.460Z'++ created_at: '2026-07-27T08:32:44.512Z'++ updated_at: '2026-07-27T08:32:44.512Z'schema:"$ref": "#/components/schemas/AllowedOrigin"'404':@@@ -987,8 -1007,8 +1007,8 @@@example:id: ao_UkLWZg9DAJorigin: https://www.example.com- created_at: '2026-07-20T12:36:50.551Z'- updated_at: '2026-07-20T12:36:50.825Z'- created_at: '2026-07-26T14:24:08.042Z'- updated_at: '2026-07-26T14:24:08.343Z'++ created_at: '2026-07-27T08:32:45.033Z'++ updated_at: '2026-07-27T08:32:45.291Z'schema:"$ref": "#/components/schemas/AllowedOrigin"'422':@@@ -1108,34 -1128,34 +1128,34 @@@key_type: publishabletoken_prefix:scopes: []- created_at: '2026-07-20T12:36:51.371Z'- updated_at: '2026-07-20T12:36:51.371Z'- created_at: '2026-07-26T14:24:09.139Z'- updated_at: '2026-07-26T14:24:09.139Z'++ created_at: '2026-07-27T08:32:45.823Z'++ updated_at: '2026-07-27T08:32:45.823Z'revoked_at:last_used_at:channel_id:- plaintext_token: pk_htotcYEf4WcspRakKc7PvEKX- plaintext_token: pk_JFGfPmiWqiZEKoJpDV3m2De6++ plaintext_token: pk_zGzjwjh2uGrLh8K73R5nzsX9created_by_email:- id: key_gbHJdmfrXBname: Backend integrationkey_type: secret- token_prefix: sk_sGiSpPdCm- token_prefix: sk_qNr2jceMP++ token_prefix: sk_Pqb4wZ5aQscopes:- write_all- created_at: '2026-07-20T12:36:51.372Z'- updated_at: '2026-07-20T12:36:51.372Z'- created_at: '2026-07-26T14:24:09.140Z'- updated_at: '2026-07-26T14:24:09.140Z'++ created_at: '2026-07-27T08:32:45.825Z'++ updated_at: '2026-07-27T08:32:45.825Z'revoked_at:last_used_at:channel_id:plaintext_token:created_by_email:- id: key_EfhxLZ9ck8- name: vel- name: sed++ name: necessitatibuskey_type: secret- token_prefix: sk_A9DB44zZ9- token_prefix: sk_ZYAfdHV3B++ token_prefix: sk_9Kn1vniaJscopes:- write_all- created_at: '2026-07-20T12:36:51.373Z'- updated_at: '2026-07-20T12:36:51.373Z'- created_at: '2026-07-26T14:24:09.141Z'- updated_at: '2026-07-26T14:24:09.141Z'++ created_at: '2026-07-27T08:32:45.825Z'++ updated_at: '2026-07-27T08:32:45.825Z'revoked_at:last_used_at:channel_id:@@@ -1202,16 -1222,16 +1222,16 @@@id: key_VqXmZF31wYname: CI keykey_type: secret- token_prefix: sk_um3ozzfTJ- token_prefix: sk_XSJF3gUVL++ token_prefix: sk_5NDst91DPscopes:- read_orders- created_at: '2026-07-20T12:36:51.889Z'- updated_at: '2026-07-20T12:36:51.889Z'- created_at: '2026-07-26T14:24:09.741Z'- updated_at: '2026-07-26T14:24:09.741Z'++ created_at: '2026-07-27T08:32:46.364Z'++ updated_at: '2026-07-27T08:32:46.364Z'revoked_at:last_used_at:channel_id:- plaintext_token: sk_um3ozzfTJ1qupWmkC1nGqJkG- created_by_email: [email protected]- plaintext_token: sk_XSJF3gUVLZht9fEVtPepwwWD- created_by_email: [email protected]++ plaintext_token: sk_5NDst91DP1uAnQ7ib22Shpp5++ created_by_email: [email protected]'422':description: validation errorcontent:@@@ -1300,12 -1320,12 +1320,12 @@@key_type: publishabletoken_prefix:scopes: []- created_at: '2026-07-20T12:36:52.160Z'- updated_at: '2026-07-20T12:36:52.160Z'- created_at: '2026-07-26T14:24:10.055Z'- updated_at: '2026-07-26T14:24:10.055Z'++ created_at: '2026-07-27T08:32:46.632Z'++ updated_at: '2026-07-27T08:32:46.632Z'revoked_at:last_used_at:channel_id:- plaintext_token: pk_uUwp7koYXdEFKJtRPXE7xseM- plaintext_token: pk_BWtJqw3maCgCL1dY8haZnVUR++ plaintext_token: pk_9VUH4BvYucKoRB2ZgFuFTHBpcreated_by_email:patch:summary: Update an API key@@@ -1359,11 -1379,11 +1379,11 @@@id: key_gbHJdmfrXBname: Backend integration (renamed)key_type: secret- token_prefix: sk_gPuW3myxU- token_prefix: sk_bpZ4NTeJB++ token_prefix: sk_AzZZxwGkMscopes:- write_all- created_at: '2026-07-20T12:36:52.422Z'- updated_at: '2026-07-20T12:36:52.675Z'- created_at: '2026-07-26T14:24:10.343Z'- updated_at: '2026-07-26T14:24:10.639Z'++ created_at: '2026-07-27T08:32:46.895Z'++ updated_at: '2026-07-27T08:32:47.149Z'revoked_at:last_used_at:channel_id:@@@ -1460,13 -1480,13 +1480,13 @@@application/json:example:id: key_EfhxLZ9ck8- name: ducimus- name: minus++ name: verokey_type: secret- token_prefix: sk_TnGrQLhNB- token_prefix: sk_wqr6gEKcv++ token_prefix: sk_3nwpSihEzscopes:- write_all- created_at: '2026-07-20T12:36:52.950Z'- updated_at: '2026-07-20T12:36:52.950Z'- created_at: '2026-07-26T14:24:10.931Z'- updated_at: '2026-07-26T14:24:10.931Z'++ created_at: '2026-07-27T08:32:47.417Z'++ updated_at: '2026-07-27T08:32:47.417Z'revoked_at:last_used_at:channel_id:@@@ -1524,12 -1544,12 +1544,12 @@@id: key_gbHJdmfrXBname: Backend integrationkey_type: secret- token_prefix: sk_FaqhYQ71c- token_prefix: sk_VP6E6TGHz++ token_prefix: sk_KyGgNj1BBscopes:- write_all- created_at: '2026-07-20T12:36:52.982Z'- updated_at: '2026-07-20T12:36:53.238Z'- revoked_at: '2026-07-20T12:36:53.238Z'- created_at: '2026-07-26T14:24:10.945Z'- updated_at: '2026-07-26T14:24:11.225Z'- revoked_at: '2026-07-26T14:24:11.225Z'++ created_at: '2026-07-27T08:32:47.429Z'++ updated_at: '2026-07-27T08:32:47.684Z'++ revoked_at: '2026-07-27T08:32:47.684Z'last_used_at:channel_id:plaintext_token:@@@ -1589,30 -1604,30 +1604,30 @@@application/json:example:data:- - id: ch_UkLWZg9DAJ- name: Online Store- code: online- active: true- default: true- storefront_access: public- guest_checkout: true- preferred_order_routing_strategy:- preferred_storefront_access:- preferred_guest_checkout:- created_at: '2026-07-20T12:36:47.924Z'- updated_at: '2026-07-20T12:36:47.924Z'- - id: ch_gbHJdmfrXB- name: Wholesale- code: wholesale- active: true- default: false- storefront_access: public- guest_checkout: true- preferred_order_routing_strategy:- preferred_storefront_access:- preferred_guest_checkout:- created_at: '2026-07-20T12:36:58.575Z'- updated_at: '2026-07-20T12:36:58.575Z'+ - id: ctg_UkLWZg9DAJ+ name: Clothing+ permalink: clothing+ position: 0+ depth: 0+ meta_title:+ meta_description:+ meta_keywords:+ children_count: 0+ parent_id:+ description: ''+ description_html: ''+ image_url:+ square_image_url:+ is_root: true+ is_child: false+ is_leaf: true+ metadata: {}+ pretty_name: Clothing+ lft: 1+ rgt: 2+ products_count: 0- created_at: '2026-07-26T14:24:13.190Z'- updated_at: '2026-07-26T14:24:13.190Z'++ created_at: '2026-07-27T08:32:49.581Z'++ updated_at: '2026-07-27T08:32:49.581Z'meta:page: 1limit: 25@@@ -1687,18 -1679,45 +1679,45 @@@content:application/json:example:- id: ch_EfhxLZ9ck8- name: Marketplace- code: marketplace- active: true- default: false- storefront_access: public- guest_checkout: true- preferred_order_routing_strategy:- preferred_storefront_access:- preferred_guest_checkout:- created_at: '2026-07-20T12:36:59.099Z'- updated_at: '2026-07-20T12:36:59.099Z'+ id: ctg_gbHJdmfrXB+ name: Shirts+ permalink: clothing/shirts+ position: 0+ depth: 1+ meta_title:+ meta_description:+ meta_keywords:+ children_count: 0+ parent_id: ctg_UkLWZg9DAJ+ description: ''+ description_html: ''+ image_url:+ square_image_url:+ is_root: false+ is_child: true+ is_leaf: true+ metadata: {}+ pretty_name: Clothing -> Shirts+ lft: 2+ rgt: 3+ products_count: 0- created_at: '2026-07-26T14:24:13.764Z'- updated_at: '2026-07-26T14:24:13.770Z'++ created_at: '2026-07-27T08:32:50.118Z'++ updated_at: '2026-07-27T08:32:50.125Z'+ schema:+ "$ref": "#/components/schemas/Category"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Name can't be blank+ details:+ name:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"requestBody:content:application/json:@@@ -1764,22 -1789,46 +1789,46 @@@content:application/json:example:- id: ch_gbHJdmfrXB- name: Wholesale- code: wholesale- active: true- default: false- storefront_access: public- guest_checkout: true- preferred_order_routing_strategy:- preferred_storefront_access:- preferred_guest_checkout:- created_at: '2026-07-20T12:36:59.109Z'- updated_at: '2026-07-20T12:36:59.109Z'+ id: ctg_UkLWZg9DAJ+ name: Clothing+ permalink: clothing+ position: 0+ depth: 0+ meta_title:+ meta_description:+ meta_keywords:+ children_count: 0+ parent_id:+ description: ''+ description_html: ''+ image_url:+ square_image_url:+ is_root: true+ is_child: false+ is_leaf: true+ metadata: {}+ pretty_name: Clothing+ lft: 1+ rgt: 2+ products_count: 0- created_at: '2026-07-26T14:24:14.066Z'- updated_at: '2026-07-26T14:24:14.066Z'++ created_at: '2026-07-27T08:32:50.408Z'++ updated_at: '2026-07-27T08:32:50.408Z'+ schema:+ "$ref": "#/components/schemas/Category"+ '404':+ description: category not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Category not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"patch:- summary: Update a channel+ summary: Update a categorytags:- - Channels+ - Categoriessecurity:- api_key: []bearer_auth: []@@@ -1819,18 -1860,32 +1860,32 @@@content:application/json:example:- id: ch_gbHJdmfrXB- name: Wholesale (Updated)- code: wholesale- active: true- default: false- storefront_access: public- guest_checkout: true- preferred_order_routing_strategy:- preferred_storefront_access:- preferred_guest_checkout:- created_at: '2026-07-20T12:36:59.382Z'- updated_at: '2026-07-20T12:36:59.647Z'+ id: ctg_UkLWZg9DAJ+ name: Apparel+ permalink: clothing+ position: 0+ depth: 0+ meta_title:+ meta_description:+ meta_keywords:+ children_count: 0+ parent_id:+ description: ''+ description_html: ''+ image_url:+ square_image_url:+ is_root: true+ is_child: false+ is_leaf: true+ metadata: {}+ pretty_name: Apparel+ lft: 1+ rgt: 2+ products_count: 0- created_at: '2026-07-26T14:24:14.660Z'- updated_at: '2026-07-26T14:24:14.950Z'++ created_at: '2026-07-27T08:32:50.944Z'++ updated_at: '2026-07-27T08:32:51.203Z'+ schema:+ "$ref": "#/components/schemas/Category"requestBody:content:application/json:@@@ -1939,12 -1978,32 +1978,32 @@@content:application/json:example:- product_count: 1+ id: ctg_gbHJdmfrXB+ name: Footwear+ permalink: clothing/footwear+ position: 0+ depth: 1+ meta_title:+ meta_description:+ meta_keywords:+ children_count: 0+ parent_id: ctg_UkLWZg9DAJ+ description: ''+ description_html: ''+ image_url:+ square_image_url:+ is_root: false+ is_child: true+ is_leaf: true+ metadata: {}+ pretty_name: Clothing -> Footwear+ lft: 2+ rgt: 3+ products_count: 0- created_at: '2026-07-26T14:24:15.264Z'- updated_at: '2026-07-26T14:24:15.549Z'++ created_at: '2026-07-27T08:32:51.507Z'++ updated_at: '2026-07-27T08:32:51.778Z'schema:- type: object- properties:- product_count:- type: integer+ "$ref": "#/components/schemas/Category"requestBody:content:application/json:@@@ -2023,25 -2068,166 +2068,202 @@@schema:type: objectproperties:- product_count:- type: integer+ data:+ type: array+ items:+ "$ref": "#/components/schemas/Product"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ required:+ - data+ - meta+ post:+ summary: Add a product to a category+ tags:+ - Categories+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Classifies a product under the category (appended to the end).++ **Required scope:** `write_categories` (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: category_id+ in: path+ required: true+ description: Category ID+ schema:+ type: string+ responses:+ '201':+ description: product added+ content:+ application/json:+ example:+ id: prod_UkLWZg9DAJ- name: Product 11589- slug: product-11589++ name: Product 12332++ slug: product-12332+ meta_title:+ meta_description:+ meta_keywords:- variant_count: 0++ variant_count: 1+ available_on:+ preorder_ships_at:+ purchasable: true+ preorder: false+ in_stock: false+ backorderable: true+ available: true- description: Eos quam id nemo et aliquid placeat quos maiores. Quam- accusantium rem explicabo accusamus consectetur dolore minus. Magnam- totam voluptas officia aperiam harum error. Minima molestias nihil- sint laborum. Dolor eius aspernatur quos incidunt ratione. Nam quam- dolores blanditiis ducimus accusantium ut deserunt. Unde error repellat- quam consectetur voluptates. Deserunt numquam consequatur rerum- molestiae laudantium ab. Delectus accusamus aut impedit quis cum- autem voluptatem. Modi voluptate voluptas praesentium error.++ description: Doloremque amet architecto illo quia. Assumenda in ratione++ sed incidunt nulla cumque. Recusandae praesentium laborum hic unde++ optio doloremque. Reprehenderit dolorum error doloribus optio ab.++ Laborum maiores facilis vero a. Ipsa repellat sunt quod non quaerat++ impedit. Quos molestias eius esse commodi iste ipsam sed quas.+ description_html: |-- Eos quam id nemo et aliquid placeat quos maiores. Quam accusantium rem explicabo accusamus consectetur dolore minus. Magnam totam voluptas officia aperiam harum error. Minima molestias nihil sint laborum. Dolor eius aspernatur quos incidunt ratione.- Nam quam dolores blanditiis ducimus accusantium ut deserunt. Unde error repellat quam consectetur voluptates. Deserunt numquam consequatur rerum molestiae laudantium ab. Delectus accusamus aut impedit quis cum autem voluptatem. Modi voluptate voluptas praesentium error.++ Doloremque amet architecto illo quia. Assumenda in ratione sed incidunt nulla cumque. Recusandae praesentium laborum hic unde optio doloremque. Reprehenderit dolorum error doloribus optio ab.++ Laborum maiores facilis vero a. Ipsa repellat sunt quod non quaerat impedit. Quos molestias eius esse commodi iste ipsam sed quas.+ default_variant_id: variant_UkLWZg9DAJ+ thumbnail_url:+ tags: []+ price:+ id: price_UkLWZg9DAJ+ amount: '19.99'+ amount_in_cents: 1999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$19.99"+ display_compare_at_amount:+ price_list_id:+ variant_id: variant_UkLWZg9DAJ- created_at: '2026-07-26T14:24:15.901Z'- updated_at: '2026-07-26T14:24:15.901Z'++ created_at: '2026-07-27T08:32:52.130Z'++ updated_at: '2026-07-27T08:32:52.130Z'+ original_price:+ status: active+ metadata: {}+ deleted_at:- created_at: '2026-07-26T14:24:15.884Z'- updated_at: '2026-07-26T14:24:15.910Z'++ created_at: '2026-07-27T08:32:52.107Z'++ updated_at: '2026-07-27T08:32:52.141Z'+ tax_category_id: taxcat_UkLWZg9DAJ+ schema:+ "$ref": "#/components/schemas/Product"requestBody:content:application/json:schema:type: object+ properties:+ product_id:+ type: string+ example: prod_abc123required:- - product_ids+ - product_id++ "/api/v3/admin/categories/{category_id}/products/{id}":++ delete:++ summary: Remove a product from a category++ tags:++ - Categories++ security:++ - api_key: []++ bearer_auth: []++ description: |-++ Removes a product from the category's manual classification.++++ **Required scope:** `write_categories` (for API-key authentication).++ parameters:++ - name: x-spree-api-key++ in: header++ required: true++ schema:++ type: string++ - name: Authorization++ in: header++ required: true++ description: Bearer token for admin authentication++ schema:++ type: string++ - name: category_id++ in: path++ required: true++ description: Category ID++ schema:++ type: string++ - name: id++ in: path++ required: true++ description: Product ID++ schema:++ type: string++ responses:++ '204':++ description: product removed+ "/api/v3/admin/categories/{category_id}/products/{id}/reposition":+ patch:+ summary: Reposition a category product+ tags:+ - Categories+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Moves a product to a new index among the category's products.++ **Required scope:** `write_categories` (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: category_id+ in: path+ required: true+ description: Category ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Product ID+ schema:+ type: string+ responses:+ '204':+ description: product repositioned+ requestBody:+ content:+ application/json:+ schema:+ type: objectproperties:- product_ids:- type: array- items:- type: string- "/api/v3/admin/custom_field_definitions":+ new_position:+ type: integer+ description: 0-based index among the category's products+ required:+ - new_position+ "/api/v3/admin/channels":get:- summary: List custom field definitions+ summary: List channelstags:- - Custom Fields+ - Channelssecurity:- api_key: []bearer_auth: []@@@ -2098,24 -2278,30 +2314,30 @@@application/json:example:data:- - id: cfdef_UkLWZg9DAJ- namespace: specs- key: fabric- label: Title- field_type: short_text- resource_type: Spree::Product- storefront_visible: true- created_at: '2026-07-20T12:37:03.922Z'- updated_at: '2026-07-20T12:37:03.922Z'- - id: cfdef_gbHJdmfrXB- namespace: custom- key: order_notes- label: Order Notes- field_type: short_text- resource_type: Spree::Order- storefront_visible: true- created_at: '2026-07-20T12:37:03.923Z'- updated_at: '2026-07-20T12:37:03.923Z'+ - id: ch_UkLWZg9DAJ+ name: Online Store+ code: online+ active: true+ default: true+ storefront_access: public+ guest_checkout: true+ preferred_order_routing_strategy:+ preferred_storefront_access:+ preferred_guest_checkout:- created_at: '2026-07-26T14:24:05.245Z'- updated_at: '2026-07-26T14:24:05.245Z'++ created_at: '2026-07-27T08:32:42.440Z'++ updated_at: '2026-07-27T08:32:42.440Z'+ - id: ch_gbHJdmfrXB+ name: Wholesale+ code: wholesale+ active: true+ default: false+ storefront_access: public+ guest_checkout: true+ preferred_order_routing_strategy:+ preferred_storefront_access:+ preferred_guest_checkout:- created_at: '2026-07-26T14:24:16.572Z'- updated_at: '2026-07-26T14:24:16.572Z'++ created_at: '2026-07-27T08:32:53.035Z'++ updated_at: '2026-07-27T08:32:53.035Z'meta:page: 1limit: 25@@@ -2174,15 -2376,18 +2412,18 @@@content:application/json:example:- id: cfdef_EfhxLZ9ck8- namespace: specs- key: origin- label: Country of Origin- field_type: short_text- resource_type: Spree::Product- storefront_visible: true- created_at: '2026-07-20T12:37:04.448Z'- updated_at: '2026-07-20T12:37:04.448Z'+ id: ch_EfhxLZ9ck8+ name: Marketplace+ code: marketplace+ active: true+ default: false+ storefront_access: public+ guest_checkout: true+ preferred_order_routing_strategy:+ preferred_storefront_access:+ preferred_guest_checkout:- created_at: '2026-07-26T14:24:17.152Z'- updated_at: '2026-07-26T14:24:17.152Z'++ created_at: '2026-07-27T08:32:53.569Z'++ updated_at: '2026-07-27T08:32:53.569Z'requestBody:content:application/json:@@@ -2272,19 -2475,22 +2511,22 @@@content:application/json:example:- id: cfdef_UkLWZg9DAJ- namespace: specs- key: fabric- label: Title- field_type: short_text- resource_type: Spree::Product- storefront_visible: true- created_at: '2026-07-20T12:37:04.454Z'- updated_at: '2026-07-20T12:37:04.454Z'+ id: ch_gbHJdmfrXB+ name: Wholesale+ code: wholesale+ active: true+ default: false+ storefront_access: public+ guest_checkout: true+ preferred_order_routing_strategy:+ preferred_storefront_access:+ preferred_guest_checkout:- created_at: '2026-07-26T14:24:17.164Z'- updated_at: '2026-07-26T14:24:17.164Z'++ created_at: '2026-07-27T08:32:53.591Z'++ updated_at: '2026-07-27T08:32:53.591Z'patch:- summary: Update a custom field definition+ summary: Update a channeltags:- - Custom Fields+ - Channelssecurity:- api_key: []bearer_auth: []@@@ -2330,15 -2530,18 +2566,18 @@@content:application/json:example:- id: cfdef_UkLWZg9DAJ- namespace: specs- key: fabric- label: Fabric Composition- field_type: short_text- resource_type: Spree::Product- storefront_visible: false- created_at: '2026-07-20T12:37:04.720Z'- updated_at: '2026-07-20T12:37:05.003Z'+ id: ch_gbHJdmfrXB+ name: Wholesale (Updated)+ code: wholesale+ active: true+ default: false+ storefront_access: login_required+ guest_checkout: false+ preferred_order_routing_strategy:+ preferred_storefront_access: login_required+ preferred_guest_checkout: false- created_at: '2026-07-26T14:24:17.452Z'- updated_at: '2026-07-26T14:24:17.740Z'++ created_at: '2026-07-27T08:32:53.868Z'++ updated_at: '2026-07-27T08:32:54.133Z'requestBody:content:application/json:@@@ -2682,58 -2819,56 +2855,56 @@@content:application/json:example:- id: cg_UkLWZg9DAJ- name: VIPs- description: Top spenders- customers_count: 1- created_at: '2026-07-20T12:37:06.588Z'- updated_at: '2026-07-20T12:37:06.588Z'- customers:- - id: cus_UkLWZg9DAJ- email: [email protected]- first_name: Loree- last_name: Torp- phone:- accepts_email_marketing: false- full_name: Loree Torp- available_store_credit_total: '0'- display_available_store_credit_total: "$0.00"- login: [email protected]- metadata: {}- last_sign_in_at:- current_sign_in_at:- created_at: '2026-07-20T12:37:06.856Z'- updated_at: '2026-07-20T12:37:06.856Z'- sign_in_count: 0- failed_attempts: 0- last_sign_in_ip:- current_sign_in_ip:- tags: []- internal_note_html:- default_billing_address_id:- default_shipping_address_id:- orders_count: 0- total_spent: '0.0'- display_total_spent: "$0.00"- last_order_completed_at:- customer_group_ids:- - cg_UkLWZg9DAJ- schema:- "$ref": "#/components/schemas/CustomerGroup"- '404':- description: customer group not found- content:- application/json:- example:- error:- code: record_not_found- message: Customer group not found- schema:- "$ref": "#/components/schemas/ErrorResponse"- patch:- summary: Update a customer group+ data:+ - id: orule_UkLWZg9DAJ+ position: 1+ active: true- created_at: '2026-07-26T14:24:05.250Z'- updated_at: '2026-07-26T14:24:05.250Z'++ created_at: '2026-07-27T08:32:42.455Z'++ updated_at: '2026-07-27T08:32:42.455Z'+ type: preferred_location+ channel_id: ch_UkLWZg9DAJ+ preferences: {}+ preference_schema: []+ label: Preferred location+ description: Fulfill from the location pinned on the order, when+ one is set+ - id: orule_gbHJdmfrXB+ position: 2+ active: true- created_at: '2026-07-26T14:24:05.253Z'- updated_at: '2026-07-26T14:24:05.253Z'++ created_at: '2026-07-27T08:32:42.464Z'++ updated_at: '2026-07-27T08:32:42.464Z'+ type: minimize_splits+ channel_id: ch_UkLWZg9DAJ+ preferences: {}+ preference_schema: []+ label: Minimize splits+ description: Prefer the location that can fulfill the most items+ on its own, avoiding split shipments+ - id: orule_EfhxLZ9ck8+ position: 3+ active: true- created_at: '2026-07-26T14:24:05.256Z'- updated_at: '2026-07-26T14:24:05.256Z'++ created_at: '2026-07-27T08:32:42.473Z'++ updated_at: '2026-07-27T08:32:42.473Z'+ type: default_location+ channel_id: ch_UkLWZg9DAJ+ preferences: {}+ preference_schema: []+ label: Default location+ description: Prefer the stock location marked as default+ meta:+ page: 1+ limit: 25+ count: 3+ pages: 1+ from: 1+ to: 3+ in: 3+ previous:+ next:+ post:+ summary: Create an order routing rule on a channeltags:- - Customer Groups+ - Channelssecurity:- api_key: []bearer_auth: []@@@ -2782,16 -2910,19 +2946,19 @@@content:application/json:example:- id: cg_UkLWZg9DAJ- name: VIP customers (Q1)- description: Top spenders- customers_count: 0- created_at: '2026-07-20T12:37:07.412Z'- updated_at: '2026-07-20T12:37:07.665Z'- schema:- "$ref": "#/components/schemas/CustomerGroup"+ id: orule_VqXmZF31wY+ position: 3+ active: true- created_at: '2026-07-26T14:24:55.909Z'- updated_at: '2026-07-26T14:24:55.909Z'++ created_at: '2026-07-27T08:33:31.228Z'++ updated_at: '2026-07-27T08:33:31.228Z'+ type: default_location+ channel_id: ch_UkLWZg9DAJ+ preferences: {}+ preference_schema: []+ label: Default location+ description: Prefer the stock location marked as default'422':- description: validation error+ description: unknown rule typecontent:application/json:example:@@@ -2860,13 -3001,40 +3037,40 @@@schema:type: stringresponses:- '204':- description: customer group deleted- "/api/v3/admin/customers/{customer_id}/addresses":- get:- summary: List customer addresses+ '200':+ description: rule updated+ content:+ application/json:+ example:+ id: orule_UkLWZg9DAJ+ position: 2+ active: false- created_at: '2026-07-26T14:24:05.250Z'- updated_at: '2026-07-26T14:24:56.489Z'++ created_at: '2026-07-27T08:32:42.455Z'++ updated_at: '2026-07-27T08:33:31.751Z'+ type: preferred_location+ channel_id: ch_UkLWZg9DAJ+ preferences: {}+ preference_schema: []+ label: Preferred location+ description: Fulfill from the location pinned on the order, when one+ is set+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ active:+ type: boolean+ position:+ type: integer+ preferences:+ type: object+ additionalProperties: true+ delete:+ summary: Delete an order routing ruletags:- - Customers+ - Channelssecurity:- api_key: []bearer_auth: []@@@ -3135,45 -3187,39 +3223,39 @@@content:application/json:example:- id: addr_UkLWZg9DAJ- first_name: John- last_name: Doe- full_name: John Doe- address1: 3 Lovely Street- address2: Northwest- postal_code: '10118'- city: Manhattan- phone: 555-555-0199- company: Company- country_name: United States of America- country_iso: US- state_text: NY- state_abbr: NY- quick_checkout: false- is_default_billing: false- is_default_shipping: false- state_name: New York- label:- metadata: {}- created_at: '2026-07-20T12:37:09.915Z'- updated_at: '2026-07-20T12:37:10.406Z'- customer_id: cus_UkLWZg9DAJ- requestBody:- content:- application/json:- schema:- type: object- properties:- city:- type: string- is_default_billing:- type: boolean- is_default_shipping:- type: boolean- delete:- summary: Delete a customer address+ data:+ - id: cfdef_UkLWZg9DAJ+ namespace: specs+ key: fabric+ label: Title+ field_type: short_text+ resource_type: Spree::Product+ storefront_visible: true- created_at: '2026-07-26T14:24:19.114Z'- updated_at: '2026-07-26T14:24:19.114Z'++ created_at: '2026-07-27T08:32:58.423Z'++ updated_at: '2026-07-27T08:32:58.423Z'+ - id: cfdef_gbHJdmfrXB+ namespace: custom+ key: order_notes+ label: Order Notes+ field_type: short_text+ resource_type: Spree::Order+ storefront_visible: true- created_at: '2026-07-26T14:24:19.115Z'- updated_at: '2026-07-26T14:24:19.115Z'++ created_at: '2026-07-27T08:32:58.433Z'++ updated_at: '2026-07-27T08:32:58.433Z'+ meta:+ page: 1+ limit: 25+ count: 2+ pages: 1+ from: 1+ to: 2+ in: 2+ previous:+ next:+ post:+ summary: Create a custom field definitiontags:- - Customers+ - Custom Fieldssecurity:- api_key: []bearer_auth: []@@@ -3207,24 -3258,55 +3294,55 @@@required: trueschema:type: string- - name: customer_id- in: path- required: true- schema:- type: string- - name: id- in: path- required: true- schema:- type: stringresponses:- '204':- description: address deleted- "/api/v3/admin/customers/{customer_id}/credit_cards":+ '201':+ description: definition created+ content:+ application/json:+ example:+ id: cfdef_EfhxLZ9ck8+ namespace: specs+ key: origin+ label: Country of Origin+ field_type: short_text+ resource_type: Spree::Product+ storefront_visible: true- created_at: '2026-07-26T14:24:19.677Z'- updated_at: '2026-07-26T14:24:19.677Z'++ created_at: '2026-07-27T08:32:58.957Z'++ updated_at: '2026-07-27T08:32:58.957Z'+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - key+ - field_type+ - resource_type+ properties:+ namespace:+ type: string+ description: Defaults to `custom`+ key:+ type: string+ label:+ type: string+ description: Human-readable name; defaults to titleized `key`+ field_type:+ type: string+ description: Custom field type identifier (one of the registered+ field-type class names).+ resource_type:+ type: string+ description: Owner class, e.g. `Spree::Product`+ storefront_visible:+ type: boolean+ description: 'When false, definition is admin-only (was `display_on:+ back_end`)'+ "/api/v3/admin/custom_field_definitions/{id}":get:- summary: List customer credit cards+ summary: Show a custom field definitiontags:- - Customers+ - Custom Fieldssecurity:- api_key: []bearer_auth: []@@@ -3283,35 -3362,19 +3398,19 @@@content:application/json:example:- data:- - id: card_UkLWZg9DAJ- brand: visa- last4: '1111'- month: 12- year: 2027- name: Spree Commerce- default: false- gateway_payment_profile_id:- customer_id: cus_UkLWZg9DAJ- payment_method_id: pm_UkLWZg9DAJ- metadata: {}- created_at: '2026-07-20T12:37:11.396Z'- updated_at: '2026-07-20T12:37:11.396Z'- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- "/api/v3/admin/customers/{customer_id}/credit_cards/{id}":- get:- summary: Show a customer credit card+ id: cfdef_UkLWZg9DAJ+ namespace: specs+ key: fabric+ label: Title+ field_type: short_text+ resource_type: Spree::Product+ storefront_visible: true- created_at: '2026-07-26T14:24:19.681Z'- updated_at: '2026-07-26T14:24:19.681Z'++ created_at: '2026-07-27T08:32:58.962Z'++ updated_at: '2026-07-27T08:32:58.962Z'+ patch:+ summary: Update a custom field definitiontags:- - Customers+ - Custom Fieldssecurity:- api_key: []bearer_auth: []@@@ -3375,23 -3420,29 +3456,29 @@@content:application/json:example:- id: card_UkLWZg9DAJ- brand: visa- last4: '1111'- month: 12- year: 2027- name: Spree Commerce- default: false- gateway_payment_profile_id:- customer_id: cus_UkLWZg9DAJ- payment_method_id: pm_UkLWZg9DAJ- metadata: {}- created_at: '2026-07-20T12:37:11.961Z'- updated_at: '2026-07-20T12:37:11.961Z'+ id: cfdef_UkLWZg9DAJ+ namespace: specs+ key: fabric+ label: Fabric Composition+ field_type: short_text+ resource_type: Spree::Product+ storefront_visible: false- created_at: '2026-07-26T14:24:19.960Z'- updated_at: '2026-07-26T14:24:20.240Z'++ created_at: '2026-07-27T08:32:59.222Z'++ updated_at: '2026-07-27T08:32:59.476Z'+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ label:+ type: string+ storefront_visible:+ type: booleandelete:- summary: Delete a customer credit card+ summary: Delete a custom field definitiontags:- - Customers+ - Custom Fieldssecurity:- api_key: []bearer_auth: []@@@ -3502,22 -3566,18 +3602,18 @@@application/json:example:data:- - id: credit_UkLWZg9DAJ- amount: '50.0'- amount_used: '0.0'- amount_remaining: '50.0'- display_amount: "$50.00"- display_amount_used: "$0.00"- display_amount_remaining: "$50.00"- currency: USD- memo:- metadata: {}- created_at: '2026-07-20T12:37:13.236Z'- updated_at: '2026-07-20T12:37:13.236Z'- customer_id: cus_UkLWZg9DAJ- created_by_id: admin_UkLWZg9DAJ- category_id: sccat_UkLWZg9DAJ- category_name: Exchange+ - id: cg_UkLWZg9DAJ+ name: VIPs+ description: Top spenders+ customers_count: 0- created_at: '2026-07-26T14:24:20.526Z'- updated_at: '2026-07-26T14:24:20.526Z'++ created_at: '2026-07-27T08:32:59.742Z'++ updated_at: '2026-07-27T08:32:59.742Z'+ - id: cg_gbHJdmfrXB+ name: Wholesale+ description:+ customers_count: 0- created_at: '2026-07-26T14:24:20.527Z'- updated_at: '2026-07-26T14:24:20.527Z'++ created_at: '2026-07-27T08:32:59.743Z'++ updated_at: '2026-07-27T08:32:59.743Z'meta:page: 1limit: 25@@@ -3582,22 -3662,27 +3698,27 @@@content:application/json:example:- id: credit_gbHJdmfrXB- amount: '25.0'- amount_used: '0.0'- amount_remaining: '25.0'- display_amount: "$25.00"- display_amount_used: "$0.00"- display_amount_remaining: "$25.00"- currency: USD- memo: Goodwill- metadata: {}- created_at: '2026-07-20T12:37:14.261Z'- updated_at: '2026-07-20T12:37:14.261Z'- customer_id: cus_UkLWZg9DAJ- created_by_id: admin_gbHJdmfrXB- category_id: sccat_UkLWZg9DAJ- category_name: Exchange+ id: cg_EfhxLZ9ck8+ name: Wholesale 2+ description: B2B accounts+ customers_count: 1- created_at: '2026-07-26T14:24:21.376Z'- updated_at: '2026-07-26T14:24:21.376Z'++ created_at: '2026-07-27T08:33:00.532Z'++ updated_at: '2026-07-27T08:33:00.532Z'+ schema:+ "$ref": "#/components/schemas/CustomerGroup"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Name can't be blank+ details:+ name:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"requestBody:content:application/json:@@@ -3678,39 -3772,58 +3808,58 @@@content:application/json:example:- id: credit_UkLWZg9DAJ- amount: '50.0'- amount_used: '0.0'- amount_remaining: '50.0'- display_amount: "$50.00"- display_amount_used: "$0.00"- display_amount_remaining: "$50.00"- currency: USD- memo: Updated- metadata: {}- created_at: '2026-07-20T12:37:14.755Z'- updated_at: '2026-07-20T12:37:15.016Z'- customer_id: cus_UkLWZg9DAJ- created_by_id: admin_UkLWZg9DAJ- category_id: sccat_UkLWZg9DAJ- category_name: Exchange- requestBody:- content:- application/json:- schema:- type: object- properties:- amount:- type: string- example: '50.00'- category_id:- type: string- memo:- type: string- delete:- summary: Delete a store credit+ id: cg_UkLWZg9DAJ+ name: VIPs+ description: Top spenders+ customers_count: 1- created_at: '2026-07-26T14:24:21.966Z'- updated_at: '2026-07-26T14:24:21.966Z'++ created_at: '2026-07-27T08:33:01.067Z'++ updated_at: '2026-07-27T08:33:01.067Z'+ customers:+ - id: cus_UkLWZg9DAJ- email: [email protected]- first_name: Dyan- last_name: Hansen++ email: [email protected]++ first_name: Idalia++ last_name: Sporer+ phone:+ accepts_email_marketing: false- full_name: Dyan Hansen++ full_name: Idalia Sporer+ available_store_credit_total: '0'+ display_available_store_credit_total: "$0.00"- login: [email protected]++ login: [email protected]+ metadata: {}+ last_sign_in_at:+ current_sign_in_at:- created_at: '2026-07-26T14:24:22.227Z'- updated_at: '2026-07-26T14:24:22.227Z'++ created_at: '2026-07-27T08:33:01.304Z'++ updated_at: '2026-07-27T08:33:01.304Z'+ sign_in_count: 0+ failed_attempts: 0+ last_sign_in_ip:+ current_sign_in_ip:+ tags: []+ internal_note_html:+ default_billing_address_id:+ default_shipping_address_id:+ orders_count: 0+ total_spent: '0.0'+ display_total_spent: "$0.00"+ last_order_completed_at:+ customer_group_ids:+ - cg_UkLWZg9DAJ+ schema:+ "$ref": "#/components/schemas/CustomerGroup"+ '404':+ description: customer group not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Customer group not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ patch:+ summary: Update a customer grouptags:- - Customers+ - Customer Groupssecurity:- api_key: []bearer_auth: []@@@ -3744,24 -3866,56 +3902,56 @@@required: trueschema:type: string- - name: customer_id- in: path- required: true- schema:- type: string- - name: id- in: path- required: true- schema:- type: stringresponses:- '204':- description: store credit deleted- "/api/v3/admin/customers":- get:- summary: List customers+ '200':+ description: customer group updated+ content:+ application/json:+ example:+ id: cg_UkLWZg9DAJ+ name: VIP customers (Q1)+ description: Top spenders+ customers_count: 0- created_at: '2026-07-26T14:24:22.819Z'- updated_at: '2026-07-26T14:24:23.098Z'++ created_at: '2026-07-27T08:33:01.852Z'++ updated_at: '2026-07-27T08:33:02.112Z'+ schema:+ "$ref": "#/components/schemas/CustomerGroup"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Name can't be blank+ details:+ name:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ example: VIP customers (Q1)+ description:+ type: string+ example: Updated description+ nullable: true+ customer_ids:+ type: array+ items:+ type: string+ example:+ - cus_UkLWZg9DAJ+ delete:+ summary: Delete a customer grouptags:- - Customers+ - Customer Groupssecurity:- api_key: []bearer_auth: []@@@ -3837,34 -4016,29 +4052,29 @@@application/json:example:data:- - id: cus_UkLWZg9DAJ- email: [email protected]- first_name: Jane+ - id: addr_UkLWZg9DAJ+ first_name: Johnlast_name: Doe- phone:- accepts_email_marketing: false- full_name: Jane Doe- available_store_credit_total: '0'- display_available_store_credit_total: "$0.00"- login: [email protected]+ full_name: John Doe+ address1: 1 Lovely Street+ address2: Northwest+ postal_code: '10118'+ city: New York+ phone: 555-555-0199+ company: Company+ country_name: United States of America+ country_iso: US+ state_text: NY+ state_abbr: NY+ quick_checkout: false+ is_default_billing: false+ is_default_shipping: false+ state_name: New York+ label:metadata: {}- last_sign_in_at:- current_sign_in_at:- created_at: '2026-07-20T12:37:15.991Z'- updated_at: '2026-07-20T12:37:15.991Z'- sign_in_count: 0- failed_attempts: 0- last_sign_in_ip:- current_sign_in_ip:- tags: []- internal_note_html:- default_billing_address_id:- default_shipping_address_id:- orders_count: 0- total_spent: '0'- display_total_spent: "$0.00"- last_order_completed_at:- customer_group_ids: []- created_at: '2026-07-26T14:24:23.936Z'- updated_at: '2026-07-26T14:24:23.936Z'++ created_at: '2026-07-27T08:33:02.891Z'++ updated_at: '2026-07-27T08:33:02.891Z'+ customer_id: cus_UkLWZg9DAJmeta:page: 1limit: 25@@@ -3926,34 -4110,29 +4146,29 @@@content:application/json:example:- id: cus_gbHJdmfrXB- email: [email protected]- first_name: New- last_name: Customer- phone:- accepts_email_marketing: false- full_name: New Customer- available_store_credit_total: '0'- display_available_store_credit_total: "$0.00"- login:+ id: addr_gbHJdmfrXB+ first_name: Jane+ last_name: Doe+ full_name: Jane Doe+ address1: 350 Fifth Avenue+ address2:+ postal_code: '10118'+ city: New York+ phone: "+12125551234"+ company:+ country_name: United States of America+ country_iso: US+ state_text: NY+ state_abbr: NY+ quick_checkout: false+ is_default_billing: false+ is_default_shipping: false+ state_name: New York+ label: Officemetadata: {}- last_sign_in_at:- current_sign_in_at:- created_at: '2026-07-20T12:37:16.746Z'- updated_at: '2026-07-20T12:37:16.746Z'- sign_in_count: 0- failed_attempts: 0- last_sign_in_ip:- current_sign_in_ip:- tags: []- internal_note_html:- default_billing_address_id:- default_shipping_address_id:- orders_count: 0- total_spent: '0.0'- display_total_spent: "$0.00"- last_order_completed_at:- customer_group_ids: []- created_at: '2026-07-26T14:24:25.287Z'- updated_at: '2026-07-26T14:24:25.287Z'++ created_at: '2026-07-27T08:33:04.129Z'++ updated_at: '2026-07-27T08:33:04.129Z'+ customer_id: cus_UkLWZg9DAJrequestBody:content:application/json:@@@ -4047,36 -4225,43 +4261,43 @@@content:application/json:example:- id: cus_UkLWZg9DAJ- email: [email protected]- first_name: Jane+ id: addr_UkLWZg9DAJ+ first_name: Johnlast_name: Doe- phone:- accepts_email_marketing: false- full_name: Jane Doe- available_store_credit_total: '0'- display_available_store_credit_total: "$0.00"- login: [email protected]+ full_name: John Doe+ address1: 3 Lovely Street+ address2: Northwest+ postal_code: '10118'+ city: Manhattan+ phone: 555-555-0199+ company: Company+ country_name: United States of America+ country_iso: US+ state_text: NY+ state_abbr: NY+ quick_checkout: false+ is_default_billing: false+ is_default_shipping: false+ state_name: New York+ label:metadata: {}- last_sign_in_at:- current_sign_in_at:- created_at: '2026-07-20T12:37:16.989Z'- updated_at: '2026-07-20T12:37:16.989Z'- sign_in_count: 0- failed_attempts: 0- last_sign_in_ip:- current_sign_in_ip:- tags: []- internal_note_html:- default_billing_address_id:- default_shipping_address_id:- orders_count: 0- total_spent: '0'- display_total_spent: "$0.00"- last_order_completed_at:- customer_group_ids: []- patch:- summary: Update a customer- created_at: '2026-07-26T14:24:25.555Z'- updated_at: '2026-07-26T14:24:26.102Z'++ created_at: '2026-07-27T08:33:04.374Z'++ updated_at: '2026-07-27T08:33:04.869Z'+ customer_id: cus_UkLWZg9DAJ+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ city:+ type: string+ is_default_billing:+ type: boolean+ is_default_shipping:+ type: boolean+ delete:+ summary: Delete a customer addresstags:- Customerssecurity:@@@ -4220,12 -4353,53 +4389,53 @@@required: trueschema:type: string+ - name: expand+ in: query+ required: false+ description: Comma-separated associations to expand (e.g., payment_method).+ Use dot notation for nested expand (max 4 levels).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include (e.g., brand,last4,month,year).+ id is always included.+ schema:+ type: stringresponses:- '204':- description: customer deleted- "/api/v3/admin/customers/bulk_add_to_groups":- post:- summary: Bulk-add customers to groups+ '200':+ description: credit cards found+ content:+ application/json:+ example:+ data:+ - id: card_UkLWZg9DAJ+ brand: visa+ last4: '1111'+ month: 12+ year: 2027+ name: Spree Commerce+ default: false+ gateway_payment_profile_id:+ customer_id: cus_UkLWZg9DAJ+ payment_method_id: pm_UkLWZg9DAJ+ metadata: {}- created_at: '2026-07-26T14:24:27.231Z'- updated_at: '2026-07-26T14:24:27.231Z'++ created_at: '2026-07-27T08:33:05.888Z'++ updated_at: '2026-07-27T08:33:05.888Z'+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ "/api/v3/admin/customers/{customer_id}/credit_cards/{id}":+ get:+ summary: Show a customer credit cardtags:- Customerssecurity:@@@ -4274,40 -4465,21 +4501,21 @@@content:application/json:example:- customer_count: 1- customer_group_count: 1- schema:- type: object- properties:- customer_count:- type: integer- customer_group_count:- type: integer- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - customer_group_ids- properties:- ids:- type: array- items:- type: string- example:- - cus_UkLWZg9DAJ- - cus_QrLWXg9CAJ- customer_group_ids:- type: array- items:- type: string- example:- - cg_UkLWZg9DAJ- "/api/v3/admin/customers/bulk_remove_from_groups":- post:- summary: Bulk-remove customers from groups+ id: card_UkLWZg9DAJ+ brand: visa+ last4: '1111'+ month: 12+ year: 2027+ name: Spree Commerce+ default: false+ gateway_payment_profile_id:+ customer_id: cus_UkLWZg9DAJ+ payment_method_id: pm_UkLWZg9DAJ+ metadata: {}- created_at: '2026-07-26T14:24:28.143Z'- updated_at: '2026-07-26T14:24:28.143Z'++ created_at: '2026-07-27T08:33:06.432Z'++ updated_at: '2026-07-27T08:33:06.432Z'+ delete:+ summary: Delete a customer credit cardtags:- Customerssecurity:@@@ -4433,40 -4591,35 +4627,35 @@@content:application/json:example:- customer_count: 1- tag_count: 2- schema:- type: object- properties:- customer_count:- type: integer- tag_count:- type: integer- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - tags- properties:- ids:- type: array- items:- type: string- example:- - cus_UkLWZg9DAJ- tags:- type: array- items:- type: string- example:- - vip- - newsletter- "/api/v3/admin/customers/bulk_remove_tags":+ data:+ - id: credit_UkLWZg9DAJ+ amount: '50.0'+ amount_used: '0.0'+ amount_remaining: '50.0'+ display_amount: "$50.00"+ display_amount_used: "$0.00"+ display_amount_remaining: "$50.00"+ currency: USD+ memo:+ metadata: {}- created_at: '2026-07-26T14:24:29.546Z'- updated_at: '2026-07-26T14:24:29.546Z'++ created_at: '2026-07-27T08:33:07.680Z'++ updated_at: '2026-07-27T08:33:07.680Z'+ customer_id: cus_UkLWZg9DAJ+ created_by_id: admin_UkLWZg9DAJ+ category_id: sccat_UkLWZg9DAJ+ category_name: Exchange+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:post:- summary: Bulk-remove tags from customers+ summary: Issue a store credit to a customertags:- Customerssecurity:@@@ -4513,15 -4672,22 +4708,22 @@@content:application/json:example:- customer_count: 1- tag_count: 1- schema:- type: object- properties:- customer_count:- type: integer- tag_count:- type: integer+ id: credit_gbHJdmfrXB+ amount: '25.0'+ amount_used: '0.0'+ amount_remaining: '25.0'+ display_amount: "$25.00"+ display_amount_used: "$0.00"+ display_amount_remaining: "$25.00"+ currency: USD+ memo: Goodwill+ metadata: {}- created_at: '2026-07-26T14:24:30.660Z'- updated_at: '2026-07-26T14:24:30.660Z'++ created_at: '2026-07-27T08:33:08.734Z'++ updated_at: '2026-07-27T08:33:08.734Z'+ customer_id: cus_UkLWZg9DAJ+ created_by_id: admin_gbHJdmfrXB+ category_id: sccat_UkLWZg9DAJ+ category_name: ExchangerequestBody:content:application/json:@@@ -4662,17 -4768,22 +4804,22 @@@content:application/json:example:- id: exp_gbHJdmfrXB- number: EF839443854- type: Spree::Exports::Products- format: csv- created_at: '2026-07-20T12:37:21.732Z'- updated_at: '2026-07-20T12:37:21.732Z'- user_id: admin_UkLWZg9DAJ- done: false- filename:- byte_size:- download_url:+ id: credit_UkLWZg9DAJ+ amount: '50.0'+ amount_used: '0.0'+ amount_remaining: '50.0'+ display_amount: "$50.00"+ display_amount_used: "$0.00"+ display_amount_remaining: "$50.00"+ currency: USD+ memo: Updated+ metadata: {}- created_at: '2026-07-26T14:24:31.201Z'- updated_at: '2026-07-26T14:24:31.481Z'++ created_at: '2026-07-27T08:33:09.227Z'++ updated_at: '2026-07-27T08:33:09.485Z'+ customer_id: cus_UkLWZg9DAJ+ created_by_id: admin_UkLWZg9DAJ+ category_id: sccat_UkLWZg9DAJ+ category_name: ExchangerequestBody:content:application/json:@@@ -4948,36 -4927,34 +4963,34 @@@application/json:example:data:- - id: ful_UkLWZg9DAJ- number: H81284371092- tracking: U10000- tracking_url:- cost: '10.0'- display_cost: "$10.00"- total: '10.0'- display_total: "$10.00"- discount_total: '0.0'- display_discount_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- status: ready- fulfillment_type: shipping- fulfilled_at:- items:- - item_id: li_UkLWZg9DAJ- variant_id: variant_UkLWZg9DAJ- quantity: 1+ - id: cus_UkLWZg9DAJ+ email: [email protected]+ first_name: Jane+ last_name: Doe+ phone:+ accepts_email_marketing: false+ full_name: Jane Doe+ available_store_credit_total: '0'+ display_available_store_credit_total: "$0.00"+ login: [email protected]metadata: {}- adjustment_total: '0.0'- pre_tax_amount: '0.0'- created_at: '2026-07-20T12:37:35.954Z'- updated_at: '2026-07-20T12:37:36.029Z'- order_id: or_UkLWZg9DAJ- stock_location_id: sloc_UkLWZg9DAJ+ last_sign_in_at:+ current_sign_in_at:- created_at: '2026-07-26T14:24:32.566Z'- updated_at: '2026-07-26T14:24:32.566Z'++ created_at: '2026-07-27T08:33:10.550Z'++ updated_at: '2026-07-27T08:33:10.550Z'+ sign_in_count: 0+ failed_attempts: 0+ last_sign_in_ip:+ current_sign_in_ip:+ tags: []+ internal_note_html:+ default_billing_address_id:+ default_shipping_address_id:+ orders_count: 0+ total_spent: '0'+ display_total_spent: "$0.00"+ last_order_completed_at:+ customer_group_ids: []meta:page: 1limit: 25@@@ -5044,45 -5016,34 +5052,34 @@@content:application/json:example:- id: ful_gbHJdmfrXB- number: H80849717467- tracking: INPOST-12345- tracking_url:- cost: '10.0'- display_cost: "$10.00"- total: '10.0'- display_total: "$10.00"- discount_total: '0.0'- display_discount_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- status: shipped- fulfillment_type: shipping- fulfilled_at: '2026-07-20T12:37:36Z'- items:- - item_id: li_UkLWZg9DAJ- variant_id: variant_UkLWZg9DAJ- quantity: 1+ id: cus_gbHJdmfrXB+ email: [email protected]+ first_name: New+ last_name: Customer+ phone:+ accepts_email_marketing: false+ full_name: New Customer+ available_store_credit_total: '0'+ display_available_store_credit_total: "$0.00"+ login:metadata: {}- adjustment_total: '0.0'- pre_tax_amount: '0.0'- created_at: '2026-07-20T12:37:36.919Z'- updated_at: '2026-07-20T12:37:36.950Z'- order_id: or_UkLWZg9DAJ- stock_location_id: sloc_UkLWZg9DAJ- '422':- description: order not completed- content:- application/json:- example:- error:- code: processing_error- message: Fulfillments can only be created manually on completed- orders+ last_sign_in_at:+ current_sign_in_at:- created_at: '2026-07-26T14:24:33.436Z'- updated_at: '2026-07-26T14:24:33.436Z'++ created_at: '2026-07-27T08:33:11.317Z'++ updated_at: '2026-07-27T08:33:11.317Z'+ sign_in_count: 0+ failed_attempts: 0+ last_sign_in_ip:+ current_sign_in_ip:+ tags: []+ internal_note_html:+ default_billing_address_id:+ default_shipping_address_id:+ orders_count: 0+ total_spent: '0.0'+ display_total_spent: "$0.00"+ last_order_completed_at:+ customer_group_ids: []requestBody:content:application/json:@@@ -5210,40 -5137,38 +5173,38 @@@content:application/json:example:- id: ful_UkLWZg9DAJ- number: H94215976498- tracking: U10000- tracking_url:- cost: '10.0'- display_cost: "$10.00"- total: '10.0'- display_total: "$10.00"- discount_total: '0.0'- display_discount_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- status: ready- fulfillment_type: shipping- fulfilled_at:- items:- - item_id: li_UkLWZg9DAJ- variant_id: variant_UkLWZg9DAJ- quantity: 1+ id: cus_UkLWZg9DAJ+ email: [email protected]+ first_name: Jane+ last_name: Doe+ phone:+ accepts_email_marketing: false+ full_name: Jane Doe+ available_store_credit_total: '0'+ display_available_store_credit_total: "$0.00"+ login: [email protected]metadata: {}- adjustment_total: '0.0'- pre_tax_amount: '0.0'- created_at: '2026-07-20T12:37:38.143Z'- updated_at: '2026-07-20T12:37:38.210Z'- order_id: or_UkLWZg9DAJ- stock_location_id: sloc_UkLWZg9DAJ+ last_sign_in_at:+ current_sign_in_at:- created_at: '2026-07-26T14:24:33.708Z'- updated_at: '2026-07-26T14:24:33.708Z'++ created_at: '2026-07-27T08:33:11.566Z'++ updated_at: '2026-07-27T08:33:11.566Z'+ sign_in_count: 0+ failed_attempts: 0+ last_sign_in_ip:+ current_sign_in_ip:+ tags: []+ internal_note_html:+ default_billing_address_id:+ default_shipping_address_id:+ orders_count: 0+ total_spent: '0'+ display_total_spent: "$0.00"+ last_order_completed_at:+ customer_group_ids: []patch:- summary: Update a shipment+ summary: Update a customertags:- - Fulfillments+ - Customerssecurity:- api_key: []bearer_auth: []@@@ -5298,36 -5216,34 +5252,34 @@@content:application/json:example:- id: ful_UkLWZg9DAJ- number: H74244574949- tracking: 1Z999AA10123456784- tracking_url: https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=1Z999AA10123456784- cost: '10.0'- display_cost: "$10.00"- total: '10.0'- display_total: "$10.00"- discount_total: '0.0'- display_discount_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- status: ready- fulfillment_type: shipping- fulfilled_at:- items:- - item_id: li_UkLWZg9DAJ- variant_id: variant_UkLWZg9DAJ- quantity: 1+ id: cus_UkLWZg9DAJ+ email: [email protected]+ first_name: Updated+ last_name: Doe+ phone:+ accepts_email_marketing: false+ full_name: Updated Doe+ available_store_credit_total: '0'+ display_available_store_credit_total: "$0.00"+ login: [email protected]metadata: {}- adjustment_total: '0.0'- pre_tax_amount: '0.0'- created_at: '2026-07-20T12:37:38.768Z'- updated_at: '2026-07-20T12:37:39.081Z'- order_id: or_UkLWZg9DAJ- stock_location_id: sloc_UkLWZg9DAJ+ last_sign_in_at:+ current_sign_in_at:- created_at: '2026-07-26T14:24:34.263Z'- updated_at: '2026-07-26T14:24:34.559Z'++ created_at: '2026-07-27T08:33:12.065Z'++ updated_at: '2026-07-27T08:33:12.325Z'+ sign_in_count: 0+ failed_attempts: 0+ last_sign_in_ip:+ current_sign_in_ip:+ tags: []+ internal_note_html:+ default_billing_address_id:+ default_shipping_address_id:+ orders_count: 0+ total_spent: '0.0'+ display_total_spent: "$0.00"+ last_order_completed_at:+ customer_group_ids: []requestBody:content:application/json:@@@ -5788,15 -5678,17 +5714,17 @@@application/json:example:data:- - id: gcb_UkLWZg9DAJ- codes_count: 2- currency: USD- prefix: WELCOME- created_at: '2026-07-20T12:37:22.532Z'- updated_at: '2026-07-20T12:37:22.532Z'- amount: '50.0'- expires_at:- created_by_id:+ - id: exp_UkLWZg9DAJ- number: EF312340918++ number: EF438116439+ format: csv- created_at: '2026-07-26T14:24:38.804Z'- updated_at: '2026-07-26T14:24:38.804Z'++ created_at: '2026-07-27T08:33:16.091Z'++ updated_at: '2026-07-27T08:33:16.091Z'+ type: products+ user_id: admin_UkLWZg9DAJ+ done: false+ filename:+ byte_size:+ download_url:meta:page: 1limit: 25@@@ -5889,14 -5752,17 +5788,17 @@@content:application/json:example:- error:- code: validation_error- message: Prefix can't be blank- details:- prefix:- - can't be blank- schema:- "$ref": "#/components/schemas/ErrorResponse"+ id: exp_gbHJdmfrXB- number: EF576105308++ number: EF930187751+ format: csv- created_at: '2026-07-26T14:24:39.103Z'- updated_at: '2026-07-26T14:24:39.103Z'++ created_at: '2026-07-27T08:33:16.426Z'++ updated_at: '2026-07-27T08:33:16.426Z'+ type: products+ user_id: admin_UkLWZg9DAJ+ done: false+ filename:+ byte_size:+ download_url:requestBody:content:application/json:@@@ -5994,16 -5852,21 +5888,21 @@@content:application/json:example:- error:- code: record_not_found- message: Gift card batch not found- schema:- "$ref": "#/components/schemas/ErrorResponse"- "/api/v3/admin/gift_cards":- get:- summary: List gift cards+ id: exp_UkLWZg9DAJ- number: EF239894523++ number: EF286162572+ format: csv- created_at: '2026-07-26T14:24:39.377Z'- updated_at: '2026-07-26T14:24:39.377Z'++ created_at: '2026-07-27T08:33:16.678Z'++ updated_at: '2026-07-27T08:33:16.678Z'+ type: products+ user_id: admin_UkLWZg9DAJ+ done: false+ filename:+ byte_size:+ download_url:+ delete:+ summary: Delete an exporttags:- - Gift Cards+ - Exportssecurity:- api_key: []bearer_auth: []@@@ -6360,15 -6037,51 +6073,51 @@@content:application/json:example:- error:- code: record_not_found- message: Gift card not found- schema:- "$ref": "#/components/schemas/ErrorResponse"- patch:- summary: Update a gift card+ data:+ - id: ful_UkLWZg9DAJ- number: H53003973085++ number: H94182102161+ tracking: U10000+ tracking_url:+ cost: '10.0'+ display_cost: "$10.00"+ total: '10.0'+ display_total: "$10.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ status: ready+ fulfillment_type: shipping+ fulfilled_at:+ items:+ - item_id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJ+ quantity: 1+ metadata: {}+ adjustment_total: '0.0'+ pre_tax_amount: '0.0'- created_at: '2026-07-26T14:24:57.424Z'- updated_at: '2026-07-26T14:24:57.502Z'++ created_at: '2026-07-27T08:33:32.598Z'++ updated_at: '2026-07-27T08:33:32.667Z'+ order_id: or_UkLWZg9DAJ+ stock_location_id: sloc_UkLWZg9DAJ+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ post:+ summary: Create a fulfillmenttags:- - Gift Cards+ - Fulfillmentssecurity:- api_key: []bearer_auth: []@@@ -6412,27 -6134,45 +6170,45 @@@content:application/json:example:- id: gc_UkLWZg9DAJ- code: 3A5895EB9D986D1A- status: active- currency: USD- amount: '75.0'- amount_used: '0.0'- amount_authorized: '0.0'- amount_remaining: '75.0'- display_amount: "$75.00"- display_amount_used: "$0.00"- display_amount_remaining: "$75.00"- expires_at:- redeemed_at:- expired: false- active: true- created_at: '2026-07-20T12:37:25.205Z'- updated_at: '2026-07-20T12:37:25.460Z'- customer_id:- created_by_id:- schema:- "$ref": "#/components/schemas/GiftCard"+ id: ful_gbHJdmfrXB- number: H40149286520++ number: H17174515222+ tracking: INPOST-12345+ tracking_url:+ cost: '10.0'+ display_cost: "$10.00"+ total: '10.0'+ display_total: "$10.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ status: shipped+ fulfillment_type: shipping- fulfilled_at: '2026-07-26T14:24:58Z'++ fulfilled_at: '2026-07-27T08:33:33Z'+ items:+ - item_id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJ+ quantity: 1+ metadata: {}+ adjustment_total: '0.0'+ pre_tax_amount: '0.0'- created_at: '2026-07-26T14:24:58.506Z'- updated_at: '2026-07-26T14:24:58.527Z'++ created_at: '2026-07-27T08:33:33.557Z'++ updated_at: '2026-07-27T08:33:33.577Z'+ order_id: or_UkLWZg9DAJ+ stock_location_id: sloc_UkLWZg9DAJ+ '422':+ description: order not completed+ content:+ application/json:+ example:+ error:+ code: processing_error+ message: Fulfillments can only be created manually on completed+ ordersrequestBody:content:application/json:@@@ -6573,45 -6300,40 +6336,40 @@@content:application/json:example:- data:- - id: mkt_UkLWZg9DAJ- name: EU- currency: USD- default_locale: en- tax_inclusive: false- default: false- country_isos:- - DE- supported_locales:- - en- created_at: '2026-07-20T12:37:30.210Z'- updated_at: '2026-07-20T12:37:30.210Z'- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- schema:- type: object- properties:- data:- type: array- items:- "$ref": "#/components/schemas/Market"- meta:- "$ref": "#/components/schemas/PaginationMeta"- required:- - data- - meta- post:- summary: Create a market+ id: ful_UkLWZg9DAJ- number: H16604971949++ number: H96095888174+ tracking: U10000+ tracking_url:+ cost: '10.0'+ display_cost: "$10.00"+ total: '10.0'+ display_total: "$10.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ status: ready+ fulfillment_type: shipping+ fulfilled_at:+ items:+ - item_id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJ+ quantity: 1+ metadata: {}+ adjustment_total: '0.0'+ pre_tax_amount: '0.0'- created_at: '2026-07-26T14:24:59.858Z'- updated_at: '2026-07-26T14:24:59.919Z'++ created_at: '2026-07-27T08:33:34.896Z'++ updated_at: '2026-07-27T08:33:34.959Z'+ order_id: or_UkLWZg9DAJ+ stock_location_id: sloc_UkLWZg9DAJ+ patch:+ summary: Update a shipmenttags:- - Markets+ - Fulfillmentssecurity:- api_key: []bearer_auth: []@@@ -6667,41 -6388,36 +6424,36 @@@content:application/json:example:- id: mkt_gbHJdmfrXB- name: France only- currency: EUR- default_locale: fr- tax_inclusive: true- default: false- country_isos:- - FR- supported_locales:- - en- - fr- created_at: '2026-07-20T12:37:30.791Z'- updated_at: '2026-07-20T12:37:30.791Z'- schema:- "$ref": "#/components/schemas/Market"- '422':- description: validation error- content:- application/json:- example:- error:- code: validation_error- message: Name can't be blank, Currency can't be blank, Default locale- can't be blank, and Countries can't be blank- details:- name:- - can't be blank- currency:- - can't be blank- default_locale:- - can't be blank- countries:- - can't be blank- schema:- "$ref": "#/components/schemas/ErrorResponse"+ id: ful_UkLWZg9DAJ- number: H10774147778++ number: H76958675811+ tracking: 1Z999AA10123456784+ tracking_url: https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=1Z999AA10123456784+ cost: '10.0'+ display_cost: "$10.00"+ total: '10.0'+ display_total: "$10.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ status: ready+ fulfillment_type: shipping+ fulfilled_at:+ items:+ - item_id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJ+ quantity: 1+ metadata: {}+ adjustment_total: '0.0'+ pre_tax_amount: '0.0'- created_at: '2026-07-26T14:25:00.533Z'- updated_at: '2026-07-26T14:25:00.879Z'++ created_at: '2026-07-27T08:33:35.522Z'++ updated_at: '2026-07-27T08:33:35.835Z'+ order_id: or_UkLWZg9DAJ+ stock_location_id: sloc_UkLWZg9DAJrequestBody:content:application/json:@@@ -6824,15 -6490,41 +6526,41 @@@content:application/json:example:- error:- code: record_not_found- message: Market not found- schema:- "$ref": "#/components/schemas/ErrorResponse"+ id: ful_UkLWZg9DAJ- number: H30683605087++ number: H35921273279+ tracking: U10000+ tracking_url:+ cost: '10.0'+ display_cost: "$10.00"+ total: '10.0'+ display_total: "$10.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ status: shipped+ fulfillment_type: shipping- fulfilled_at: '2026-07-26T14:25:01Z'++ fulfilled_at: '2026-07-27T08:33:36Z'+ items:+ - item_id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJ+ quantity: 1+ metadata: {}+ adjustment_total: '0.0'+ pre_tax_amount: '0.0'- created_at: '2026-07-26T14:25:01.224Z'- updated_at: '2026-07-26T14:25:01.592Z'++ created_at: '2026-07-27T08:33:36.147Z'++ updated_at: '2026-07-27T08:33:36.463Z'+ order_id: or_UkLWZg9DAJ+ stock_location_id: sloc_UkLWZg9DAJ+ "/api/v3/admin/orders/{order_id}/fulfillments/{id}/cancel":patch:- summary: Update a market+ summary: Cancel a fulfillmenttags:- - Markets+ - Fulfillmentssecurity:- api_key: []bearer_auth: []@@@ -6904,54 -6578,136 +6614,136 @@@content:application/json:example:- error:- code: validation_error- message: Name can't be blank- details:- name:- - can't be blank- schema:- "$ref": "#/components/schemas/ErrorResponse"- requestBody:- content:- application/json:- schema:- type: object- properties:- name:- type: string- currency:- type: string- default_locale:- type: string- supported_locales:- type: array- items:- type: string- tax_inclusive:- type: boolean- default:- type: boolean- position:- type: integer- country_isos:- type: array- items:- type: string- delete:- summary: Delete a market+ id: ful_UkLWZg9DAJ- number: H14618766767++ number: H52777443472+ tracking: U10000+ tracking_url:+ cost: '10.0'+ display_cost: "$10.00"+ total: '10.0'+ display_total: "$10.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ status: canceled+ fulfillment_type: shipping+ fulfilled_at:+ items:+ - item_id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJ+ quantity: 1+ metadata: {}+ adjustment_total: '0.0'+ pre_tax_amount: '0.0'- created_at: '2026-07-26T14:25:01.925Z'- updated_at: '2026-07-26T14:25:02.348Z'++ created_at: '2026-07-27T08:33:36.765Z'++ updated_at: '2026-07-27T08:33:37.076Z'+ order_id: or_UkLWZg9DAJ+ stock_location_id: sloc_UkLWZg9DAJ+ "/api/v3/admin/orders/{order_id}/fulfillments/{id}/resume":+ patch:+ summary: Resume a fulfillmenttags:- - Markets+ - Fulfillmentssecurity:- api_key: []bearer_auth: []description: |-- Soft-deletes the market (sets `deleted_at`). The default market and- the last remaining market in a store cannot be deleted — both return- 422 with a `validation_error`.+ Resumes a canceled fulfillment.++ **Required scope:** `write_fulfillments` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'+ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })- **Required scope:** `write_settings` (for API-key authentication).+ const fulfillment = await client.orders.fulfillments.resume('or_UkLWZg9DAJ', 'ful_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api patch /orders/{order_id}/fulfillments/{id}/resume -d '{+ ... }'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Fulfillment ID+ schema:+ type: string+ responses:+ '200':+ description: fulfillment resumed+ content:+ application/json:+ example:+ id: ful_UkLWZg9DAJ- number: H52817073845++ number: H02828089650+ tracking: U10000+ tracking_url:+ cost: '10.0'+ display_cost: "$10.00"+ total: '10.0'+ display_total: "$10.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ status: pending+ fulfillment_type: shipping+ fulfilled_at:+ items:+ - item_id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJ+ quantity: 1+ metadata: {}+ adjustment_total: '0.0'+ pre_tax_amount: '0.0'- created_at: '2026-07-26T14:25:02.727Z'- updated_at: '2026-07-26T14:25:03.086Z'++ created_at: '2026-07-27T08:33:37.384Z'++ updated_at: '2026-07-27T08:33:37.714Z'+ order_id: or_UkLWZg9DAJ+ stock_location_id: sloc_UkLWZg9DAJ+ "/api/v3/admin/orders/{order_id}/fulfillments/{id}/split":+ patch:+ summary: Split a fulfillment+ tags:+ - Fulfillments+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Transfers items from this shipment to a new shipment at a different stock location.++ **Required scope:** `write_fulfillments` (for API-key authentication).x-codeSamples:- lang: javascriptlabel: Spree Admin SDK@@@ -6988,14 -6755,60 +6791,60 @@@content:application/json:example:- error:- code: validation_error- message: Market cannot be deleted- "/api/v3/admin/option_types":+ data:+ - id: ful_gbHJdmfrXB- number: H71150187259++ number: H11137554515+ tracking:+ tracking_url:+ cost: '10.0'+ display_cost: "$10.00"+ total: '10.0'+ display_total: "$10.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ status: ready+ fulfillment_type: shipping+ fulfilled_at:+ items:+ - item_id: li_UkLWZg9DAJ+ variant_id: variant_UkLWZg9DAJ+ quantity: 1+ metadata: {}+ adjustment_total: '0.0'+ pre_tax_amount: '0.0'- created_at: '2026-07-26T14:25:03.786Z'- updated_at: '2026-07-26T14:25:03.840Z'++ created_at: '2026-07-27T08:33:38.374Z'++ updated_at: '2026-07-27T08:33:38.420Z'+ order_id: or_UkLWZg9DAJ+ stock_location_id: sloc_gbHJdmfrXB+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - variant_id+ - quantity+ properties:+ variant_id:+ type: string+ description: Variant ID+ quantity:+ type: integer+ example: 1+ stock_location_id:+ type: string+ description: Target stock location ID+ "/api/v3/admin/gift_card_batches":get:- summary: List option types+ summary: List gift card batchestags:- - Option Types+ - Gift Cardssecurity:- api_key: []bearer_auth: []@@@ -7069,15 -6878,15 +6914,15 @@@application/json:example:data:- - id: opt_UkLWZg9DAJ- name: foo-size-1- label: Size- position: 1- kind: dropdown- metadata: {}- filterable: true- created_at: '2026-07-20T12:37:33.514Z'- updated_at: '2026-07-20T12:37:33.514Z'+ - id: gcb_UkLWZg9DAJ+ codes_count: 2+ currency: USD+ prefix: WELCOME- created_at: '2026-07-26T14:24:40.011Z'- updated_at: '2026-07-26T14:24:40.011Z'++ created_at: '2026-07-27T08:33:17.232Z'++ updated_at: '2026-07-27T08:33:17.232Z'+ amount: '50.0'+ expires_at:+ created_by_id:meta:page: 1limit: 25@@@ -7164,17 -6963,17 +6999,17 @@@content:application/json:example:- id: opt_gbHJdmfrXB- name: material- label: Material- position: 2- kind: dropdown- metadata: {}- filterable: true- created_at: '2026-07-20T12:37:34.042Z'- updated_at: '2026-07-20T12:37:34.042Z'+ id: gcb_gbHJdmfrXB+ codes_count: 5+ currency: USD+ prefix: NEWCAMP- created_at: '2026-07-26T14:24:40.614Z'- updated_at: '2026-07-26T14:24:40.614Z'++ created_at: '2026-07-27T08:33:17.750Z'++ updated_at: '2026-07-27T08:33:17.750Z'+ amount: '25.0'+ expires_at: '2030-12-31'+ created_by_id: admin_UkLWZg9DAJschema:- "$ref": "#/components/schemas/OptionType"+ "$ref": "#/components/schemas/GiftCardBatch"'422':description: validation errorcontent:@@@ -7289,19 -7068,19 +7104,19 @@@content:application/json:example:- id: opt_UkLWZg9DAJ- name: foo-size-5- label: Size- position: 1- kind: dropdown- metadata: {}- filterable: true- created_at: '2026-07-20T12:37:34.306Z'- updated_at: '2026-07-20T12:37:34.306Z'+ id: gcb_UkLWZg9DAJ+ codes_count: 2+ currency: USD+ prefix: WELCOME- created_at: '2026-07-26T14:24:40.912Z'- updated_at: '2026-07-26T14:24:40.912Z'++ created_at: '2026-07-27T08:33:18.038Z'++ updated_at: '2026-07-27T08:33:18.038Z'+ amount: '50.0'+ expires_at:+ created_by_id:schema:- "$ref": "#/components/schemas/OptionType"+ "$ref": "#/components/schemas/GiftCardBatch"'404':- description: option type not found+ description: gift card batch not foundcontent:application/json:example:@@@ -7351,31 -7135,111 +7171,111 @@@description: Bearer token for admin authenticationschema:type: string- - name: id- in: path- required: true- description: Option type ID+ - name: page+ in: query+ required: false+ description: Page number+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ description: Number of records per page+ schema:+ type: integer+ - name: q[code_cont]+ in: query+ required: false+ description: Filter by gift card code (contains)schema:type: string- responses:- '200':- description: option type updated- content:- application/json:- example:- id: opt_UkLWZg9DAJ- name: foo-size-7- label: Updated Label- position: 1- kind: dropdown- metadata: {}- filterable: true- created_at: '2026-07-20T12:37:34.846Z'- updated_at: '2026-07-20T12:37:35.099Z'+ - name: q[state_eq]+ in: query+ required: false+ description: Filter by status (active, redeemed, partially_redeemed, canceled)+ schema:+ type: string+ - name: sort+ in: query+ required: false+ description: Sort by field. Prefix with `-` for descending (e.g., `-created_at`).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: gift cards found+ content:+ application/json:+ example:+ data:+ - id: gc_UkLWZg9DAJ- code: AA18C4AE49ADC13B++ code: 6CE2E98C11F8609D+ status: active+ currency: USD+ amount: '50.0'+ amount_used: '0.0'+ amount_authorized: '0.0'+ amount_remaining: '50.0'+ display_amount: "$50.00"+ display_amount_used: "$0.00"+ display_amount_remaining: "$50.00"+ expires_at:+ redeemed_at:+ expired: false+ active: true- created_at: '2026-07-26T14:24:41.504Z'- updated_at: '2026-07-26T14:24:41.504Z'++ created_at: '2026-07-27T08:33:18.571Z'++ updated_at: '2026-07-27T08:33:18.571Z'+ customer_id:+ created_by_id:+ - id: gc_gbHJdmfrXB- code: 0ADF639229B96ADD++ code: 670131AD56C6104C+ status: active+ currency: USD+ amount: '25.0'+ amount_used: '0.0'+ amount_authorized: '0.0'+ amount_remaining: '25.0'+ display_amount: "$25.00"+ display_amount_used: "$0.00"+ display_amount_remaining: "$25.00"+ expires_at:+ redeemed_at:+ expired: false+ active: true- created_at: '2026-07-26T14:24:41.505Z'- updated_at: '2026-07-26T14:24:41.505Z'++ created_at: '2026-07-27T08:33:18.572Z'++ updated_at: '2026-07-27T08:33:18.572Z'+ customer_id:+ created_by_id:+ meta:+ page: 1+ limit: 25+ count: 2+ pages: 1+ from: 1+ to: 2+ in: 2+ previous:+ next:schema:- "$ref": "#/components/schemas/OptionType"- '422':- description: validation error+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/GiftCard"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ required:+ - data+ - meta+ '401':+ description: unauthorizedcontent:application/json:example:@@@ -7459,20 -7295,88 +7331,88 @@@schema:type: stringresponses:- '204':- description: option type deleted- "/api/v3/admin/orders/{order_id}/gift_cards":- post:- summary: Apply a gift card to an order+ '201':+ description: gift card created+ content:+ application/json:+ example:+ id: gc_EfhxLZ9ck8- code: EAEFE3937F770839++ code: 320C91A64A4B9C6A+ status: active+ currency: USD+ amount: '25.0'+ amount_used: '0.0'+ amount_authorized: '0.0'+ amount_remaining: '25.0'+ display_amount: "$25.00"+ display_amount_used: "$0.00"+ display_amount_remaining: "$25.00"+ expires_at: '2030-12-31'+ redeemed_at:+ expired: false+ active: true- created_at: '2026-07-26T14:24:42.094Z'- updated_at: '2026-07-26T14:24:42.094Z'++ created_at: '2026-07-27T08:33:19.105Z'++ updated_at: '2026-07-27T08:33:19.105Z'+ customer_id:+ created_by_id: admin_UkLWZg9DAJ+ schema:+ "$ref": "#/components/schemas/GiftCard"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Amount must be greater than 0+ details:+ amount:+ - must be greater than 0+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - amount+ properties:+ amount:+ type: string+ example: '25.00'+ description: Decimal amount, greater than zero.+ currency:+ type: string+ example: USD+ description: ISO 4217 currency code. Defaults to the store currency.+ code:+ type: string+ example: WELCOME50+ description: Optional caller-supplied code. Auto-generated when+ omitted.+ expires_at:+ type: string+ example: '2030-12-31'+ description: ISO 8601 date.+ nullable: true+ user_id:+ type: string+ example: cus_UkLWZg9DAJ+ description: Optional customer prefixed ID.+ nullable: true+ "/api/v3/admin/gift_cards/{id}":+ parameters:+ - name: id+ in: path+ required: true+ description: Gift card prefixed ID+ schema:+ type: string+ get:+ summary: Get a gift cardtags:- - Orders+ - Gift Cardssecurity:- api_key: []bearer_auth: []@@@ -7522,41 -7425,40 +7461,40 @@@application/json:example:id: gc_UkLWZg9DAJ- code: 3485649B23213826- code: F4FF738D653CEB45++ code: 5CF6F9CEE51777EFstatus: activecurrency: USD- amount: '10.0'- amount_used: '10.0'+ amount: '50.0'+ amount_used: '0.0'amount_authorized: '0.0'- amount_remaining: '0.0'- display_amount: "$10.00"- display_amount_used: "$10.00"- display_amount_remaining: "$0.00"+ amount_remaining: '50.0'+ display_amount: "$50.00"+ display_amount_used: "$0.00"+ display_amount_remaining: "$50.00"expires_at:redeemed_at:expired: falseactive: true- created_at: '2026-07-20T12:37:41.973Z'- updated_at: '2026-07-20T12:37:42.250Z'- created_at: '2026-07-26T14:24:42.407Z'- updated_at: '2026-07-26T14:24:42.407Z'++ created_at: '2026-07-27T08:33:19.374Z'++ updated_at: '2026-07-27T08:33:19.374Z'customer_id:created_by_id:- requestBody:- content:- application/json:- schema:- type: object- required:- - code- properties:- code:- type: string- description: Gift card code- example: GIFT-XXXX-YYYY- "/api/v3/admin/orders/{order_id}/gift_cards/{id}":- delete:- summary: Remove a gift card from an order+ schema:+ "$ref": "#/components/schemas/GiftCard"+ '404':+ description: gift card not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Gift card not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ patch:+ summary: Update a gift cardtags:- - Orders+ - Gift Cardssecurity:- api_key: []bearer_auth: []@@@ -7591,26 -7497,53 +7533,53 @@@schema:type: stringresponses:- '204':- description: gift card removed- "/api/v3/admin/orders/{order_id}/items":- get:- summary: List order items+ '200':+ description: gift card updated+ content:+ application/json:+ example:+ id: gc_UkLWZg9DAJ- code: 1CEBCD58FD792E0A++ code: 953D0947BD6246E6+ status: active+ currency: USD+ amount: '75.0'+ amount_used: '0.0'+ amount_authorized: '0.0'+ amount_remaining: '75.0'+ display_amount: "$75.00"+ display_amount_used: "$0.00"+ display_amount_remaining: "$75.00"+ expires_at:+ redeemed_at:+ expired: false+ active: true- created_at: '2026-07-26T14:24:43.028Z'- updated_at: '2026-07-26T14:24:43.354Z'++ created_at: '2026-07-27T08:33:19.918Z'++ updated_at: '2026-07-27T08:33:20.178Z'+ customer_id:+ created_by_id:+ schema:+ "$ref": "#/components/schemas/GiftCard"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ amount:+ type: string+ example: '75.00'+ expires_at:+ type: string+ example: '2031-12-31'+ nullable: true+ user_id:+ type: string+ example: cus_UkLWZg9DAJ+ nullable: true+ delete:+ summary: Delete a gift cardtags:- - Orders+ - Gift Cardssecurity:- api_key: []bearer_auth: []@@@ -7782,72 -7619,153 +7655,153 @@@content:application/json:example:- id: li_gbHJdmfrXB- variant_id: variant_VqXmZF31wY- preorder: false- preorder_ships_at:- quantity: 3- currency: USD- name: Product 231578- slug: product-231578- options_text: 'Size: S'- price: '19.99'- display_price: "$19.99"- total: '59.97'- display_total: "$59.97"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- pre_tax_amount: '59.97'- display_pre_tax_amount: "$59.97"- discounted_amount: '59.97'- display_discounted_amount: "$59.97"- display_compare_at_amount: "$0.00"- compare_at_amount:- thumbnail_url:- option_values:- - id: optval_gbHJdmfrXB- option_type_id: opt_gbHJdmfrXB- name: size-3- label: S- position: 1- color_code:- option_type_name: foo-size-12- option_type_label: Size- image_url:- metadata: {}- created_at: '2026-07-20T12:37:44.008Z'- updated_at: '2026-07-20T12:37:44.008Z'- digital_links: []- metadata: {}- created_at: '2026-07-20T12:37:44.033Z'- updated_at: '2026-07-20T12:37:44.033Z'- cost_price: '17.0'- tax_category_id: taxcat_UkLWZg9DAJ- requestBody:- content:- application/json:- schema:- type: object- required:- - variant_id- properties:- variant_id:- type: string- description: Prefixed variant ID- quantity:- type: integer- default: 1- "/api/v3/admin/orders/{order_id}/items/{id}":- get:- summary: Show an item+ data:+ - id: imp_UkLWZg9DAJ- number: IM737567403++ number: IM241543817+ rows_count: 0- created_at: '2026-07-26T14:24:44.272Z'- updated_at: '2026-07-26T14:24:44.281Z'++ created_at: '2026-07-27T08:33:20.966Z'++ updated_at: '2026-07-27T08:33:20.974Z'+ type: products+ status: pending+ owner_type: store+ owner_id: store_UkLWZg9DAJ+ user_id: admin_UkLWZg9DAJ+ processing_errors:+ preferred_delimiter: ","+ original_filename: products_import.csv+ original_byte_size: 3612+ original_file_url: "/api/v3/admin/imports/imp_UkLWZg9DAJ/download"+ completed_rows_count: 0+ failed_rows_count: 0+ schema_fields:+ - name: slug+ label: Slug+ required: true+ - name: sku+ label: SKU+ required: true+ - name: name+ label: Name+ required: true+ - name: price+ label: Price+ required: true+ - name: status+ label: Status+ required: false+ - name: description+ label: Description+ required: false+ - name: meta_title+ label: Meta Title+ required: false+ - name: meta_description+ label: Meta Description+ required: false+ - name: meta_keywords+ label: Meta Keywords+ required: false+ - name: tags+ label: Tags+ required: false+ - name: compare_at_price+ label: Compare at Price+ required: false+ - name: currency+ label: Currency+ required: false+ - name: width+ label: Width+ required: false+ - name: height+ label: Height+ required: false+ - name: depth+ label: Depth+ required: false+ - name: dimensions_unit+ label: Dimensions Unit+ required: false+ - name: weight+ label: Weight+ required: false+ - name: weight_unit+ label: Weight Unit+ required: false+ - name: available_on+ label: Available On+ required: false+ - name: discontinue_on+ label: Discontinue On+ required: false+ - name: track_inventory+ label: Track Inventory+ required: false+ - name: inventory_count+ label: Inventory Count+ required: false+ - name: inventory_backorderable+ label: Inventory Backorderable+ required: false+ - name: tax_category+ label: Tax Category+ required: false+ - name: shipping_category+ label: Shipping Category+ required: false+ - name: image1_src+ label: Image 1 URL+ required: false+ - name: image2_src+ label: Image 2 URL+ required: false+ - name: image3_src+ label: Image 3 URL+ required: false+ - name: option1_name+ label: Option 1 Name+ required: false+ - name: option1_value+ label: Option 1 Value+ required: false+ - name: option2_name+ label: Option 2 Name+ required: false+ - name: option2_value+ label: Option 2 Value+ required: false+ - name: option3_name+ label: Option 3 Name+ required: false+ - name: option3_value+ label: Option 3 Value+ required: false+ - name: category1+ label: Category 1+ required: false+ - name: category2+ label: Category 2+ required: false+ - name: category3+ label: Category 3+ required: false+ csv_headers: []+ sample_row: {}+ mappings: []+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ post:+ summary: Create an importtags:- - Orders+ - Importssecurity:- api_key: []bearer_auth: []@@@ -8180,5990 -7799,296 +7835,296 @@@content:application/json:example:- id: or_UkLWZg9DAJ- market_id:- channel_id: ch_UkLWZg9DAJ- number: R322010260- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 1- fulfillment_status:- payment_status:- completed_at:- item_total: '10.0'- display_item_total: "$10.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '110.0'- display_total: "$110.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: '60.0'- display_amount_due: "$60.00"- delivery_total: '100.0'- display_delivery_total: "$100.00"- store_credit_total: '50.0'- display_store_credit_total: "-$50.00"- covered_by_store_credit: false- gift_card:- market:- status: draft- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '0.0'- display_payment_total: "$0.00"- metadata: {}- canceled_at:- approved_at:- created_at: '2026-07-20T12:37:51.477Z'- updated_at: '2026-07-20T12:37:51.535Z'- preferred_stock_location_id:- tags: []- internal_note:- approver_id:- canceler_id:- created_by_id:- customer_id: cus_UkLWZg9DAJ- requestBody:- content:- application/json:- schema:- type: object- properties:- amount:- type: string- description: Optional explicit amount; defaults to order outstanding- balance- delete:- summary: Remove store credit from an order- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Removes any applied store credit from the order.-- **Required scope:** `write_store_credits` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- await client.orders.storeCredits.remove('or_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api delete /orders/{order_id}/store_credits- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: order_id- in: path- required: true- description: Order ID- schema:- type: string- responses:- '204':- description: store credit removed- "/api/v3/admin/orders":- get:- summary: List orders- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Returns a paginated list of orders for the current store.-- **Required scope:** `read_orders` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: orders, meta } = await client.orders.list({- status_eq: 'complete',- completed_at_gt: '2026-01-01',- sort: '-completed_at',- limit: 25,- })- - lang: bash- label: Spree CLI- source: spree api get /orders -d '{"status_eq":"complete","completed_at_gt":"2026-01-01","sort":"-completed_at","limit":25}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: page- in: query- required: false- description: Page number- schema:- type: integer- - name: limit- in: query- required: false- description: Number of records per page- schema:- type: integer- - name: sort- in: query- required: false- description: Sort field (e.g., created_at, -created_at, completed_at)- schema:- type: string- - name: q[state_eq]- in: query- required: false- description: Filter by state (cart, address, delivery, payment, confirm, complete,- canceled)- schema:- type: string- - name: q[email_cont]- in: query- required: false- description: Filter by email (contains)- schema:- type: string- - name: q[number_eq]- in: query- required: false- description: Filter by order number- schema:- type: string- - name: q[completed_at_gt]- in: query- required: false- description: Filter by completed after date- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., items, fulfillments,- payments, customer, discounts, billing_address, shipping_address). Use dot- notation for nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., number,total,status,completed_at).- id is always included.- schema:- type: string- responses:- '200':- description: orders found- content:- application/json:- example:- data:- - id: or_UkLWZg9DAJ- market_id:- channel_id: ch_UkLWZg9DAJ- number: R117645820- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 0- fulfillment_status:- payment_status:- completed_at:- item_total: '0.0'- display_item_total: "$0.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '0.0'- display_total: "$0.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: '0.0'- display_amount_due: "$0.00"- delivery_total: '0.0'- display_delivery_total: "$0.00"- store_credit_total: '0.0'- display_store_credit_total: "$0.00"- covered_by_store_credit: false- gift_card:- market:- status: draft- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '0.0'- display_payment_total: "$0.00"- metadata: {}- canceled_at:- approved_at:- created_at: '2026-07-20T12:37:53.124Z'- updated_at: '2026-07-20T12:37:53.124Z'- preferred_stock_location_id:- tags: []- internal_note:- approver_id:- canceler_id:- created_by_id:- customer_id: cus_UkLWZg9DAJ- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- '401':- description: unauthorized- content:- application/json:- example:- error:- code: authentication_required- message: Authentication required- schema:- "$ref": "#/components/schemas/ErrorResponse"- post:- summary: Create a draft order- tags:- - Orders- security:- - api_key: []- bearer_auth: []- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- // One-shot order create: customer, items, addresses, market, channel,- // notes, metadata, and a coupon code in a single call. Everything- // except `email` is optional.- const order = await client.orders.create({- email: '[email protected]',- customer_id: 'cus_UkLWZg9DAJ', // Existing customer; omit for guest orders- use_customer_default_address: false, // true to copy the customer's saved addresses-- currency: 'USD',- market_id: 'mkt_UkLWZg9DAJ',- channel_id: 'ch_UkLWZg9DAJ', // Optional — defaults to the store's primary channel- locale: 'en-US',-- // Pin the order's preferred fulfillment location. Order Routing's- // built-in PreferredLocation rule ranks this location first when- // it stocks the cart's items; if it doesn't, routing falls back- // to the next rule (Minimize Splits → Default Location).- preferred_stock_location_id: 'sloc_UkLWZg9DAJ',-- customer_note: 'Please leave at the front desk.',- internal_note: 'VIP customer — handle with care.',- metadata: {- external_reference: 'subscription_invoice_2026_04',- source: 'recurring-engine',- },-- // Items: each variant_id + quantity. Optional metadata per line.- items: [- { variant_id: 'variant_k5nR8xLq', quantity: 2 },- { variant_id: 'variant_QXyZ12abCD', quantity: 1, metadata: { gift: true } },- ],-- // Provide addresses inline OR by ID (existing customer addresses).- shipping_address: {- first_name: 'Jane',- last_name: 'Doe',- address1: '350 Fifth Avenue',- address2: 'Floor 42',- city: 'New York',- postal_code: '10118',- country_iso: 'US',- state_abbr: 'NY',- phone: '+1 212 555 1234',- company: 'Acme Inc.',- },- // shipping_address_id: 'addr_UkLWZg9DAJ', // alternative to inline-- billing_address: {- first_name: 'Jane',- last_name: 'Doe',- address1: '350 Fifth Avenue',- city: 'New York',- postal_code: '10118',- country_iso: 'US',- state_abbr: 'NY',- phone: '+1 212 555 1234',- },- // billing_address_id: 'addr_UkLWZg9DAJ',-- // Optional. Invalid codes are non-fatal — the order is created either way.- coupon_code: 'WELCOME10',- })- - lang: bash- label: Spree CLI- source: spree api post /orders -d '{"email":"[email protected]","customer_id":"cus_UkLWZg9DAJ","use_customer_default_address":false,"currency":"USD","market_id":"mkt_UkLWZg9DAJ","channel_id":"ch_UkLWZg9DAJ","locale":"en-US","preferred_stock_location_id":"sloc_UkLWZg9DAJ","customer_note":"Please- leave at the front desk.","internal_note":"VIP customer — handle with care.","metadata":{"external_reference":"subscription_invoice_2026_04","source":"recurring-engine"},"items":[{"variant_id":"variant_k5nR8xLq","quantity":2},{"variant_id":"variant_QXyZ12abCD","quantity":1,"metadata":{"gift":true}}],"shipping_address":{"first_name":"Jane","last_name":"Doe","address1":"350- Fifth Avenue","address2":"Floor 42","city":"New York","postal_code":"10118","country_iso":"US","state_abbr":"NY","phone":"+1- 212 555 1234","company":"Acme Inc."},"billing_address":{"first_name":"Jane","last_name":"Doe","address1":"350- Fifth Avenue","city":"New York","postal_code":"10118","country_iso":"US","state_abbr":"NY","phone":"+1- 212 555 1234"},"coupon_code":"WELCOME10"}'- description: |-- Creates a new draft order in one shot. Customer, items, addresses, currency,- market, channel, locale, notes, metadata, and a coupon code can all be- provided inline.-- Setting `preferred_stock_location_id` pins the order's preferred fulfillment- location — Order Routing's built-in `PreferredLocation` rule consumes it- when picking which stock location ships each shipment.-- Invalid coupon codes are non-fatal — the order is created and the failure- is reported on the service result (not in the API response body for now).--- **Required scope:** `write_orders` (for API-key authentication).- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- responses:- '201':- description: order created with preferred_stock_location_id- content:- application/json:- example:- id: or_gbHJdmfrXB- market_id:- channel_id: ch_UkLWZg9DAJ- number: R805209480- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 0- fulfillment_status:- payment_status:- completed_at:- item_total: '0.0'- display_item_total: "$0.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '0.0'- display_total: "$0.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: '0.0'- display_amount_due: "$0.00"- delivery_total: '0.0'- display_delivery_total: "$0.00"- store_credit_total: '0.0'- display_store_credit_total: "$0.00"- covered_by_store_credit: false- gift_card:- market:- status: draft- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '0.0'- display_payment_total: "$0.00"- metadata: {}- canceled_at:- approved_at:- created_at: '2026-07-20T12:37:54.675Z'- updated_at: '2026-07-20T12:37:54.678Z'- preferred_stock_location_id: sloc_UkLWZg9DAJ- tags: []- internal_note:- approver_id:- canceler_id:- created_by_id:- customer_id:- requestBody:- content:- application/json:- schema:- type: object- properties:- email:- type: string- example: [email protected]- customer_id:- type: string- description: 'Customer ID. Alias: user_id (legacy).'- use_customer_default_address:- type: boolean- description: When true with customer_id, copies the customer's saved- billing/shipping addresses onto the order.- currency:- type: string- example: USD- market_id:- type: string- description: Market ID- channel_id:- type: string- description: Channel ID. Defaults to the store primary channel when- omitted.- preferred_stock_location_id:- type: string- description: Stock Location ID to prefer for fulfillment. Order- Routing's built-in PreferredLocation rule reads this and ranks- the location first; routing falls back to the next rule when the- preferred location can't cover the cart.- locale:- type: string- example: en-US- customer_note:- type: string- description: Public, customer-visible note- internal_note:- type: string- description: Staff-only note- metadata:- type: object- description: Arbitrary key/value metadata- shipping_address:- type: object- properties:- first_name:- type: string- last_name:- type: string- address1:- type: string- city:- type: string- postal_code:- type: string- country_iso:- type: string- state_abbr:- type: string- phone:- type: string- shipping_address_id:- type: string- description: Existing customer address ID- billing_address:- type: object- properties:- first_name:- type: string- last_name:- type: string- address1:- type: string- city:- type: string- postal_code:- type: string- country_iso:- type: string- state_abbr:- type: string- phone:- type: string- billing_address_id:- type: string- description: Existing customer address ID- items:- type: array- items:- type: object- required:- - variant_id- - quantity- properties:- variant_id:- type: string- description: Variant ID- quantity:- type: integer- example: 1- metadata:- type: object- coupon_code:- type: string- description: Optional. Applied non-fatally; invalid codes do not- block creation.- "/api/v3/admin/orders/{id}":- get:- summary: Show an order- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Returns full order details including admin-only fields.-- **Required scope:** `read_orders` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const order = await client.orders.get('or_UkLWZg9DAJ', {- expand: ['items', 'fulfillments', 'payments', 'customer'],- })- - lang: bash- label: Spree CLI- source: spree api get /orders/{id} -d '{"expand":["items","fulfillments","payments","customer"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Order ID (e.g., or_xxx)- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., items, fulfillments,- payments, customer, discounts, billing_address, shipping_address). Use dot- notation for nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., number,total,status,completed_at).- id is always included.- schema:- type: string- responses:- '200':- description: order found- content:- application/json:- example:- id: or_UkLWZg9DAJ- market_id:- channel_id: ch_UkLWZg9DAJ- number: R956192184- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 0- fulfillment_status:- payment_status:- completed_at:- item_total: '0.0'- display_item_total: "$0.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '0.0'- display_total: "$0.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: '0.0'- display_amount_due: "$0.00"- delivery_total: '0.0'- display_delivery_total: "$0.00"- store_credit_total: '0.0'- display_store_credit_total: "$0.00"- covered_by_store_credit: false- gift_card:- market:- status: draft- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '0.0'- display_payment_total: "$0.00"- metadata: {}- canceled_at:- approved_at:- created_at: '2026-07-20T12:37:54.937Z'- updated_at: '2026-07-20T12:37:54.937Z'- preferred_stock_location_id:- tags: []- internal_note:- approver_id:- canceler_id:- created_by_id:- customer_id: cus_UkLWZg9DAJ- '404':- description: order not found- content:- application/json:- example:- error:- code: order_not_found- message: Order not found- schema:- "$ref": "#/components/schemas/ErrorResponse"- patch:- summary: Update an order- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Updates an order. Supports updating email, addresses, special instructions, and line items.-- **Required scope:** `write_orders` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const order = await client.orders.update('or_UkLWZg9DAJ', {- email: '[email protected]',- internal_note: 'VIP — gift wrap on next order',- })- - lang: bash- label: Spree CLI- source: spree api patch /orders/{id} -d '{"email":"[email protected]","internal_note":"VIP- — gift wrap on next order"}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Order ID- schema:- type: string- responses:- '200':- description: order updated- content:- application/json:- example:- id: or_UkLWZg9DAJ- market_id:- channel_id: ch_UkLWZg9DAJ- number: R388200041- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 0- fulfillment_status:- payment_status:- completed_at:- item_total: '0.0'- display_item_total: "$0.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '0.0'- display_total: "$0.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: '0.0'- display_amount_due: "$0.00"- delivery_total: '0.0'- display_delivery_total: "$0.00"- store_credit_total: '0.0'- display_store_credit_total: "$0.00"- covered_by_store_credit: false- gift_card:- market:- status: draft- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '0.0'- display_payment_total: "$0.00"- metadata: {}- canceled_at:- approved_at:- created_at: '2026-07-20T12:37:55.952Z'- updated_at: '2026-07-20T12:37:56.212Z'- preferred_stock_location_id:- tags: []- internal_note:- approver_id:- canceler_id:- created_by_id:- customer_id: cus_UkLWZg9DAJ- requestBody:- content:- application/json:- schema:- type: object- properties:- email:- type: string- special_instructions:- type: string- internal_note:- type: string- channel_id:- type: string- description: Channel ID- preferred_stock_location_id:- type: string- description: Stock Location ID to prefer for fulfillment. Re-runs- Order Routing's PreferredLocation rule on subsequent shipment- rebuilds.- ship_address:- type: object- properties:- firstname:- type: string- lastname:- type: string- address1:- type: string- city:- type: string- zipcode:- type: string- country_iso:- type: string- state_abbr:- type: string- phone:- type: string- bill_address:- type: object- properties:- firstname:- type: string- lastname:- type: string- address1:- type: string- city:- type: string- zipcode:- type: string- country_iso:- type: string- state_abbr:- type: string- phone:- type: string- items:- type: array- items:- type: object- required:- - variant_id- properties:- variant_id:- type: string- description: Variant ID- quantity:- type: integer- example: 1- metadata:- type: object- delete:- summary: Delete a draft order- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Deletes a draft order. Completed orders cannot be deleted.-- **Required scope:** `write_orders` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- await client.orders.delete('or_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api delete /orders/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Order ID- schema:- type: string- responses:- '204':- description: order deleted- "/api/v3/admin/orders/{id}/complete":- patch:- summary: Complete an order- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Completes an order in the `confirm` state, marking it as placed.-- Set `notify_customer: true` to send the order confirmation email.--- **Required scope:** `write_orders` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const order = await client.orders.complete('or_UkLWZg9DAJ', {- notify_customer: true,- })- - lang: bash- label: Spree CLI- source: spree api patch /orders/{id}/complete -d '{"notify_customer":true}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Order ID- schema:- type: string- responses:- '200':- description: order completed- content:- application/json:- example:- id: or_UkLWZg9DAJ- market_id:- channel_id: ch_UkLWZg9DAJ- number: R131825041- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 1- fulfillment_status: ready- payment_status: paid- completed_at: '2026-07-20T12:37:57.056Z'- item_total: '10.0'- display_item_total: "$10.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '110.0'- display_total: "$110.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: '0.0'- display_amount_due: "$0.00"- delivery_total: '100.0'- display_delivery_total: "$100.00"- store_credit_total: '0.0'- display_store_credit_total: "$0.00"- covered_by_store_credit: false- gift_card:- market:- status: draft- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '110.0'- display_payment_total: "$110.00"- metadata: {}- canceled_at:- approved_at:- created_at: '2026-07-20T12:37:56.996Z'- updated_at: '2026-07-20T12:37:57.079Z'- preferred_stock_location_id:- tags: []- internal_note:- approver_id:- canceler_id:- created_by_id:- customer_id: cus_UkLWZg9DAJ- '422':- description: order cannot be completed- content:- application/json:- example:- error:- code: order_cannot_complete- message: No payment found- details:- base:- - No payment found- schema:- "$ref": "#/components/schemas/ErrorResponse"- requestBody:- content:- application/json:- schema:- type: object- properties:- notify_customer:- type: boolean- description: Send the order confirmation email after completion.- "/api/v3/admin/orders/{id}/cancel":- patch:- summary: Cancel an order- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Cancels a completed order.-- **Required scope:** `write_orders` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const order = await client.orders.cancel('or_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api patch /orders/{id}/cancel -d '{ ... }'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Order ID- schema:- type: string- responses:- '200':- description: order canceled- content:- application/json:- example:- id: or_UkLWZg9DAJ- market_id:- channel_id: ch_UkLWZg9DAJ- number: R967213855- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 1- fulfillment_status: canceled- payment_status: void- completed_at: '2026-07-20T12:37:58.233Z'- item_total: '10.0'- display_item_total: "$10.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '20.0'- display_total: "$20.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: "-0.0"- display_amount_due: "$0.00"- delivery_total: '10.0'- display_delivery_total: "$10.00"- store_credit_total: '0.0'- display_store_credit_total: "$0.00"- covered_by_store_credit: false- gift_card:- market:- status: canceled- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '0.0'- display_payment_total: "$0.00"- metadata: {}- canceled_at: '2026-07-20T12:37:58.499Z'- approved_at:- created_at: '2026-07-20T12:37:58.176Z'- updated_at: '2026-07-20T12:37:58.538Z'- preferred_stock_location_id:- tags: []- internal_note:- approver_id:- canceler_id: admin_UkLWZg9DAJ- created_by_id:- customer_id: cus_UkLWZg9DAJ- "/api/v3/admin/orders/{id}/approve":- patch:- summary: Approve an order- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Approves an order (e.g., for fraud review).-- **Required scope:** `write_orders` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const order = await client.orders.approve('or_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api patch /orders/{id}/approve -d '{ ... }'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Order ID- schema:- type: string- responses:- '200':- description: order approved- content:- application/json:- example:- id: or_UkLWZg9DAJ- market_id:- channel_id: ch_UkLWZg9DAJ- number: R978455749- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 1- fulfillment_status:- payment_status:- completed_at: '2026-07-20T12:37:58.864Z'- item_total: '10.0'- display_item_total: "$10.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '110.0'- display_total: "$110.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: '110.0'- display_amount_due: "$110.00"- delivery_total: '100.0'- display_delivery_total: "$100.00"- store_credit_total: '0.0'- display_store_credit_total: "$0.00"- covered_by_store_credit: false- gift_card:- market:- status: draft- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '0.0'- display_payment_total: "$0.00"- metadata: {}- canceled_at:- approved_at: '2026-07-20T12:37:59.125Z'- created_at: '2026-07-20T12:37:58.813Z'- updated_at: '2026-07-20T12:37:58.864Z'- preferred_stock_location_id:- tags: []- internal_note:- approver_id: admin_UkLWZg9DAJ- canceler_id:- created_by_id:- customer_id: cus_UkLWZg9DAJ- "/api/v3/admin/orders/{id}/resume":- patch:- summary: Resume a canceled order- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Resumes a previously canceled order.-- **Required scope:** `write_orders` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const order = await client.orders.resume('or_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api patch /orders/{id}/resume -d '{ ... }'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Order ID- schema:- type: string- responses:- '200':- description: order resumed- content:- application/json:- example:- id: or_UkLWZg9DAJ- market_id:- channel_id: ch_UkLWZg9DAJ- number: R612544022- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 1- fulfillment_status: canceled- payment_status: void- completed_at: '2026-07-20T12:37:59.442Z'- item_total: '10.0'- display_item_total: "$10.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '20.0'- display_total: "$20.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: '20.0'- display_amount_due: "$20.00"- delivery_total: '10.0'- display_delivery_total: "$10.00"- store_credit_total: '0.0'- display_store_credit_total: "$0.00"- covered_by_store_credit: false- gift_card:- market:- status: placed- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '0.0'- display_payment_total: "$0.00"- metadata: {}- canceled_at: '2026-07-20T12:37:59.697Z'- approved_at:- created_at: '2026-07-20T12:37:59.383Z'- updated_at: '2026-07-20T12:37:59.775Z'- preferred_stock_location_id:- tags: []- internal_note:- approver_id:- canceler_id: admin_UkLWZg9DAJ- created_by_id:- customer_id: cus_UkLWZg9DAJ- "/api/v3/admin/orders/{id}/resend_confirmation":- post:- summary: Resend confirmation email- tags:- - Orders- security:- - api_key: []- bearer_auth: []- description: |-- Publishes the order.completed event to trigger confirmation email delivery.-- **Required scope:** `write_orders` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- await client.orders.resendConfirmation('or_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api post /orders/{id}/resend_confirmation -d '{ ... }'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Order ID- schema:- type: string- responses:- '200':- description: confirmation resent- content:- application/json:- example:- id: or_UkLWZg9DAJ- market_id:- channel_id: ch_UkLWZg9DAJ- number: R847838804- email: [email protected]- customer_note:- currency: USD- locale: en- total_quantity: 1- fulfillment_status:- payment_status:- completed_at: '2026-07-20T12:38:00.077Z'- item_total: '10.0'- display_item_total: "$10.00"- adjustment_total: '0.0'- display_adjustment_total: "$0.00"- discount_total: '0.0'- display_discount_total: "$0.00"- tax_total: '0.0'- display_tax_total: "$0.00"- included_tax_total: '0.0'- display_included_tax_total: "$0.00"- additional_tax_total: '0.0'- display_additional_tax_total: "$0.00"- total: '110.0'- display_total: "$110.00"- gift_card_total: '0.0'- display_gift_card_total: "$0.00"- amount_due: '110.0'- display_amount_due: "$110.00"- delivery_total: '100.0'- display_delivery_total: "$100.00"- store_credit_total: '0.0'- display_store_credit_total: "$0.00"- covered_by_store_credit: false- gift_card:- market:- status: draft- last_ip_address:- considered_risky: false- confirmation_delivered: false- store_owner_notification_delivered:- payment_total: '0.0'- display_payment_total: "$0.00"- metadata: {}- canceled_at:- approved_at:- created_at: '2026-07-20T12:38:00.032Z'- updated_at: '2026-07-20T12:38:00.077Z'- preferred_stock_location_id:- tags: []- internal_note:- approver_id:- canceler_id:- created_by_id:- customer_id: cus_UkLWZg9DAJ- "/api/v3/admin/payment_methods":- get:- summary: List payment methods- tags:- - Payment Methods- security:- - api_key: []- bearer_auth: []- description: |-- Returns the store's configured payment methods. Use `source_required: true` to know which methods need a saved source.-- **Required scope:** `read_settings` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: paymentMethods } = await client.paymentMethods.list()- - lang: bash- label: Spree CLI- source: spree api get /payment_methods- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand. Use dot notation for- nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., name,type,active).- id is always included.- schema:- type: string- responses:- '200':- description: payment methods found- content:- application/json:- example:- data:- - id: pm_UkLWZg9DAJ- name: Check- description:- type: check- session_required: false- source_required: false- metadata: {}- active: true- auto_capture:- storefront_visible: true- position: 1- created_at: '2026-07-20T12:38:01.377Z'- updated_at: '2026-07-20T12:38:01.377Z'- preferences: {}- preference_schema: []- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- "/api/v3/admin/payment_methods/types":- get:- summary: List available payment provider types- tags:- - Payment Methods- security:- - api_key: []- bearer_auth: []- description: |-- Returns the registered Spree::PaymentMethod subclasses that can be used to create new payment methods. Useful for populating a "Provider" dropdown in admin UIs.-- **Required scope:** `read_settings` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: types } = await client.paymentMethods.types()- - lang: bash- label: Spree CLI- source: spree api get /payment_methods/types- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: provider types found- content:- application/json:- example:- data:- - type: bogus- label: Bogus- description:- preference_schema:- - key: dummy_key- type: string- default: PUBLICKEY123- - key: dummy_secret_key- type: password- default:- - type: custom_payment_source_method- label: Custom Payment Source Method- description:- preference_schema: []- "/api/v3/admin/payment_methods/{id}":- get:- summary: Show a payment method- tags:- - Payment Methods- security:- - api_key: []- bearer_auth: []- description: |-- Returns a payment method by ID.-- **Required scope:** `read_settings` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const paymentMethod = await client.paymentMethods.get('pm_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api get /payment_methods/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: id- in: path- required: true- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand. Use dot notation for- nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., name,type,active).- id is always included.- schema:- type: string- responses:- '200':- description: payment method found- content:- application/json:- example:- id: pm_UkLWZg9DAJ- name: Check- description:- type: check- session_required: false- source_required: false- metadata: {}- active: true- auto_capture:- storefront_visible: true- position: 1- created_at: '2026-07-20T12:38:01.908Z'- updated_at: '2026-07-20T12:38:01.908Z'- preferences: {}- preference_schema: []- "/api/v3/admin/orders/{order_id}/payments":- get:- summary: List payments- tags:- - Payments- security:- - api_key: []- bearer_auth: []- description: |-- Returns all payments for an order.-- **Required scope:** `read_payments` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: payments } = await client.orders.payments.list('or_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api get /orders/{order_id}/payments- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: order_id- in: path- required: true- description: Order ID- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., payment_method,- source). Use dot notation for nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., amount,status,number,response_code).- id is always included.- schema:- type: string- responses:- '200':- description: payments found- content:- application/json:- example:- data:- - id: py_UkLWZg9DAJ- payment_method_id: pm_UkLWZg9DAJ- response_code: BGS-cb71e09eef0f- number: PMSVCH3O- amount: '110.0'- display_amount: "$110.00"- status: completed- source_type: credit_card- source_id: card_UkLWZg9DAJ- source:- id: card_UkLWZg9DAJ- brand: visa- last4: '1111'- month: 12- year: 2027- name: Spree Commerce- default: false- gateway_payment_profile_id:- customer_id:- payment_method_id: pm_gbHJdmfrXB- metadata: {}- created_at: '2026-07-20T12:37:46.072Z'- updated_at: '2026-07-20T12:37:46.074Z'- metadata: {}- avs_response:- cvv_response_code:- cvv_response_message:- created_at: '2026-07-20T12:37:46.074Z'- updated_at: '2026-07-20T12:37:46.074Z'- captured_amount: '0.0'- order_id: or_UkLWZg9DAJ- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- post:- summary: Create a payment- tags:- - Payments- security:- - api_key: []- bearer_auth: []- description: |-- Creates a new payment for the order.-- **Required scope:** `write_payments` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const payment = await client.orders.payments.create('or_UkLWZg9DAJ', {- payment_method_id: 'pm_UkLWZg9DAJ',- amount: '99.99',- source_id: 'cc_UkLWZg9DAJ',- })- - lang: bash- label: Spree CLI- source: spree api post /orders/{order_id}/payments -d '{"payment_method_id":"pm_UkLWZg9DAJ","amount":"99.99","source_id":"cc_UkLWZg9DAJ"}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: order_id- in: path- required: true- description: Order ID- schema:- type: string- responses:- '201':- description: payment created- content:- application/json:- example:- id: py_gbHJdmfrXB- payment_method_id: pm_EfhxLZ9ck8- response_code:- number: P0K6QYL2- amount: '110.0'- display_amount: "$110.00"- status: checkout- source_type:- source_id:- source:- metadata: {}- avs_response:- cvv_response_code:- cvv_response_message:- created_at: '2026-07-20T12:37:47.269Z'- updated_at: '2026-07-20T12:37:47.269Z'- captured_amount: '0.0'- order_id: or_gbHJdmfrXB- requestBody:- content:- application/json:- schema:- type: object- required:- - payment_method_id- properties:- payment_method_id:- type: string- description: Payment method ID- amount:- type: string- example: '99.99'- source_id:- type: string- description: Payment source ID- "/api/v3/admin/orders/{order_id}/payments/{id}":- get:- summary: Show a payment- tags:- - Payments- security:- - api_key: []- bearer_auth: []- description: |-- Returns details of a specific payment.-- **Required scope:** `read_payments` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const payment = await client.orders.payments.get('or_UkLWZg9DAJ', 'pay_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api get /orders/{order_id}/payments/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: order_id- in: path- required: true- description: Order ID- schema:- type: string- - name: id- in: path- required: true- description: Payment ID- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., payment_method,- source). Use dot notation for nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., amount,status,number,response_code).- id is always included.- schema:- type: string- responses:- '200':- description: payment found- content:- application/json:- example:- id: py_UkLWZg9DAJ- payment_method_id: pm_UkLWZg9DAJ- response_code: BGS-e23c9ab08649- number: PW14UQLV- amount: '110.0'- display_amount: "$110.00"- status: completed- source_type: credit_card- source_id: card_UkLWZg9DAJ- source:- id: card_UkLWZg9DAJ- brand: visa- last4: '1111'- month: 12- year: 2027- name: Spree Commerce- default: false- gateway_payment_profile_id:- customer_id:- payment_method_id: pm_gbHJdmfrXB- metadata: {}- created_at: '2026-07-20T12:37:47.623Z'- updated_at: '2026-07-20T12:37:47.627Z'- metadata: {}- avs_response:- cvv_response_code:- cvv_response_message:- created_at: '2026-07-20T12:37:47.625Z'- updated_at: '2026-07-20T12:37:47.625Z'- captured_amount: '0.0'- order_id: or_UkLWZg9DAJ- "/api/v3/admin/orders/{order_id}/payments/{id}/capture":- patch:- summary: Capture a payment- tags:- - Payments- security:- - api_key: []- bearer_auth: []- description: |-- Captures a pending payment.-- **Required scope:** `write_payments` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const payment = await client.orders.payments.capture('or_UkLWZg9DAJ', 'pay_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api patch /orders/{order_id}/payments/{id}/capture -d '{ ...- }'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: order_id- in: path- required: true- description: Order ID- schema:- type: string- - name: id- in: path- required: true- description: Payment ID- schema:- type: string- responses:- '200':- description: payment captured- content:- application/json:- example:- id: py_UkLWZg9DAJ- payment_method_id: pm_UkLWZg9DAJ- response_code: BGS-e32c9c3cc5ab- number: PRBP71ZN- amount: '110.0'- display_amount: "$110.00"- status: completed- source_type: credit_card- source_id: card_UkLWZg9DAJ- source:- id: card_UkLWZg9DAJ- brand: visa- last4: '1111'- month: 12- year: 2027- name: Spree Commerce- default: false- gateway_payment_profile_id:- customer_id:- payment_method_id: pm_gbHJdmfrXB- metadata: {}- created_at: '2026-07-20T12:37:48.239Z'- updated_at: '2026-07-20T12:37:48.241Z'- metadata: {}- avs_response:- cvv_response_code:- cvv_response_message:- created_at: '2026-07-20T12:37:48.240Z'- updated_at: '2026-07-20T12:37:48.549Z'- captured_amount: '110.0'- order_id: or_UkLWZg9DAJ- '422':- description: capture failed- content:- application/json:- example:- error:- code: processing_error- message: 'Bogus Gateway: Forced failure'- schema:- "$ref": "#/components/schemas/ErrorResponse"- "/api/v3/admin/orders/{order_id}/payments/{id}/void":- patch:- summary: Void a payment- tags:- - Payments- security:- - api_key: []- bearer_auth: []- description: |-- Voids a payment.-- **Required scope:** `write_payments` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const payment = await client.orders.payments.void('or_UkLWZg9DAJ', 'pay_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api patch /orders/{order_id}/payments/{id}/void -d '{ ... }'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: order_id- in: path- required: true- description: Order ID- schema:- type: string- - name: id- in: path- required: true- description: Payment ID- schema:- type: string- responses:- '200':- description: payment voided- content:- application/json:- example:- id: py_UkLWZg9DAJ- payment_method_id: pm_UkLWZg9DAJ- response_code: void-BGS-d1e063861bd5- number: PA1EAM84- amount: '110.0'- display_amount: "$110.00"- status: void- source_type: credit_card- source_id: card_UkLWZg9DAJ- source:- id: card_UkLWZg9DAJ- brand: visa- last4: '1111'- month: 12- year: 2027- name: Spree Commerce- default: false- gateway_payment_profile_id:- customer_id:- payment_method_id: pm_gbHJdmfrXB- metadata: {}- created_at: '2026-07-20T12:37:49.562Z'- updated_at: '2026-07-20T12:37:49.566Z'- metadata: {}- avs_response:- cvv_response_code:- cvv_response_message:- created_at: '2026-07-20T12:37:49.564Z'- updated_at: '2026-07-20T12:37:49.855Z'- captured_amount: '0.0'- order_id: or_UkLWZg9DAJ- "/api/v3/admin/price_lists":- get:- summary: List price lists- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Returns the price lists configured for the current store.-- **Required scope:** `read_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: priceLists } = await client.priceLists.list()- - lang: bash- label: Spree CLI- source: spree api get /price_lists- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: page- in: query- required: false- schema:- type: integer- - name: limit- in: query- required: false- schema:- type: integer- - name: q[name_cont]- in: query- required: false- schema:- type: string- - name: q[status_eq]- in: query- required: false- schema:- type: string- - name: sort- in: query- required: false- schema:- type: string- - name: expand- in: query- required: false- description: 'Comma-separated associations to embed. Supported: `price_rules`.'- schema:- type: string- responses:- '200':- description: price lists found- content:- application/json:- example:- data:- - id: pl_UkLWZg9DAJ- name: Wholesale- description:- status: draft- position: 1- match_policy: all- starts_at:- ends_at:- deleted_at:- created_at: '2026-07-20T12:38:02.174Z'- updated_at: '2026-07-20T12:38:02.174Z'- currently_active: false- products_count: 0- prices_count: 0- product_ids: []- - id: pl_gbHJdmfrXB- name: Holiday- description:- status: draft- position: 2- match_policy: all- starts_at:- ends_at:- deleted_at:- created_at: '2026-07-20T12:38:02.176Z'- updated_at: '2026-07-20T12:38:02.176Z'- currently_active: false- products_count: 0- prices_count: 0- product_ids: []- meta:- page: 1- limit: 25- count: 2- pages: 1- from: 1- to: 2- in: 2- previous:- next:- schema:- type: object- properties:- data:- type: array- items:- "$ref": "#/components/schemas/PriceList"- meta:- "$ref": "#/components/schemas/PaginationMeta"- required:- - data- - meta- post:- summary: Create a price list- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Creates a new draft price list.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- // Server-to-server one-shot create. Ship the rules that gate the list- // and the exact per-variant prices in a single request — variants in- // `prices` implicitly become part of the list (upserted on the unique- // key `(variant_id, currency, price_list_id)`), so there's no need to- // pre-declare `product_ids` separately.- const priceList = await client.priceLists.create({- name: 'EU wholesale',- description: 'Tiered pricing for verified B2B customers',- match_policy: 'all',- starts_at: '2026-06-01T00:00:00Z',- ends_at: '2026-09-01T00:00:00Z',- rules: [- {- type: 'customer_group_rule',- preferences: { customer_group_ids: ['cg_aBc123'] },- },- {- type: 'volume_rule',- preferences: { min_quantity: 10 },- },- ],- prices: [- {- variant_id: 'variant_xY9',- currency: 'USD',- amount: '19.99',- compare_at_amount: '24.99',- },- {- variant_id: 'variant_aB7',- currency: 'USD',- amount: '21.99',- },- ],- })- - lang: bash- label: Spree CLI- source: spree api post /price_lists -d '{"name":"EU wholesale","description":"Tiered- pricing for verified B2B customers","match_policy":"all","starts_at":"2026-06-01T00:00:00Z","ends_at":"2026-09-01T00:00:00Z","rules":[{"type":"customer_group_rule","preferences":{"customer_group_ids":["cg_aBc123"]}},{"type":"volume_rule","preferences":{"min_quantity":10}}],"prices":[{"variant_id":"variant_xY9","currency":"USD","amount":"19.99","compare_at_amount":"24.99"},{"variant_id":"variant_aB7","currency":"USD","amount":"21.99"}]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '201':- description: price list created (server-to-server — rules + prices, no product_ids)- content:- application/json:- example:- id: pl_EfhxLZ9ck8- name: EU wholesale- description:- status: draft- position: 3- match_policy: all- starts_at:- ends_at:- deleted_at:- created_at: '2026-07-20T12:38:03.116Z'- updated_at: '2026-07-20T12:38:03.118Z'- currently_active: false- products_count: 1- prices_count: 2- product_ids:- - prod_UkLWZg9DAJ- schema:- "$ref": "#/components/schemas/PriceList"- '422':- description: validation error- content:- application/json:- example:- error:- code: validation_error- message: Name can't be blank- details:- name:- - can't be blank- schema:- "$ref": "#/components/schemas/ErrorResponse"- requestBody:- content:- application/json:- schema:- type: object- required:- - name- properties:- name:- type: string- example: EU wholesale- description:- type: string- nullable: true- starts_at:- type: string- nullable: true- example: '2026-06-01T00:00:00Z'- ends_at:- type: string- nullable: true- example: '2026-09-01T00:00:00Z'- match_policy:- type: string- enum:- - all- - any- example: all- position:- type: integer- example: 1- product_ids:- type: array- items:- type: string- description: Prefixed product ids to seed the list with.- example:- - prod_aBc123- rules:- type: array- description: STI-typed price rules to attach on create. Existing- rules on the same payload via PATCH reconcile by id.- items:- type: object- required:- - type- properties:- type:- type: string- example: volume_rule- preferences:- type: object- additionalProperties: true- prices:- type: array- description: 'Server-to-server alternative to `product_ids`: ship- the exact per-variant prices the list should contain. Each row- upserts on the unique key `(variant_id, currency, price_list_id)`.- Mix-and-match with `product_ids` is supported but typically unnecessary- — `prices` alone tells the server which variants belong to the- list and what the override amount is.'- items:- type: object- required:- - variant_id- - currency- properties:- variant_id:- type: string- example: variant_xY9- currency:- type: string- example: USD- amount:- type: string- nullable: true- example: '19.99'- compare_at_amount:- type: string- nullable: true- example: '24.99'- "/api/v3/admin/price_lists/{id}":- parameters:- - name: id- in: path- required: true- schema:- type: string- get:- summary: Get a price list- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `read_products` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const priceList = await client.priceLists.get('pl_xxx')- - lang: bash- label: Spree CLI- source: spree api get /price_lists/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: expand- in: query- required: false- schema:- type: string- responses:- '200':- description: price list found- content:- application/json:- example:- id: pl_UkLWZg9DAJ- name: Wholesale- description:- status: draft- position: 1- match_policy: all- starts_at:- ends_at:- deleted_at:- created_at: '2026-07-20T12:38:03.403Z'- updated_at: '2026-07-20T12:38:03.403Z'- currently_active: false- products_count: 0- prices_count: 0- product_ids: []- schema:- "$ref": "#/components/schemas/PriceList"- '404':- description: price list not found- content:- application/json:- example:- error:- code: record_not_found- message: Price list not found- schema:- "$ref": "#/components/schemas/ErrorResponse"- patch:- summary: Update a price list- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Updates a price list. The optional `rules:` array reconciles nested- STI-typed price rules in a single round-trip — existing rules update- by `id`, new rules build, missing rules destroy. Mirrors the- promotion editor's "save the whole thing on Save" pattern.--- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const priceList = await client.priceLists.update('pl_xxx', {- name: 'Wholesale (Q3)',- })- - lang: bash- label: Spree CLI- source: spree api patch /price_lists/{id} -d '{"name":"Wholesale (Q3)"}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: price list updated with nested rules- content:- application/json:- example:- id: pl_UkLWZg9DAJ- name: Wholesale (Q3)- description:- status: draft- position: 1- match_policy: all- starts_at:- ends_at:- deleted_at:- created_at: '2026-07-20T12:38:04.971Z'- updated_at: '2026-07-20T12:38:05.228Z'- currently_active: false- products_count: 0- prices_count: 0- product_ids: []- schema:- "$ref": "#/components/schemas/PriceList"- requestBody:- content:- application/json:- schema:- type: object- properties:- name:- type: string- description:- type: string- nullable: true- starts_at:- type: string- nullable: true- ends_at:- type: string- nullable: true- match_policy:- type: string- enum:- - all- - any- position:- type: integer- product_ids:- type: array- items:- type: string- description: Prefixed product ids — reconciles list membership (adds- + removes).- example:- - prod_aBc123- rules:- type: array- items:- type: object- required:- - type- properties:- id:- type: string- nullable: true- type:- type: string- example: volume_rule- preferences:- type: object- additionalProperties: true- prices:- type: array- description: Individual price overrides (the spreadsheet payload).- Each row updates by `id` if shipped, otherwise upserts on the- unique key `(variant_id, currency, price_list_id)`.- items:- type: object- oneOf:- - required:- - id- - required:- - variant_id- - currency- properties:- id:- type: string- example: price_aBc123- variant_id:- type: string- example: variant_xY9- currency:- type: string- example: USD- amount:- type: string- nullable: true- example: '12.50'- compare_at_amount:- type: string- nullable: true- example: '15.00'- delete:- summary: Delete a price list- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Soft-deletes the price list. Associated prices are removed asynchronously.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- await client.priceLists.delete('pl_xxx')- - lang: bash- label: Spree CLI- source: spree api delete /price_lists/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '204':- description: price list deleted- "/api/v3/admin/price_lists/{id}/activate":- parameters:- - name: id- in: path- required: true- schema:- type: string- patch:- summary: Activate a price list- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Transitions a draft / inactive list to `active`. If `starts_at` is- in the future the list is marked `scheduled` instead, matching the- legacy admin behaviour.--- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const priceList = await client.priceLists.activate('pl_xxx')- - lang: bash- label: Spree CLI- source: spree api patch /price_lists/{id}/activate -d '{ ... }'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: price list activated- content:- application/json:- example:- id: pl_UkLWZg9DAJ- name: Wholesale- description:- status: active- position: 1- match_policy: all- starts_at:- ends_at:- deleted_at:- created_at: '2026-07-20T12:38:05.498Z'- updated_at: '2026-07-20T12:38:05.762Z'- currently_active: true- products_count: 0- prices_count: 0- product_ids: []- schema:- "$ref": "#/components/schemas/PriceList"- "/api/v3/admin/price_lists/{id}/deactivate":- parameters:- - name: id- in: path- required: true- schema:- type: string- patch:- summary: Deactivate a price list- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `write_products` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const priceList = await client.priceLists.deactivate('pl_xxx')- - lang: bash- label: Spree CLI- source: spree api patch /price_lists/{id}/deactivate -d '{ ... }'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: price list deactivated- content:- application/json:- example:- id: pl_UkLWZg9DAJ- name: Price List 1- description:- status: inactive- position: 1- match_policy: all- starts_at:- ends_at:- deleted_at:- created_at: '2026-07-20T12:38:05.776Z'- updated_at: '2026-07-20T12:38:06.035Z'- currently_active: false- products_count: 0- prices_count: 0- product_ids: []- schema:- "$ref": "#/components/schemas/PriceList"- "/api/v3/admin/prices":- get:- summary: List prices- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Generic prices endpoint covering both base prices and price-list- overrides. Filter with Ransack: `q[price_list_id_eq]=…`,- `q[currency_eq]=USD`, `q[price_list_id_null]=true` (base prices only).-- The admin spreadsheet uses this with server-side pagination so it- scales past the metadata-PATCH path on `/price_lists/:id`.--- **Required scope:** `read_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: prices } = await client.prices.list({- price_list_id_eq: 'pl_xxx',- currency_eq: 'USD',- expand: ['variant'],- })- - lang: bash- label: Spree CLI- source: spree api get /prices -d '{"price_list_id_eq":"pl_xxx","currency_eq":"USD","expand":["variant"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: page- in: query- required: false- schema:- type: integer- - name: limit- in: query- required: false- schema:- type: integer- - name: q[price_list_id_eq]- in: query- required: false- schema:- type: string- - name: q[price_list_id_null]- in: query- required: false- schema:- type: boolean- - name: q[currency_eq]- in: query- required: false- schema:- type: string- - name: q[variant_id_eq]- in: query- required: false- schema:- type: string- - name: sort- in: query- required: false- description: Comma-separated sort keys. Supports e.g. `variant_product_name,variant_id`.- schema:- type: string- - name: expand- in: query- required: false- description: 'Comma-separated associations to embed. Supported: `variant`.'- schema:- type: string- responses:- '200':- description: prices found- content:- application/json:- example:- data:- - id: price_UkLWZg9DAJ- amount: '19.99'- amount_in_cents: 1999- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$19.99"- display_compare_at_amount:- price_list_id:- variant_id: variant_UkLWZg9DAJ- created_at: '2026-07-20T12:38:06.066Z'- updated_at: '2026-07-20T12:38:06.066Z'- - id: price_gbHJdmfrXB- amount: '19.99'- amount_in_cents: 1999- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$19.99"- display_compare_at_amount:- price_list_id:- variant_id: variant_gbHJdmfrXB- created_at: '2026-07-20T12:38:06.089Z'- updated_at: '2026-07-20T12:38:06.089Z'- - id: price_EfhxLZ9ck8- amount: '5.0'- amount_in_cents: 500- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$5.00"- display_compare_at_amount:- price_list_id: pl_UkLWZg9DAJ- variant_id: variant_gbHJdmfrXB- created_at: '2026-07-20T12:38:06.093Z'- updated_at: '2026-07-20T12:38:06.093Z'- meta:- page: 1- limit: 25- count: 3- pages: 1- from: 1- to: 3- in: 3- previous:- next:- schema:- type: object- properties:- data:- type: array- items:- "$ref": "#/components/schemas/Price"- meta:- "$ref": "#/components/schemas/PaginationMeta"- required:- - data- - meta- post:- summary: Create a price- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Creates a single price. Omit `price_list_id` to create a base price.- For more than a handful of rows, prefer `POST /admin/prices/bulk_upsert`.--- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const price = await client.prices.create({- variant_id: 'variant_xxx',- currency: 'USD',- amount: '19.99',- })- - lang: bash- label: Spree CLI- source: spree api post /prices -d '{"variant_id":"variant_xxx","currency":"USD","amount":"19.99"}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '201':- description: price created- content:- application/json:- example:- id: price_uw2YK1rnl0- amount: '9.99'- amount_in_cents: 999- compare_at_amount:- compare_at_amount_in_cents:- currency: EUR- display_amount: "€9.99"- display_compare_at_amount:- price_list_id:- variant_id: variant_EfhxLZ9ck8- created_at: '2026-07-20T12:38:06.684Z'- updated_at: '2026-07-20T12:38:06.684Z'- schema:- "$ref": "#/components/schemas/Price"- requestBody:- content:- application/json:- schema:- type: object- required:- - variant_id- - currency- properties:- variant_id:- type: string- example: variant_xY9- currency:- type: string- example: USD- amount:- type: string- nullable: true- example: '19.99'- compare_at_amount:- type: string- nullable: true- example: '24.99'- price_list_id:- type: string- nullable: true- example: pl_aBc123- "/api/v3/admin/prices/{id}":- parameters:- - name: id- in: path- required: true- schema:- type: string- get:- summary: Get a price- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `read_products` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const price = await client.prices.get('price_xxx')- - lang: bash- label: Spree CLI- source: spree api get /prices/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: price found- content:- application/json:- example:- id: price_EfhxLZ9ck8- amount: '5.0'- amount_in_cents: 500- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$5.00"- display_compare_at_amount:- price_list_id: pl_UkLWZg9DAJ- variant_id: variant_gbHJdmfrXB- created_at: '2026-07-20T12:38:06.747Z'- updated_at: '2026-07-20T12:38:06.747Z'- schema:- "$ref": "#/components/schemas/Price"- '404':- description: price not found- content:- application/json:- example:- error:- code: record_not_found- message: Price not found- schema:- "$ref": "#/components/schemas/ErrorResponse"- patch:- summary: Update a price- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `write_products` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const price = await client.prices.update('price_xxx', {- amount: '12.34',- })- - lang: bash- label: Spree CLI- source: spree api patch /prices/{id} -d '{"amount":"12.34"}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: price updated- content:- application/json:- example:- id: price_EfhxLZ9ck8- amount: '12.34'- amount_in_cents: 1234- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$12.34"- display_compare_at_amount:- price_list_id: pl_UkLWZg9DAJ- variant_id: variant_gbHJdmfrXB- created_at: '2026-07-20T12:38:07.414Z'- updated_at: '2026-07-20T12:38:07.768Z'- schema:- "$ref": "#/components/schemas/Price"- requestBody:- content:- application/json:- schema:- type: object- properties:- amount:- type: string- nullable: true- compare_at_amount:- type: string- nullable: true- delete:- summary: Delete a price- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Soft-deletes the price (acts_as_paranoid).-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- await client.prices.delete('price_xxx')- - lang: bash- label: Spree CLI- source: spree api delete /prices/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '204':- description: price deleted- "/api/v3/admin/prices/bulk_upsert":- post:- summary: Bulk-upsert prices- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Upserts a batch of prices in a single SQL round trip.-- Each row either:- * targets an existing price by `id`, OR- * matches on the unique key `(variant_id, currency, price_list_id)` —- updating the existing row if one exists, creating one otherwise.-- Model callbacks (e.g. PriceHistory) are bypassed; this is a- bulk-write fast path for the admin spreadsheet. The response- carries `price_count` — the number of rows touched.--- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { price_count } = await client.prices.bulkUpsert({- prices: [- {- variant_id: 'variant_xxx',- currency: 'USD',- price_list_id: 'pl_xxx',- amount: '11.11',- },- {- variant_id: 'variant_yyy',- currency: 'USD',- price_list_id: 'pl_xxx',- amount: '22.22',- },- ],- })- - lang: bash- label: Spree CLI- source: spree api post /prices/bulk_upsert -d '{"prices":[{"variant_id":"variant_xxx","currency":"USD","price_list_id":"pl_xxx","amount":"11.11"},{"variant_id":"variant_yyy","currency":"USD","price_list_id":"pl_xxx","amount":"22.22"}]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: prices upserted- content:- application/json:- example:- price_count: 2- schema:- type: object- properties:- price_count:- type: integer- '422':- description: missing prices key- content:- application/json:- example:- error:- code: missing_prices- message: prices is required (send an empty array to no-op).- schema:- "$ref": "#/components/schemas/ErrorResponse"- requestBody:- content:- application/json:- schema:- type: object- required:- - prices- properties:- prices:- type: array- items:- type: object- required:- - variant_id- - currency- properties:- id:- type: string- nullable: true- example: price_aBc123- variant_id:- type: string- example: variant_xY9- currency:- type: string- example: USD- price_list_id:- type: string- nullable: true- example: pl_aBc123- amount:- type: string- nullable: true- example: '19.99'- compare_at_amount:- type: string- nullable: true- example: '24.99'- "/api/v3/admin/prices/bulk_destroy":- delete:- summary: Bulk-delete prices- tags:- - Pricing- security:- - api_key: []- bearer_auth: []- description: |-- Soft-deletes each price in `ids`. Returns the count actually destroyed.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { price_count } = await client.prices.bulkDestroy({- ids: ['price_xxx', 'price_yyy'],- })- - lang: bash- label: Spree CLI- source: spree api delete /prices/bulk_destroy -d '{"ids":["price_xxx","price_yyy"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: prices deleted- content:- application/json:- example:- price_count: 1- schema:- type: object- properties:- price_count:- type: integer- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- properties:- ids:- type: array- items:- type: string- "/api/v3/admin/products/{product_id}/custom_fields":- get:- summary: List product custom fields- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Returns the product's custom field values.-- **Required scope:** `read_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: customFields } = await client.products.customFields.list('prod_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api get /products/{product_id}/custom_fields- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: product_id- in: path- required: true- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., custom_field_definition).- Use dot notation for nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., key,value,namespace).- id is always included.- schema:- type: string- responses:- '200':- description: custom fields found- content:- application/json:- example:- data:- - id: cf_UkLWZg9DAJ- label: Title- type: Spree::Metafields::ShortText- field_type: short_text- key: custom.title- value: wool- created_at: '2026-07-20T12:38:09.084Z'- updated_at: '2026-07-20T12:38:09.084Z'- storefront_visible: true- custom_field_definition_id: cfdef_UkLWZg9DAJ- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- post:- summary: Create a product custom field- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Sets a custom field value on the product. Requires an existing CustomFieldDefinition; pass its prefixed `cfdef_…` id.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const customField = await client.products.customFields.create('prod_UkLWZg9DAJ', {- custom_field_definition_id: 'cfdef_AbC123XyZ',- value: 'wool',- })- - lang: bash- label: Spree CLI- source: spree api post /products/{product_id}/custom_fields -d '{"custom_field_definition_id":"cfdef_AbC123XyZ","value":"wool"}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: product_id- in: path- required: true- schema:- type: string- responses:- '201':- description: custom field created- content:- application/json:- example:- id: cf_gbHJdmfrXB- label: Description- type: Spree::Metafields::LongText- field_type: long_text- key: custom.description- value: A longer description- created_at: '2026-07-20T12:38:09.644Z'- updated_at: '2026-07-20T12:38:09.644Z'- storefront_visible: true- custom_field_definition_id: cfdef_gbHJdmfrXB- '422':- description: duplicate definition for the same product- content:- application/json:- example:- error:- code: validation_error- message: Metafield definition has already been taken- details:- metafield_definition_id:- - has already been taken- requestBody:- content:- application/json:- schema:- type: object- required:- - custom_field_definition_id- - value- properties:- custom_field_definition_id:- type: string- description: Prefixed `cfdef_…` id- value:- description: Value matching the definition's `field_type`- "/api/v3/admin/products/{product_id}/custom_fields/{id}":- get:- summary: Show a product custom field- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `read_products` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const customField = await client.products.customFields.get('prod_UkLWZg9DAJ', 'cf_AbC123XyZ')- - lang: bash- label: Spree CLI- source: spree api get /products/{product_id}/custom_fields/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: product_id- in: path- required: true- schema:- type: string- - name: id- in: path- required: true- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., custom_field_definition).- Use dot notation for nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., key,value,namespace).- id is always included.- schema:- type: string- responses:- '200':- description: custom field found- content:- application/json:- example:- id: cf_UkLWZg9DAJ- label: Title- type: Spree::Metafields::ShortText- field_type: short_text- key: custom.title- value: wool- created_at: '2026-07-20T12:38:09.991Z'- updated_at: '2026-07-20T12:38:09.991Z'- storefront_visible: true- custom_field_definition_id: cfdef_UkLWZg9DAJ- patch:- summary: Update a product custom field- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Updates the custom field's `value`. The linked definition cannot be changed — delete and recreate to switch.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const customField = await client.products.customFields.update('prod_UkLWZg9DAJ', 'cf_AbC123XyZ', {- value: 'cotton',- })- - lang: bash- label: Spree CLI- source: spree api patch /products/{product_id}/custom_fields/{id} -d '{"value":"cotton"}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: product_id- in: path- required: true- schema:- type: string- - name: id- in: path- required: true- schema:- type: string- responses:- '200':- description: custom field updated- content:- application/json:- example:- id: cf_UkLWZg9DAJ- label: Title- type: Spree::Metafields::ShortText- field_type: short_text- key: custom.title- value: cotton- created_at: '2026-07-20T12:38:10.292Z'- updated_at: '2026-07-20T12:38:10.554Z'- storefront_visible: true- custom_field_definition_id: cfdef_UkLWZg9DAJ- requestBody:- content:- application/json:- schema:- type: object- required:- - value- properties:- value:- description: New value- delete:- summary: Delete a product custom field- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `write_products` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- await client.products.customFields.delete('prod_UkLWZg9DAJ', 'cf_AbC123XyZ')- - lang: bash- label: Spree CLI- source: spree api delete /products/{product_id}/custom_fields/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: product_id- in: path- required: true- schema:- type: string- - name: id- in: path- required: true- schema:- type: string- responses:- '204':- description: custom field deleted- "/api/v3/admin/products/{product_id}/translations":- get:- summary: List product translations- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Returns the full translation matrix for the product: the source value and content type per translatable field, plus the translated value for every supported locale.-- **Required scope:** `read_products` (for API-key authentication).- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- - name: product_id- in: path- required: true- schema:- type: string- responses:- '200':- description: translations found- content:- application/json:- example:- data:- resource_id: prod_UkLWZg9DAJ- resource_type: product- translations:- de:- name: Espressomaschine- description:- slug: espressomaschine- meta_description:- meta_title:- translated_field_count: 2- fr:- name:- description:- slug:- meta_description:- meta_title:- translated_field_count: 0- fields:- - key: name- type: string- source: Espresso Machine- - key: description- type: html- source: |-- Ducimus ex fugiat ipsa nesciunt suscipit corrupti. Quidem nobis quia atque eveniet ipsam iusto. Doloremque porro autem nobis commodi. Nisi delectus praesentium molestiae ipsam. Cumque delectus sed officiis vitae voluptate asperiores consequatur.- Natus pariatur rerum temporibus quia porro sit ipsa culpa. Dolorem iusto aliquam quae ipsam. Consequuntur suscipit excepturi ut quam minima. Laudantium dolorem amet velit veritatis tempora sequi.- Sint quidem mollitia voluptas sapiente animi tempore dolorem. Molestiae ducimus voluptate mollitia facilis. Tempore optio odio praesentium fugit cumque distinctio. Fuga quibusdam totam a illum labore consequatur temporibus. Accusantium vitae praesentium quam maiores nobis tempore.- Ab voluptatibus libero tenetur deserunt repellendus quae unde. Ipsam eius dolore iure quasi quam. Deleniti laudantium eaque facilis veritatis adipisci officiis.- - key: slug- type: string- source: espresso-machine- - key: meta_description- type: string- source:- - key: meta_title- type: string- source:- default_locale: en- supported_locales:- - de- - en- - fr- "/api/v3/admin/products":- get:- summary: List products- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Returns a paginated list of products for the current store.-- **Required scope:** `read_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: products } = await client.products.list({- name_cont: 'shirt',- status_eq: 'active',- sort: '-created_at',- limit: 25,- })- - lang: bash- label: Spree CLI- source: spree api get /products -d '{"name_cont":"shirt","status_eq":"active","sort":"-created_at","limit":25}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: page- in: query- required: false- description: Page number- schema:- type: integer- - name: limit- in: query- required: false- description: Number of records per page- schema:- type: integer- - name: sort- in: query- required: false- description: Sort field (e.g., name, -name, price, -price, best_selling)- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., variants, media,- option_types, categories). Use dot notation for nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., name,slug,price,status).- id is always included.- schema:- type: string- - name: q[name_cont]- in: query- required: false- description: Filter by name (contains)- schema:- type: string- - name: q[status_eq]- in: query- required: false- description: Filter by status- schema:- type: string- responses:- '200':- description: products found- content:- application/json:- example:- data:- - id: prod_UkLWZg9DAJ- name: Product 664197- slug: product-664197- meta_title:- meta_description:- meta_keywords:- variant_count: 1- available_on:- preorder_ships_at:- purchasable: true- preorder: false- in_stock: false- backorderable: true- available: true- description: Ad vitae eius laboriosam molestiae facilis maxime.- Iusto commodi sed illo ipsum quod. Id vitae veritatis omnis delectus- quibusdam expedita. Dolorem nisi minus quasi repellendus suscipit- enim. Corporis neque ut sequi fuga dolore voluptatibus nobis.- Architecto expedita nam velit magni repudiandae.- description_html: |-- Ad vitae eius laboriosam molestiae facilis maxime. Iusto commodi sed illo ipsum quod. Id vitae veritatis omnis delectus quibusdam expedita.- Dolorem nisi minus quasi repellendus suscipit enim. Corporis neque ut sequi fuga dolore voluptatibus nobis. Architecto expedita nam velit magni repudiandae.- default_variant_id: variant_UkLWZg9DAJ- thumbnail_url:- tags: []- price:- id: price_UkLWZg9DAJ- amount: '19.99'- amount_in_cents: 1999- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$19.99"- display_compare_at_amount:- price_list_id:- variant_id: variant_UkLWZg9DAJ- created_at: '2026-07-20T12:38:11.202Z'- updated_at: '2026-07-20T12:38:11.202Z'- original_price:- status: active- metadata: {}- deleted_at:- created_at: '2026-07-20T12:38:11.188Z'- updated_at: '2026-07-20T12:38:11.209Z'- tax_category_id: taxcat_UkLWZg9DAJ- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- schema:- type: object- properties:- data:- type: array- items:- "$ref": "#/components/schemas/Product"- meta:- "$ref": "#/components/schemas/PaginationMeta"- required:- - data- - meta- '401':- description: unauthorized- content:- application/json:- example:- error:- code: authentication_required- message: Authentication required- schema:- "$ref": "#/components/schemas/ErrorResponse"- post:- summary: Create a product- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Creates a new product. Supports nested variants with prices and option types.-- Option types and values are auto-created if they don't exist.- Prices are upserted by currency. Stock items are upserted by stock location.--- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const product = await client.products.create({- name: 'Premium T-Shirt',- description: 'Soft, organic cotton.',- status: 'active',- variants: [- {- sku: 'TSHIRT-S-NAVY',- options: [- { name: 'size', value: 'Small' },- { name: 'color', value: 'navy' },- ],- prices: [- { currency: 'USD', amount: '29.99' },- { currency: 'EUR', amount: '27.99' },- ],- stock_items: [{ stock_location_id: 'sloc_UkLWZg9DAJ', count_on_hand: 50 }],- },- {- sku: 'TSHIRT-M-NAVY',- options: [- { name: 'size', value: 'Medium' },- { name: 'color', value: 'navy' },- ],- prices: [{ currency: 'USD', amount: '29.99' }],- stock_items: [{ stock_location_id: 'sloc_UkLWZg9DAJ', count_on_hand: 30 }],- },- ],- })- - lang: bash- label: Spree CLI- source: spree api post /products -d '{"name":"Premium T-Shirt","description":"Soft,- organic cotton.","status":"active","variants":[{"sku":"TSHIRT-S-NAVY","options":[{"name":"size","value":"Small"},{"name":"color","value":"navy"}],"prices":[{"currency":"USD","amount":"29.99"},{"currency":"EUR","amount":"27.99"}],"stock_items":[{"stock_location_id":"sloc_UkLWZg9DAJ","count_on_hand":50}]},{"sku":"TSHIRT-M-NAVY","options":[{"name":"size","value":"Medium"},{"name":"color","value":"navy"}],"prices":[{"currency":"USD","amount":"29.99"}],"stock_items":[{"stock_location_id":"sloc_UkLWZg9DAJ","count_on_hand":30}]}]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- responses:- '201':- description: product created- content:- application/json:- example:- id: prod_gbHJdmfrXB- name: New Product- slug: new-product- meta_title:- meta_description:- meta_keywords:- variant_count: 0- available_on:- preorder_ships_at:- purchasable: false- preorder: false- in_stock: false- backorderable: false- available: false- description:- description_html:- default_variant_id: variant_gbHJdmfrXB- thumbnail_url:- tags: []- price:- original_price:- status: draft- metadata: {}- deleted_at:- created_at: '2026-07-20T12:38:11.825Z'- updated_at: '2026-07-20T12:38:11.830Z'- tax_category_id:- schema:- "$ref": "#/components/schemas/Product"- '422':- description: validation error- content:- application/json:- example:- error:- code: validation_error- message: Name can't be blank- details:- name:- - can't be blank- schema:- "$ref": "#/components/schemas/ErrorResponse"- requestBody:- content:- application/json:- schema:- type: object- properties:- name:- type: string- example: Premium T-Shirt- description:- type: string- slug:- type: string- status:- type: string- enum:- - draft- - active- - archived- tax_category_id:- type: string- description: Tax category ID- category_ids:- type: array- items:- type: string- description: Array of category IDs- tags:- type: array- items:- type: string- example:- - eco- - sale- prices:- type: array- description: 'Shorthand for a simple (no-options) product: per-currency- prices that forward to the product''s sole variant. For products- with options, set prices per variant under `variants:` instead.'- items:- type: object- required:- - currency- - amount- properties:- currency:- type: string- example: USD- amount:- type: string- example: '29.99'- compare_at_amount:- type: string- nullable: true- example: '39.99'- variants:- type: array- description: Array of variant payloads. Variants can declare multiple- option pairs via `options:` and per-currency prices via `prices:`.- Stock counts go in `stock_items:` (per stock location).- items:- type: object- properties:- sku:- type: string- options:- type: array- description: One pair per option type the variant participates- in (e.g. size + color). Option types and values are auto-created- if missing.- items:- type: object- required:- - name- - value- properties:- name:- type: string- example: size- value:- type: string- example: Small- prices:- type: array- description: Per-currency prices. Upserted by currency.- items:- type: object- required:- - currency- - amount- properties:- currency:- type: string- example: USD- amount:- type: string- example: '29.99'- compare_at_amount:- type: string- nullable: true- example: '39.99'- stock_items:- type: array- description: Per-stock-location inventory. Upserted by stock_location_id.- items:- type: object- required:- - stock_location_id- - count_on_hand- properties:- stock_location_id:- type: string- description: Stock location ID (e.g. sloc_xxx)- count_on_hand:- type: integer- example: 50- backorderable:- type: boolean- required:- - name- "/api/v3/admin/products/{id}":- get:- summary: Get a product- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Returns a single product by ID.-- **Required scope:** `read_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const product = await client.products.get('prod_86Rf07xd4z', {- expand: ['variants', 'option_types'],- })- - lang: bash- label: Spree CLI- source: spree api get /products/{id} -d '{"expand":["variants","option_types"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Product ID (e.g., prod_xxx)- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., variants, media,- option_types, categories). Use dot notation for nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., name,slug,price,status).- id is always included.- schema:- type: string- responses:- '200':- description: product found- content:- application/json:- example:- id: prod_UkLWZg9DAJ- name: Product 701894- slug: product-701894- meta_title:- meta_description:- meta_keywords:- variant_count: 1- available_on:- preorder_ships_at:- purchasable: true- preorder: false- in_stock: false- backorderable: true- available: true- description: Consectetur vel quam culpa voluptates unde eligendi.- Asperiores sit occaecati quas minima officia nulla ducimus. Esse- velit reprehenderit at commodi minima. Consequatur officia optio- doloremque soluta aut eos atque. Eum quam eius sapiente ducimus- voluptatum dolorum aliquid. Minima placeat quis neque consequatur- quod repellendus aperiam. Iste suscipit excepturi reiciendis beatae- perspiciatis velit. Occaecati quibusdam voluptas harum vero soluta- accusamus perspiciatis totam. Adipisci at harum officia neque nisi- qui. Illum sapiente vel cum earum. Expedita placeat neque soluta- tenetur in voluptas unde blanditiis. Incidunt optio eligendi reprehenderit- maxime facilis. Dolorum id soluta pariatur veritatis voluptatem- natus. Error perspiciatis earum distinctio deserunt debitis quibusdam- architecto. Cum autem quos error tenetur sapiente. Delectus sequi- et eos repellat. Recusandae ullam officiis error incidunt quos eum.- description_html: |-- Consectetur vel quam culpa voluptates unde eligendi. Asperiores sit occaecati quas minima officia nulla ducimus. Esse velit reprehenderit at commodi minima. Consequatur officia optio doloremque soluta aut eos atque.- Eum quam eius sapiente ducimus voluptatum dolorum aliquid. Minima placeat quis neque consequatur quod repellendus aperiam. Iste suscipit excepturi reiciendis beatae perspiciatis velit. Occaecati quibusdam voluptas harum vero soluta accusamus perspiciatis totam. Adipisci at harum officia neque nisi qui.- Illum sapiente vel cum earum. Expedita placeat neque soluta tenetur in voluptas unde blanditiis. Incidunt optio eligendi reprehenderit maxime facilis.- Dolorum id soluta pariatur veritatis voluptatem natus. Error perspiciatis earum distinctio deserunt debitis quibusdam architecto. Cum autem quos error tenetur sapiente. Delectus sequi et eos repellat. Recusandae ullam officiis error incidunt quos eum.- default_variant_id: variant_UkLWZg9DAJ- thumbnail_url:- tags: []- price:- id: price_UkLWZg9DAJ- amount: '19.99'- amount_in_cents: 1999- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$19.99"- display_compare_at_amount:- price_list_id:- variant_id: variant_UkLWZg9DAJ- created_at: '2026-07-20T12:38:12.176Z'- updated_at: '2026-07-20T12:38:12.176Z'- original_price:- status: active- metadata: {}- deleted_at:- created_at: '2026-07-20T12:38:12.163Z'- updated_at: '2026-07-20T12:38:12.183Z'- tax_category_id: taxcat_UkLWZg9DAJ- schema:- "$ref": "#/components/schemas/Product"- '404':- description: product not found- content:- application/json:- example:- error:- code: record_not_found- message: Product not found- schema:- "$ref": "#/components/schemas/ErrorResponse"- patch:- summary: Update a product- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Updates a product. Only provided fields are updated.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const product = await client.products.update('prod_86Rf07xd4z', {- name: 'Updated Name',- status: 'active',- tags: ['eco', 'sale'],- })- - lang: bash- label: Spree CLI- source: spree api patch /products/{id} -d '{"name":"Updated Name","status":"active","tags":["eco","sale"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Product ID- schema:- type: string- responses:- '200':- description: product updated- content:- application/json:- example:- id: prod_UkLWZg9DAJ- name: Updated Name- slug: product-721290- meta_title:- meta_description:- meta_keywords:- variant_count: 1- available_on:- preorder_ships_at:- purchasable: true- preorder: false- in_stock: false- backorderable: true- available: true- description: Repellat veniam voluptas dolorem aliquam placeat fugiat- debitis. Magnam quasi corporis mollitia quisquam harum reprehenderit- consequatur tenetur. Deserunt reiciendis ipsum atque voluptatibus- in nemo sed animi. Consequuntur et voluptates saepe asperiores.- Fugiat temporibus consequuntur omnis expedita repudiandae. Recusandae- tenetur sed fuga blanditiis ipsam vitae laboriosam. Sequi voluptas- magnam eos rerum sunt mollitia perspiciatis fugit. Eveniet explicabo- animi corrupti dolorem eaque sit delectus molestiae. Repellat alias- expedita praesentium quod tempore.- description_html: |-- Repellat veniam voluptas dolorem aliquam placeat fugiat debitis. Magnam quasi corporis mollitia quisquam harum reprehenderit consequatur tenetur. Deserunt reiciendis ipsum atque voluptatibus in nemo sed animi. Consequuntur et voluptates saepe asperiores. Fugiat temporibus consequuntur omnis expedita repudiandae.- Recusandae tenetur sed fuga blanditiis ipsam vitae laboriosam. Sequi voluptas magnam eos rerum sunt mollitia perspiciatis fugit. Eveniet explicabo animi corrupti dolorem eaque sit delectus molestiae. Repellat alias expedita praesentium quod tempore.- default_variant_id: variant_UkLWZg9DAJ- thumbnail_url:- tags: []- price:- id: price_UkLWZg9DAJ- amount: '19.99'- amount_in_cents: 1999- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$19.99"- display_compare_at_amount:- price_list_id:- variant_id: variant_UkLWZg9DAJ- created_at: '2026-07-20T12:38:12.776Z'- updated_at: '2026-07-20T12:38:12.776Z'- original_price:- status: active- metadata: {}- deleted_at:- created_at: '2026-07-20T12:38:12.767Z'- updated_at: '2026-07-20T12:38:13.046Z'- tax_category_id: taxcat_UkLWZg9DAJ- schema:- "$ref": "#/components/schemas/Product"- '422':- description: validation error- content:- application/json:- example:- error:- code: validation_error- message: Name can't be blank- details:- name:- - can't be blank- schema:- "$ref": "#/components/schemas/ErrorResponse"- requestBody:- content:- application/json:- schema:- type: object- properties:- name:- type: string- example: Premium T-Shirt- description:- type: string- slug:- type: string- status:- type: string- enum:- - draft- - active- - archived- tax_category_id:- type: string- description: Tax category ID- category_ids:- type: array- items:- type: string- description: Array of category IDs- tags:- type: array- items:- type: string- example:- - eco- - sale- prices:- type: array- description: 'Shorthand for a simple (no-options) product: per-currency- prices that forward to the product''s sole variant. For products- with options, set prices per variant under `variants:` instead.'- items:- type: object- required:- - currency- - amount- properties:- currency:- type: string- example: USD- amount:- type: string- example: '29.99'- compare_at_amount:- type: string- nullable: true- example: '39.99'- variants:- type: array- description: Array of variant payloads. Variants can declare multiple- option pairs via `options:` and per-currency prices via `prices:`.- Stock counts go in `stock_items:` (per stock location).- items:- type: object- properties:- sku:- type: string- options:- type: array- description: One pair per option type the variant participates- in (e.g. size + color). Option types and values are auto-created- if missing.- items:- type: object- required:- - name- - value- properties:- name:- type: string- example: size- value:- type: string- example: Small- prices:- type: array- description: Per-currency prices. Upserted by currency.- items:- type: object- required:- - currency- - amount- properties:- currency:- type: string- example: USD- amount:- type: string- example: '29.99'- compare_at_amount:- type: string- nullable: true- example: '39.99'- stock_items:- type: array- description: Per-stock-location inventory. Upserted by stock_location_id.- items:- type: object- required:- - stock_location_id- - count_on_hand- properties:- stock_location_id:- type: string- description: Stock location ID (e.g. sloc_xxx)- count_on_hand:- type: integer- example: 50- backorderable:- type: boolean- delete:- summary: Delete a product- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Soft-deletes a product.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- await client.products.delete('prod_86Rf07xd4z')- - lang: bash- label: Spree CLI- source: spree api delete /products/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Product ID- schema:- type: string- responses:- '204':- description: product deleted- "/api/v3/admin/products/bulk_status_update":- post:- summary: Bulk-update product status- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Sets `status` on each product in `ids`. Reindexes the affected products- for search. Cross-store IDs are silently dropped. Returns counts.--- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const result = await client.products.bulkStatusUpdate({- ids: ['prod_UkLWZg9DAJ', 'prod_9XbR2kQwLm'],- status: 'archived',- })- - lang: bash- label: Spree CLI- source: spree api post /products/bulk_status_update -d '{"ids":["prod_UkLWZg9DAJ","prod_9XbR2kQwLm"],"status":"archived"}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: cross-store products silently dropped- content:- application/json:- example:- product_count: 0- status: archived- schema:- type: object- properties:- product_count:- type: integer- status:- type: string- '422':- description: invalid status- content:- application/json:- example:- error:- code: invalid_status- message: Invalid status- schema:- "$ref": "#/components/schemas/ErrorResponse"- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - status- properties:- ids:- type: array- items:- type: string- example:- - prod_UkLWZg9DAJ- status:- type: string- enum:- - draft- - active- - archived- example: archived- "/api/v3/admin/products/bulk_add_to_categories":- post:- summary: Bulk-add products to categories- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Attaches each product in `ids` to every category (taxon) in `category_ids`.- Categories from sibling stores are silently ignored.--- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const result = await client.products.bulkAddToCategories({- ids: ['prod_UkLWZg9DAJ', 'prod_9XbR2kQwLm'],- category_ids: ['cat_AbC123XyZ'],- })- - lang: bash- label: Spree CLI- source: spree api post /products/bulk_add_to_categories -d '{"ids":["prod_UkLWZg9DAJ","prod_9XbR2kQwLm"],"category_ids":["cat_AbC123XyZ"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: products added to categories- content:- application/json:- example:- product_count: 1- category_count: 1- schema:- type: object- properties:- product_count:- type: integer- category_count:- type: integer- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - category_ids- properties:- ids:- type: array- items:- type: string- category_ids:- type: array- items:- type: string- "/api/v3/admin/products/bulk_remove_from_categories":- post:- summary: Bulk-remove products from categories- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Detaches each product in `ids` from every category in `category_ids`.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const result = await client.products.bulkRemoveFromCategories({- ids: ['prod_UkLWZg9DAJ', 'prod_9XbR2kQwLm'],- category_ids: ['cat_AbC123XyZ'],- })- - lang: bash- label: Spree CLI- source: spree api post /products/bulk_remove_from_categories -d '{"ids":["prod_UkLWZg9DAJ","prod_9XbR2kQwLm"],"category_ids":["cat_AbC123XyZ"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: products removed from categories- content:- application/json:- example:- product_count: 1- category_count: 1- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - category_ids- properties:- ids:- type: array- items:- type: string- category_ids:- type: array- items:- type: string- "/api/v3/admin/products/bulk_add_to_collections":- post:- summary: Bulk-add products to collections- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Attaches each product in `ids` to every manual collection in `collection_ids`.- Automatic (rule-based) and sibling-store collections are silently ignored.--- **Required scope:** `write_products` (for API-key authentication).- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: products added to collections- content:- application/json:- example:- product_count: 1- collection_count: 1- schema:- type: object- properties:- product_count:- type: integer- collection_count:- type: integer- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - collection_ids- properties:- ids:- type: array- items:- type: string- collection_ids:- type: array- items:- type: string- "/api/v3/admin/products/bulk_remove_from_collections":- post:- summary: Bulk-remove products from collections- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Detaches each product in `ids` from every collection in `collection_ids`.-- **Required scope:** `write_products` (for API-key authentication).- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: products removed from collections- content:- application/json:- example:- product_count: 1- collection_count: 1- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - collection_ids- properties:- ids:- type: array- items:- type: string- collection_ids:- type: array- items:- type: string- "/api/v3/admin/products/bulk_add_to_channels":- post:- summary: Bulk-add products to channels- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Publishes each product in `ids` on every channel in `channel_ids`. Idempotent —- re-publishing on an existing channel is a no-op. Channels from sibling stores- are silently ignored.--- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const result = await client.products.bulkAddToChannels({- ids: ['prod_UkLWZg9DAJ', 'prod_9XbR2kQwLm'],- channel_ids: ['channel_AbC123XyZ'],- })- - lang: bash- label: Spree CLI- source: spree api post /products/bulk_add_to_channels -d '{"ids":["prod_UkLWZg9DAJ","prod_9XbR2kQwLm"],"channel_ids":["channel_AbC123XyZ"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: products published on channels- content:- application/json:- example:- product_count: 1- channel_count: 1- schema:- type: object- properties:- product_count:- type: integer- channel_count:- type: integer- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - channel_ids- properties:- ids:- type: array- items:- type: string- channel_ids:- type: array- items:- type: string- "/api/v3/admin/products/bulk_remove_from_channels":- post:- summary: Bulk-remove products from channels- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Unpublishes each product in `ids` from every channel in `channel_ids`.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const result = await client.products.bulkRemoveFromChannels({- ids: ['prod_UkLWZg9DAJ', 'prod_9XbR2kQwLm'],- channel_ids: ['channel_AbC123XyZ'],- })- - lang: bash- label: Spree CLI- source: spree api post /products/bulk_remove_from_channels -d '{"ids":["prod_UkLWZg9DAJ","prod_9XbR2kQwLm"],"channel_ids":["channel_AbC123XyZ"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: products unpublished from channels- content:- application/json:- example:- product_count: 1- channel_count: 1- removed: 1- schema:- type: object- properties:- product_count:- type: integer- channel_count:- type: integer- removed:- type: integer- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - channel_ids- properties:- ids:- type: array- items:- type: string- channel_ids:- type: array- items:- type: string- "/api/v3/admin/products/bulk_add_tags":- post:- summary: Bulk-add tags to products- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Adds each tag name in `tags` to every product in `ids`. Tags are upserted by name.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const result = await client.products.bulkAddTags({- ids: ['prod_UkLWZg9DAJ', 'prod_9XbR2kQwLm'],- tags: ['summer', 'sale'],- })- - lang: bash- label: Spree CLI- source: spree api post /products/bulk_add_tags -d '{"ids":["prod_UkLWZg9DAJ","prod_9XbR2kQwLm"],"tags":["summer","sale"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: tags added- content:- application/json:- example:- product_count: 1- tag_count: 2- schema:- type: object- properties:- product_count:- type: integer- tag_count:- type: integer- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - tags- properties:- ids:- type: array- items:- type: string- tags:- type: array- items:- type: string- example:- - summer- - sale- "/api/v3/admin/products/bulk_remove_tags":- post:- summary: Bulk-remove tags from products- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Removes each tag in `tags` from every product in `ids`.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const result = await client.products.bulkRemoveTags({- ids: ['prod_UkLWZg9DAJ', 'prod_9XbR2kQwLm'],- tags: ['summer'],- })- - lang: bash- label: Spree CLI- source: spree api post /products/bulk_remove_tags -d '{"ids":["prod_UkLWZg9DAJ","prod_9XbR2kQwLm"],"tags":["summer"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: tags removed- content:- application/json:- example:- product_count: 1- tag_count: 1- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- - tags- properties:- ids:- type: array- items:- type: string- tags:- type: array- items:- type: string- "/api/v3/admin/products/bulk_destroy":- delete:- summary: Bulk-delete products- tags:- - Products- security:- - api_key: []- bearer_auth: []- description: |-- Soft-deletes each product in `ids`. Returns the count actually destroyed.-- **Required scope:** `write_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const result = await client.products.bulkDestroy({- ids: ['prod_UkLWZg9DAJ', 'prod_9XbR2kQwLm'],- })- - lang: bash- label: Spree CLI- source: spree api delete /products/bulk_destroy -d '{"ids":["prod_UkLWZg9DAJ","prod_9XbR2kQwLm"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: products deleted- content:- application/json:- example:- product_count: 1- schema:- type: object- properties:- product_count:- type: integer- requestBody:- content:- application/json:- schema:- type: object- required:- - ids- properties:- ids:- type: array- items:- type: string- "/api/v3/admin/promotions/{promotion_id}/coupon_codes":- parameters:- - name: promotion_id- in: path- required: true- schema:- type: string- get:- summary: List coupon codes for a promotion- tags:- - Promotions- security:- - api_key: []- bearer_auth: []- description: |-- Returns the auto-generated coupon codes for a multi-code promotion. Single-code promotions store the code on the promotion itself; this endpoint returns an empty list for them.-- **Required scope:** `read_promotions` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: coupons } = await client.promotions.couponCodes.list('promo_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api get /promotions/{promotion_id}/coupon_codes- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: coupon codes found- content:- application/json:- example:- data:- - id: coupon_UkLWZg9DAJ- code: AAA111- state: unused- created_at: '2026-07-20T12:37:03.651Z'- updated_at: '2026-07-20T12:37:03.651Z'- promotion_id: promo_UkLWZg9DAJ- order_id:- - id: coupon_gbHJdmfrXB- code: BBB222- state: unused- created_at: '2026-07-20T12:37:03.652Z'- updated_at: '2026-07-20T12:37:03.652Z'- promotion_id: promo_UkLWZg9DAJ- order_id:- meta:- page: 1- limit: 25- count: 2- pages: 1- from: 1- to: 2- in: 2- previous:- next:- "/api/v3/admin/promotions/{promotion_id}/promotion_actions":- parameters:- - name: promotion_id- in: path- required: true- schema:- type: string- get:- summary: List actions for a promotion- tags:- - Promotions- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `read_promotions` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: actions } = await client.promotions.actions.list('promo_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api get /promotions/{promotion_id}/promotion_actions- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: actions found- content:- application/json:- example:- data:- - id: pact_UkLWZg9DAJ- created_at: '2026-07-20T12:38:17.455Z'- updated_at: '2026-07-20T12:38:17.455Z'- type: free_shipping- promotion_id: promo_UkLWZg9DAJ- preferences: {}- preference_schema: []- label: Free shipping- calculator:- line_items:- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- post:- summary: Create an action on a promotion- tags:- - Promotions- security:- - api_key: []- bearer_auth: []- description: |-- Adds a new action to a promotion. The `type` is the wire shorthand from `GET /promotion_actions/types` (e.g. `free_shipping`, `create_item_adjustments`). Fully-qualified Ruby class names are also accepted for backward compatibility.-- **Required scope:** `write_promotions` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const action = await client.promotions.actions.create('promo_UkLWZg9DAJ', {- type: 'free_shipping',- })- - lang: bash- label: Spree CLI- source: spree api post /promotions/{promotion_id}/promotion_actions -d '{"type":"free_shipping"}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '201':- description: action created- content:- application/json:- example:- id: pact_UkLWZg9DAJ- created_at: '2026-07-20T12:38:17.993Z'- updated_at: '2026-07-20T12:38:17.993Z'- type: free_shipping- promotion_id: promo_UkLWZg9DAJ- preferences: {}- preference_schema: []- label: Free shipping- calculator:- line_items:- '422':- description: unknown action type- content:- application/json:- example:- error:- code: unknown_promotion_action_type- message: Unknown type- requestBody:- content:- application/json:- schema:- type: object- properties:- type:- type: string- example: free_shipping- preferences:- type: object- additionalProperties: true- required:- - type- "/api/v3/admin/promotions/{promotion_id}/promotion_actions/{id}":- parameters:- - name: promotion_id- in: path- required: true- schema:- type: string- - name: id- in: path- required: true- schema:- type: string- delete:- summary: Delete an action from a promotion- tags:- - Promotions- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `write_promotions` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- await client.promotions.actions.delete('promo_UkLWZg9DAJ', 'promoact_k5nR8xLq')- - lang: bash- label: Spree CLI- source: spree api delete /promotions/{promotion_id}/promotion_actions/{id}- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '204':- description: action deleted- "/api/v3/admin/promotions/{promotion_id}/promotion_rules":- parameters:- - name: promotion_id- in: path- required: true- schema:- type: string- get:- summary: List rules for a promotion- tags:- - Promotions- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `read_promotions` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const { data: rules } = await client.promotions.rules.list('promo_UkLWZg9DAJ')- - lang: bash- label: Spree CLI- source: spree api get /promotions/{promotion_id}/promotion_rules- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: rules found- content:- application/json:- example:- data:- - id: prorule_UkLWZg9DAJ- created_at: '2026-07-20T12:38:18.520Z'- updated_at: '2026-07-20T12:38:18.520Z'- type: currency- promotion_id: promo_UkLWZg9DAJ- preferences:- currency: USD- preference_schema:- - key: currency- type: string- default:- label: Currency- product_ids:- category_ids:- customer_ids:- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- post:- summary: Create a rule on a promotion- tags:- - Promotions- security:- - api_key: []- bearer_auth: []- description: |-- Adds a new rule to a promotion. The `type` is the wire shorthand from `GET /promotion_rules/types` (e.g. `currency`, `item_total`, `product`). Fully-qualified Ruby class names are also accepted for backward compatibility.-- **Required scope:** `write_promotions` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const rule = await client.promotions.rules.create('promo_UkLWZg9DAJ', {- type: 'currency',- preferences: { currency: 'EUR' },- })- - lang: bash- label: Spree CLI- source: spree api post /promotions/{promotion_id}/promotion_rules -d '{"type":"currency","preferences":{"currency":"EUR"}}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '201':- description: rule created with preferences- content:- application/json:- example:- id: prorule_UkLWZg9DAJ- created_at: '2026-07-20T12:38:19.039Z'- updated_at: '2026-07-20T12:38:19.039Z'- type: currency- promotion_id: promo_UkLWZg9DAJ- preferences:- currency: EUR- preference_schema:- - key: currency- type: string- default:- label: Currency- product_ids:- category_ids:- customer_ids:- '422':- description: unknown rule type- content:- application/json:- example:- error:- code: unknown_promotion_rule_type- message: Unknown type- requestBody:- content:- application/json:- schema:- type: object- properties:- type:- type: string- example: currency- preferences:- type: object- additionalProperties: true- required:- - type- "/api/v3/admin/promotions/{promotion_id}/promotion_rules/{id}":- parameters:- - name: promotion_id- in: path- required: true- schema:- type: string- - name: id- in: path- required: true- schema:- type: string- patch:- summary: Update a rule's preferences- tags:- - Promotions- security:- - api_key: []- bearer_auth: []- description: "**Required scope:** `write_promotions` (for API-key authentication)."- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const rule = await client.promotions.rules.update('promo_UkLWZg9DAJ', 'promorule_k5nR8xLq', {- preferences: { currency: 'USD' },- })- - lang: bash- label: Spree CLI- source: spree api patch /promotions/{promotion_id}/promotion_rules/{id} -d- '{"preferences":{"currency":"USD"}}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- schema:- type: string- responses:- '200':- description: rule updated+ id: imp_gbHJdmfrXB- number: IM496212618++ number: IM864139435+ rows_count: 0- created_at: '2026-07-26T14:24:44.607Z'- updated_at: '2026-07-26T14:24:44.656Z'++ created_at: '2026-07-27T08:33:21.268Z'++ updated_at: '2026-07-27T08:33:21.304Z'+ type: products+ status: mapping+ owner_type: store+ owner_id: store_UkLWZg9DAJ+ user_id: admin_UkLWZg9DAJ+ processing_errors:+ preferred_delimiter: ","+ original_filename: import.csv+ original_byte_size: 44+ original_file_url: "/api/v3/admin/imports/imp_gbHJdmfrXB/download"+ completed_rows_count: 0+ failed_rows_count: 0+ schema_fields:+ - name: slug+ label: Slug+ required: true+ - name: sku+ label: SKU+ required: true+ - name: name+ label: Name+ required: true+ - name: price+ label: Price+ required: true+ - name: status+ label: Status+ required: false+ - name: description+ label: Description+ required: false+ - name: meta_title+ label: Meta Title+ required: false+ - name: meta_description+ label: Meta Description+ required: false+ - name: meta_keywords+ label: Meta Keywords+ required: false+ - name: tags+ label: Tags+ required: false+ - name: compare_at_price+ label: Compare at Price+ required: false+ - name: currency+ label: Currency+ required: false+ - name: width+ label: Width+ required: false+ - name: height+ label: Height+ required: false+ - name: depth+ label: Depth+ required: false+ - name: dimensions_unit+ label: Dimensions Unit+ required: false+ - name: weight+ label: Weight+ required: false+ - name: weight_unit+ label: Weight Unit+ required: false+ - name: available_on+ label: Available On+ required: false+ - name: discontinue_on+ label: Discontinue On+ required: false+ - name: track_inventory+ label: Track Inventory+ required: false+ - name: inventory_count+ label: Inventory Count+ required: false+ - name: inventory_backorderable+ label: Inventory Backorderable+ required: false+ - name: tax_category+ label: Tax Category+ required: false+ - name: shipping_category+ label: Shipping Category+ required: false+ - name: image1_src+ label: Image 1 URL+ required: false+ - name: image2_src+ label: Image 2 URL+ required: false+ - name: image3_src+ label: Image 3 URL+ required: false+ - name: option1_name+ label: Option 1 Name+ required: false+ - name: option1_value+ label: Option 1 Value+ required: false+ - name: option2_name+ label: Option 2 Name+ required: false+ - name: option2_value+ label: Option 2 Value+ required: false+ - name: option3_name+ label: Option 3 Name+ required: false+ - name: option3_value+ label: Option 3 Value+ required: false+ - name: category1+ label: Category 1+ required: false+ - name: category2+ label: Category 2+ required: false+ - name: category3+ label: Category 3+ required: false+ csv_headers:+ - slug+ - sku+ - name+ - price+ sample_row:+ slug: widget+ sku: W-1+ name: Widget+ price: '10.00'+ mappings:+ - id: immap_UkLWZg9DAJ+ schema_field: slug+ file_column: slug+ required: true+ - id: immap_gbHJdmfrXB+ schema_field: sku+ file_column: sku+ required: true+ - id: immap_EfhxLZ9ck8+ schema_field: name+ file_column: name+ required: true+ - id: immap_VqXmZF31wY+ schema_field: price+ file_column: price+ required: true+ - id: immap_uw2YK1rnl0+ schema_field: status+ file_column:+ required: false+ - id: immap_OIJLhNcSbf+ schema_field: description+ file_column:+ required: false+ - id: immap_AXs1igzRC6+ schema_field: meta_title+ file_column:+ required: false+ - id: immap_p6klVeMgbn+ schema_field: meta_description+ file_column:+ required: false+ - id: immap_nJqfPa3Cpe+ schema_field: meta_keywords+ file_column:+ required: false+ - id: immap_98FqgRua4h+ schema_field: tags+ file_column:+ required: false+ - id: immap_xhoCpeNMWu+ schema_field: compare_at_price+ file_column:+ required: false+ - id: immap_vEmzDoNU0H+ schema_field: currency+ file_column:+ required: false+ - id: immap_2KY5XM6frI+ schema_field: width+ file_column:+ required: false+ - id: immap_HOVtlDrOmL+ schema_field: height+ file_column:+ required: false+ - id: immap_ed6l8wVqSM+ schema_field: depth+ file_column:+ required: false+ - id: immap_s18jaGonyx+ schema_field: dimensions_unit+ file_column:+ required: false+ - id: immap_GZUcnUYI5A+ schema_field: weight+ file_column:+ required: false+ - id: immap_ROeNhrwyV9+ schema_field: weight_unit+ file_column:+ required: false+ - id: immap_L3pHOn63Vw+ schema_field: available_on+ file_column:+ required: false+ - id: immap_PQNMcnNFWw+ schema_field: discontinue_on+ file_column:+ required: false+ - id: immap_C9SrJgpzQ4+ schema_field: track_inventory+ file_column:+ required: false+ - id: immap_YHETxCGlb0+ schema_field: inventory_count+ file_column:+ required: false+ - id: immap_5OQZnCRf8J+ schema_field: inventory_backorderable+ file_column:+ required: false+ - id: immap_F0GX8NaP3Y+ schema_field: tax_category+ file_column:+ required: false+ - id: immap_kOKT9MVfb0+ schema_field: shipping_category+ file_column:+ required: false+ - id: immap_3uWpPTcf5W+ schema_field: image1_src+ file_column:+ required: false+ - id: immap_D6Psx31WaT+ schema_field: image2_src+ file_column:+ required: false+ - id: immap_msx3nOJap6+ schema_field: image3_src+ file_column:+ required: false+ - id: immap_5CQZnCRf8J+ schema_field: option1_name+ file_column:+ required: false+ - id: immap_M2nyloHRUQ+ schema_field: option1_value+ file_column:+ required: false+ - id: immap_prklVeMgbn+ schema_field: option2_name+ file_column:+ required: false+ - id: immap_so8jaGonyx+ schema_field: option2_value+ file_column:+ required: false+ - id: immap_rsClYtECFI+ schema_field: option3_name+ file_column:+ required: false+ - id: immap_8DR0I7fEbw+ schema_field: option3_value+ file_column:+ required: false+ - id: immap_aAtNvLSUAr+ schema_field: category1+ file_column:+ required: false+ - id: immap_QiA48cIW7A+ schema_field: category2+ file_column:+ required: false+ - id: immap_QDA48cIW7A+ schema_field: category3+ file_column:+ required: false+ '422':+ description: unknown import typecontent:application/json:example:@@@ -14268,113 -8164,25 +8200,57 @@@type: stringresponses:'200':- description: promotions found+ description: CSV templatecontent:- application/json:- example:- data:- - id: promo_UkLWZg9DAJ- name: Summer Sale- description:- code: summer- starts_at: '2026-07-20T12:38:19.942Z'- expires_at:- usage_limit:- match_policy: all- path:- kind: coupon_code- multi_codes: false- number_of_codes:- code_prefix:- promotion_category_id:- metadata: {}- created_at: '2026-07-20T12:38:19.943Z'- updated_at: '2026-07-20T12:38:19.943Z'- action_ids: []- rule_ids: []- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- post:- summary: Create a promotion+ application/json: {}+ text/csv:+ schema:+ type: string+ format: binary++ "/api/v3/admin/imports/example":++ get:++ summary: Download an example import file+ tags:- - Promotions++ - Imports+ security:+ - api_key: []+ bearer_auth: []+ description: |-- Creates a new promotion. `code` is required for single-code coupon promotions;- pass `multi_codes: true` with `number_of_codes` to auto-generate a batch.-- Rules and actions can be created in the same request by passing arrays of- `{ type, preferences, ... }` rows. The server reconciles to the desired set:- new rows are built, existing rows (by `id`) are updated, omitted rows are removed.--- **Required scope:** `write_promotions` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- // Single coupon code, no rules/actions- const promotion = await client.promotions.create({- name: 'Black Friday',- code: 'BLACKFRIDAY',- starts_at: '2026-11-29T00:00:00Z',- expires_at: '2026-12-01T00:00:00Z',- })++ Redirects to a populated example CSV for the given import type — the same sample data `rake spree:load_sample_data` uses, pinned to the installed Spree version. Returns 404 for a type that ships no example file.+- // One-shot: promotion + rules + actions in a single request- const blackFriday = await client.promotions.create({- name: 'Black Friday',- code: 'BLACKFRIDAY',- kind: 'coupon_code',- starts_at: '2026-11-29T00:00:00Z',- expires_at: '2026-12-01T00:00:00Z',- match_policy: 'all',- rules: [- {- type: 'currency',- preferences: { currency: 'USD' },- },- {- type: 'item_total',- preferences: { amount_min: 100, operator_min: 'gte' },- },- {- type: 'product',- preferences: { match_policy: 'any' },- product_ids: ['prod_abc123', 'prod_def456'],- },- ],- actions: [- {- type: 'create_item_adjustments',- calculator: {- type: 'percent_on_line_item',- preferences: { percent: 25 },- },- },- { type: 'free_shipping' },- ],- })- - lang: bash- label: Spree CLI- source: spree api post /promotions -d '{"name":"Black Friday","code":"BLACKFRIDAY","starts_at":"2026-11-29T00:00:00Z","expires_at":"2026-12-01T00:00:00Z"}'++ **Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).++ parameters:++ - name: x-spree-api-key++ in: header++ required: true++ schema:++ type: string++ - name: Authorization++ in: header++ required: true++ schema:++ type: string++ - name: type++ in: query++ required: true++ description: Registered import type, e.g. products.++ schema:++ type: string++ responses:++ '302':++ description: Redirect to the example CSV+ "/api/v3/admin/imports/{id}":+ get:+ summary: Show an import+ tags:+ - Imports+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns import status and row counters. The admin dashboard polls this endpoint while `status` is `completed_mapping` or `processing`; `rows_count`, `completed_rows_count` and `failed_rows_count` drive the progress bar. The mapping payload (`csv_headers`, `sample_row`) is only present while `status` is `mapping`.++ **Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).parameters:- name: x-spree-api-keyin: header@@@ -14421,114 -8205,142 +8273,142 @@@content:application/json:example:- error:- code: validation_error- message: Name can't be blank and Code can't be blank- details:- name:- - can't be blank- code:- - can't be blank- requestBody:- content:- application/json:- schema:- type: object- properties:- name:- type: string- code:- type: string- nullable: true- description:- type: string- nullable: true- starts_at:- type: string- format: date-time- nullable: true- expires_at:- type: string- format: date-time- nullable: true- usage_limit:- type: integer- nullable: true- match_policy:- type: string- enum:- - all- - any- kind:- type: string- enum:- - coupon_code- - automatic- multi_codes:- type: boolean- number_of_codes:- type: integer- nullable: true- code_prefix:- type: string- nullable: true- promotion_category_id:- type: string- nullable: true- rules:- type: array- items:- type: object- properties:- type:- type: string- example: currency- preferences:- type: object- additionalProperties: true- product_ids:- type: array- items:- type: string- category_ids:- type: array- items:- type: string- customer_ids:- type: array- items:- type: string- required:- - type- actions:- type: array- items:- type: object- properties:- type:- type: string- example: free_shipping- preferences:- type: object- additionalProperties: true- calculator:- type: object- properties:- type:- type: string- example: flat_percent_item_total- preferences:- type: object- additionalProperties: true- required:- - type- required:- - name- "/api/v3/admin/promotions/{id}":- get:- summary: Show a promotion+ id: imp_UkLWZg9DAJ- number: IM878940201++ number: IM818284913+ rows_count: 0- created_at: '2026-07-26T14:24:45.863Z'- updated_at: '2026-07-26T14:24:45.871Z'++ created_at: '2026-07-27T08:33:22.380Z'++ updated_at: '2026-07-27T08:33:22.386Z'+ type: products+ status: pending+ owner_type: store+ owner_id: store_UkLWZg9DAJ+ user_id: admin_UkLWZg9DAJ+ processing_errors:+ preferred_delimiter: ","+ original_filename: products_import.csv+ original_byte_size: 3612+ original_file_url: "/api/v3/admin/imports/imp_UkLWZg9DAJ/download"+ completed_rows_count: 0+ failed_rows_count: 0+ schema_fields:+ - name: slug+ label: Slug+ required: true+ - name: sku+ label: SKU+ required: true+ - name: name+ label: Name+ required: true+ - name: price+ label: Price+ required: true+ - name: status+ label: Status+ required: false+ - name: description+ label: Description+ required: false+ - name: meta_title+ label: Meta Title+ required: false+ - name: meta_description+ label: Meta Description+ required: false+ - name: meta_keywords+ label: Meta Keywords+ required: false+ - name: tags+ label: Tags+ required: false+ - name: compare_at_price+ label: Compare at Price+ required: false+ - name: currency+ label: Currency+ required: false+ - name: width+ label: Width+ required: false+ - name: height+ label: Height+ required: false+ - name: depth+ label: Depth+ required: false+ - name: dimensions_unit+ label: Dimensions Unit+ required: false+ - name: weight+ label: Weight+ required: false+ - name: weight_unit+ label: Weight Unit+ required: false+ - name: available_on+ label: Available On+ required: false+ - name: discontinue_on+ label: Discontinue On+ required: false+ - name: track_inventory+ label: Track Inventory+ required: false+ - name: inventory_count+ label: Inventory Count+ required: false+ - name: inventory_backorderable+ label: Inventory Backorderable+ required: false+ - name: tax_category+ label: Tax Category+ required: false+ - name: shipping_category+ label: Shipping Category+ required: false+ - name: image1_src+ label: Image 1 URL+ required: false+ - name: image2_src+ label: Image 2 URL+ required: false+ - name: image3_src+ label: Image 3 URL+ required: false+ - name: option1_name+ label: Option 1 Name+ required: false+ - name: option1_value+ label: Option 1 Value+ required: false+ - name: option2_name+ label: Option 2 Name+ required: false+ - name: option2_value+ label: Option 2 Value+ required: false+ - name: option3_name+ label: Option 3 Name+ required: false+ - name: option3_value+ label: Option 3 Value+ required: false+ - name: category1+ label: Category 1+ required: false+ - name: category2+ label: Category 2+ required: false+ - name: category3+ label: Category 3+ required: false+ csv_headers: []+ sample_row: {}+ mappings: []+ delete:+ summary: Delete an importtags:- - Promotions+ - Importssecurity:- api_key: []bearer_auth: []@@@ -14679,122 -8442,313 +8510,313 @@@content:application/json:example:- id: promo_UkLWZg9DAJ- name: Summer Sale- description:- code: summer- starts_at: '2026-07-20T12:38:21.937Z'- expires_at:- usage_limit:- match_policy: all- path:- kind: coupon_code- multi_codes: false- number_of_codes:- code_prefix:- promotion_category_id:- metadata: {}- created_at: '2026-07-20T12:38:21.937Z'- updated_at: '2026-07-20T12:38:22.202Z'- action_ids: []- rule_ids: []+ id: imp_gbHJdmfrXB- number: IM172282853++ number: IM805703945+ rows_count: 0- created_at: '2026-07-26T14:24:46.825Z'- updated_at: '2026-07-26T14:24:46.906Z'++ created_at: '2026-07-27T08:33:23.195Z'++ updated_at: '2026-07-27T08:33:23.275Z'+ type: products+ status: completed_mapping+ owner_type: store+ owner_id: store_UkLWZg9DAJ+ user_id: admin_UkLWZg9DAJ+ processing_errors:+ preferred_delimiter: ","+ original_filename: products_import.csv+ original_byte_size: 3612+ original_file_url: "/api/v3/admin/imports/imp_gbHJdmfrXB/download"+ completed_rows_count: 0+ failed_rows_count: 0+ schema_fields:+ - name: slug+ label: Slug+ required: true+ - name: sku+ label: SKU+ required: true+ - name: name+ label: Name+ required: true+ - name: price+ label: Price+ required: true+ - name: status+ label: Status+ required: false+ - name: description+ label: Description+ required: false+ - name: meta_title+ label: Meta Title+ required: false+ - name: meta_description+ label: Meta Description+ required: false+ - name: meta_keywords+ label: Meta Keywords+ required: false+ - name: tags+ label: Tags+ required: false+ - name: compare_at_price+ label: Compare at Price+ required: false+ - name: currency+ label: Currency+ required: false+ - name: width+ label: Width+ required: false+ - name: height+ label: Height+ required: false+ - name: depth+ label: Depth+ required: false+ - name: dimensions_unit+ label: Dimensions Unit+ required: false+ - name: weight+ label: Weight+ required: false+ - name: weight_unit+ label: Weight Unit+ required: false+ - name: available_on+ label: Available On+ required: false+ - name: discontinue_on+ label: Discontinue On+ required: false+ - name: track_inventory+ label: Track Inventory+ required: false+ - name: inventory_count+ label: Inventory Count+ required: false+ - name: inventory_backorderable+ label: Inventory Backorderable+ required: false+ - name: tax_category+ label: Tax Category+ required: false+ - name: shipping_category+ label: Shipping Category+ required: false+ - name: image1_src+ label: Image 1 URL+ required: false+ - name: image2_src+ label: Image 2 URL+ required: false+ - name: image3_src+ label: Image 3 URL+ required: false+ - name: option1_name+ label: Option 1 Name+ required: false+ - name: option1_value+ label: Option 1 Value+ required: false+ - name: option2_name+ label: Option 2 Name+ required: false+ - name: option2_value+ label: Option 2 Value+ required: false+ - name: option3_name+ label: Option 3 Name+ required: false+ - name: option3_value+ label: Option 3 Value+ required: false+ - name: category1+ label: Category 1+ required: false+ - name: category2+ label: Category 2+ required: false+ - name: category3+ label: Category 3+ required: false+ csv_headers: []+ sample_row: {}+ mappings:+ - id: immap_UkLWZg9DAJ+ schema_field: slug+ file_column: slug+ required: true+ - id: immap_gbHJdmfrXB+ schema_field: sku+ file_column: sku+ required: true+ - id: immap_EfhxLZ9ck8+ schema_field: name+ file_column: name+ required: true+ - id: immap_VqXmZF31wY+ schema_field: price+ file_column: price+ required: true+ - id: immap_uw2YK1rnl0+ schema_field: status+ file_column: status+ required: false+ - id: immap_OIJLhNcSbf+ schema_field: description+ file_column: description+ required: false+ - id: immap_AXs1igzRC6+ schema_field: meta_title+ file_column: meta_title+ required: false+ - id: immap_p6klVeMgbn+ schema_field: meta_description+ file_column: meta_description+ required: false+ - id: immap_nJqfPa3Cpe+ schema_field: meta_keywords+ file_column: meta_keywords+ required: false+ - id: immap_98FqgRua4h+ schema_field: tags+ file_column: tags+ required: false+ - id: immap_xhoCpeNMWu+ schema_field: compare_at_price+ file_column: compare_at_price+ required: false+ - id: immap_vEmzDoNU0H+ schema_field: currency+ file_column: currency+ required: false+ - id: immap_2KY5XM6frI+ schema_field: width+ file_column: width+ required: false+ - id: immap_HOVtlDrOmL+ schema_field: height+ file_column: height+ required: false+ - id: immap_ed6l8wVqSM+ schema_field: depth+ file_column: depth+ required: false+ - id: immap_s18jaGonyx+ schema_field: dimensions_unit+ file_column: dimensions_unit+ required: false+ - id: immap_GZUcnUYI5A+ schema_field: weight+ file_column: weight+ required: false+ - id: immap_ROeNhrwyV9+ schema_field: weight_unit+ file_column: weight_unit+ required: false+ - id: immap_L3pHOn63Vw+ schema_field: available_on+ file_column: available_on+ required: false+ - id: immap_PQNMcnNFWw+ schema_field: discontinue_on+ file_column: discontinue_on+ required: false+ - id: immap_C9SrJgpzQ4+ schema_field: track_inventory+ file_column: track_inventory+ required: false+ - id: immap_YHETxCGlb0+ schema_field: inventory_count+ file_column: inventory_count+ required: false+ - id: immap_5OQZnCRf8J+ schema_field: inventory_backorderable+ file_column: inventory_backorderable+ required: false+ - id: immap_F0GX8NaP3Y+ schema_field: tax_category+ file_column: tax_category+ required: false+ - id: immap_kOKT9MVfb0+ schema_field: shipping_category+ file_column:+ required: false+ - id: immap_3uWpPTcf5W+ schema_field: image1_src+ file_column: image1_src+ required: false+ - id: immap_D6Psx31WaT+ schema_field: image2_src+ file_column: image2_src+ required: false+ - id: immap_msx3nOJap6+ schema_field: image3_src+ file_column: image3_src+ required: false+ - id: immap_5CQZnCRf8J+ schema_field: option1_name+ file_column: option1_name+ required: false+ - id: immap_M2nyloHRUQ+ schema_field: option1_value+ file_column: option1_value+ required: false+ - id: immap_prklVeMgbn+ schema_field: option2_name+ file_column: option2_name+ required: false+ - id: immap_so8jaGonyx+ schema_field: option2_value+ file_column: option2_value+ required: false+ - id: immap_rsClYtECFI+ schema_field: option3_name+ file_column: option3_name+ required: false+ - id: immap_8DR0I7fEbw+ schema_field: option3_value+ file_column: option3_value+ required: false+ - id: immap_aAtNvLSUAr+ schema_field: category1+ file_column: category1+ required: false+ - id: immap_QiA48cIW7A+ schema_field: category2+ file_column: category2+ required: false+ - id: immap_QDA48cIW7A+ schema_field: category3+ file_column: category3+ required: falserequestBody:content:- application/json:- schema:- type: object- properties:- name:- type: string- description:- type: string- nullable: true- code:- type: string- nullable: true- starts_at:- type: string- format: date-time- nullable: true- expires_at:- type: string- format: date-time- nullable: true- usage_limit:- type: integer- nullable: true- match_policy:- type: string- enum:- - all- - any- kind:- type: string- enum:- - coupon_code- - automatic- promotion_category_id:- type: string- nullable: true- rules:+ application/json:+ schema:+ type: object+ properties:+ mappings:type: array+ description: 'Column assignments to apply before starting. `file_column:+ null` unmaps a field.'items:type: object- properties:- id:- type: string- nullable: true- description: Pass to update an existing rule; omit to build- a new one- type:- type: string- example: currency- preferences:- type: object- additionalProperties: true- product_ids:- type: array- items:- type: string- category_ids:- type: array- items:- type: string- customer_ids:- type: array- items:- type: stringrequired:- - type- actions:- type: array- items:- type: object+ - schema_fieldproperties:- id:+ schema_field:type: string- nullable: true- type:+ example: slug+ file_column:type: string- example: free_shipping- preferences:- type: object- additionalProperties: true- calculator:- type: object- properties:- type:- type: string- example: flat_percent_item_total- preferences:- type: object- additionalProperties: true- required:- - type- delete:- summary: Delete a promotion+ nullable: true+ example: Product Handle+ "/api/v3/admin/imports/{id}/retry_failed_rows":+ patch:+ summary: Retry failed rowstags:- - Promotions+ - Importssecurity:- api_key: []bearer_auth: []@@@ -14831,13 -8773,212 +8841,212 @@@schema:type: stringresponses:- '204':- description: promotion deleted- "/api/v3/admin/promotion_actions/types":+ '200':+ description: retry queued+ content:+ application/json:+ example:+ id: imp_gbHJdmfrXB- number: IM686695634++ number: IM133434493+ rows_count: 1- created_at: '2026-07-26T14:24:47.208Z'- updated_at: '2026-07-26T14:24:47.231Z'++ created_at: '2026-07-27T08:33:23.540Z'++ updated_at: '2026-07-27T08:33:23.564Z'+ type: products+ status: processing+ owner_type: store+ owner_id: store_UkLWZg9DAJ+ user_id: admin_UkLWZg9DAJ+ processing_errors:+ preferred_delimiter: ","+ original_filename: products_import.csv+ original_byte_size: 3612+ original_file_url: "/api/v3/admin/imports/imp_gbHJdmfrXB/download"+ completed_rows_count: 0+ failed_rows_count: 1+ schema_fields:+ - name: slug+ label: Slug+ required: true+ - name: sku+ label: SKU+ required: true+ - name: name+ label: Name+ required: true+ - name: price+ label: Price+ required: true+ - name: status+ label: Status+ required: false+ - name: description+ label: Description+ required: false+ - name: meta_title+ label: Meta Title+ required: false+ - name: meta_description+ label: Meta Description+ required: false+ - name: meta_keywords+ label: Meta Keywords+ required: false+ - name: tags+ label: Tags+ required: false+ - name: compare_at_price+ label: Compare at Price+ required: false+ - name: currency+ label: Currency+ required: false+ - name: width+ label: Width+ required: false+ - name: height+ label: Height+ required: false+ - name: depth+ label: Depth+ required: false+ - name: dimensions_unit+ label: Dimensions Unit+ required: false+ - name: weight+ label: Weight+ required: false+ - name: weight_unit+ label: Weight Unit+ required: false+ - name: available_on+ label: Available On+ required: false+ - name: discontinue_on+ label: Discontinue On+ required: false+ - name: track_inventory+ label: Track Inventory+ required: false+ - name: inventory_count+ label: Inventory Count+ required: false+ - name: inventory_backorderable+ label: Inventory Backorderable+ required: false+ - name: tax_category+ label: Tax Category+ required: false+ - name: shipping_category+ label: Shipping Category+ required: false+ - name: image1_src+ label: Image 1 URL+ required: false+ - name: image2_src+ label: Image 2 URL+ required: false+ - name: image3_src+ label: Image 3 URL+ required: false+ - name: option1_name+ label: Option 1 Name+ required: false+ - name: option1_value+ label: Option 1 Value+ required: false+ - name: option2_name+ label: Option 2 Name+ required: false+ - name: option2_value+ label: Option 2 Value+ required: false+ - name: option3_name+ label: Option 3 Name+ required: false+ - name: option3_value+ label: Option 3 Value+ required: false+ - name: category1+ label: Category 1+ required: false+ - name: category2+ label: Category 2+ required: false+ - name: category3+ label: Category 3+ required: false+ csv_headers: []+ sample_row: {}+ mappings: []+ "/api/v3/admin/imports/{import_id}/rows":+ get:+ summary: List import rows+ tags:+ - Imports+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Paginated rows of an import — the failure report. Filter with `q[status_eq]=failed` to list only rows that could not be imported; each row carries the raw CSV `data` and its `validation_errors`.++ **Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ - name: import_id+ in: path+ required: true+ schema:+ type: string+ - name: q[status_eq]+ in: query+ required: false+ description: 'Filter rows by status: pending, processing, completed, failed.'+ schema:+ type: string+ responses:+ '200':+ description: rows found+ content:+ application/json:+ example:+ data:+ - id: imrow_gbHJdmfrXB+ row_number: 2+ status: failed+ validation_errors: boom- created_at: '2026-07-26T14:24:47.522Z'- updated_at: '2026-07-26T14:24:47.522Z'++ created_at: '2026-07-27T08:33:23.823Z'++ updated_at: '2026-07-27T08:33:23.823Z'+ import_id: imp_UkLWZg9DAJ+ item_type:+ item_id:+ data:+ slug: test-product+ name: Test Product+ price: '10.00'+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ "/api/v3/admin/markets":get:- summary: List available promotion action types+ summary: List marketstags:- - Promotions+ - Marketssecurity:- api_key: []bearer_auth: []@@@ -14878,27 -9048,44 +9116,44 @@@application/json:example:data:- - type: create_line_items- label: Create line items- description:- preference_schema: []- - type: create_item_adjustments- label: Create per-line-item adjustment- description:- preference_schema: []- - type: create_adjustment- label: Create whole-order adjustment- description:- preference_schema: []- - type: free_shipping- label: Free shipping- description:- preference_schema: []- "/api/v3/admin/promotion_rules/types":- get:- summary: List available promotion rule types+ - id: mkt_UkLWZg9DAJ+ name: EU+ currency: USD+ default_locale: en+ tax_inclusive: false+ default: false+ country_isos:+ - DE+ supported_locales:+ - en- created_at: '2026-07-26T14:24:49.233Z'- updated_at: '2026-07-26T14:24:49.233Z'++ created_at: '2026-07-27T08:33:25.380Z'++ updated_at: '2026-07-27T08:33:25.380Z'+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/Market"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ required:+ - data+ - meta+ post:+ summary: Create a markettags:- - Promotions+ - Marketssecurity:- api_key: []bearer_auth: []@@@ -14938,109 -9141,103 +9209,103 @@@content:application/json:example:- data:- - type: category- label: Categories- description:- preference_schema:- - key: match_policy- type: string- default: any- - type: channel- label: Channel(s)- description:- preference_schema:- - key: channel_ids- type: array- default: []- - type: country- label: Country- description:- preference_schema:- - key: country_isos- type: array- default: []- - key: country_id- type: integer- default:- - key: country_iso- type: string- default:- - type: currency- label: Currency- description:- preference_schema:- - key: currency- type: string- default:- - type: customer_group- label: Customer Group(s)- description:- preference_schema:- - key: customer_group_ids- type: array- default: []- - type: customer- label: Customers- description:- preference_schema: []- - type: first_order- label: First order- description:- preference_schema: []- - type: item_total- label: Item total- description:- preference_schema:- - key: amount_min- type: decimal- default: 100.0- - key: operator_min- type: string- default: ">"- - key: amount_max- type: decimal- default:- - key: operator_max- type: string- default: "<"- - type: market- label: Market(s)- description:- preference_schema:- - key: market_ids- type: array- default: []- - type: one_use_per_user- label: One Use Per User- description:- preference_schema: []- - type: customer_logged_in- label: Only logged in customers- description:- preference_schema: []- - type: option_value- label: Option Value(s)- description:- preference_schema:- - key: match_policy+ id: mkt_gbHJdmfrXB+ name: France only+ currency: EUR+ default_locale: fr+ tax_inclusive: true+ default: false+ country_isos:+ - FR+ supported_locales:+ - en+ - fr- created_at: '2026-07-26T14:24:49.887Z'- updated_at: '2026-07-26T14:24:49.887Z'++ created_at: '2026-07-27T08:33:25.941Z'++ updated_at: '2026-07-27T08:33:25.941Z'+ schema:+ "$ref": "#/components/schemas/Market"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Name can't be blank, Currency can't be blank, Default locale+ can't be blank, and Countries can't be blank+ details:+ name:+ - can't be blank+ currency:+ - can't be blank+ default_locale:+ - can't be blank+ countries:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ example: Europe+ currency:+ type: string+ example: EUR+ description: ISO 4217 currency code.+ default_locale:+ type: string+ example: de+ description: IETF locale tag used as the market default.+ supported_locales:+ type: array+ items:type: string- default: any- - key: eligible_values- type: array- default: []- - type: product- label: Product(s)- description:- preference_schema:- - key: match_policy+ description: Locale codes available in this market. The default+ is always implicitly included.+ example:+ - de+ - en+ tax_inclusive:+ type: boolean+ default: false+ description: Display prices with tax included.+ default:+ type: boolean+ default: false+ description: Setting to true demotes the previous default.+ position:+ type: integer+ description: Sort order within the store; lower = first.+ country_isos:+ type: array+ items:type: string- default: any- "/api/v3/admin/orders/{order_id}/refunds":+ description: 2-letter ISO country codes assigned to this market.+ At least one is required.+ example:+ - DE+ - FR+ required:+ - name+ - currency+ - default_locale+ - country_isos+ "/api/v3/admin/markets/{id}":+ parameters:+ - name: id+ in: path+ required: true+ schema:+ type: stringget:- summary: List refunds+ summary: Get a markettags:- - Refunds+ - Marketssecurity:- api_key: []bearer_auth: []@@@ -15101,21 -9279,34 +9347,34 @@@content:application/json:example:- data: []- meta:- page: 1- limit: 25- count: 0- pages: 1- from: 0- to: 0- in: 0- previous:- next:- post:- summary: Create a refund+ id: mkt_UkLWZg9DAJ+ name: EU+ currency: USD+ default_locale: en+ tax_inclusive: false+ default: false+ country_isos:+ - DE+ supported_locales:+ - en- created_at: '2026-07-26T14:24:50.258Z'- updated_at: '2026-07-26T14:24:50.258Z'++ created_at: '2026-07-27T08:33:26.253Z'++ updated_at: '2026-07-27T08:33:26.253Z'+ schema:+ "$ref": "#/components/schemas/Market"+ '404':+ description: market not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Market not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ patch:+ summary: Update a markettags:- - Refunds+ - Marketssecurity:- api_key: []bearer_auth: []@@@ -15166,15 -9359,33 +9427,33 @@@content:application/json:example:- id: re_UkLWZg9DAJ- transaction_id: BGS-86b5abfc9394- amount: '5.0'- payment_id: py_UkLWZg9DAJ- refund_reason_id: rr_UkLWZg9DAJ- reimbursement_id:- metadata: {}- created_at: '2026-07-20T12:37:51.121Z'- updated_at: '2026-07-20T12:37:51.121Z'+ id: mkt_UkLWZg9DAJ+ name: European Union+ currency: USD+ default_locale: en+ tax_inclusive: true+ default: false+ country_isos:+ - DE+ supported_locales:+ - en- created_at: '2026-07-26T14:24:50.950Z'- updated_at: '2026-07-26T14:24:51.266Z'++ created_at: '2026-07-27T08:33:26.829Z'++ updated_at: '2026-07-27T08:33:27.090Z'+ schema:+ "$ref": "#/components/schemas/Market"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Name can't be blank+ details:+ name:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"requestBody:content:application/json:@@@ -15316,11 -9543,15 +9611,15 @@@application/json:example:data:- - id: sccat_UkLWZg9DAJ- name: Goodwill- created_at: '2026-07-20T12:38:25.441Z'- updated_at: '2026-07-20T12:38:25.441Z'- non_expiring: false+ - id: opt_UkLWZg9DAJ+ name: foo-size-1+ label: Size+ position: 1+ kind: dropdown+ metadata: {}+ filterable: true- created_at: '2026-07-26T14:24:52.945Z'- updated_at: '2026-07-26T14:24:52.945Z'++ created_at: '2026-07-27T08:33:28.518Z'++ updated_at: '2026-07-27T08:33:28.518Z'meta:page: 1limit: 25@@@ -15353,18 -9584,125 +9652,125 @@@message: Authentication requiredschema:"$ref": "#/components/schemas/ErrorResponse"- "/api/v3/admin/store_credit_categories/{id}":- parameters:- - name: id- in: path- required: true- description: Store credit category ID- schema:- type: string+ post:+ summary: Create an option type+ tags:+ - Option Types+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Creates a new option type. Supports nested option values.++ Option values can be provided inline and will be created or updated by name.+++ **Required scope:** `write_products` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const optionType = await client.optionTypes.create({+ name: 'color',+ label: 'Color',+ option_values: [+ { name: 'red', label: 'Red' },+ { name: 'navy', label: 'Navy' },+ ],+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /option_types -d '{"name":"color","label":"Color","option_values":[{"name":"red","label":"Red"},{"name":"navy","label":"Navy"}]}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '201':+ description: option type created+ content:+ application/json:+ example:+ id: opt_gbHJdmfrXB+ name: material+ label: Material+ position: 2+ kind: dropdown+ metadata: {}+ filterable: true- created_at: '2026-07-26T14:24:53.546Z'- updated_at: '2026-07-26T14:24:53.546Z'++ created_at: '2026-07-27T08:33:29.057Z'++ updated_at: '2026-07-27T08:33:29.057Z'+ schema:+ "$ref": "#/components/schemas/OptionType"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Name can't be blank and Presentation can't be blank+ details:+ name:+ - can't be blank+ presentation:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ example: color+ label:+ type: string+ example: Color+ position:+ type: integer+ example: 1+ filterable:+ type: boolean+ example: true+ option_values:+ type: array+ items:+ type: object+ properties:+ name:+ type: string+ example: red+ label:+ type: string+ example: Red+ position:+ type: integer+ required:+ - name+ - label+ "/api/v3/admin/option_types/{id}":get:- summary: Get a store credit category+ summary: Get an option typetags:- - Settings+ - Option Typessecurity:- api_key: []bearer_auth: []@@@ -15411,15 -9763,19 +9831,19 @@@content:application/json:example:- id: sccat_UkLWZg9DAJ- name: Goodwill- created_at: '2026-07-20T12:38:25.722Z'- updated_at: '2026-07-20T12:38:25.722Z'- non_expiring: false+ id: opt_UkLWZg9DAJ+ name: foo-size-5+ label: Size+ position: 1+ kind: dropdown+ metadata: {}+ filterable: true- created_at: '2026-07-26T14:24:53.848Z'- updated_at: '2026-07-26T14:24:53.848Z'++ created_at: '2026-07-27T08:33:29.328Z'++ updated_at: '2026-07-27T08:33:29.328Z'schema:- "$ref": "#/components/schemas/StoreCreditCategory"+ "$ref": "#/components/schemas/OptionType"'404':- description: store credit category not found+ description: option type not foundcontent:application/json:example:@@@ -15467,265 -9825,388 +9893,388 @@@description: Bearer token for admin authenticationschema:type: string+ - name: id+ in: path+ required: true+ description: Option type ID+ schema:+ type: stringresponses:'200':- description: current store+ description: option type updatedcontent:- application/json:- example:- id: store_UkLWZg9DAJ- metadata: {}- name: Spree Test Store- code: spree_1- preferred_storefront_url:- default_currency: USD- default_locale: en- mail_from_address: [email protected]- customer_support_email: [email protected]- new_order_notifications_email: [email protected]- preferred_send_consumer_transactional_emails: true- preferred_admin_locale:- preferred_timezone: UTC- preferred_weight_unit: lb- preferred_unit_system: imperial- preferred_storefront_access: public- preferred_guest_checkout: true- created_at: '2026-07-20T12:36:47.916Z'- updated_at: '2026-07-20T12:38:26.299Z'- url: http://www.example.com:3000- api_url: http://www.example.com:3000- setup_tasks:- - name: setup_payment_method- done: false- - name: add_products- done: false- - name: set_customer_support_email- done: true- - name: setup_taxes_collection- done: false- - name: setup_storefront- done: false- supported_currencies:- - USD- supported_locales:- - en- available_locales:- - aa- - ab- - ae- - af- - ak- - am- - an- - ar- - as- - av- - ay- - az- - ba- - be- - bg- - bh- - bi- - bm- - bn- - bo- - br- - bs- - ca- - ce- - ch- - co- - cr- - cs- - cu- - cv- - cy- - da- - de- - de-AT- - de-CH- - dv- - dz- - ee- - el- - en- - en-AU- - en-CA- - en-GB- - en-IN- - en-NZ- - eo- - es- - es-419- - es-MX- - et- - eu- - fa- - ff- - fi- - fj- - fo- - fr- - fr-CA- - fy- - ga- - gd- - gl- - gn- - gu- - gv- - ha- - he- - hi- - ho- - hr- - ht- - hu- - hy- - hz- - ia- - id- - ie- - ig- - ii- - ik- - io- - is- - it- - iu- - ja- - jv- - ka- - kg- - ki- - kj- - kk- - kl- - km- - kn- - ko- - kr- - ks- - ku- - kv- - kw- - ky- - la- - lb- - lg- - li- - ln- - lo- - lt- - lu- - lv- - mg- - mh- - mi- - mk- - ml- - mn- - mr- - ms- - mt- - my- - na- - nb- - nd- - ne- - ng- - nl- - nn- - 'no'- - nr- - nv- - ny- - oc- - oj- - om- - or- - os- - pa- - pi- - pl- - ps- - pt- - pt-BR- - pt-PT- - qu- - rm- - rn- - ro- - ru- - rw- - sa- - sc- - sd- - se- - sg- - si- - sk- - sl- - sm- - sn- - so- - sq- - sr- - ss- - st- - su- - sv- - sw- - ta- - te- - tg- - th- - ti- - tk- - tl- - tn- - to- - tr- - ts- - tt- - tw- - ty- - ug- - uk- - ur- - uz- - ve- - vi- - vo- - wa- - wo- - xh- - yi- - yo- - za- - zh-CN- - zh-HK- - zh-TW- - zu- logo_url:- mailer_logo_url:+ application/json:+ example:+ id: opt_UkLWZg9DAJ+ name: foo-size-7+ label: Updated Label+ position: 1+ kind: dropdown+ metadata: {}+ filterable: true- created_at: '2026-07-26T14:24:54.438Z'- updated_at: '2026-07-26T14:24:54.732Z'++ created_at: '2026-07-27T08:33:29.866Z'++ updated_at: '2026-07-27T08:33:30.125Z'schema:- "$ref": "#/components/schemas/Store"- '401':- description: unauthorized+ "$ref": "#/components/schemas/OptionType"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Presentation can't be blank+ details:+ presentation:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ example: color+ label:+ type: string+ example: Color+ position:+ type: integer+ example: 1+ filterable:+ type: boolean+ example: true+ option_values:+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ description: Existing option value ID to update+ name:+ type: string+ example: red+ label:+ type: string+ example: Red+ position:+ type: integer+ delete:+ summary: Delete an option type+ tags:+ - Option Types+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Deletes an option type.++ **Required scope:** `write_products` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.optionTypes.delete('ot_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api delete /option_types/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Option type ID+ schema:+ type: string+ responses:+ '204':+ description: option type deleted+ "/api/v3/admin/orders/{order_id}/gift_cards":+ post:+ summary: Apply a gift card to an order+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Applies a gift card by code to the order. Returns the gift card.++ **Required scope:** `write_gift_cards` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.orders.giftCards.apply('or_UkLWZg9DAJ', {+ code: 'GIFT-XXXX-YYYY',+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /orders/{order_id}/gift_cards -d '{"code":"GIFT-XXXX-YYYY"}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ responses:+ '201':+ description: gift card applied+ content:+ application/json:+ example:+ id: gc_UkLWZg9DAJ- code: 77FF9B748389EE1A++ code: 84C1CE3AC4794213+ status: active+ currency: USD+ amount: '10.0'+ amount_used: '10.0'+ amount_authorized: '0.0'+ amount_remaining: '0.0'+ display_amount: "$10.00"+ display_amount_used: "$10.00"+ display_amount_remaining: "$0.00"+ expires_at:+ redeemed_at:+ expired: false+ active: true- created_at: '2026-07-26T14:25:04.193Z'- updated_at: '2026-07-26T14:25:04.493Z'++ created_at: '2026-07-27T08:33:38.736Z'++ updated_at: '2026-07-27T08:33:39.013Z'+ customer_id:+ created_by_id:+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - code+ properties:+ code:+ type: string+ description: Gift card code+ example: GIFT-XXXX-YYYY+ "/api/v3/admin/orders/{order_id}/gift_cards/{id}":+ delete:+ summary: Remove a gift card from an order+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Removes the gift card from the order.++ **Required scope:** `write_gift_cards` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.orders.giftCards.remove('or_UkLWZg9DAJ', 'gc_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api delete /orders/{order_id}/gift_cards/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Gift card ID+ schema:+ type: string+ responses:+ '204':+ description: gift card removed+ "/api/v3/admin/orders/{order_id}/items":+ get:+ summary: List order items+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns all line items for an order.++ **Required scope:** `read_orders` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: items } = await client.orders.items.list('or_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api get /orders/{order_id}/items+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ - name: expand+ in: query+ required: false+ description: Comma-separated associations to expand (e.g., variant, variant.product).+ Use dot notation for nested expand (max 4 levels).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include (e.g., quantity,price,total).+ id is always included.+ schema:+ type: string+ responses:+ '200':+ description: items foundcontent:application/json:example:- error:- code: authentication_required- message: Authentication required- schema:- "$ref": "#/components/schemas/ErrorResponse"- patch:- summary: Update the current store+ data:+ - id: li_UkLWZg9DAJ+ variant_id: variant_gbHJdmfrXB+ preorder: false+ preorder_ships_at:+ quantity: 2+ currency: USD- name: Product 173705- slug: product-173705++ name: Product 215249++ slug: product-215249+ options_text: 'Size: S'+ price: '10.0'+ display_price: "$10.00"+ total: '20.0'+ display_total: "$20.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ pre_tax_amount: '20.0'+ display_pre_tax_amount: "$20.00"+ discounted_amount: '20.0'+ display_discounted_amount: "$20.00"+ display_compare_at_amount: "$0.00"+ compare_at_amount:+ thumbnail_url:+ option_values:+ - id: optval_UkLWZg9DAJ+ option_type_id: opt_UkLWZg9DAJ+ name: size-1+ label: S+ position: 1+ color_code:+ option_type_name: foo-size-10+ option_type_label: Size+ image_url:+ metadata: {}- created_at: '2026-07-26T14:25:05.225Z'- updated_at: '2026-07-26T14:25:05.225Z'++ created_at: '2026-07-27T08:33:39.652Z'++ updated_at: '2026-07-27T08:33:39.652Z'+ digital_links: []+ metadata: {}- created_at: '2026-07-26T14:25:05.513Z'- updated_at: '2026-07-26T14:25:05.513Z'++ created_at: '2026-07-27T08:33:39.940Z'++ updated_at: '2026-07-27T08:33:39.940Z'+ cost_price: '17.0'+ tax_category_id: taxcat_UkLWZg9DAJ+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ post:+ summary: Add an itemtags:- - Settings+ - Orderssecurity:- api_key: []bearer_auth: []@@@ -15749,7 -10231,119 +10299,119 @@@})- lang: bashlabel: Spree CLI- source: spree api patch /store -d '{"name":"My Store"}'+ source: spree api post /orders/{order_id}/items -d '{"variant_id":"variant_k5nR8xLq","quantity":2}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ responses:+ '201':+ description: item added+ content:+ application/json:+ example:+ id: li_gbHJdmfrXB+ variant_id: variant_VqXmZF31wY+ preorder: false+ preorder_ships_at:+ quantity: 3+ currency: USD- name: Product 191899- slug: product-191899++ name: Product 231707++ slug: product-231707+ options_text: 'Size: S'+ price: '19.99'+ display_price: "$19.99"+ total: '59.97'+ display_total: "$59.97"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ pre_tax_amount: '59.97'+ display_pre_tax_amount: "$59.97"+ discounted_amount: '59.97'+ display_discounted_amount: "$59.97"+ display_compare_at_amount: "$0.00"+ compare_at_amount:+ thumbnail_url:+ option_values:+ - id: optval_gbHJdmfrXB+ option_type_id: opt_gbHJdmfrXB+ name: size-3+ label: S+ position: 1+ color_code:+ option_type_name: foo-size-12+ option_type_label: Size+ image_url:+ metadata: {}- created_at: '2026-07-26T14:25:06.459Z'- updated_at: '2026-07-26T14:25:06.459Z'++ created_at: '2026-07-27T08:33:40.796Z'++ updated_at: '2026-07-27T08:33:40.796Z'+ digital_links: []+ metadata: {}- created_at: '2026-07-26T14:25:06.488Z'- updated_at: '2026-07-26T14:25:06.488Z'++ created_at: '2026-07-27T08:33:40.818Z'++ updated_at: '2026-07-27T08:33:40.818Z'+ cost_price: '17.0'+ tax_category_id: taxcat_UkLWZg9DAJ+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - variant_id+ properties:+ variant_id:+ type: string+ description: Prefixed variant ID+ quantity:+ type: integer+ default: 1+ "/api/v3/admin/orders/{order_id}/items/{id}":+ get:+ summary: Show an item+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns details of a specific line item.++ **Required scope:** `read_orders` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const item = await client.orders.items.get('or_UkLWZg9DAJ', 'li_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api get /orders/{order_id}/items/{id}parameters:- name: x-spree-api-keyin: header@@@ -15768,258 -10388,746 +10456,746 @@@content:application/json:example:- id: store_UkLWZg9DAJ- metadata: {}- name: Renamed Store- code: spree_1- preferred_storefront_url:- default_currency: USD- default_locale: en- mail_from_address: [email protected]- customer_support_email: [email protected]- new_order_notifications_email: [email protected]- preferred_send_consumer_transactional_emails: true- preferred_admin_locale:- preferred_timezone: UTC- preferred_weight_unit: lb- preferred_unit_system: imperial- preferred_storefront_access: public- preferred_guest_checkout: true- created_at: '2026-07-20T12:36:47.916Z'- updated_at: '2026-07-20T12:38:26.880Z'- url: http://www.example.com:3000- api_url: http://www.example.com:3000- setup_tasks:- - name: setup_payment_method- done: false- - name: add_products- done: false- - name: set_customer_support_email- done: true- - name: setup_taxes_collection- done: false- - name: setup_storefront- done: false- supported_currencies:- - USD- supported_locales:- - en- available_locales:- - aa- - ab- - ae- - af- - ak- - am- - an- - ar- - as- - av- - ay- - az- - ba- - be- - bg- - bh- - bi- - bm- - bn- - bo- - br- - bs- - ca- - ce- - ch- - co- - cr- - cs- - cu- - cv- - cy- - da- - de- - de-AT- - de-CH- - dv- - dz- - ee- - el- - en- - en-AU- - en-CA- - en-GB- - en-IN- - en-NZ- - eo- - es- - es-419- - es-MX- - et- - eu- - fa- - ff- - fi- - fj- - fo- - fr- - fr-CA- - fy- - ga- - gd- - gl- - gn- - gu- - gv- - ha- - he- - hi- - ho- - hr- - ht- - hu- - hy- - hz- - ia- - id- - ie- - ig- - ii- - ik- - io- - is- - it- - iu- - ja- - jv- - ka- - kg- - ki- - kj- - kk- - kl- - km- - kn- - ko- - kr- - ks- - ku- - kv- - kw- - ky- - la- - lb- - lg- - li- - ln- - lo- - lt- - lu- - lv- - mg- - mh- - mi- - mk- - ml- - mn- - mr- - ms- - mt- - my- - na- - nb- - nd- - ne- - ng- - nl- - nn- - 'no'- - nr- - nv- - ny- - oc- - oj- - om- - or- - os- - pa- - pi- - pl- - ps- - pt- - pt-BR- - pt-PT- - qu- - rm- - rn- - ro- - ru- - rw- - sa- - sc- - sd- - se- - sg- - si- - sk- - sl- - sm- - sn- - so- - sq- - sr- - ss- - st- - su- - sv- - sw- - ta- - te- - tg- - th- - ti- - tk- - tl- - tn- - to- - tr- - ts- - tt- - tw- - ty- - ug- - uk- - ur- - uz- - ve- - vi- - vo- - wa- - wo- - xh- - yi- - yo- - za- - zh-CN- - zh-HK- - zh-TW- - zu- logo_url:- mailer_logo_url:- schema:- "$ref": "#/components/schemas/Store"- '422':- description: validation error+ id: li_UkLWZg9DAJ+ variant_id: variant_gbHJdmfrXB+ preorder: false+ preorder_ships_at:+ quantity: 2+ currency: USD- name: Product 201539- slug: product-201539++ name: Product 243142++ slug: product-243142+ options_text: 'Size: S'+ price: '10.0'+ display_price: "$10.00"+ total: '20.0'+ display_total: "$20.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ pre_tax_amount: '20.0'+ display_pre_tax_amount: "$20.00"+ discounted_amount: '20.0'+ display_discounted_amount: "$20.00"+ display_compare_at_amount: "$0.00"+ compare_at_amount:+ thumbnail_url:+ option_values:+ - id: optval_UkLWZg9DAJ+ option_type_id: opt_UkLWZg9DAJ+ name: size-4+ label: S+ position: 1+ color_code:+ option_type_name: foo-size-13+ option_type_label: Size+ image_url:+ metadata: {}- created_at: '2026-07-26T14:25:06.585Z'- updated_at: '2026-07-26T14:25:06.585Z'++ created_at: '2026-07-27T08:33:40.914Z'++ updated_at: '2026-07-27T08:33:40.914Z'+ digital_links: []+ metadata: {}- created_at: '2026-07-26T14:25:06.871Z'- updated_at: '2026-07-26T14:25:06.871Z'++ created_at: '2026-07-27T08:33:41.172Z'++ updated_at: '2026-07-27T08:33:41.172Z'+ cost_price: '17.0'+ tax_category_id: taxcat_UkLWZg9DAJ+ patch:+ summary: Update an item+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Updates an order item quantity or metadata.++ **Required scope:** `write_orders` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const item = await client.orders.items.update('or_UkLWZg9DAJ', 'li_UkLWZg9DAJ', {+ quantity: 5,+ })+ - lang: bash+ label: Spree CLI+ source: spree api patch /orders/{order_id}/items/{id} -d '{"quantity":5}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Item ID+ schema:+ type: string+ responses:+ '200':+ description: item updated+ content:+ application/json:+ example:+ id: li_UkLWZg9DAJ+ variant_id: variant_gbHJdmfrXB+ preorder: false+ preorder_ships_at:+ quantity: 5+ currency: USD- name: Product 213585- slug: product-213585++ name: Product 258060++ slug: product-258060+ options_text: 'Size: S'+ price: '19.99'+ display_price: "$19.99"+ total: '99.95'+ display_total: "$99.95"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ pre_tax_amount: '99.95'+ display_pre_tax_amount: "$99.95"+ discounted_amount: '99.95'+ display_discounted_amount: "$99.95"+ display_compare_at_amount: "$0.00"+ compare_at_amount:+ thumbnail_url:+ option_values:+ - id: optval_UkLWZg9DAJ+ option_type_id: opt_UkLWZg9DAJ+ name: size-5+ label: S+ position: 1+ color_code:+ option_type_name: foo-size-14+ option_type_label: Size+ image_url:+ metadata: {}- created_at: '2026-07-26T14:25:07.206Z'- updated_at: '2026-07-26T14:25:07.206Z'++ created_at: '2026-07-27T08:33:41.480Z'++ updated_at: '2026-07-27T08:33:41.480Z'+ digital_links: []+ metadata: {}- created_at: '2026-07-26T14:25:07.495Z'- updated_at: '2026-07-26T14:25:07.822Z'++ created_at: '2026-07-27T08:33:41.739Z'++ updated_at: '2026-07-27T08:33:42.016Z'+ cost_price: '17.0'+ tax_category_id: taxcat_UkLWZg9DAJ+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ quantity:+ type: integer+ delete:+ summary: Remove an item+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Removes an item from the order.++ **Required scope:** `write_orders` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.orders.items.delete('or_UkLWZg9DAJ', 'li_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api delete /orders/{order_id}/items/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Item ID+ schema:+ type: string+ responses:+ '204':+ description: line item removed+ "/api/v3/admin/orders/{order_id}/store_credits":+ post:+ summary: Apply customer's store credit to an order+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Applies the order customer's available store credit. When `amount` is omitted, applies up to the order outstanding balance.++ **Required scope:** `write_store_credits` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const order = await client.orders.storeCredits.apply('or_UkLWZg9DAJ', {+ amount: '25.00',+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /orders/{order_id}/store_credits -d '{"amount":"25.00"}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ responses:+ '201':+ description: store credit applied+ content:+ application/json:+ example:+ id: or_UkLWZg9DAJ+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R561859613- email: [email protected]++ number: R930899071++ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 1+ fulfillment_status:+ payment_status:+ completed_at:+ item_total: '10.0'+ display_item_total: "$10.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '110.0'+ display_total: "$110.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: '60.0'+ display_amount_due: "$60.00"+ delivery_total: '100.0'+ display_delivery_total: "$100.00"+ store_credit_total: '50.0'+ display_store_credit_total: "-$50.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: draft+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '0.0'+ display_payment_total: "$0.00"+ metadata: {}+ canceled_at:+ approved_at:- created_at: '2026-07-26T14:25:14.778Z'- updated_at: '2026-07-26T14:25:14.839Z'++ created_at: '2026-07-27T08:33:48.284Z'++ updated_at: '2026-07-27T08:33:48.340Z'+ preferred_stock_location_id:+ tags: []+ internal_note:+ approver_id:+ canceler_id:+ created_by_id:+ customer_id: cus_UkLWZg9DAJ+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ amount:+ type: string+ description: Optional explicit amount; defaults to order outstanding+ balance+ delete:+ summary: Remove store credit from an order+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Removes any applied store credit from the order.++ **Required scope:** `write_store_credits` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.orders.storeCredits.remove('or_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api delete /orders/{order_id}/store_credits+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ responses:+ '204':+ description: store credit removed+ "/api/v3/admin/orders":+ get:+ summary: List orders+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns a paginated list of orders for the current store.++ **Required scope:** `read_orders` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: orders, meta } = await client.orders.list({+ status_eq: 'complete',+ completed_at_gt: '2026-01-01',+ sort: '-completed_at',+ limit: 25,+ })+ - lang: bash+ label: Spree CLI+ source: spree api get /orders -d '{"status_eq":"complete","completed_at_gt":"2026-01-01","sort":"-completed_at","limit":25}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: page+ in: query+ required: false+ description: Page number+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ description: Number of records per page+ schema:+ type: integer+ - name: sort+ in: query+ required: false+ description: Sort field (e.g., created_at, -created_at, completed_at)+ schema:+ type: string+ - name: q[state_eq]+ in: query+ required: false+ description: Filter by state (cart, address, delivery, payment, confirm, complete,+ canceled)+ schema:+ type: string+ - name: q[email_cont]+ in: query+ required: false+ description: Filter by email (contains)+ schema:+ type: string+ - name: q[number_eq]+ in: query+ required: false+ description: Filter by order number+ schema:+ type: string+ - name: q[completed_at_gt]+ in: query+ required: false+ description: Filter by completed after date+ schema:+ type: string+ - name: expand+ in: query+ required: false+ description: Comma-separated associations to expand (e.g., items, fulfillments,+ payments, customer, discounts, billing_address, shipping_address). Use dot+ notation for nested expand (max 4 levels).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include (e.g., number,total,status,completed_at).+ id is always included.+ schema:+ type: string+ responses:+ '200':+ description: orders found+ content:+ application/json:+ example:+ data:+ - id: or_UkLWZg9DAJ+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R700605304- email: [email protected]++ number: R613798803++ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 0+ fulfillment_status:+ payment_status:+ completed_at:+ item_total: '0.0'+ display_item_total: "$0.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '0.0'+ display_total: "$0.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: '0.0'+ display_amount_due: "$0.00"+ delivery_total: '0.0'+ display_delivery_total: "$0.00"+ store_credit_total: '0.0'+ display_store_credit_total: "$0.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: draft+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '0.0'+ display_payment_total: "$0.00"+ metadata: {}+ canceled_at:+ approved_at:- created_at: '2026-07-26T14:25:16.615Z'- updated_at: '2026-07-26T14:25:16.615Z'++ created_at: '2026-07-27T08:33:49.938Z'++ updated_at: '2026-07-27T08:33:49.938Z'+ preferred_stock_location_id:+ tags: []+ internal_note:+ approver_id:+ canceler_id:+ created_by_id:+ customer_id: cus_UkLWZg9DAJ+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ '401':+ description: unauthorizedcontent:application/json:example:error:- code: validation_error- message: Site Name can't be blank- details:- name:- - can't be blank+ code: authentication_required+ message: Authentication requiredschema:"$ref": "#/components/schemas/ErrorResponse"+ post:+ summary: Create a draft order+ tags:+ - Orders+ security:+ - api_key: []+ bearer_auth: []+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ // One-shot order create: customer, items, addresses, market, channel,+ // notes, metadata, and a coupon code in a single call. Everything+ // except `email` is optional.+ const order = await client.orders.create({+ email: '[email protected]',+ customer_id: 'cus_UkLWZg9DAJ', // Existing customer; omit for guest orders+ use_customer_default_address: false, // true to copy the customer's saved addresses++ currency: 'USD',+ market_id: 'mkt_UkLWZg9DAJ',+ channel_id: 'ch_UkLWZg9DAJ', // Optional — defaults to the store's primary channel+ locale: 'en-US',++ // Pin the order's preferred fulfillment location. Order Routing's+ // built-in PreferredLocation rule ranks this location first when+ // it stocks the cart's items; if it doesn't, routing falls back+ // to the next rule (Minimize Splits → Default Location).+ preferred_stock_location_id: 'sloc_UkLWZg9DAJ',++ customer_note: 'Please leave at the front desk.',+ internal_note: 'VIP customer — handle with care.',+ metadata: {+ external_reference: 'subscription_invoice_2026_04',+ source: 'recurring-engine',+ },++ // Items: each variant_id + quantity. Optional metadata per line.+ items: [+ { variant_id: 'variant_k5nR8xLq', quantity: 2 },+ { variant_id: 'variant_QXyZ12abCD', quantity: 1, metadata: { gift: true } },+ ],++ // Provide addresses inline OR by ID (existing customer addresses).+ shipping_address: {+ first_name: 'Jane',+ last_name: 'Doe',+ address1: '350 Fifth Avenue',+ address2: 'Floor 42',+ city: 'New York',+ postal_code: '10118',+ country_iso: 'US',+ state_abbr: 'NY',+ phone: '+1 212 555 1234',+ company: 'Acme Inc.',+ },+ // shipping_address_id: 'addr_UkLWZg9DAJ', // alternative to inline++ billing_address: {+ first_name: 'Jane',+ last_name: 'Doe',+ address1: '350 Fifth Avenue',+ city: 'New York',+ postal_code: '10118',+ country_iso: 'US',+ state_abbr: 'NY',+ phone: '+1 212 555 1234',+ },+ // billing_address_id: 'addr_UkLWZg9DAJ',++ // Optional. Invalid codes are non-fatal — the order is created either way.+ coupon_code: 'WELCOME10',+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /orders -d '{"email":"[email protected]","customer_id":"cus_UkLWZg9DAJ","use_customer_default_address":false,"currency":"USD","market_id":"mkt_UkLWZg9DAJ","channel_id":"ch_UkLWZg9DAJ","locale":"en-US","preferred_stock_location_id":"sloc_UkLWZg9DAJ","customer_note":"Please+ leave at the front desk.","internal_note":"VIP customer — handle with care.","metadata":{"external_reference":"subscription_invoice_2026_04","source":"recurring-engine"},"items":[{"variant_id":"variant_k5nR8xLq","quantity":2},{"variant_id":"variant_QXyZ12abCD","quantity":1,"metadata":{"gift":true}}],"shipping_address":{"first_name":"Jane","last_name":"Doe","address1":"350+ Fifth Avenue","address2":"Floor 42","city":"New York","postal_code":"10118","country_iso":"US","state_abbr":"NY","phone":"+1+ 212 555 1234","company":"Acme Inc."},"billing_address":{"first_name":"Jane","last_name":"Doe","address1":"350+ Fifth Avenue","city":"New York","postal_code":"10118","country_iso":"US","state_abbr":"NY","phone":"+1+ 212 555 1234"},"coupon_code":"WELCOME10"}'+ description: |-+ Creates a new draft order in one shot. Customer, items, addresses, currency,+ market, channel, locale, notes, metadata, and a coupon code can all be+ provided inline.++ Setting `preferred_stock_location_id` pins the order's preferred fulfillment+ location — Order Routing's built-in `PreferredLocation` rule consumes it+ when picking which stock location ships each shipment.++ Invalid coupon codes are non-fatal — the order is created and the failure+ is reported on the service result (not in the API response body for now).+++ **Required scope:** `write_orders` (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '201':+ description: order created with preferred_stock_location_id+ content:+ application/json:+ example:+ id: or_gbHJdmfrXB+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R847475874++ number: R785376926+ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 0+ fulfillment_status:+ payment_status:+ completed_at:+ item_total: '0.0'+ display_item_total: "$0.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '0.0'+ display_total: "$0.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: '0.0'+ display_amount_due: "$0.00"+ delivery_total: '0.0'+ display_delivery_total: "$0.00"+ store_credit_total: '0.0'+ display_store_credit_total: "$0.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: draft+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '0.0'+ display_payment_total: "$0.00"+ metadata: {}+ canceled_at:+ approved_at:- created_at: '2026-07-26T14:25:18.335Z'- updated_at: '2026-07-26T14:25:18.338Z'++ created_at: '2026-07-27T08:33:51.484Z'++ updated_at: '2026-07-27T08:33:51.487Z'+ preferred_stock_location_id: sloc_UkLWZg9DAJ+ tags: []+ internal_note:+ approver_id:+ canceler_id:+ created_by_id:+ customer_id:requestBody:content:application/json:@@@ -16098,11 -11304,64 +11372,64 @@@content:application/json:example:- data:- - name: vip- - name: wholesale- '422':- description: invalid taggable type+ id: or_UkLWZg9DAJ+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R659399782- email: [email protected]++ number: R807942449++ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 0+ fulfillment_status:+ payment_status:+ completed_at:+ item_total: '0.0'+ display_item_total: "$0.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '0.0'+ display_total: "$0.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: '0.0'+ display_amount_due: "$0.00"+ delivery_total: '0.0'+ display_delivery_total: "$0.00"+ store_credit_total: '0.0'+ display_store_credit_total: "$0.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: draft+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '0.0'+ display_payment_total: "$0.00"+ metadata: {}+ canceled_at:+ approved_at:- created_at: '2026-07-26T14:25:18.618Z'- updated_at: '2026-07-26T14:25:18.618Z'++ created_at: '2026-07-27T08:33:51.743Z'++ updated_at: '2026-07-27T08:33:51.743Z'+ preferred_stock_location_id:+ tags: []+ internal_note:+ approver_id:+ canceler_id:+ created_by_id:+ customer_id: cus_UkLWZg9DAJ+ '404':+ description: order not foundcontent:application/json:example:@@@ -16275,13 -11424,62 +11492,62 @@@content:application/json:example:- error:- code: validation_error- message: 'Unsupported locale(s): es'- details:- translations:- '0':- - 'Unsupported locale(s): es'+ id: or_UkLWZg9DAJ+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R076644502++ number: R209016643+ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 0+ fulfillment_status:+ payment_status:+ completed_at:+ item_total: '0.0'+ display_item_total: "$0.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '0.0'+ display_total: "$0.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: '0.0'+ display_amount_due: "$0.00"+ delivery_total: '0.0'+ display_delivery_total: "$0.00"+ store_credit_total: '0.0'+ display_store_credit_total: "$0.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: draft+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '0.0'+ display_payment_total: "$0.00"+ metadata: {}+ canceled_at:+ approved_at:- created_at: '2026-07-26T14:25:19.740Z'- updated_at: '2026-07-26T14:25:20.030Z'++ created_at: '2026-07-27T08:33:52.785Z'++ updated_at: '2026-07-27T08:33:53.056Z'+ preferred_stock_location_id:+ tags: []+ internal_note:+ approver_id:+ canceler_id:+ created_by_id:+ customer_id: cus_UkLWZg9DAJrequestBody:content:application/json:@@@ -16424,22 -11656,89 +11724,89 @@@content:application/json:example:- id: admin_UkLWZg9DAJ- email: [email protected]- first_name: Zoila- last_name: Murray- full_name: Zoila Murray- selected_locale:- created_at: '2026-07-20T12:36:48.556Z'- updated_at: '2026-07-20T12:36:48.556Z'- avatar_url:- roles:- - id: role_UkLWZg9DAJ- name: admin+ id: or_UkLWZg9DAJ+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R303213588- email: [email protected]++ number: R692874780++ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 1+ fulfillment_status: ready+ payment_status: paid- completed_at: '2026-07-26T14:25:20.966Z'++ completed_at: '2026-07-27T08:33:53.902Z'+ item_total: '10.0'+ display_item_total: "$10.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '110.0'+ display_total: "$110.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: '0.0'+ display_amount_due: "$0.00"+ delivery_total: '100.0'+ display_delivery_total: "$100.00"+ store_credit_total: '0.0'+ display_store_credit_total: "$0.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: draft+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '110.0'+ display_payment_total: "$110.00"+ metadata: {}+ canceled_at:+ approved_at:- created_at: '2026-07-26T14:25:20.901Z'- updated_at: '2026-07-26T14:25:20.987Z'++ created_at: '2026-07-27T08:33:53.833Z'++ updated_at: '2026-07-27T08:33:53.933Z'+ preferred_stock_location_id:+ tags: []+ internal_note:+ approver_id:+ canceler_id:+ created_by_id:+ customer_id: cus_UkLWZg9DAJ+ '422':+ description: order cannot be completed+ content:+ application/json:+ example:+ error:+ code: order_cannot_complete+ message: No payment found+ details:+ base:+ - No payment found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ notify_customer:+ type: boolean+ description: Send the order confirmation email after completion.+ "/api/v3/admin/orders/{id}/cancel":patch:- summary: Update a staff member+ summary: Cancel an ordertags:- - Staff+ - Orderssecurity:- api_key: []bearer_auth: []@@@ -16487,38 -11785,67 +11853,67 @@@content:application/json:example:- id: admin_UkLWZg9DAJ- email: [email protected]- first_name: Renamed- last_name: Heathcote- full_name: Renamed Heathcote- selected_locale:- created_at: '2026-07-20T12:36:48.846Z'- updated_at: '2026-07-20T12:36:48.888Z'- avatar_url:- roles:- - id: role_UkLWZg9DAJ- name: admin- requestBody:- content:- application/json:- schema:- type: object- properties:- first_name:- type: string- example: Ada- last_name:- type: string- example: Lovelace- role_ids:- type: array- items:- type: string- delete:- summary: Remove a staff member from this store+ id: or_UkLWZg9DAJ+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R928552946- email: [email protected]++ number: R460406839++ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 1+ fulfillment_status: canceled+ payment_status: void- completed_at: '2026-07-26T14:25:22.265Z'++ completed_at: '2026-07-27T08:33:55.072Z'+ item_total: '10.0'+ display_item_total: "$10.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '20.0'+ display_total: "$20.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: "-0.0"+ display_amount_due: "$0.00"+ delivery_total: '10.0'+ display_delivery_total: "$10.00"+ store_credit_total: '0.0'+ display_store_credit_total: "$0.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: canceled+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '0.0'+ display_payment_total: "$0.00"+ metadata: {}- canceled_at: '2026-07-26T14:25:22.559Z'++ canceled_at: '2026-07-27T08:33:55.378Z'+ approved_at:- created_at: '2026-07-26T14:25:22.204Z'- updated_at: '2026-07-26T14:25:22.604Z'++ created_at: '2026-07-27T08:33:55.022Z'++ updated_at: '2026-07-27T08:33:55.423Z'+ preferred_stock_location_id:+ tags: []+ internal_note:+ approver_id:+ canceler_id: admin_UkLWZg9DAJ+ created_by_id:+ customer_id: cus_UkLWZg9DAJ+ "/api/v3/admin/orders/{id}/approve":+ patch:+ summary: Approve an ordertags:- - Staff+ - Orderssecurity:- api_key: []bearer_auth: []@@@ -16558,13 -11887,72 +11955,72 @@@schema:type: stringresponses:- '204':- description: staff removed from store- "/api/v3/admin/invitations":- get:- summary: List invitations+ '200':+ description: order approved+ content:+ application/json:+ example:+ id: or_UkLWZg9DAJ+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R193268574- email: [email protected]++ number: R544761167++ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 1+ fulfillment_status:+ payment_status:- completed_at: '2026-07-26T14:25:22.960Z'++ completed_at: '2026-07-27T08:33:55.752Z'+ item_total: '10.0'+ display_item_total: "$10.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '110.0'+ display_total: "$110.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: '110.0'+ display_amount_due: "$110.00"+ delivery_total: '100.0'+ display_delivery_total: "$100.00"+ store_credit_total: '0.0'+ display_store_credit_total: "$0.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: draft+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '0.0'+ display_payment_total: "$0.00"+ metadata: {}+ canceled_at:- approved_at: '2026-07-26T14:25:23.257Z'- created_at: '2026-07-26T14:25:22.905Z'- updated_at: '2026-07-26T14:25:22.959Z'++ approved_at: '2026-07-27T08:33:56.027Z'++ created_at: '2026-07-27T08:33:55.703Z'++ updated_at: '2026-07-27T08:33:55.752Z'+ preferred_stock_location_id:+ tags: []+ internal_note:+ approver_id: admin_UkLWZg9DAJ+ canceler_id:+ created_by_id:+ customer_id: cus_UkLWZg9DAJ+ "/api/v3/admin/orders/{id}/resume":+ patch:+ summary: Resume a canceled ordertags:- - Staff+ - Orderssecurity:- api_key: []bearer_auth: []@@@ -16604,35 -11999,67 +12067,67 @@@content:application/json:example:- data:- - id: inv_UkLWZg9DAJ- email: [email protected]- status: pending- created_at: '2026-07-20T12:37:29.079Z'- updated_at: '2026-07-20T12:37:29.079Z'- expires_at: '2026-08-03T12:37:29.076Z'- role_id: role_UkLWZg9DAJ- role_name: admin- inviter_email: [email protected]- acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=dZcJBgfBpyQNZFBRWPzAwiWC"- invitee_exists: false- store:- id: store_UkLWZg9DAJ- name: Spree Test Store- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:+ id: or_UkLWZg9DAJ+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R690064589- email: [email protected]++ number: R732194571++ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 1+ fulfillment_status: canceled+ payment_status: void- completed_at: '2026-07-26T14:25:23.602Z'++ completed_at: '2026-07-27T08:33:56.358Z'+ item_total: '10.0'+ display_item_total: "$10.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '20.0'+ display_total: "$20.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: '20.0'+ display_amount_due: "$20.00"+ delivery_total: '10.0'+ display_delivery_total: "$10.00"+ store_credit_total: '0.0'+ display_store_credit_total: "$0.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: placed+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '0.0'+ display_payment_total: "$0.00"+ metadata: {}- canceled_at: '2026-07-26T14:25:23.895Z'++ canceled_at: '2026-07-27T08:33:56.619Z'+ approved_at:- created_at: '2026-07-26T14:25:23.545Z'- updated_at: '2026-07-26T14:25:24.003Z'++ created_at: '2026-07-27T08:33:56.295Z'++ updated_at: '2026-07-27T08:33:56.708Z'+ preferred_stock_location_id:+ tags: []+ internal_note:+ approver_id:+ canceler_id: admin_UkLWZg9DAJ+ created_by_id:+ customer_id: cus_UkLWZg9DAJ+ "/api/v3/admin/orders/{id}/resend_confirmation":post:- summary: Create an invitation+ summary: Resend confirmation emailtags:- - Staff+ - Orderssecurity:- api_key: []bearer_auth: []@@@ -16675,40 -12106,67 +12174,67 @@@content:application/json:example:- id: inv_gbHJdmfrXB- email: [email protected]- status: pending- created_at: '2026-07-20T12:37:29.356Z'- updated_at: '2026-07-20T12:37:29.356Z'- expires_at: '2026-08-03T12:37:29.354Z'- role_id: role_UkLWZg9DAJ- role_name: admin- inviter_email: [email protected]- acceptance_url: "/accept-invitation/inv_gbHJdmfrXB?token=1ivQVsbV6Mi9i2mPyRWLUKHH"- invitee_exists: false- store:- id: store_UkLWZg9DAJ- name: Spree Test Store- requestBody:- content:- application/json:- schema:- type: object- required:- - role_id- properties:- email:- type: string- example: [email protected]- role_id:- type: string- example: role_xxx- "/api/v3/admin/invitations/{id}":- delete:- summary: Revoke an invitation+ id: or_UkLWZg9DAJ+ market_id:+ channel_id: ch_UkLWZg9DAJ- number: R634770759- email: [email protected]++ number: R402873803++ email: [email protected]+ customer_note:+ currency: USD+ locale: en+ total_quantity: 1+ fulfillment_status:+ payment_status:- completed_at: '2026-07-26T14:25:24.348Z'++ completed_at: '2026-07-27T08:33:57.024Z'+ item_total: '10.0'+ display_item_total: "$10.00"+ adjustment_total: '0.0'+ display_adjustment_total: "$0.00"+ discount_total: '0.0'+ display_discount_total: "$0.00"+ tax_total: '0.0'+ display_tax_total: "$0.00"+ included_tax_total: '0.0'+ display_included_tax_total: "$0.00"+ additional_tax_total: '0.0'+ display_additional_tax_total: "$0.00"+ total: '110.0'+ display_total: "$110.00"+ gift_card_total: '0.0'+ display_gift_card_total: "$0.00"+ amount_due: '110.0'+ display_amount_due: "$110.00"+ delivery_total: '100.0'+ display_delivery_total: "$100.00"+ store_credit_total: '0.0'+ display_store_credit_total: "$0.00"+ covered_by_store_credit: false+ gift_card:+ market:+ status: draft+ last_ip_address:+ considered_risky: false+ confirmation_delivered: false+ store_owner_notification_delivered:+ payment_total: '0.0'+ display_payment_total: "$0.00"+ metadata: {}+ canceled_at:+ approved_at:- created_at: '2026-07-26T14:25:24.289Z'- updated_at: '2026-07-26T14:25:24.348Z'++ created_at: '2026-07-27T08:33:56.969Z'++ updated_at: '2026-07-27T08:33:57.023Z'+ preferred_stock_location_id:+ tags: []+ internal_note:+ approver_id:+ canceler_id:+ created_by_id:+ customer_id: cus_UkLWZg9DAJ+ "/api/v3/admin/payment_methods":+ get:+ summary: List payment methodstags:- - Staff+ - Payment Methodssecurity:- api_key: []bearer_auth: []@@@ -16745,13 -12215,42 +12283,42 @@@schema:type: stringresponses:- '204':- description: invitation revoked- "/api/v3/admin/invitations/{id}/resend":- patch:- summary: Resend an invitation+ '200':+ description: payment methods found+ content:+ application/json:+ example:+ data:+ - id: pm_UkLWZg9DAJ+ name: Check+ description:+ type: check+ session_required: false+ source_required: false+ metadata: {}+ active: true+ auto_capture:+ storefront_visible: true+ position: 1- created_at: '2026-07-26T14:25:25.782Z'- updated_at: '2026-07-26T14:25:25.782Z'++ created_at: '2026-07-27T08:33:58.328Z'++ updated_at: '2026-07-27T08:33:58.328Z'+ preferences: {}+ preference_schema: []+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ "/api/v3/admin/payment_methods/types":+ get:+ summary: List available payment provider typestags:- - Staff+ - Payment Methodssecurity:- api_key: []bearer_auth: []@@@ -16854,26 -12368,26 +12436,26 @@@content:application/json:example:- data:- - id: role_UkLWZg9DAJ- name: admin- created_at: '2026-07-20T12:38:23.022Z'- updated_at: '2026-07-20T12:38:23.022Z'- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- "/api/v3/admin/stock_locations":+ id: pm_UkLWZg9DAJ+ name: Check+ description:+ type: check+ session_required: false+ source_required: false+ metadata: {}+ active: true+ auto_capture:+ storefront_visible: true+ position: 1- created_at: '2026-07-26T14:25:26.369Z'- updated_at: '2026-07-26T14:25:26.369Z'++ created_at: '2026-07-27T08:33:58.857Z'++ updated_at: '2026-07-27T08:33:58.857Z'+ preferences: {}+ preference_schema: []+ "/api/v3/admin/orders/{order_id}/payments":get:- summary: List stock locations+ summary: List paymentstags:- - Stock Locations+ - Paymentssecurity:- api_key: []bearer_auth: []@@@ -16973,31 -12449,37 +12517,37 @@@application/json:example:data:- - id: sloc_UkLWZg9DAJ- state_abbr: STATE_ABBR_56- name: Brooklyn warehouse- address1: 1600 Pennsylvania Ave NW- city: Washington- zipcode: '20500'- country_iso: US- country_name: United States of America- state_text: STATE_ABBR_56- admin_name:- address2:- state_name:- phone: "(202) 456-1111"- company:- active: true- default: false- backorderable_default: true- propagate_all_variants: false- kind: warehouse- pickup_enabled: false- pickup_stock_policy: local- pickup_ready_in_minutes:- pickup_instructions:- created_at: '2026-07-20T12:38:23.295Z'- updated_at: '2026-07-20T12:38:23.295Z'+ - id: py_UkLWZg9DAJ+ payment_method_id: pm_UkLWZg9DAJ- response_code: BGS-40d936e1e2a3- number: PPSMEVJK++ response_code: BGS-303fe304f1a1++ number: PDXITJIX+ amount: '110.0'+ display_amount: "$110.00"+ status: completed+ source_type: credit_card+ source_id: card_UkLWZg9DAJ+ source:+ id: card_UkLWZg9DAJ+ brand: visa+ last4: '1111'+ month: 12+ year: 2027+ name: Spree Commerce+ default: false+ gateway_payment_profile_id:+ customer_id:+ payment_method_id: pm_gbHJdmfrXB+ metadata: {}- created_at: '2026-07-26T14:25:08.922Z'- updated_at: '2026-07-26T14:25:08.925Z'++ created_at: '2026-07-27T08:33:42.916Z'++ updated_at: '2026-07-27T08:33:42.919Z'+ metadata: {}+ avs_response:+ cvv_response_code:+ cvv_response_message:- created_at: '2026-07-26T14:25:08.924Z'- updated_at: '2026-07-26T14:25:08.924Z'++ created_at: '2026-07-27T08:33:42.918Z'++ updated_at: '2026-07-27T08:33:42.918Z'+ captured_amount: '0.0'+ order_id: or_UkLWZg9DAJmeta:page: 1limit: 25@@@ -17120,14 -12544,24 +12612,24 @@@content:application/json:example:- error:- code: validation_error- message: Name can't be blank- details:- name:- - can't be blank- schema:- "$ref": "#/components/schemas/ErrorResponse"+ id: py_gbHJdmfrXB+ payment_method_id: pm_EfhxLZ9ck8+ response_code:- number: P4Z1VKRJ++ number: PHJWKA2S+ amount: '110.0'+ display_amount: "$110.00"+ status: checkout+ source_type:+ source_id:+ source:+ metadata: {}+ avs_response:+ cvv_response_code:+ cvv_response_message:- created_at: '2026-07-26T14:25:10.247Z'- updated_at: '2026-07-26T14:25:10.247Z'++ created_at: '2026-07-27T08:33:44.099Z'++ updated_at: '2026-07-27T08:33:44.099Z'+ captured_amount: '0.0'+ order_id: or_gbHJdmfrXBrequestBody:content:application/json:@@@ -17298,15 -12650,42 +12718,42 @@@content:application/json:example:- error:- code: record_not_found- message: Stock location not found- schema:- "$ref": "#/components/schemas/ErrorResponse"+ id: py_UkLWZg9DAJ+ payment_method_id: pm_UkLWZg9DAJ- response_code: BGS-e4e289aa255b- number: PCD6W6EE++ response_code: BGS-afdc0d0937cc++ number: PXSTNU2X+ amount: '110.0'+ display_amount: "$110.00"+ status: completed+ source_type: credit_card+ source_id: card_UkLWZg9DAJ+ source:+ id: card_UkLWZg9DAJ+ brand: visa+ last4: '1111'+ month: 12+ year: 2027+ name: Spree Commerce+ default: false+ gateway_payment_profile_id:+ customer_id:+ payment_method_id: pm_gbHJdmfrXB+ metadata: {}- created_at: '2026-07-26T14:25:10.629Z'- updated_at: '2026-07-26T14:25:10.633Z'++ created_at: '2026-07-27T08:33:44.476Z'++ updated_at: '2026-07-27T08:33:44.479Z'+ metadata: {}+ avs_response:+ cvv_response_code:+ cvv_response_message:- created_at: '2026-07-26T14:25:10.631Z'- updated_at: '2026-07-26T14:25:10.631Z'++ created_at: '2026-07-27T08:33:44.478Z'++ updated_at: '2026-07-27T08:33:44.478Z'+ captured_amount: '0.0'+ order_id: or_UkLWZg9DAJ+ "/api/v3/admin/orders/{order_id}/payments/{id}/capture":patch:- summary: Update a stock location+ summary: Capture a paymenttags:- - Stock Locations+ - Paymentssecurity:- api_key: []bearer_auth: []@@@ -17356,35 -12739,39 +12807,39 @@@content:application/json:example:- id: sloc_UkLWZg9DAJ- state_abbr: STATE_ABBR_62- name: Renamed warehouse- address1: 1600 Pennsylvania Ave NW- city: Washington- zipcode: '20500'- country_iso: US- country_name: United States of America- state_text: STATE_ABBR_62- admin_name:- address2:- state_name:- phone: "(202) 456-1111"- company:- active: true- default: false- backorderable_default: true- propagate_all_variants: false- kind: warehouse- pickup_enabled: true- pickup_stock_policy: local- pickup_ready_in_minutes: 45- pickup_instructions:- created_at: '2026-07-20T12:38:24.636Z'- updated_at: '2026-07-20T12:38:24.895Z'- schema:- "$ref": "#/components/schemas/StockLocation"+ id: py_UkLWZg9DAJ+ payment_method_id: pm_UkLWZg9DAJ- response_code: BGS-e5d00e5abfec- number: P1R6FDF2++ response_code: BGS-b7462e3f3f06++ number: PZ7K8WXD+ amount: '110.0'+ display_amount: "$110.00"+ status: completed+ source_type: credit_card+ source_id: card_UkLWZg9DAJ+ source:+ id: card_UkLWZg9DAJ+ brand: visa+ last4: '1111'+ month: 12+ year: 2027+ name: Spree Commerce+ default: false+ gateway_payment_profile_id:+ customer_id:+ payment_method_id: pm_gbHJdmfrXB+ metadata: {}- created_at: '2026-07-26T14:25:11.298Z'- updated_at: '2026-07-26T14:25:11.301Z'++ created_at: '2026-07-27T08:33:45.089Z'++ updated_at: '2026-07-27T08:33:45.092Z'+ metadata: {}+ avs_response:+ cvv_response_code:+ cvv_response_message:- created_at: '2026-07-26T14:25:11.300Z'- updated_at: '2026-07-26T14:25:11.654Z'++ created_at: '2026-07-27T08:33:45.091Z'++ updated_at: '2026-07-27T08:33:45.399Z'+ captured_amount: '110.0'+ order_id: or_UkLWZg9DAJ'422':- description: validation error+ description: capture failedcontent:application/json:example:@@@ -17503,14 -12819,60 +12887,60 @@@description: Bearer token for admin authenticationschema:type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Payment ID+ schema:+ type: stringresponses:- '204':- description: stock location deleted- "/api/v3/admin/products/{product_id}/variants":+ '200':+ description: payment voided+ content:+ application/json:+ example:+ id: py_UkLWZg9DAJ+ payment_method_id: pm_UkLWZg9DAJ- response_code: void-BGS-0746564685e5- number: P4ZS3CE2++ response_code: void-BGS-f941a84e6201++ number: PQUKWXD4+ amount: '110.0'+ display_amount: "$110.00"+ status: void+ source_type: credit_card+ source_id: card_UkLWZg9DAJ+ source:+ id: card_UkLWZg9DAJ+ brand: visa+ last4: '1111'+ month: 12+ year: 2027+ name: Spree Commerce+ default: false+ gateway_payment_profile_id:+ customer_id:+ payment_method_id: pm_gbHJdmfrXB+ metadata: {}- created_at: '2026-07-26T14:25:12.758Z'- updated_at: '2026-07-26T14:25:12.761Z'++ created_at: '2026-07-27T08:33:46.411Z'++ updated_at: '2026-07-27T08:33:46.414Z'+ metadata: {}+ avs_response:+ cvv_response_code:+ cvv_response_message:- created_at: '2026-07-26T14:25:12.760Z'- updated_at: '2026-07-26T14:25:13.069Z'++ created_at: '2026-07-27T08:33:46.413Z'++ updated_at: '2026-07-27T08:33:46.692Z'+ captured_amount: '0.0'+ order_id: or_UkLWZg9DAJ+ "/api/v3/admin/price_lists":get:- summary: List product variants+ summary: List price liststags:- - Variants+ - Pricingsecurity:- api_key: []bearer_auth: []@@@ -17586,108 -12944,36 +13012,36 @@@application/json:example:data:- - id: variant_UkLWZg9DAJ- product_id: prod_UkLWZg9DAJ- sku: SKU-109- options_text: ''- track_inventory: true- media_count: 0- preorder_ships_at:- thumbnail_url:- purchasable: true- in_stock: false- backorderable: true- preorder: false- weight: 0.0- height:- width:- depth:- price:- id: price_UkLWZg9DAJ- amount: '19.99'- amount_in_cents: 1999- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$19.99"- display_compare_at_amount:- price_list_id:- original_price:- option_values: []- metadata: {}+ - id: pl_UkLWZg9DAJ+ name: Wholesale+ description:+ status: draftposition: 1- cost_price: '17.0'- cost_currency: USD- barcode:- weight_unit: lb- dimensions_unit:- backorder_limit:+ match_policy: all+ starts_at:+ ends_at:deleted_at:- created_at: '2026-07-20T12:38:28.969Z'- updated_at: '2026-07-20T12:38:28.985Z'- preorderable: false- tax_category_id: taxcat_UkLWZg9DAJ- available_stock: 0- reserved_quantity: 0- total_on_hand: 0- product_name: Product 902337- - id: variant_gbHJdmfrXB- product_id: prod_UkLWZg9DAJ- sku: SKU-110- options_text: 'Size: S'- track_inventory: true- media_count: 0- preorder_ships_at:- thumbnail_url:- purchasable: true- in_stock: false- backorderable: true- preorder: false- weight: 47.27- height: 183.58- width: 73.86- depth: 34.7- price:- id: price_gbHJdmfrXB- amount: '19.99'- amount_in_cents: 1999- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$19.99"- display_compare_at_amount:- price_list_id:- original_price:- option_values:- - id: optval_UkLWZg9DAJ- option_type_id: opt_UkLWZg9DAJ- name: size-19- label: S- position: 1- color_code:- option_type_name: foo-size-28- option_type_label: Size- image_url:- metadata: {}- created_at: '2026-07-20T12:38:29.007Z'- updated_at: '2026-07-20T12:38:29.007Z'- metadata: {}- created_at: '2026-07-26T14:25:26.670Z'- updated_at: '2026-07-26T14:25:26.670Z'++ created_at: '2026-07-27T08:33:59.120Z'++ updated_at: '2026-07-27T08:33:59.120Z'+ currently_active: false+ products_count: 0+ prices_count: 0+ product_ids: []+ - id: pl_gbHJdmfrXB+ name: Holiday+ description:+ status: draftposition: 2- cost_price: '17.0'- cost_currency: USD- barcode:- weight_unit: lb- dimensions_unit:- backorder_limit:+ match_policy: all+ starts_at:+ ends_at:deleted_at:- created_at: '2026-07-20T12:38:29.003Z'- updated_at: '2026-07-20T12:38:29.020Z'- preorderable: false- tax_category_id: taxcat_UkLWZg9DAJ- available_stock: 0- reserved_quantity: 0- total_on_hand: 0- product_name: Product 902337- created_at: '2026-07-26T14:25:26.673Z'- updated_at: '2026-07-26T14:25:26.673Z'++ created_at: '2026-07-27T08:33:59.122Z'++ updated_at: '2026-07-27T08:33:59.122Z'+ currently_active: false+ products_count: 0+ prices_count: 0+ product_ids: []meta:page: 1limit: 25@@@ -17759,67 -13070,28 +13138,28 @@@type: stringresponses:'201':- description: variant created+ description: price list created (server-to-server — rules + prices, no product_ids)content:application/json:- example:- id: variant_EfhxLZ9ck8- product_id: prod_UkLWZg9DAJ- sku: NEW-SKU-001- options_text: 'Size: XL'- track_inventory: true- media_count: 0- preorder_ships_at:- thumbnail_url:- purchasable: false- in_stock: false- backorderable: false- preorder: false- weight: 0.0- height:- width:- depth:- price:- id: price_EfhxLZ9ck8- amount: '24.99'- amount_in_cents: 2499- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$24.99"- display_compare_at_amount:- price_list_id:- original_price:- option_values:- - id: optval_gbHJdmfrXB- option_type_id: opt_gbHJdmfrXB- name: xl- label: XL- position: 1- color_code:- option_type_name: size- option_type_label: Size- image_url:- metadata: {}- created_at: '2026-07-20T12:38:29.693Z'- updated_at: '2026-07-20T12:38:29.693Z'- metadata: {}+ example:+ id: pl_EfhxLZ9ck8+ name: EU wholesale+ description:+ status: draftposition: 3- cost_price:- cost_currency: USD- barcode:- weight_unit: lb- dimensions_unit:- backorder_limit:+ match_policy: all+ starts_at:+ ends_at:deleted_at:- created_at: '2026-07-20T12:38:29.698Z'- updated_at: '2026-07-20T12:38:29.700Z'- preorderable: false- tax_category_id: taxcat_UkLWZg9DAJ- available_stock: 0- reserved_quantity: 0- total_on_hand: 0- product_name: Product 912012- created_at: '2026-07-26T14:25:27.683Z'- updated_at: '2026-07-26T14:25:27.685Z'++ created_at: '2026-07-27T08:34:00.034Z'++ updated_at: '2026-07-27T08:34:00.036Z'+ currently_active: false+ products_count: 1+ prices_count: 2+ product_ids:+ - prod_UkLWZg9DAJ+ schema:+ "$ref": "#/components/schemas/PriceList"'422':description: validation errorcontent:@@@ -17929,130 -13200,63 +13268,63 @@@security:- api_key: []bearer_auth: []- description: |-- Returns a single variant by ID.-- **Required scope:** `read_products` (for API-key authentication).- x-codeSamples:- - lang: javascript- label: Spree Admin SDK- source: |-- import { createAdminClient } from '@spree/admin-sdk'-- const client = createAdminClient({- baseUrl: 'https://your-store.com',- secretKey: 'sk_xxx',- })-- const variant = await client.products.variants.get('prod_86Rf07xd4z', 'variant_k5nR8xLq', {- expand: ['prices', 'stock_items'],- })- - lang: bash- label: Spree CLI- source: spree api get /products/{product_id}/variants/{id} -d '{"expand":["prices","stock_items"]}'- parameters:- - name: x-spree-api-key- in: header- required: true- schema:- type: string- - name: Authorization- in: header- required: true- description: Bearer token for admin authentication- schema:- type: string- - name: product_id- in: path- required: true- description: Product ID- schema:- type: string- - name: id- in: path- required: true- description: Variant ID- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., images, prices,- stock_items, option_values). Use dot notation for nested expand (max 4 levels).- schema:- type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include (e.g., sku,price,stock).- id is always included.- schema:- type: string- responses:- '200':- description: variant found- content:- application/json:- example:- id: variant_gbHJdmfrXB- product_id: prod_UkLWZg9DAJ- sku: SKU-116- options_text: 'Size: S'- track_inventory: true- media_count: 0- preorder_ships_at:- thumbnail_url:- purchasable: true- in_stock: false- backorderable: true- preorder: false- weight: 63.2- height: 199.5- width: 119.2- depth: 182.39- price:- id: price_gbHJdmfrXB- amount: '19.99'- amount_in_cents: 1999- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$19.99"- display_compare_at_amount:- price_list_id:- original_price:- option_values:- - id: optval_UkLWZg9DAJ- option_type_id: opt_UkLWZg9DAJ- name: size-22- label: S- position: 1- color_code:- option_type_name: foo-size-31- option_type_label: Size- image_url:- metadata: {}- created_at: '2026-07-20T12:38:30.083Z'- updated_at: '2026-07-20T12:38:30.083Z'- metadata: {}- position: 2- cost_price: '17.0'- cost_currency: USD- barcode:- weight_unit: lb- dimensions_unit:- backorder_limit:+ description: "**Required scope:** `read_products` (for API-key authentication)."+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const priceList = await client.priceLists.get('pl_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api get /price_lists/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ - name: expand+ in: query+ required: false+ schema:+ type: string+ responses:+ '200':+ description: price list found+ content:+ application/json:+ example:+ id: pl_UkLWZg9DAJ+ name: Wholesale+ description:+ status: draft+ position: 1+ match_policy: all+ starts_at:+ ends_at:deleted_at:- created_at: '2026-07-20T12:38:30.081Z'- updated_at: '2026-07-20T12:38:30.090Z'- preorderable: false- tax_category_id: taxcat_UkLWZg9DAJ- available_stock: 0- reserved_quantity: 0- total_on_hand: 0- product_name: Product 939606- created_at: '2026-07-26T14:25:27.999Z'- updated_at: '2026-07-26T14:25:27.999Z'++ created_at: '2026-07-27T08:34:00.318Z'++ updated_at: '2026-07-27T08:34:00.318Z'+ currently_active: false+ products_count: 0+ prices_count: 0+ product_ids: []+ schema:+ "$ref": "#/components/schemas/PriceList"'404':- description: variant not found+ description: price list not foundcontent:application/json:example:@@@ -18122,63 -13314,23 +13382,23 @@@content:application/json:example:- id: variant_gbHJdmfrXB- product_id: prod_UkLWZg9DAJ- sku: UPDATED-SKU- options_text: 'Size: S'- track_inventory: true- media_count: 0- preorder_ships_at:- thumbnail_url:- purchasable: true- in_stock: false- backorderable: true- preorder: false- weight: 186.67- height: 173.63- width: 117.93- depth: 171.77- price:- id: price_gbHJdmfrXB- amount: '19.99'- amount_in_cents: 1999- compare_at_amount:- compare_at_amount_in_cents:- currency: USD- display_amount: "$19.99"- display_compare_at_amount:- price_list_id:- original_price:- option_values:- - id: optval_UkLWZg9DAJ- option_type_id: opt_UkLWZg9DAJ- name: size-24- label: S- position: 1- color_code:- option_type_name: foo-size-33- option_type_label: Size- image_url:- metadata: {}- created_at: '2026-07-20T12:38:30.702Z'- updated_at: '2026-07-20T12:38:30.702Z'- metadata: {}- position: 2- cost_price: '17.0'- cost_currency: USD- barcode:- weight_unit: lb- dimensions_unit:- backorder_limit:+ id: pl_UkLWZg9DAJ+ name: Wholesale (Q3)+ description:+ status: draft+ position: 1+ match_policy: all+ starts_at:+ ends_at:deleted_at:- created_at: '2026-07-20T12:38:30.700Z'- updated_at: '2026-07-20T12:38:30.966Z'- preorderable: false- tax_category_id: taxcat_UkLWZg9DAJ- available_stock: 0- reserved_quantity: 0- total_on_hand: 0- product_name: Product 956723- created_at: '2026-07-26T14:25:29.597Z'- updated_at: '2026-07-26T14:25:29.879Z'++ created_at: '2026-07-27T08:34:01.772Z'++ updated_at: '2026-07-27T08:34:02.027Z'+ currently_active: false+ products_count: 0+ prices_count: 0+ product_ids: []+ schema:+ "$ref": "#/components/schemas/PriceList"requestBody:content:application/json:@@@ -18465,19 -13503,25 +13571,25 @@@content:application/json:example:- error:- code: record_not_found- message: Webhook endpoint not found+ id: pl_UkLWZg9DAJ+ name: Wholesale+ description:+ status: active+ position: 1+ match_policy: all+ starts_at:+ ends_at:+ deleted_at:- created_at: '2026-07-26T14:25:30.181Z'- updated_at: '2026-07-26T14:25:30.462Z'++ created_at: '2026-07-27T08:34:02.302Z'++ updated_at: '2026-07-27T08:34:02.597Z'+ currently_active: true+ products_count: 0+ prices_count: 0+ product_ids: []schema:- "$ref": "#/components/schemas/ErrorResponse"- "/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}":+ "$ref": "#/components/schemas/PriceList"+ "/api/v3/admin/price_lists/{id}/deactivate":parameters:- - name: webhook_endpoint_id- in: path- required: true- description: Parent webhook endpoint ID- schema:- type: string- name: idin: pathrequired: true@@@ -18560,29 -13567,28 +13635,28 @@@content:application/json:example:- error:- code: record_not_found- message: Webhook delivery not found+ id: pl_UkLWZg9DAJ+ name: Price List 1+ description:+ status: inactive+ position: 1+ match_policy: all+ starts_at:+ ends_at:+ deleted_at:- created_at: '2026-07-26T14:25:30.471Z'- updated_at: '2026-07-26T14:25:30.753Z'++ created_at: '2026-07-27T08:34:02.606Z'++ updated_at: '2026-07-27T08:34:02.863Z'+ currently_active: false+ products_count: 0+ prices_count: 0+ product_ids: []schema:- "$ref": "#/components/schemas/ErrorResponse"- "/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}/redeliver":- parameters:- - name: webhook_endpoint_id- in: path- required: true- description: Parent webhook endpoint ID- schema:- type: string- - name: id- in: path- required: true- description: Webhook delivery ID to redeliver- schema:- type: string- post:- summary: Redeliver a webhook delivery+ "$ref": "#/components/schemas/PriceList"+ "/api/v3/admin/prices":+ get:+ summary: List pricestags:- - Webhooks+ - Pricingsecurity:- api_key: []bearer_auth: []@@@ -18628,29 -13680,57 +13748,69 @@@content:application/json:example:- id: whd_EfhxLZ9ck8- event_name: order.created- event_id:- response_code:- execution_time:- error_type:- request_errors:- response_body:- success:- created_at: '2026-07-20T12:38:32.709Z'- updated_at: '2026-07-20T12:38:32.709Z'- delivered_at:- payload:- event: order.created+ data:++ - id: price_UkLWZg9DAJ++ amount: '19.99'++ amount_in_cents: 1999++ compare_at_amount:++ compare_at_amount_in_cents:++ currency: USD++ display_amount: "$19.99"++ display_compare_at_amount:++ price_list_id:++ variant_id: variant_UkLWZg9DAJ++ created_at: '2026-07-27T08:34:02.893Z'++ updated_at: '2026-07-27T08:34:02.893Z'+ - id: price_gbHJdmfrXB+ amount: '19.99'+ amount_in_cents: 1999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$19.99"+ display_compare_at_amount:+ price_list_id:+ variant_id: variant_gbHJdmfrXB- created_at: '2026-07-26T14:25:30.831Z'- updated_at: '2026-07-26T14:25:30.831Z'++ created_at: '2026-07-27T08:34:02.922Z'++ updated_at: '2026-07-27T08:34:02.922Z'+ - id: price_EfhxLZ9ck8+ amount: '5.0'+ amount_in_cents: 500+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$5.00"+ display_compare_at_amount:+ price_list_id: pl_UkLWZg9DAJ+ variant_id: variant_gbHJdmfrXB- created_at: '2026-07-26T14:25:30.835Z'- updated_at: '2026-07-26T14:25:30.835Z'++ created_at: '2026-07-27T08:34:02.926Z'++ updated_at: '2026-07-27T08:34:02.926Z'+ meta:+ page: 1+ limit: 25- count: 2++ count: 3+ pages: 1+ from: 1- to: 2- in: 2++ to: 3++ in: 3+ previous:+ next:+ schema:+ type: object+ properties:data:- id: 1- webhook_endpoint_id: whe_UkLWZg9DAJ- webhook_endpoint_url: https://shop.example.com/webhooks- "/api/v3/admin/webhook_endpoints":- get:- summary: List webhook endpoints+ type: array+ items:+ "$ref": "#/components/schemas/Price"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ required:+ - data+ - meta+ post:+ summary: Create a pricetags:- - Webhooks+ - Pricingsecurity:- api_key: []bearer_auth: []@@@ -18686,43 -13768,94 +13848,94 @@@- name: Authorizationin: headerrequired: true- description: Bearer token for admin authenticationschema:type: string- - name: page- in: query- required: false- description: Page number- schema:- type: integer- - name: limit- in: query- required: false- description: Number of records per page- schema:- type: integer- - name: q[name_cont]- in: query- required: false- description: Filter by name (contains)- schema:- type: string- - name: q[url_cont]- in: query- required: false- description: Filter by URL (contains)- schema:- type: string- - name: sort- in: query- required: false- description: Sort by field. Prefix with `-` for descending (e.g., `-created_at`).+ responses:+ '201':+ description: price created+ content:+ application/json:+ example:+ id: price_uw2YK1rnl0+ amount: '9.99'+ amount_in_cents: 999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: EUR+ display_amount: "€9.99"+ display_compare_at_amount:+ price_list_id:+ variant_id: variant_EfhxLZ9ck8- created_at: '2026-07-26T14:25:31.496Z'- updated_at: '2026-07-26T14:25:31.496Z'++ created_at: '2026-07-27T08:34:03.532Z'++ updated_at: '2026-07-27T08:34:03.532Z'+ schema:+ "$ref": "#/components/schemas/Price"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - variant_id+ - currency+ properties:+ variant_id:+ type: string+ example: variant_xY9+ currency:+ type: string+ example: USD+ amount:+ type: string+ nullable: true+ example: '19.99'+ compare_at_amount:+ type: string+ nullable: true+ example: '24.99'+ price_list_id:+ type: string+ nullable: true+ example: pl_aBc123+ "/api/v3/admin/prices/{id}":+ parameters:+ - name: id+ in: path+ required: true+ schema:+ type: string+ get:+ summary: Get a price+ tags:+ - Pricing+ security:+ - api_key: []+ bearer_auth: []+ description: "**Required scope:** `read_products` (for API-key authentication)."+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const price = await client.prices.get('price_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api get /prices/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: trueschema:type: string- - name: fields- in: query- required: false- description: Comma-separated list of fields to include. id is always included.+ - name: Authorization+ in: header+ required: trueschema:type: stringresponses:@@@ -18731,38 -13864,22 +13944,22 @@@content:application/json:example:- data:- - id: whe_UkLWZg9DAJ- name: Order pipeline- url: https://shop.example.com/webhooks/orders- active: true- subscriptions:- - order.created- - order.completed- - product.created- disabled_reason:- created_at: '2026-07-20T12:38:32.734Z'- updated_at: '2026-07-20T12:38:32.734Z'- disabled_at:- secret_key:- last_delivery_at:- recent_delivery_count: 0- recent_failure_count: 0- total_delivery_count: 0- successful_delivery_count: 0- failed_delivery_count: 0- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- '401':- description: unauthorized+ id: price_EfhxLZ9ck8+ amount: '5.0'+ amount_in_cents: 500+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$5.00"+ display_compare_at_amount:+ price_list_id: pl_UkLWZg9DAJ+ variant_id: variant_gbHJdmfrXB- created_at: '2026-07-26T14:25:31.560Z'- updated_at: '2026-07-26T14:25:31.560Z'++ created_at: '2026-07-27T08:34:03.592Z'++ updated_at: '2026-07-27T08:34:03.592Z'+ schema:+ "$ref": "#/components/schemas/Price"+ '404':+ description: price not foundcontent:application/json:example:@@@ -18852,26 -13930,20 +14010,20 @@@content:application/json:example:- error:- code: validation_error- message: |-- Url Translation missing. Options considered were:- - en.activerecord.errors.models.spree/webhook_endpoint.attributes.url.invalid_url- - en.activerecord.errors.models.spree/webhook_endpoint.invalid_url- - en.activerecord.errors.messages.invalid_url- - en.errors.attributes.url.invalid_url- - en.errors.messages.invalid_url- details:- url:- - |-- Translation missing. Options considered were:- - en.activerecord.errors.models.spree/webhook_endpoint.attributes.url.invalid_url- - en.activerecord.errors.models.spree/webhook_endpoint.invalid_url- - en.activerecord.errors.messages.invalid_url- - en.errors.attributes.url.invalid_url- - en.errors.messages.invalid_url+ id: price_EfhxLZ9ck8+ amount: '12.34'+ amount_in_cents: 1234+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$12.34"+ display_compare_at_amount:+ price_list_id: pl_UkLWZg9DAJ+ variant_id: variant_gbHJdmfrXB- created_at: '2026-07-26T14:25:32.248Z'- updated_at: '2026-07-26T14:25:32.531Z'++ created_at: '2026-07-27T08:34:04.215Z'++ updated_at: '2026-07-27T08:34:04.473Z'schema:- "$ref": "#/components/schemas/ErrorResponse"+ "$ref": "#/components/schemas/Price"requestBody:content:application/json:@@@ -19267,37 -14246,31 +14326,31 @@@content:application/json:example:- id: whe_UkLWZg9DAJ- name: Order pipeline- url: https://shop.example.com/webhooks/orders- active: true- subscriptions:- - order.created- - order.completed- - product.created- disabled_reason:- created_at: '2026-07-20T12:38:35.287Z'- updated_at: '2026-07-20T12:38:35.541Z'- disabled_at:- secret_key:- last_delivery_at:- recent_delivery_count: 0- recent_failure_count: 0- total_delivery_count: 0- successful_delivery_count: 0- failed_delivery_count: 0- "/api/v3/admin/webhook_endpoints/{id}/disable":- parameters:- - name: id- in: path- required: true- description: Webhook endpoint ID- schema:- type: string- patch:- summary: Disable a webhook endpoint+ data:+ - id: cf_UkLWZg9DAJ+ label: Title+ type: Spree::Metafields::ShortText+ field_type: short_text+ key: custom.title+ value: wool- created_at: '2026-07-26T14:25:34.005Z'- updated_at: '2026-07-26T14:25:34.005Z'++ created_at: '2026-07-27T08:34:05.802Z'++ updated_at: '2026-07-27T08:34:05.802Z'+ storefront_visible: true+ custom_field_definition_id: cfdef_UkLWZg9DAJ+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ post:+ summary: Create a product custom fieldtags:- - Webhooks+ - Productssecurity:- api_key: []bearer_auth: []@@@ -19345,25 -14318,27 +14398,27 @@@content:application/json:example:- id: whe_UkLWZg9DAJ- name: Order pipeline- url: https://shop.example.com/webhooks/orders- active: false- subscriptions:- - order.created- - order.completed- - product.created- disabled_reason: Investigating- created_at: '2026-07-20T12:38:35.557Z'- updated_at: '2026-07-20T12:38:35.810Z'- disabled_at: '2026-07-20T12:38:35.810Z'- secret_key:- last_delivery_at:- recent_delivery_count: 0- recent_failure_count: 0- total_delivery_count: 0- successful_delivery_count: 0- failed_delivery_count: 0+ id: cf_gbHJdmfrXB+ label: Description+ type: Spree::Metafields::LongText+ field_type: long_text+ key: custom.description+ value: A longer description- created_at: '2026-07-26T14:25:34.628Z'- updated_at: '2026-07-26T14:25:34.628Z'++ created_at: '2026-07-27T08:34:06.360Z'++ updated_at: '2026-07-27T08:34:06.360Z'+ storefront_visible: true+ custom_field_definition_id: cfdef_gbHJdmfrXB+ '422':+ description: duplicate definition for the same product+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Metafield definition has already been taken+ details:+ metafield_definition_id:+ - has already been takenrequestBody:content:application/json:@@@ -19422,57 -14418,20 +14498,20 @@@content:application/json:example:- data:- - id: ctg_UkLWZg9DAJ- name: Clothing- permalink: clothing- position: 0- depth: 0- meta_title:- meta_description:- meta_keywords:- children_count: 0- parent_id:- description: ''- description_html: ''- image_url:- square_image_url:- is_root: true- is_child: false- is_leaf: true- metadata: {}- pretty_name: Clothing- lft: 1- rgt: 2- products_count: 0- created_at: '2026-07-20T12:36:55.032Z'- updated_at: '2026-07-20T12:36:55.032Z'- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:- schema:- type: object- properties:- data:- type: array- items:- "$ref": "#/components/schemas/Category"- meta:- "$ref": "#/components/schemas/PaginationMeta"- required:- - data- - meta- post:- summary: Create a category+ id: cf_UkLWZg9DAJ+ label: Title+ type: Spree::Metafields::ShortText+ field_type: short_text+ key: custom.title+ value: wool- created_at: '2026-07-26T14:25:34.987Z'- updated_at: '2026-07-26T14:25:34.987Z'++ created_at: '2026-07-27T08:34:06.690Z'++ updated_at: '2026-07-27T08:34:06.690Z'+ storefront_visible: true+ custom_field_definition_id: cfdef_UkLWZg9DAJ+ patch:+ summary: Update a product custom fieldtags:- - Categories+ - Productssecurity:- api_key: []bearer_auth: []@@@ -19529,14 -14483,16 +14563,16 @@@content:application/json:example:- error:- code: validation_error- message: Name can't be blank- details:- name:- - can't be blank- schema:- "$ref": "#/components/schemas/ErrorResponse"+ id: cf_UkLWZg9DAJ+ label: Title+ type: Spree::Metafields::ShortText+ field_type: short_text+ key: custom.title+ value: cotton- created_at: '2026-07-26T14:25:35.308Z'- updated_at: '2026-07-26T14:25:35.590Z'++ created_at: '2026-07-27T08:34:06.982Z'++ updated_at: '2026-07-27T08:34:07.237Z'+ storefront_visible: true+ custom_field_definition_id: cfdef_UkLWZg9DAJrequestBody:content:application/json:@@@ -19679,60 -14584,52 +14664,53 @@@content:application/json:example:- id: ctg_UkLWZg9DAJ- name: Apparel- permalink: clothing- position: 0- depth: 0- meta_title:- meta_description:- meta_keywords:- children_count: 0- parent_id:- description: ''- description_html: ''- image_url:- square_image_url:- is_root: true- is_child: false- is_leaf: true- metadata: {}- pretty_name: Apparel- lft: 1- rgt: 2- products_count: 0- created_at: '2026-07-20T12:36:56.406Z'- updated_at: '2026-07-20T12:36:56.670Z'- schema:- "$ref": "#/components/schemas/Category"- requestBody:- content:- application/json:- schema:- type: object- properties:- name:- type: string- example: Apparel- parent_id:- type: string- description: Prefixed ID of the parent category- description:- type: string- permalink:- type: string- meta_title:- type: string- meta_description:- type: string- meta_keywords:- type: string- hide_from_nav:- type: boolean- delete:- summary: Delete a category+ data:+ resource_id: prod_UkLWZg9DAJ+ resource_type: product+ translations:+ de:+ name: Espressomaschine+ description:+ slug: espressomaschine+ meta_description:+ meta_title:+ translated_field_count: 2+ fr:+ name:+ description:+ slug:+ meta_description:+ meta_title:+ translated_field_count: 0+ fields:+ - key: name+ type: string+ source: Espresso Machine+ - key: description+ type: html+ source: |-- Ullam aliquam ea tempora quae sapiente. Accusamus earum nostrum fuga nam harum. Ipsa temporibus necessitatibus atque non. Qui doloribus ex unde facere sapiente nesciunt est quam.- Cum magnam doloribus pariatur veritatis vel consequuntur ab. Id quidem quam vitae error eius dolore delectus aliquam. Eaque amet numquam at voluptatum. Voluptas occaecati nam ex autem sed qui amet tenetur.++ Iusto mollitia in occaecati odio. Repudiandae similique accusamus quod laboriosam sequi iusto velit. Impedit sapiente aperiam laborum atque voluptate. Magnam sint molestias aperiam exercitationem expedita nam saepe. Dignissimos praesentium rerum labore sunt atque pariatur.++ Qui repellat aspernatur eius dolor accusantium placeat. Ad excepturi distinctio laboriosam voluptate occaecati laudantium praesentium. Necessitatibus consectetur architecto porro natus totam repellendus velit error.++ Pariatur minima libero quasi sit dolore praesentium inventore. Tenetur eius velit delectus nisi accusamus ullam. Fugit accusantium officia ut ipsa adipisci magnam. Accusamus incidunt quos tempora amet tenetur. Est neque expedita blanditiis exercitationem ullam omnis tenetur corrupti.+ - key: slug+ type: string+ source: espresso-machine+ - key: meta_description+ type: string+ source:+ - key: meta_title+ type: string+ source:+ default_locale: en+ supported_locales:+ - de+ - en+ - fr+ "/api/v3/admin/products":+ get:+ summary: List productstags:- - Categories+ - Productssecurity:- api_key: []bearer_auth: []@@@ -19759,13 -14714,94 +14795,96 @@@schema:type: stringresponses:- '204':- description: category deleted- "/api/v3/admin/categories/{id}/reposition":- patch:- summary: Reposition a category+ '200':+ description: products found+ content:+ application/json:+ example:+ data:+ - id: prod_UkLWZg9DAJ- name: Product 623463- slug: product-623463++ name: Product 669274++ slug: product-669274+ meta_title:+ meta_description:+ meta_keywords:- variant_count: 0++ variant_count: 1+ available_on:+ preorder_ships_at:+ purchasable: true+ preorder: false+ in_stock: false+ backorderable: true+ available: true- description: Quidem culpa ea deserunt architecto. Eaque rem hic- nulla totam quibusdam fugit dolorum. Dignissimos perspiciatis- earum deserunt mollitia recusandae voluptas distinctio placeat.- Fugiat animi quibusdam iste facilis sed nostrum ipsam. Nihil nesciunt- vel debitis natus in. Rem praesentium architecto cupiditate deleniti- deserunt. Cumque vero vel provident hic ipsam saepe porro suscipit.++ description: Id et cum dolorum inventore iure ipsam. Quod esse occaecati++ modi voluptas facere fugit. Adipisci sint tempore quis unde exercitationem++ repellendus porro officiis. Placeat consectetur ullam exercitationem++ delectus possimus occaecati. Voluptates laborum corporis suscipit++ deserunt neque ut. Dolorem alias facere sequi inventore occaecati.++ A numquam ex incidunt similique aspernatur inventore. Dolor culpa++ repellat vel tempora. Distinctio cupiditate nihil reiciendis accusantium++ voluptate vero dicta cumque.+ description_html: |-- Quidem culpa ea deserunt architecto. Eaque rem hic nulla totam quibusdam fugit dolorum. Dignissimos perspiciatis earum deserunt mollitia recusandae voluptas distinctio placeat. Fugiat animi quibusdam iste facilis sed nostrum ipsam.- Nihil nesciunt vel debitis natus in. Rem praesentium architecto cupiditate deleniti deserunt. Cumque vero vel provident hic ipsam saepe porro suscipit.++ Id et cum dolorum inventore iure ipsam. Quod esse occaecati modi voluptas facere fugit. Adipisci sint tempore quis unde exercitationem repellendus porro officiis. Placeat consectetur ullam exercitationem delectus possimus occaecati.++ Voluptates laborum corporis suscipit deserunt neque ut. Dolorem alias facere sequi inventore occaecati. A numquam ex incidunt similique aspernatur inventore. Dolor culpa repellat vel tempora. Distinctio cupiditate nihil reiciendis accusantium voluptate vero dicta cumque.+ default_variant_id: variant_UkLWZg9DAJ+ thumbnail_url:+ tags: []+ price:+ id: price_UkLWZg9DAJ+ amount: '19.99'+ amount_in_cents: 1999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$19.99"+ display_compare_at_amount:+ price_list_id:+ variant_id: variant_UkLWZg9DAJ- created_at: '2026-07-26T14:25:36.301Z'- updated_at: '2026-07-26T14:25:36.301Z'++ created_at: '2026-07-27T08:34:07.851Z'++ updated_at: '2026-07-27T08:34:07.851Z'+ original_price:+ status: active+ metadata: {}+ deleted_at:- created_at: '2026-07-26T14:25:36.291Z'- updated_at: '2026-07-26T14:25:36.308Z'++ created_at: '2026-07-27T08:34:07.839Z'++ updated_at: '2026-07-27T08:34:07.859Z'+ tax_category_id: taxcat_UkLWZg9DAJ+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/Product"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ required:+ - data+ - meta+ '401':+ description: unauthorized+ content:+ application/json:+ example:+ error:+ code: authentication_required+ message: Authentication required+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ post:+ summary: Create a producttags:- - Categories+ - Productssecurity:- api_key: []bearer_auth: []@@@ -19785,15 -14868,43 +14951,43 @@@description: Bearer token for admin authenticationschema:type: string- - name: id- in: path- required: true- description: Category ID- schema:- type: stringresponses:- '200':- description: category repositioned+ '201':+ description: product created+ content:+ application/json:+ example:+ id: prod_gbHJdmfrXB+ name: New Product+ slug: new-product+ meta_title:+ meta_description:+ meta_keywords:+ variant_count: 0+ available_on:+ preorder_ships_at:+ purchasable: false+ preorder: false+ in_stock: false+ backorderable: false+ available: false+ description:+ description_html:+ default_variant_id: variant_gbHJdmfrXB+ thumbnail_url:+ tags: []+ price:+ original_price:+ status: draft+ metadata: {}+ deleted_at:- created_at: '2026-07-26T14:25:36.987Z'- updated_at: '2026-07-26T14:25:36.989Z'++ created_at: '2026-07-27T08:34:08.524Z'++ updated_at: '2026-07-27T08:34:08.528Z'+ tax_category_id:+ schema:+ "$ref": "#/components/schemas/Product"+ '422':+ description: validation errorcontent:application/json:example:@@@ -19873,33 -15103,69 +15186,65 @@@content:application/json:example:- data: []- meta:- page: 1- limit: 25- count: 0- pages: 1- from: 0- to: 0- in: 0- previous:- next:+ id: prod_UkLWZg9DAJ- name: Product 664950- slug: product-664950++ name: Product 701979++ slug: product-701979+ meta_title:+ meta_description:+ meta_keywords:- variant_count: 0++ variant_count: 1+ available_on:+ preorder_ships_at:+ purchasable: true+ preorder: false+ in_stock: false+ backorderable: true+ available: true- description: Esse perferendis saepe cumque dolorem inventore maiores- impedit. Vero dicta suscipit commodi veniam qui et fugit. Non est- ratione quia temporibus perspiciatis quos. Rem distinctio natus- exercitationem maiores excepturi qui officia. Quidem dolor corporis- enim tempore nobis dolore porro.- description_html: Esse perferendis saepe cumque dolorem inventore- maiores impedit. Vero dicta suscipit commodi veniam qui et fugit.- Non est ratione quia temporibus perspiciatis quos. Rem distinctio- natus exercitationem maiores excepturi qui officia. Quidem dolor- corporis enim tempore nobis dolore porro.++ description: Minima magni pariatur sit maiores. Sit ratione ducimus++ deleniti nihil officia. Expedita unde debitis at eum quas dolore++ nulla nobis.++ description_html: Minima magni pariatur sit maiores. Sit ratione ducimus++ deleniti nihil officia. Expedita unde debitis at eum quas dolore++ nulla nobis.+ default_variant_id: variant_UkLWZg9DAJ+ thumbnail_url:+ tags: []+ price:+ id: price_UkLWZg9DAJ+ amount: '19.99'+ amount_in_cents: 1999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$19.99"+ display_compare_at_amount:+ price_list_id:+ variant_id: variant_UkLWZg9DAJ- created_at: '2026-07-26T14:25:37.373Z'- updated_at: '2026-07-26T14:25:37.373Z'++ created_at: '2026-07-27T08:34:08.875Z'++ updated_at: '2026-07-27T08:34:08.875Z'+ original_price:+ status: active+ metadata: {}+ deleted_at:- created_at: '2026-07-26T14:25:37.362Z'- updated_at: '2026-07-26T14:25:37.379Z'++ created_at: '2026-07-27T08:34:08.865Z'++ updated_at: '2026-07-27T08:34:08.882Z'+ tax_category_id: taxcat_UkLWZg9DAJschema:- type: object- properties:- data:- type: array- items:- "$ref": "#/components/schemas/Product"- meta:- "$ref": "#/components/schemas/PaginationMeta"- required:- - data- - meta- post:- summary: Add a product to a category+ "$ref": "#/components/schemas/Product"+ '404':+ description: product not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Product not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ patch:+ summary: Update a producttags:- - Categories+ - Productssecurity:- api_key: []bearer_auth: []@@@ -19932,8 -15217,8 +15296,8 @@@application/json:example:id: prod_UkLWZg9DAJ- name: Product 11273- slug: product-11273+ name: Updated Name- slug: product-68964++ slug: product-724606meta_title:meta_description:meta_keywords:@@@ -19945,17 -15230,21 +15309,20 @@@in_stock: falsebackorderable: trueavailable: true- description: Dolor cum vel distinctio dolorum ipsa tempora. Suscipit- pariatur velit ut asperiores minus quis reprehenderit. Tenetur iure- voluptatem necessitatibus dolorem labore corrupti nobis corporis.- Totam numquam ex quidem aliquid at voluptatibus quia. Accusantium- magnam omnis eveniet necessitatibus itaque eligendi. Placeat laboriosam- quo a provident. Dignissimos nam odio ea voluptatibus natus voluptate.- Quas libero illo impedit vitae quo placeat est cupiditate. Tenetur- modi delectus fugit facere adipisci.- description: Impedit quaerat ea at natus exercitationem voluptates- ipsum. Deserunt tenetur officia ut quae hic. Iure quia aut alias- consequatur. Delectus accusantium perferendis dolor veritatis nihil- facilis. Eius ut alias corrupti fugit vitae. Aliquid sequi magnam- aspernatur blanditiis. Quibusdam modi voluptatum cupiditate sit- magni voluptate autem nemo. Maiores quisquam ab sunt ea molestiae- necessitatibus praesentium ullam. Quis distinctio soluta nobis occaecati- eaque veritatis. In distinctio laudantium vel facilis non eaque- dolores. Minima tempora eligendi quisquam perspiciatis quidem. Aut- corporis debitis rem ipsa eaque soluta vitae rerum. Quis sequi officia- voluptatibus saepe quibusdam cumque hic.++ description: Blanditiis commodi aliquid alias incidunt. Molestias++ aspernatur ullam architecto consequatur accusantium. Odit repellendus++ tenetur perferendis pariatur vel. Corporis eligendi nemo voluptatem++ harum dolores. Quam et veniam commodi iure. Omnis cupiditate debitis++ consequuntur autem velit. Repudiandae libero occaecati eligendi++ ut praesentium vel quod distinctio. Vitae inventore harum vero modi++ impedit ratione ullam. Incidunt optio iusto minima officia nihil++ a vel. Deleniti ut dolorem et praesentium tempora dolore cum. Voluptate++ animi aspernatur vel earum similique temporibus. Ut iusto quidem++ minus itaque nam aliquam.description_html: |-- Dolor cum vel distinctio dolorum ipsa tempora. Suscipit pariatur velit ut asperiores minus quis reprehenderit. Tenetur iure voluptatem necessitatibus dolorem labore corrupti nobis corporis. Totam numquam ex quidem aliquid at voluptatibus quia.- Accusantium magnam omnis eveniet necessitatibus itaque eligendi. Placeat laboriosam quo a provident. Dignissimos nam odio ea voluptatibus natus voluptate. Quas libero illo impedit vitae quo placeat est cupiditate. Tenetur modi delectus fugit facere adipisci.- Impedit quaerat ea at natus exercitationem voluptates ipsum. Deserunt tenetur officia ut quae hic. Iure quia aut alias consequatur. Delectus accusantium perferendis dolor veritatis nihil facilis.- Eius ut alias corrupti fugit vitae. Aliquid sequi magnam aspernatur blanditiis. Quibusdam modi voluptatum cupiditate sit magni voluptate autem nemo. Maiores quisquam ab sunt ea molestiae necessitatibus praesentium ullam.- Quis distinctio soluta nobis occaecati eaque veritatis. In distinctio laudantium vel facilis non eaque dolores. Minima tempora eligendi quisquam perspiciatis quidem. Aut corporis debitis rem ipsa eaque soluta vitae rerum. Quis sequi officia voluptatibus saepe quibusdam cumque hic.++ Blanditiis commodi aliquid alias incidunt. Molestias aspernatur ullam architecto consequatur accusantium. Odit repellendus tenetur perferendis pariatur vel.++ Corporis eligendi nemo voluptatem harum dolores. Quam et veniam commodi iure. Omnis cupiditate debitis consequuntur autem velit. Repudiandae libero occaecati eligendi ut praesentium vel quod distinctio.++ Vitae inventore harum vero modi impedit ratione ullam. Incidunt optio iusto minima officia nihil a vel. Deleniti ut dolorem et praesentium tempora dolore cum. Voluptate animi aspernatur vel earum similique temporibus. Ut iusto quidem minus itaque nam aliquam.default_variant_id: variant_UkLWZg9DAJthumbnail_url:tags: []@@@ -19970,14 -15259,14 +15337,14 @@@display_compare_at_amount:price_list_id:variant_id: variant_UkLWZg9DAJ- created_at: '2026-07-20T12:36:57.672Z'- updated_at: '2026-07-20T12:36:57.672Z'- created_at: '2026-07-26T14:25:38.040Z'- updated_at: '2026-07-26T14:25:38.040Z'++ created_at: '2026-07-27T08:34:09.479Z'++ updated_at: '2026-07-27T08:34:09.479Z'original_price:status: activemetadata: {}deleted_at:- created_at: '2026-07-20T12:36:57.642Z'- updated_at: '2026-07-20T12:36:57.684Z'- created_at: '2026-07-26T14:25:38.027Z'- updated_at: '2026-07-26T14:25:38.353Z'++ created_at: '2026-07-27T08:34:09.470Z'++ updated_at: '2026-07-27T08:34:09.741Z'tax_category_id: taxcat_UkLWZg9DAJschema:"$ref": "#/components/schemas/Product"@@@ -20231,245 -15660,30 +15738,135 @@@content:application/json:example:- error:- code: validation_error- message: Name can't be blank- details:- name:- - can't be blank- schema:- "$ref": "#/components/schemas/ErrorResponse"+ product_count: 1+ category_count: 1requestBody:content:- application/json:- schema:- type: object- properties:- name:- type: string- example: On Sale- automatic:- type: boolean- example: true- rules_match_policy:- type: string- enum:- - all- - any- example: all- sort_order:- type: string- example: manual- permalink:- type: string- description:- type: string- meta_title:- type: string- meta_description:- type: string- meta_keywords:- type: string- rules:+ application/json:+ schema:+ type: object+ required:+ - ids+ - category_ids+ properties:+ ids:type: array- description: Full desired rule set. Entries with an id update, id-less- entries create, omitted rules are removed.items:- type: object- properties:- id:- type: string- example: crule_abc123- type:- type: string- example: Spree::CollectionRules::Tag- value:- type: string- example: summer- match_policy:- type: string- example: contains- required:- - name- "/api/v3/admin/collections/{id}":- get:- summary: Get a collection+ type: string+ category_ids:+ type: array+ items:+ type: string++ "/api/v3/admin/products/bulk_add_to_collections":++ post:++ summary: Bulk-add products to collections+ tags:- - Collections++ - Products+ security:+ - api_key: []+ bearer_auth: []+ description: |-- Returns a single collection by ID, including its rules.++ Attaches each product in `ids` to every manual collection in `collection_ids`.++ Automatic (rule-based) and sibling-store collections are silently ignored.+- **Required scope:** `read_collections` (for API-key authentication).++++ **Required scope:** `write_products` (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Collection ID- schema:- type: string- - name: expand- in: query- required: false- description: Comma-separated associations to expand (e.g., custom_fields,- translations).+ schema:+ type: string+ responses:+ '200':- description: collection found- content:- application/json:- example:- id: coll_UkLWZg9DAJ- name: Summer Sale- permalink: summer-sale- position: 1- sort_order: manual- meta_title:- meta_description:- meta_keywords:- products_count: 0- description: ''- description_html: ''- image_url:- square_image_url:- automatic: false- rules_match_policy: all- metadata: {}- created_at: '2026-07-20T12:37:01.397Z'- updated_at: '2026-07-20T12:37:01.397Z'- rules: []- schema:- "$ref": "#/components/schemas/Collection"- '404':- description: collection not found++ description: products added to collections+ content:+ application/json:+ example:- error:- code: record_not_found- message: Collection not found++ product_count: 1++ collection_count: 1+ schema:- "$ref": "#/components/schemas/ErrorResponse"- patch:- summary: Update a collection++ type: object++ properties:++ product_count:++ type: integer++ collection_count:++ type: integer++ requestBody:++ content:++ application/json:++ schema:++ type: object++ required:++ - ids++ - collection_ids++ properties:++ ids:++ type: array++ items:++ type: string++ collection_ids:++ type: array++ items:++ type: string++ "/api/v3/admin/products/bulk_remove_from_collections":++ post:++ summary: Bulk-remove products from collections+ tags:- - Collections++ - Products+ security:+ - api_key: []+ bearer_auth: []+ description: |-- Updates a collection. Send `position` to reorder it within the flat list; send the full `rules` set to sync automatic rules.++ Detaches each product in `ids` from every collection in `collection_ids`.+- **Required scope:** `write_collections` (for API-key authentication).++ **Required scope:** `write_products` (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true- description: Bearer token for admin authentication- schema:- type: string- - name: id- in: path- required: true- description: Collection ID+ schema:+ type: string+ responses:+ '200':- description: collection updated++ description: products removed from collections+ content:+ application/json:+ example:- id: coll_UkLWZg9DAJ- name: Winter Sale- permalink: summer-sale- position: 1- sort_order: manual- meta_title:- meta_description:- meta_keywords:- products_count: 0- description: ''- description_html: ''- image_url:- square_image_url:- automatic: false- rules_match_policy: all- metadata: {}- created_at: '2026-07-20T12:37:01.922Z'- updated_at: '2026-07-20T12:37:02.181Z'- rules: []- schema:- "$ref": "#/components/schemas/Collection"++ product_count: 1++ collection_count: 1+ requestBody:+ content:+ application/json:+ schema:+ type: object++ required:++ - ids++ - collection_ids+ properties:- name:- type: string- example: Winter Sale- permalink:- type: string- description:- type: string- meta_title:- type: string- meta_description:- type: string- meta_keywords:- type: string- sort_order:- type: string- automatic:- type: boolean- rules_match_policy:- type: string- enum:- - all- - any- position:- type: integer- description: Reorders the collection within the flat list (acts_as_list)- rules:++ ids:+ type: array- description: Full desired rule set (see create).+ items:- type: object- properties:- id:- type: string- type:- type: string- value:- type: string- match_policy:- type: string- delete:- summary: Delete a collection++ type: string++ collection_ids:++ type: array++ items:++ type: string+ "/api/v3/admin/products/bulk_add_to_channels":+ post:+ summary: Bulk-add products to channelstags:- - Collections+ - Productssecurity:- api_key: []bearer_auth: []@@@ -20778,138 -16088,88 +16271,88 @@@application/json:example:data:- - id: imp_UkLWZg9DAJ- number: IM817900786- type: Spree::Imports::Products- rows_count: 0- created_at: '2026-07-20T12:37:26.239Z'- updated_at: '2026-07-20T12:37:26.247Z'- status: pending- owner_type: Spree::Store- owner_id: store_UkLWZg9DAJ- user_id: admin_UkLWZg9DAJ- processing_errors:- preferred_delimiter: ","- original_filename: products_import.csv- original_byte_size: 3612- original_file_url: "/api/v3/admin/imports/imp_UkLWZg9DAJ/download"- completed_rows_count: 0- failed_rows_count: 0- schema_fields:- - name: slug- label: Slug- required: true- - name: sku- label: SKU- required: true- - name: name- label: Name- required: true- - name: price- label: Price- required: true- - name: status- label: Status- required: false- - name: description- label: Description- required: false- - name: meta_title- label: Meta Title- required: false- - name: meta_description- label: Meta Description- required: false- - name: meta_keywords- label: Meta Keywords- required: false- - name: tags- label: Tags- required: false- - name: compare_at_price- label: Compare at Price- required: false- - name: currency- label: Currency- required: false- - name: width- label: Width- required: false- - name: height- label: Height- required: false- - name: depth- label: Depth- required: false- - name: dimensions_unit- label: Dimensions Unit- required: false- - name: weight- label: Weight- required: false- - name: weight_unit- label: Weight Unit- required: false- - name: available_on- label: Available On- required: false- - name: discontinue_on- label: Discontinue On- required: false- - name: track_inventory- label: Track Inventory- required: false- - name: inventory_count- label: Inventory Count- required: false- - name: inventory_backorderable- label: Inventory Backorderable- required: false- - name: tax_category- label: Tax Category- required: false- - name: shipping_category- label: Shipping Category- required: false- - name: image1_src- label: Image 1 URL- required: false- - name: image2_src- label: Image 2 URL- required: false- - name: image3_src- label: Image 3 URL- required: false- - name: option1_name- label: Option 1 Name- required: false- - name: option1_value- label: Option 1 Value- required: false- - name: option2_name- label: Option 2 Name- required: false- - name: option2_value- label: Option 2 Value- required: false- - name: option3_name- label: Option 3 Name- required: false- - name: option3_value- label: Option 3 Value- required: false- - name: category1- label: Category 1- required: false- - name: category2- label: Category 2- required: false- - name: category3- label: Category 3- required: false- csv_headers: []- sample_row: {}- mappings: []+ - id: coupon_UkLWZg9DAJ+ code: AAA111+ state: unused- created_at: '2026-07-26T14:24:18.820Z'- updated_at: '2026-07-26T14:24:18.820Z'++ created_at: '2026-07-27T08:32:58.114Z'++ updated_at: '2026-07-27T08:32:58.114Z'+ promotion_id: promo_UkLWZg9DAJ+ order_id:+ - id: coupon_gbHJdmfrXB+ code: BBB222+ state: unused- created_at: '2026-07-26T14:24:18.821Z'- updated_at: '2026-07-26T14:24:18.821Z'++ created_at: '2026-07-27T08:32:58.115Z'++ updated_at: '2026-07-27T08:32:58.115Z'+ promotion_id: promo_UkLWZg9DAJ+ order_id:+ meta:+ page: 1+ limit: 25+ count: 2+ pages: 1+ from: 1+ to: 2+ in: 2+ previous:+ next:+ "/api/v3/admin/promotions/{promotion_id}/promotion_actions":+ parameters:+ - name: promotion_id+ in: path+ required: true+ schema:+ type: string+ get:+ summary: List actions for a promotion+ tags:+ - Promotions+ security:+ - api_key: []+ bearer_auth: []+ description: "**Required scope:** `read_promotions` (for API-key authentication)."+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: actions } = await client.promotions.actions.list('promo_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api get /promotions/{promotion_id}/promotion_actions+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: actions found+ content:+ application/json:+ example:+ data:+ - id: pact_UkLWZg9DAJ- created_at: '2026-07-26T14:25:42.452Z'- updated_at: '2026-07-26T14:25:42.452Z'++ created_at: '2026-07-27T08:34:14.142Z'++ updated_at: '2026-07-27T08:34:14.142Z'+ type: free_shipping+ promotion_id: promo_UkLWZg9DAJ+ preferences: {}+ preference_schema: []+ label: Free shipping+ calculator:+ line_items:meta:page: 1limit: 25@@@ -20957,296 -16225,549 +16408,549 @@@content:application/json:example:- id: imp_gbHJdmfrXB- number: IM314255829- type: Spree::Imports::Products- rows_count: 0- created_at: '2026-07-20T12:37:26.533Z'- updated_at: '2026-07-20T12:37:26.567Z'- status: mapping- owner_type: Spree::Store- owner_id: store_UkLWZg9DAJ- user_id: admin_UkLWZg9DAJ- processing_errors:- preferred_delimiter: ","- original_filename: import.csv- original_byte_size: 44- original_file_url: "/api/v3/admin/imports/imp_gbHJdmfrXB/download"- completed_rows_count: 0- failed_rows_count: 0- schema_fields:- - name: slug- label: Slug- required: true- - name: sku- label: SKU- required: true- - name: name- label: Name- required: true- - name: price- label: Price- required: true- - name: status- label: Status- required: false- - name: description- label: Description- required: false- - name: meta_title- label: Meta Title- required: false- - name: meta_description- label: Meta Description- required: false- - name: meta_keywords- label: Meta Keywords- required: false- - name: tags- label: Tags- required: false- - name: compare_at_price- label: Compare at Price- required: false- - name: currency+ id: pact_UkLWZg9DAJ- created_at: '2026-07-26T14:25:43.023Z'- updated_at: '2026-07-26T14:25:43.023Z'++ created_at: '2026-07-27T08:34:14.662Z'++ updated_at: '2026-07-27T08:34:14.662Z'+ type: free_shipping+ promotion_id: promo_UkLWZg9DAJ+ preferences: {}+ preference_schema: []+ label: Free shipping+ calculator:+ line_items:+ '422':+ description: unknown action type+ content:+ application/json:+ example:+ error:+ code: unknown_promotion_action_type+ message: Unknown type+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ type:+ type: string+ example: free_shipping+ preferences:+ type: object+ additionalProperties: true+ required:+ - type+ "/api/v3/admin/promotions/{promotion_id}/promotion_actions/{id}":+ parameters:+ - name: promotion_id+ in: path+ required: true+ schema:+ type: string+ - name: id+ in: path+ required: true+ schema:+ type: string+ delete:+ summary: Delete an action from a promotion+ tags:+ - Promotions+ security:+ - api_key: []+ bearer_auth: []+ description: "**Required scope:** `write_promotions` (for API-key authentication)."+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.promotions.actions.delete('promo_UkLWZg9DAJ', 'promoact_k5nR8xLq')+ - lang: bash+ label: Spree CLI+ source: spree api delete /promotions/{promotion_id}/promotion_actions/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '204':+ description: action deleted+ "/api/v3/admin/promotions/{promotion_id}/promotion_rules":+ parameters:+ - name: promotion_id+ in: path+ required: true+ schema:+ type: string+ get:+ summary: List rules for a promotion+ tags:+ - Promotions+ security:+ - api_key: []+ bearer_auth: []+ description: "**Required scope:** `read_promotions` (for API-key authentication)."+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: rules } = await client.promotions.rules.list('promo_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api get /promotions/{promotion_id}/promotion_rules+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: rules found+ content:+ application/json:+ example:+ data:+ - id: prorule_UkLWZg9DAJ- created_at: '2026-07-26T14:25:43.672Z'- updated_at: '2026-07-26T14:25:43.672Z'++ created_at: '2026-07-27T08:34:15.196Z'++ updated_at: '2026-07-27T08:34:15.196Z'+ type: currency+ promotion_id: promo_UkLWZg9DAJ+ preferences:+ currency: USD+ preference_schema:+ - key: currency+ type: string+ default:label: Currency- required: false- - name: width- label: Width- required: false- - name: height- label: Height- required: false- - name: depth- label: Depth- required: false- - name: dimensions_unit- label: Dimensions Unit- required: false- - name: weight- label: Weight- required: false- - name: weight_unit- label: Weight Unit- required: false- - name: available_on- label: Available On- required: false- - name: discontinue_on- label: Discontinue On- required: false- - name: track_inventory- label: Track Inventory- required: false- - name: inventory_count- label: Inventory Count- required: false- - name: inventory_backorderable- label: Inventory Backorderable- required: false- - name: tax_category- label: Tax Category- required: false- - name: shipping_category- label: Shipping Category- required: false- - name: image1_src- label: Image 1 URL- required: false- - name: image2_src- label: Image 2 URL- required: false- - name: image3_src- label: Image 3 URL- required: false- - name: option1_name- label: Option 1 Name- required: false- - name: option1_value- label: Option 1 Value- required: false- - name: option2_name- label: Option 2 Name- required: false- - name: option2_value- label: Option 2 Value- required: false- - name: option3_name- label: Option 3 Name- required: false- - name: option3_value- label: Option 3 Value- required: false- - name: category1- label: Category 1- required: false- - name: category2- label: Category 2- required: false- - name: category3- label: Category 3- required: false- csv_headers:- - slug- - sku- - name- - price- sample_row:- slug: widget- sku: W-1- name: Widget- price: '10.00'- mappings:- - id: immap_UkLWZg9DAJ- schema_field: slug- file_column: slug- required: true- - id: immap_gbHJdmfrXB- schema_field: sku- file_column: sku- required: true- - id: immap_EfhxLZ9ck8- schema_field: name- file_column: name- required: true- - id: immap_VqXmZF31wY- schema_field: price- file_column: price- required: true- - id: immap_uw2YK1rnl0- schema_field: status- file_column:- required: false- - id: immap_OIJLhNcSbf- schema_field: description- file_column:- required: false- - id: immap_AXs1igzRC6- schema_field: meta_title- file_column:- required: false- - id: immap_p6klVeMgbn- schema_field: meta_description- file_column:- required: false- - id: immap_nJqfPa3Cpe- schema_field: meta_keywords- file_column:- required: false- - id: immap_98FqgRua4h- schema_field: tags- file_column:- required: false- - id: immap_xhoCpeNMWu- schema_field: compare_at_price- file_column:- required: false- - id: immap_vEmzDoNU0H- schema_field: currency- file_column:- required: false- - id: immap_2KY5XM6frI- schema_field: width- file_column:- required: false- - id: immap_HOVtlDrOmL- schema_field: height- file_column:- required: false- - id: immap_ed6l8wVqSM- schema_field: depth- file_column:- required: false- - id: immap_s18jaGonyx- schema_field: dimensions_unit- file_column:- required: false- - id: immap_GZUcnUYI5A- schema_field: weight- file_column:- required: false- - id: immap_ROeNhrwyV9- schema_field: weight_unit- file_column:- required: false- - id: immap_L3pHOn63Vw- schema_field: available_on- file_column:- required: false- - id: immap_PQNMcnNFWw- schema_field: discontinue_on- file_column:- required: false- - id: immap_C9SrJgpzQ4- schema_field: track_inventory- file_column:- required: false- - id: immap_YHETxCGlb0- schema_field: inventory_count- file_column:- required: false- - id: immap_5OQZnCRf8J- schema_field: inventory_backorderable- file_column:- required: false- - id: immap_F0GX8NaP3Y- schema_field: tax_category- file_column:- required: false- - id: immap_kOKT9MVfb0- schema_field: shipping_category- file_column:- required: false- - id: immap_3uWpPTcf5W- schema_field: image1_src- file_column:- required: false- - id: immap_D6Psx31WaT- schema_field: image2_src- file_column:- required: false- - id: immap_msx3nOJap6- schema_field: image3_src- file_column:- required: false- - id: immap_5CQZnCRf8J- schema_field: option1_name- file_column:- required: false- - id: immap_M2nyloHRUQ- schema_field: option1_value- file_column:- required: false- - id: immap_prklVeMgbn- schema_field: option2_name- file_column:- required: false- - id: immap_so8jaGonyx- schema_field: option2_value- file_column:- required: false- - id: immap_rsClYtECFI- schema_field: option3_name- file_column:- required: false- - id: immap_8DR0I7fEbw- schema_field: option3_value- file_column:- required: false- - id: immap_aAtNvLSUAr- schema_field: category1- file_column:- required: false- - id: immap_QiA48cIW7A- schema_field: category2- file_column:- required: false- - id: immap_QDA48cIW7A- schema_field: category3- file_column:- required: false+ product_ids:+ category_ids:+ customer_ids:+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ post:+ summary: Create a rule on a promotion+ tags:+ - Promotions+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Adds a new rule to a promotion. The `type` is the wire shorthand from `GET /promotion_rules/types` (e.g. `currency`, `item_total`, `product`). Fully-qualified Ruby class names are also accepted for backward compatibility.++ **Required scope:** `write_promotions` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const rule = await client.promotions.rules.create('promo_UkLWZg9DAJ', {+ type: 'currency',+ preferences: { currency: 'EUR' },+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /promotions/{promotion_id}/promotion_rules -d '{"type":"currency","preferences":{"currency":"EUR"}}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '201':+ description: rule created with preferences+ content:+ application/json:+ example:+ id: prorule_UkLWZg9DAJ- created_at: '2026-07-26T14:25:44.285Z'- updated_at: '2026-07-26T14:25:44.285Z'++ created_at: '2026-07-27T08:34:15.714Z'++ updated_at: '2026-07-27T08:34:15.714Z'+ type: currency+ promotion_id: promo_UkLWZg9DAJ+ preferences:+ currency: EUR+ preference_schema:+ - key: currency+ type: string+ default:+ label: Currency+ product_ids:+ category_ids:+ customer_ids:+ '422':+ description: unknown rule type+ content:+ application/json:+ example:+ error:+ code: unknown_promotion_rule_type+ message: Unknown type+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ type:+ type: string+ example: currency+ preferences:+ type: object+ additionalProperties: true+ required:+ - type+ "/api/v3/admin/promotions/{promotion_id}/promotion_rules/{id}":+ parameters:+ - name: promotion_id+ in: path+ required: true+ schema:+ type: string+ - name: id+ in: path+ required: true+ schema:+ type: string+ patch:+ summary: Update a rule's preferences+ tags:+ - Promotions+ security:+ - api_key: []+ bearer_auth: []+ description: "**Required scope:** `write_promotions` (for API-key authentication)."+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const rule = await client.promotions.rules.update('promo_UkLWZg9DAJ', 'promorule_k5nR8xLq', {+ preferences: { currency: 'USD' },+ })+ - lang: bash+ label: Spree CLI+ source: spree api patch /promotions/{promotion_id}/promotion_rules/{id} -d+ '{"preferences":{"currency":"USD"}}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: rule updated+ content:+ application/json:+ example:+ id: prorule_UkLWZg9DAJ- created_at: '2026-07-26T14:25:44.596Z'- updated_at: '2026-07-26T14:25:44.894Z'++ created_at: '2026-07-27T08:34:15.988Z'++ updated_at: '2026-07-27T08:34:16.253Z'+ type: currency+ promotion_id: promo_UkLWZg9DAJ+ preferences:+ currency: GBP+ preference_schema:+ - key: currency+ type: string+ default:+ label: Currency+ product_ids:+ category_ids:+ customer_ids:+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ preferences:+ type: object+ additionalProperties: true+ delete:+ summary: Delete a rule from a promotion+ tags:+ - Promotions+ security:+ - api_key: []+ bearer_auth: []+ description: "**Required scope:** `write_promotions` (for API-key authentication)."+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.promotions.rules.delete('promo_UkLWZg9DAJ', 'promorule_k5nR8xLq')+ - lang: bash+ label: Spree CLI+ source: spree api delete /promotions/{promotion_id}/promotion_rules/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '204':+ description: rule deleted+ "/api/v3/admin/promotions":+ get:+ summary: List promotions+ tags:+ - Promotions+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns the store's promotions, including manual coupon and automatic promotions.++ **Required scope:** `read_promotions` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: promotions } = await client.promotions.list()+ - lang: bash+ label: Spree CLI+ source: spree api get /promotions+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: promotions found+ content:+ application/json:+ example:+ data:+ - id: promo_UkLWZg9DAJ+ name: Summer Sale+ description:+ code: summer- starts_at: '2026-07-26T14:25:45.219Z'++ starts_at: '2026-07-27T08:34:16.534Z'+ expires_at:+ usage_limit:+ match_policy: all+ path:+ kind: coupon_code+ multi_codes: false+ number_of_codes:+ code_prefix:+ promotion_category_id:+ metadata: {}- created_at: '2026-07-26T14:25:45.219Z'- updated_at: '2026-07-26T14:25:45.219Z'++ created_at: '2026-07-27T08:34:16.534Z'++ updated_at: '2026-07-27T08:34:16.534Z'+ action_ids: []+ rule_ids: []+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ post:+ summary: Create a promotion+ tags:+ - Promotions+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Creates a new promotion. `code` is required for single-code coupon promotions;+ pass `multi_codes: true` with `number_of_codes` to auto-generate a batch.++ Rules and actions can be created in the same request by passing arrays of+ `{ type, preferences, ... }` rows. The server reconciles to the desired set:+ new rows are built, existing rows (by `id`) are updated, omitted rows are removed.+++ **Required scope:** `write_promotions` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ // Single coupon code, no rules/actions+ const promotion = await client.promotions.create({+ name: 'Black Friday',+ code: 'BLACKFRIDAY',+ starts_at: '2026-11-29T00:00:00Z',+ expires_at: '2026-12-01T00:00:00Z',+ })++ // One-shot: promotion + rules + actions in a single request+ const blackFriday = await client.promotions.create({+ name: 'Black Friday',+ code: 'BLACKFRIDAY',+ kind: 'coupon_code',+ starts_at: '2026-11-29T00:00:00Z',+ expires_at: '2026-12-01T00:00:00Z',+ match_policy: 'all',+ rules: [+ {+ type: 'currency',+ preferences: { currency: 'USD' },+ },+ {+ type: 'item_total',+ preferences: { amount_min: 100, operator_min: 'gte' },+ },+ {+ type: 'product',+ preferences: { match_policy: 'any' },+ product_ids: ['prod_abc123', 'prod_def456'],+ },+ ],+ actions: [+ {+ type: 'create_item_adjustments',+ calculator: {+ type: 'percent_on_line_item',+ preferences: { percent: 25 },+ },+ },+ { type: 'free_shipping' },+ ],+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /promotions -d '{"name":"Black Friday","code":"BLACKFRIDAY","starts_at":"2026-11-29T00:00:00Z","expires_at":"2026-12-01T00:00:00Z"}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '201':+ description: promotion created with rules and actions+ content:+ application/json:+ example:+ id: promo_gbHJdmfrXB+ name: Black Friday+ description:+ code: blackfriday-os- starts_at: '2026-07-26T14:25:46.152Z'++ starts_at: '2026-07-27T08:34:17.378Z'+ expires_at:+ usage_limit:+ match_policy: all+ path:+ kind: coupon_code+ multi_codes: false+ number_of_codes:+ code_prefix:+ promotion_category_id:+ metadata: {}- created_at: '2026-07-26T14:25:46.152Z'- updated_at: '2026-07-26T14:25:46.179Z'++ created_at: '2026-07-27T08:34:17.378Z'++ updated_at: '2026-07-27T08:34:17.400Z'+ action_ids:+ - pact_UkLWZg9DAJ+ - pact_gbHJdmfrXB+ rule_ids:+ - prorule_UkLWZg9DAJ+ - prorule_gbHJdmfrXB+ - prorule_EfhxLZ9ck8'422':- description: unknown import type+ description: invalid paramscontent:application/json:example:@@@ -21322,18 -16916,33 +17099,33 @@@type: stringresponses:'200':- description: CSV template+ description: promotion foundcontent:- application/json: {}- text/csv:- schema:- type: string- format: binary- "/api/v3/admin/imports/{id}":- get:- summary: Show an import+ application/json:+ example:+ id: promo_UkLWZg9DAJ+ name: Summer Sale+ description:+ code: summer- starts_at: '2026-07-26T14:25:46.529Z'++ starts_at: '2026-07-27T08:34:17.675Z'+ expires_at:+ usage_limit:+ match_policy: all+ path:+ kind: coupon_code+ multi_codes: false+ number_of_codes:+ code_prefix:+ promotion_category_id:+ metadata: {}- created_at: '2026-07-26T14:25:46.530Z'- updated_at: '2026-07-26T14:25:46.530Z'++ created_at: '2026-07-27T08:34:17.675Z'++ updated_at: '2026-07-27T08:34:17.675Z'+ action_ids: []+ rule_ids: []+ patch:+ summary: Update a promotiontags:- - Imports+ - Promotionssecurity:- api_key: []bearer_auth: []@@@ -21363,142 -17029,122 +17212,122 @@@content:application/json:example:- id: imp_UkLWZg9DAJ- number: IM765689597- type: Spree::Imports::Products- rows_count: 0- created_at: '2026-07-20T12:37:27.371Z'- updated_at: '2026-07-20T12:37:27.377Z'- status: pending- owner_type: Spree::Store- owner_id: store_UkLWZg9DAJ- user_id: admin_UkLWZg9DAJ- processing_errors:- preferred_delimiter: ","- original_filename: products_import.csv- original_byte_size: 3612- original_file_url: "/api/v3/admin/imports/imp_UkLWZg9DAJ/download"- completed_rows_count: 0- failed_rows_count: 0- schema_fields:- - name: slug- label: Slug- required: true- - name: sku- label: SKU- required: true- - name: name- label: Name- required: true- - name: price- label: Price- required: true- - name: status- label: Status- required: false- - name: description- label: Description- required: false- - name: meta_title- label: Meta Title- required: false- - name: meta_description- label: Meta Description- required: false- - name: meta_keywords- label: Meta Keywords- required: false- - name: tags- label: Tags- required: false- - name: compare_at_price- label: Compare at Price- required: false- - name: currency- label: Currency- required: false- - name: width- label: Width- required: false- - name: height- label: Height- required: false- - name: depth- label: Depth- required: false- - name: dimensions_unit- label: Dimensions Unit- required: false- - name: weight- label: Weight- required: false- - name: weight_unit- label: Weight Unit- required: false- - name: available_on- label: Available On- required: false- - name: discontinue_on- label: Discontinue On- required: false- - name: track_inventory- label: Track Inventory- required: false- - name: inventory_count- label: Inventory Count- required: false- - name: inventory_backorderable- label: Inventory Backorderable- required: false- - name: tax_category- label: Tax Category- required: false- - name: shipping_category- label: Shipping Category- required: false- - name: image1_src- label: Image 1 URL- required: false- - name: image2_src- label: Image 2 URL- required: false- - name: image3_src- label: Image 3 URL- required: false- - name: option1_name- label: Option 1 Name- required: false- - name: option1_value- label: Option 1 Value- required: false- - name: option2_name- label: Option 2 Name- required: false- - name: option2_value- label: Option 2 Value- required: false- - name: option3_name- label: Option 3 Name- required: false- - name: option3_value- label: Option 3 Value- required: false- - name: category1- label: Category 1- required: false- - name: category2- label: Category 2- required: false- - name: category3- label: Category 3- required: false- csv_headers: []- sample_row: {}- mappings: []+ id: promo_UkLWZg9DAJ+ name: Summer Sale+ description:+ code: summer- starts_at: '2026-07-26T14:25:47.622Z'++ starts_at: '2026-07-27T08:34:18.489Z'+ expires_at:+ usage_limit:+ match_policy: all+ path:+ kind: coupon_code+ multi_codes: false+ number_of_codes:+ code_prefix:+ promotion_category_id:+ metadata: {}- created_at: '2026-07-26T14:25:47.622Z'- updated_at: '2026-07-26T14:25:47.927Z'++ created_at: '2026-07-27T08:34:18.489Z'++ updated_at: '2026-07-27T08:34:18.749Z'+ action_ids: []+ rule_ids: []+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ description:+ type: string+ nullable: true+ code:+ type: string+ nullable: true+ starts_at:+ type: string+ format: date-time+ nullable: true+ expires_at:+ type: string+ format: date-time+ nullable: true+ usage_limit:+ type: integer+ nullable: true+ match_policy:+ type: string+ enum:+ - all+ - any+ kind:+ type: string+ enum:+ - coupon_code+ - automatic+ promotion_category_id:+ type: string+ nullable: true+ rules:+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ nullable: true+ description: Pass to update an existing rule; omit to build+ a new one+ type:+ type: string+ example: currency+ preferences:+ type: object+ additionalProperties: true+ product_ids:+ type: array+ items:+ type: string+ category_ids:+ type: array+ items:+ type: string+ customer_ids:+ type: array+ items:+ type: string+ required:+ - type+ actions:+ type: array+ items:+ type: object+ properties:+ id:+ type: string+ nullable: true+ type:+ type: string+ example: free_shipping+ preferences:+ type: object+ additionalProperties: true+ calculator:+ type: object+ properties:+ type:+ type: string+ example: flat_percent_item_total+ preferences:+ type: object+ additionalProperties: true+ required:+ - typedelete:- summary: Delete an import+ summary: Delete a promotiontags:- - Imports+ - Promotionssecurity:- api_key: []bearer_auth: []@@@ -21600,641 -17288,4518 +17471,5199 @@@content:application/json:example:- id: imp_gbHJdmfrXB- number: IM239088810- type: Spree::Imports::Products- rows_count: 0- created_at: '2026-07-20T12:37:28.180Z'- updated_at: '2026-07-20T12:37:28.241Z'- status: completed_mapping- owner_type: Spree::Store- owner_id: store_UkLWZg9DAJ- user_id: admin_UkLWZg9DAJ- processing_errors:- preferred_delimiter: ","- original_filename: products_import.csv- original_byte_size: 3612- original_file_url: "/api/v3/admin/imports/imp_gbHJdmfrXB/download"- completed_rows_count: 0- failed_rows_count: 0- schema_fields:- - name: slug- label: Slug- required: true- - name: sku- label: SKU- required: true- - name: name- label: Name- required: true- - name: price- label: Price- required: true- - name: status- label: Status- required: false- - name: description- label: Description- required: false- - name: meta_title- label: Meta Title- required: false- - name: meta_description- label: Meta Description- required: false- - name: meta_keywords- label: Meta Keywords- required: false- - name: tags- label: Tags- required: false- - name: compare_at_price- label: Compare at Price- required: false- - name: currency+ data:+ - type: category+ label: Categories+ description:+ preference_schema:+ - key: match_policy+ type: string+ default: any+ - type: channel+ label: Channel(s)+ description:+ preference_schema:+ - key: channel_ids+ type: array+ default: []+ - type: country+ label: Country+ description:+ preference_schema:+ - key: country_isos+ type: array+ default: []+ - key: country_id+ type: integer+ default:+ - key: country_iso+ type: string+ default:+ - type: currencylabel: Currency- required: false- - name: width- label: Width- required: false- - name: height- label: Height- required: false- - name: depth- label: Depth- required: false- - name: dimensions_unit- label: Dimensions Unit- required: false- - name: weight- label: Weight- required: false- - name: weight_unit- label: Weight Unit- required: false- - name: available_on- label: Available On- required: false- - name: discontinue_on- label: Discontinue On- required: false- - name: track_inventory- label: Track Inventory- required: false- - name: inventory_count- label: Inventory Count- required: false- - name: inventory_backorderable- label: Inventory Backorderable- required: false- - name: tax_category- label: Tax Category- required: false- - name: shipping_category- label: Shipping Category- required: false- - name: image1_src- label: Image 1 URL- required: false- - name: image2_src- label: Image 2 URL- required: false- - name: image3_src- label: Image 3 URL- required: false- - name: option1_name- label: Option 1 Name- required: false- - name: option1_value- label: Option 1 Value- required: false- - name: option2_name- label: Option 2 Name- required: false- - name: option2_value- label: Option 2 Value- required: false- - name: option3_name- label: Option 3 Name- required: false- - name: option3_value- label: Option 3 Value- required: false- - name: category1- label: Category 1- required: false- - name: category2- label: Category 2- required: false- - name: category3- label: Category 3- required: false- csv_headers: []- sample_row: {}- mappings:- - id: immap_UkLWZg9DAJ- schema_field: slug- file_column: slug- required: true- - id: immap_gbHJdmfrXB- schema_field: sku- file_column: sku- required: true- - id: immap_EfhxLZ9ck8- schema_field: name- file_column: name- required: true- - id: immap_VqXmZF31wY- schema_field: price- file_column: price- required: true- - id: immap_uw2YK1rnl0- schema_field: status- file_column: status- required: false- - id: immap_OIJLhNcSbf- schema_field: description- file_column: description- required: false- - id: immap_AXs1igzRC6- schema_field: meta_title- file_column: meta_title- required: false- - id: immap_p6klVeMgbn- schema_field: meta_description- file_column: meta_description- required: false- - id: immap_nJqfPa3Cpe- schema_field: meta_keywords- file_column: meta_keywords- required: false- - id: immap_98FqgRua4h- schema_field: tags- file_column: tags- required: false- - id: immap_xhoCpeNMWu- schema_field: compare_at_price- file_column: compare_at_price- required: false- - id: immap_vEmzDoNU0H- schema_field: currency- file_column: currency- required: false- - id: immap_2KY5XM6frI- schema_field: width- file_column: width- required: false- - id: immap_HOVtlDrOmL- schema_field: height- file_column: height- required: false- - id: immap_ed6l8wVqSM- schema_field: depth- file_column: depth- required: false- - id: immap_s18jaGonyx- schema_field: dimensions_unit- file_column: dimensions_unit- required: false- - id: immap_GZUcnUYI5A- schema_field: weight- file_column: weight- required: false- - id: immap_ROeNhrwyV9- schema_field: weight_unit- file_column: weight_unit- required: false- - id: immap_L3pHOn63Vw- schema_field: available_on- file_column: available_on- required: false- - id: immap_PQNMcnNFWw- schema_field: discontinue_on- file_column: discontinue_on- required: false- - id: immap_C9SrJgpzQ4- schema_field: track_inventory- file_column: track_inventory- required: false- - id: immap_YHETxCGlb0- schema_field: inventory_count- file_column: inventory_count- required: false- - id: immap_5OQZnCRf8J- schema_field: inventory_backorderable- file_column: inventory_backorderable- required: false- - id: immap_F0GX8NaP3Y- schema_field: tax_category- file_column: tax_category- required: false- - id: immap_kOKT9MVfb0- schema_field: shipping_category- file_column:- required: false- - id: immap_3uWpPTcf5W- schema_field: image1_src- file_column: image1_src- required: false- - id: immap_D6Psx31WaT- schema_field: image2_src- file_column: image2_src- required: false- - id: immap_msx3nOJap6- schema_field: image3_src- file_column: image3_src- required: false- - id: immap_5CQZnCRf8J- schema_field: option1_name- file_column: option1_name- required: false- - id: immap_M2nyloHRUQ- schema_field: option1_value- file_column: option1_value- required: false- - id: immap_prklVeMgbn- schema_field: option2_name- file_column: option2_name- required: false- - id: immap_so8jaGonyx- schema_field: option2_value- file_column: option2_value- required: false- - id: immap_rsClYtECFI- schema_field: option3_name- file_column: option3_name- required: false- - id: immap_8DR0I7fEbw- schema_field: option3_value- file_column: option3_value- required: false- - id: immap_aAtNvLSUAr- schema_field: category1- file_column: category1- required: false- - id: immap_QiA48cIW7A- schema_field: category2- file_column: category2- required: false- - id: immap_QDA48cIW7A- schema_field: category3- file_column: category3- required: false+ description:+ preference_schema:+ - key: currency+ type: string+ default:+ - type: customer_group+ label: Customer Group(s)+ description:+ preference_schema:+ - key: customer_group_ids+ type: array+ default: []+ - type: customer+ label: Customers+ description:+ preference_schema: []+ - type: first_order+ label: First order+ description:+ preference_schema: []+ - type: item_total+ label: Item total+ description:+ preference_schema:+ - key: amount_min+ type: decimal+ default: 100.0+ - key: operator_min+ type: string+ default: ">"+ - key: amount_max+ type: decimal+ default:+ - key: operator_max+ type: string+ default: "<"+ - type: market+ label: Market(s)+ description:+ preference_schema:+ - key: market_ids+ type: array+ default: []+ - type: one_use_per_user+ label: One Use Per User+ description:+ preference_schema: []+ - type: customer_logged_in+ label: Only logged in customers+ description:+ preference_schema: []+ - type: option_value+ label: Option Value(s)+ description:+ preference_schema:+ - key: match_policy+ type: string+ default: any+ - key: eligible_values+ type: array+ default: []+ - type: product+ label: Product(s)+ description:+ preference_schema:+ - key: match_policy+ type: string+ default: any+ "/api/v3/admin/orders/{order_id}/refunds":+ get:+ summary: List refunds+ tags:+ - Refunds+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns all refunds for an order.++ **Required scope:** `read_refunds` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: refunds } = await client.orders.refunds.list('or_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api get /orders/{order_id}/refunds+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ - name: expand+ in: query+ required: false+ description: Comma-separated associations to expand (e.g., payment, refund_reason).+ Use dot notation for nested expand (max 4 levels).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include (e.g., amount,reason,transaction_id).+ id is always included.+ schema:+ type: string+ responses:+ '200':+ description: refunds found+ content:+ application/json:+ example:+ data: []+ meta:+ page: 1+ limit: 25+ count: 0+ pages: 1+ from: 0+ to: 0+ in: 0+ previous:+ next:+ post:+ summary: Create a refund+ tags:+ - Refunds+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Creates a refund for a payment on the order. The refund is automatically processed via the payment gateway.++ **Required scope:** `write_refunds` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const refund = await client.orders.refunds.create('or_UkLWZg9DAJ', {+ payment_id: 'pay_UkLWZg9DAJ',+ amount: '5.00',+ refund_reason_id: 'refrsn_UkLWZg9DAJ',+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /orders/{order_id}/refunds -d '{"payment_id":"pay_UkLWZg9DAJ","amount":"5.00","refund_reason_id":"refrsn_UkLWZg9DAJ"}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: order_id+ in: path+ required: true+ description: Order ID+ schema:+ type: string+ responses:+ '201':+ description: refund created+ content:+ application/json:+ example:+ id: re_UkLWZg9DAJ- transaction_id: BGS-b7d555d8e781++ transaction_id: BGS-d46589a00c20+ amount: '5.0'+ payment_id: py_UkLWZg9DAJ+ refund_reason_id: rr_UkLWZg9DAJ+ reimbursement_id:+ metadata: {}- created_at: '2026-07-26T14:25:14.447Z'- updated_at: '2026-07-26T14:25:14.447Z'++ created_at: '2026-07-27T08:33:48.003Z'++ updated_at: '2026-07-27T08:33:48.003Z'+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - payment_id+ - amount+ properties:+ payment_id:+ type: string+ description: Payment ID+ amount:+ type: string+ example: '10.00'+ refund_reason_id:+ type: string+ description: Refund reason ID+ "/api/v3/admin/locales":+ get:+ summary: List supported locales+ tags:+ - Settings+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns the locales a merchant can translate content into for the current store, with the default and right-to-left flags.++ **Required scope:** `read_settings` (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: locales found+ content:+ application/json:+ example:+ data:+ - code: de+ name: de+ default: false+ rtl: false+ - code: en+ name: English+ default: true+ rtl: false+ - code: fr+ name: fr+ default: false+ rtl: false+ "/api/v3/admin/store_credit_categories":+ get:+ summary: List store credit categories+ tags:+ - Settings+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns the configured store credit categories. Categories classify+ store credits (e.g., "Goodwill", "Gift Card", "Refund") and surface+ in the admin UI as a dropdown when issuing or editing a store+ credit. Category names matching `Spree::Config[:non_expiring_credit_types]`+ are flagged via `non_expiring: true`.+++ **Required scope:** `read_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: categories } = await client.storeCreditCategories.list()+ - lang: bash+ label: Spree CLI+ source: spree api get /store_credit_categories+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: page+ in: query+ required: false+ description: Page number+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ description: Number of records per page+ schema:+ type: integer+ - name: q[name_cont]+ in: query+ required: false+ description: Filter by name (contains)+ schema:+ type: string+ - name: sort+ in: query+ required: false+ description: Sort by field. Prefix with `-` for descending (e.g., `-created_at`).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: store credit categories found+ content:+ application/json:+ example:+ data:+ - id: sccat_UkLWZg9DAJ+ name: Goodwill- created_at: '2026-07-26T14:25:51.573Z'- updated_at: '2026-07-26T14:25:51.573Z'++ created_at: '2026-07-27T08:34:21.973Z'++ updated_at: '2026-07-27T08:34:21.973Z'+ non_expiring: false+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/StoreCreditCategory"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ required:+ - data+ - meta+ '401':+ description: unauthorized+ content:+ application/json:+ example:+ error:+ code: authentication_required+ message: Authentication required+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ "/api/v3/admin/store_credit_categories/{id}":+ parameters:+ - name: id+ in: path+ required: true+ description: Store credit category ID+ schema:+ type: string+ get:+ summary: Get a store credit category+ tags:+ - Settings+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns a single store credit category by prefixed ID.++ **Required scope:** `read_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const category = await client.storeCreditCategories.get('sccat_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api get /store_credit_categories/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: store credit category found+ content:+ application/json:+ example:+ id: sccat_UkLWZg9DAJ+ name: Goodwill- created_at: '2026-07-26T14:25:51.897Z'- updated_at: '2026-07-26T14:25:51.897Z'++ created_at: '2026-07-27T08:34:22.246Z'++ updated_at: '2026-07-27T08:34:22.246Z'+ non_expiring: false+ schema:+ "$ref": "#/components/schemas/StoreCreditCategory"+ '404':+ description: store credit category not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Store credit category not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ "/api/v3/admin/store":+ get:+ summary: Get the current store+ tags:+ - Settings+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns the current store configuration. The store is resolved from the request context (host or admin selection); there is no `id` parameter.++ **Required scope:** `read_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const store = await client.store.get()+ - lang: bash+ label: Spree CLI+ source: spree api get /store+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '200':+ description: current store+ content:+ application/json:+ example:+ id: store_UkLWZg9DAJ+ metadata: {}+ name: Spree Test Store+ code: spree_1+ preferred_storefront_url:+ default_currency: USD+ default_locale: en+ mail_from_address: [email protected]+ customer_support_email: [email protected]+ new_order_notifications_email: [email protected]+ preferred_send_consumer_transactional_emails: true+ preferred_admin_locale:+ preferred_timezone: UTC+ preferred_weight_unit: lb+ preferred_unit_system: imperial+ preferred_storefront_access: public+ preferred_guest_checkout: true+ preferred_order_routing_strategy: Spree::OrderRouting::Strategy::Rules- created_at: '2026-07-26T14:24:05.236Z'- updated_at: '2026-07-26T14:25:52.572Z'++ created_at: '2026-07-27T08:32:42.423Z'++ updated_at: '2026-07-27T08:34:22.795Z'+ url: http://www.example.com:3000+ api_url: http://www.example.com:3000+ setup_tasks:+ - name: setup_payment_method+ done: false+ - name: add_products+ done: false+ - name: set_customer_support_email+ done: true+ - name: setup_taxes_collection+ done: false+ - name: setup_storefront+ done: false+ supported_currencies:+ - USD+ supported_locales:+ - en+ available_locales:+ - aa+ - ab+ - ae+ - af+ - ak+ - am+ - an+ - ar+ - as+ - av+ - ay+ - az+ - ba+ - be+ - bg+ - bh+ - bi+ - bm+ - bn+ - bo+ - br+ - bs+ - ca+ - ce+ - ch+ - co+ - cr+ - cs+ - cu+ - cv+ - cy+ - da+ - de+ - de-AT+ - de-CH+ - dv+ - dz+ - ee+ - el+ - en+ - en-AU+ - en-CA+ - en-GB+ - en-IN+ - en-NZ+ - eo+ - es+ - es-419+ - es-MX+ - et+ - eu+ - fa+ - ff+ - fi+ - fj+ - fo+ - fr+ - fr-CA+ - fy+ - ga+ - gd+ - gl+ - gn+ - gu+ - gv+ - ha+ - he+ - hi+ - ho+ - hr+ - ht+ - hu+ - hy+ - hz+ - ia+ - id+ - ie+ - ig+ - ii+ - ik+ - io+ - is+ - it+ - iu+ - ja+ - jv+ - ka+ - kg+ - ki+ - kj+ - kk+ - kl+ - km+ - kn+ - ko+ - kr+ - ks+ - ku+ - kv+ - kw+ - ky+ - la+ - lb+ - lg+ - li+ - ln+ - lo+ - lt+ - lu+ - lv+ - mg+ - mh+ - mi+ - mk+ - ml+ - mn+ - mr+ - ms+ - mt+ - my+ - na+ - nb+ - nd+ - ne+ - ng+ - nl+ - nn+ - 'no'+ - nr+ - nv+ - ny+ - oc+ - oj+ - om+ - or+ - os+ - pa+ - pi+ - pl+ - ps+ - pt+ - pt-BR+ - pt-PT+ - qu+ - rm+ - rn+ - ro+ - ru+ - rw+ - sa+ - sc+ - sd+ - se+ - sg+ - si+ - sk+ - sl+ - sm+ - sn+ - so+ - sq+ - sr+ - ss+ - st+ - su+ - sv+ - sw+ - ta+ - te+ - tg+ - th+ - ti+ - tk+ - tl+ - tn+ - to+ - tr+ - ts+ - tt+ - tw+ - ty+ - ug+ - uk+ - ur+ - uz+ - ve+ - vi+ - vo+ - wa+ - wo+ - xh+ - yi+ - yo+ - za+ - zh-CN+ - zh-HK+ - zh-TW+ - zu+ logo_url:+ mailer_logo_url:+ schema:+ "$ref": "#/components/schemas/Store"+ '401':+ description: unauthorized+ content:+ application/json:+ example:+ error:+ code: authentication_required+ message: Authentication required+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ patch:+ summary: Update the current store+ tags:+ - Settings+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Updates the current store configuration.++ **Required scope:** `write_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const store = await client.store.update({+ name: 'My Store'+ })+ - lang: bash+ label: Spree CLI+ source: spree api patch /store -d '{"name":"My Store"}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '200':+ description: store updated+ content:+ application/json:+ example:+ id: store_UkLWZg9DAJ+ metadata: {}+ name: Renamed Store+ code: spree_1+ preferred_storefront_url:+ default_currency: USD+ default_locale: en+ mail_from_address: [email protected]+ customer_support_email: [email protected]+ new_order_notifications_email: [email protected]+ preferred_send_consumer_transactional_emails: true+ preferred_admin_locale:+ preferred_timezone: UTC+ preferred_weight_unit: lb+ preferred_unit_system: imperial+ preferred_storefront_access: public+ preferred_guest_checkout: true+ preferred_order_routing_strategy: Spree::OrderRouting::Strategy::Rules- created_at: '2026-07-26T14:24:05.236Z'- updated_at: '2026-07-26T14:25:53.256Z'++ created_at: '2026-07-27T08:32:42.423Z'++ updated_at: '2026-07-27T08:34:23.430Z'+ url: http://www.example.com:3000+ api_url: http://www.example.com:3000+ setup_tasks:+ - name: setup_payment_method+ done: false+ - name: add_products+ done: false+ - name: set_customer_support_email+ done: true+ - name: setup_taxes_collection+ done: false+ - name: setup_storefront+ done: false+ supported_currencies:+ - USD+ supported_locales:+ - en+ available_locales:+ - aa+ - ab+ - ae+ - af+ - ak+ - am+ - an+ - ar+ - as+ - av+ - ay+ - az+ - ba+ - be+ - bg+ - bh+ - bi+ - bm+ - bn+ - bo+ - br+ - bs+ - ca+ - ce+ - ch+ - co+ - cr+ - cs+ - cu+ - cv+ - cy+ - da+ - de+ - de-AT+ - de-CH+ - dv+ - dz+ - ee+ - el+ - en+ - en-AU+ - en-CA+ - en-GB+ - en-IN+ - en-NZ+ - eo+ - es+ - es-419+ - es-MX+ - et+ - eu+ - fa+ - ff+ - fi+ - fj+ - fo+ - fr+ - fr-CA+ - fy+ - ga+ - gd+ - gl+ - gn+ - gu+ - gv+ - ha+ - he+ - hi+ - ho+ - hr+ - ht+ - hu+ - hy+ - hz+ - ia+ - id+ - ie+ - ig+ - ii+ - ik+ - io+ - is+ - it+ - iu+ - ja+ - jv+ - ka+ - kg+ - ki+ - kj+ - kk+ - kl+ - km+ - kn+ - ko+ - kr+ - ks+ - ku+ - kv+ - kw+ - ky+ - la+ - lb+ - lg+ - li+ - ln+ - lo+ - lt+ - lu+ - lv+ - mg+ - mh+ - mi+ - mk+ - ml+ - mn+ - mr+ - ms+ - mt+ - my+ - na+ - nb+ - nd+ - ne+ - ng+ - nl+ - nn+ - 'no'+ - nr+ - nv+ - ny+ - oc+ - oj+ - om+ - or+ - os+ - pa+ - pi+ - pl+ - ps+ - pt+ - pt-BR+ - pt-PT+ - qu+ - rm+ - rn+ - ro+ - ru+ - rw+ - sa+ - sc+ - sd+ - se+ - sg+ - si+ - sk+ - sl+ - sm+ - sn+ - so+ - sq+ - sr+ - ss+ - st+ - su+ - sv+ - sw+ - ta+ - te+ - tg+ - th+ - ti+ - tk+ - tl+ - tn+ - to+ - tr+ - ts+ - tt+ - tw+ - ty+ - ug+ - uk+ - ur+ - uz+ - ve+ - vi+ - vo+ - wa+ - wo+ - xh+ - yi+ - yo+ - za+ - zh-CN+ - zh-HK+ - zh-TW+ - zu+ logo_url:+ mailer_logo_url:+ schema:+ "$ref": "#/components/schemas/Store"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Site Name can't be blank+ details:+ name:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ example: My Store+ preferred_admin_locale:+ type: string+ example: en+ preferred_timezone:+ type: string+ example: UTC+ preferred_weight_unit:+ type: string+ example: kg+ preferred_unit_system:+ type: string+ example: metric+ "/api/v3/admin/tags":+ get:+ summary: List tags+ tags:+ - Settings+ security:+ - api_key: []+ bearer_auth: []+ description: Returns tag names for a given taggable type. Used for autocomplete+ in tag inputs on products, orders, and customers.+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: tags } = await client.tags.list({+ taggable_type: 'Spree::User',+ q: 'vip',+ })+ - lang: bash+ label: Spree CLI+ source: spree api get /tags -d '{"taggable_type":"Spree::User","q":"vip"}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ - name: taggable_type+ in: query+ required: true+ description: Taggable type (`Spree::Product`, `Spree::Order`, or `Spree::User`)+ schema:+ type: string+ - name: q+ in: query+ required: false+ description: Optional case-insensitive substring filter+ schema:+ type: string+ responses:+ '200':+ description: tags found+ content:+ application/json:+ example:+ data:+ - name: vip+ - name: wholesale+ '422':+ description: invalid taggable type+ content:+ application/json:+ example:+ error:+ code: invalid_taggable_type+ message: taggable_type must be one of Spree::Product, Spree::Order,+ Spree::LegacyUser+ "/api/v3/admin/translatable_resources":+ get:+ summary: List translatable resources+ tags:+ - Settings+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns every translatable resource type and its translatable fields (key + content type), so clients can render translation editors generically.++ **Required scope:** `read_settings` (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: translatable resources found+ content:+ application/json:+ example:+ data:+ - resource_type: option_type+ fields:+ - key: label+ type: string+ readable: true+ - resource_type: option_value+ fields:+ - key: label+ type: string+ readable: false+ - resource_type: product+ fields:+ - key: name+ type: string+ - key: description+ type: html+ - key: slug+ type: string+ - key: meta_description+ type: string+ - key: meta_title+ type: string+ readable: true++ - resource_type: collection++ fields:++ - key: name++ type: string++ - key: description++ type: string++ - key: permalink++ type: string++ readable: false+ - resource_type: category+ fields:+ - key: name+ type: string+ - key: pretty_name+ type: string+ - key: description+ type: html+ - key: permalink+ type: string+ readable: true+ - resource_type: taxonomy+ fields:+ - key: name+ type: string+ readable: false+ - resource_type: store+ fields:+ - key: name+ type: string+ - key: meta_description+ type: string+ - key: meta_keywords+ type: string+ - key: seo_title+ type: string+ - key: customer_support_email+ type: string+ - key: address+ type: string+ - key: contact_phone+ type: string+ readable: false+ - resource_type: policy+ fields:+ - key: name+ type: string+ - key: body+ type: html+ readable: false+ "/api/v3/admin/translations/batch":+ post:+ summary: Batch upsert translations+ tags:+ - Settings+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Atomically upserts translations across many records of (possibly) different translatable resource types in one request — e.g. an option type and all its option values in one save. A flat list of independent registry writes; all entries succeed or none do.++ **Required scope:** `write_<resource>` for every resource type in the batch (for API-key authentication) (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: translations upserted+ content:+ application/json:+ example:+ data:+ - resource_id: opt_UkLWZg9DAJ+ resource_type: option_type+ translations:+ de:+ label: Größe+ translated_field_count: 1+ fr:+ label:+ translated_field_count: 0+ default_locale: en+ supported_locales:+ - de+ - en+ - fr+ - resource_id: optval_UkLWZg9DAJ+ resource_type: option_value+ translations:+ de:+ label: Klein+ translated_field_count: 1+ fr:+ label:+ translated_field_count: 0+ default_locale: en+ supported_locales:+ - de+ - en+ - fr+ '422':+ description: unsupported locale rolls back the whole batch+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: 'Unsupported locale(s): es'+ details:+ translations:+ '0':+ - 'Unsupported locale(s): es'+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - translations+ properties:+ translations:+ type: array+ items:+ type: object+ required:+ - resource_type+ - resource_id+ - values+ properties:+ resource_type:+ type: string+ description: Translatable resource type token, e.g. `option_type`+ resource_id:+ type: string+ description: Prefixed id of the record+ values:+ type: object+ description: 'Map of locale code to { field: value }'+ additionalProperties:+ type: object+ additionalProperties: true+ "/api/v3/admin/admin_users":+ get:+ summary: List staff+ tags:+ - Staff+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns admin users with at least one role assignment on the current store.++ **Required scope:** `read_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: staff } = await client.adminUsers.list()+ - lang: bash+ label: Spree CLI+ source: spree api get /admin_users+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: staff found+ content:+ application/json:+ example:+ data:+ - id: admin_UkLWZg9DAJ- email: [email protected]- first_name: Rhoda- last_name: King- full_name: Rhoda King++ email: [email protected]++ first_name: Eneida++ last_name: Hessel++ full_name: Eneida Hessel+ selected_locale:- created_at: '2026-07-26T14:24:05.571Z'- updated_at: '2026-07-26T14:24:05.571Z'++ created_at: '2026-07-27T08:32:42.775Z'++ updated_at: '2026-07-27T08:32:42.775Z'+ avatar_url:+ roles:+ - id: role_UkLWZg9DAJ+ name: admin+ stores:+ - id: store_UkLWZg9DAJ+ name: Spree Test Store+ code: spree_1+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ "/api/v3/admin/admin_users/{id}":+ get:+ summary: Show a staff member+ tags:+ - Staff+ security:+ - api_key: []+ bearer_auth: []+ description: "**Required scope:** `read_settings` (for API-key authentication)."+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const staff = await client.adminUsers.get('admin_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api get /admin_users/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ - name: id+ in: path+ required: true+ schema:+ type: string+ responses:+ '200':+ description: staff member found+ content:+ application/json:+ example:+ id: admin_UkLWZg9DAJ- email: [email protected]- first_name: Adele- last_name: Homenick- full_name: Adele Homenick++ email: [email protected]++ first_name: Tawanna++ last_name: Littel++ full_name: Tawanna Littel+ selected_locale:- created_at: '2026-07-26T14:24:05.929Z'- updated_at: '2026-07-26T14:24:05.929Z'++ created_at: '2026-07-27T08:32:43.109Z'++ updated_at: '2026-07-27T08:32:43.109Z'+ avatar_url:+ roles:+ - id: role_UkLWZg9DAJ+ name: admin+ stores:+ - id: store_UkLWZg9DAJ+ name: Spree Test Store+ code: spree_1+ patch:+ summary: Update a staff member+ tags:+ - Staff+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Updates name fields and reassigns roles for the current store. `role_ids` is a complete replacement — roles not in the array are removed for this store.++ **Required scope:** `write_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const staff = await client.adminUsers.update('admin_xxx', {+ first_name: 'Ada',+ role_ids: ['role_xxx']+ })+ - lang: bash+ label: Spree CLI+ source: spree api patch /admin_users/{id} -d '{"first_name":"Ada","role_ids":["role_xxx"]}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ - name: id+ in: path+ required: true+ schema:+ type: string+ responses:+ '200':+ description: staff member updated+ content:+ application/json:+ example:+ id: admin_UkLWZg9DAJ- email: [email protected]++ email: [email protected]+ first_name: Renamed- last_name: Lueilwitz- full_name: Renamed Lueilwitz++ last_name: Abshire++ full_name: Renamed Abshire+ selected_locale:- created_at: '2026-07-26T14:24:06.248Z'- updated_at: '2026-07-26T14:24:06.271Z'++ created_at: '2026-07-27T08:32:43.374Z'++ updated_at: '2026-07-27T08:32:43.393Z'+ avatar_url:+ roles:+ - id: role_UkLWZg9DAJ+ name: admin+ stores:+ - id: store_UkLWZg9DAJ+ name: Spree Test Store+ code: spree_1+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ first_name:+ type: string+ example: Ada+ last_name:+ type: string+ example: Lovelace+ role_ids:+ type: array+ items:+ type: string+ delete:+ summary: Remove a staff member from this store+ tags:+ - Staff+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Removes the user's role assignments on the current store. The account is preserved — the user keeps access to any other stores.++ **Required scope:** `write_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.adminUsers.delete('admin_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api delete /admin_users/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ - name: id+ in: path+ required: true+ schema:+ type: string+ responses:+ '204':+ description: staff removed from store+ "/api/v3/admin/invitations":+ get:+ summary: List invitations+ tags:+ - Staff+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns invitations for the current store, including pending and accepted.++ **Required scope:** `read_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: invitations } = await client.invitations.list()+ - lang: bash+ label: Spree CLI+ source: spree api get /invitations+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: invitations found+ content:+ application/json:+ example:+ data:+ - id: inv_UkLWZg9DAJ- email: [email protected]++ email: [email protected]+ status: pending- created_at: '2026-07-26T14:24:47.826Z'- updated_at: '2026-07-26T14:24:47.826Z'- expires_at: '2026-08-09T14:24:47.823Z'++ created_at: '2026-07-27T08:33:24.133Z'++ updated_at: '2026-07-27T08:33:24.133Z'++ expires_at: '2026-08-10T08:33:24.131Z'+ role_id: role_UkLWZg9DAJ+ role_name: admin- inviter_email: [email protected]- acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=uTWoNC9doX1nDWmoMDg6WimE"++ inviter_email: [email protected]++ acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=NJZUSat5bApThzAjb68nZwxw"+ invitee_exists: false+ store:+ id: store_UkLWZg9DAJ+ name: Spree Test Store+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ post:+ summary: Create an invitation+ tags:+ - Staff+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Invites a teammate by email. The invitation is scoped to the current store and carries the chosen role; on accept, a `RoleUser` is created via the invitation's `after_accept` callback.++ **Required scope:** `write_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const invitation = await client.invitations.create({+ email: '[email protected]',+ role_id: 'role_xxx'+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /invitations -d '{"email":"[email protected]","role_id":"role_xxx"}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '201':+ description: invitation created+ content:+ application/json:+ example:+ id: inv_gbHJdmfrXB+ email: [email protected]+ status: pending- created_at: '2026-07-26T14:24:48.165Z'- updated_at: '2026-07-26T14:24:48.165Z'- expires_at: '2026-08-09T14:24:48.160Z'++ created_at: '2026-07-27T08:33:24.411Z'++ updated_at: '2026-07-27T08:33:24.411Z'++ expires_at: '2026-08-10T08:33:24.408Z'+ role_id: role_UkLWZg9DAJ+ role_name: admin- inviter_email: [email protected]- acceptance_url: "/accept-invitation/inv_gbHJdmfrXB?token=BgNEWiM5vfFrdkA121xg5J7G"++ inviter_email: [email protected]++ acceptance_url: "/accept-invitation/inv_gbHJdmfrXB?token=2AS27HFs8gYV19BjzoVhBb7y"+ invitee_exists: false+ store:+ id: store_UkLWZg9DAJ+ name: Spree Test Store+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - role_id+ properties:+ email:+ type: string+ example: [email protected]+ role_id:+ type: string+ example: role_xxx+ "/api/v3/admin/invitations/{id}":+ delete:+ summary: Revoke an invitation+ tags:+ - Staff+ security:+ - api_key: []+ bearer_auth: []+ description: "**Required scope:** `write_settings` (for API-key authentication)."+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.invitations.delete('inv_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api delete /invitations/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ - name: id+ in: path+ required: true+ schema:+ type: string+ responses:+ '204':+ description: invitation revoked+ "/api/v3/admin/invitations/{id}/resend":+ patch:+ summary: Resend an invitation+ tags:+ - Staff+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Issues a fresh token and dispatches the invitation email again.++ **Required scope:** `write_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const invitation = await client.invitations.resend('inv_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api patch /invitations/{id}/resend -d '{ ... }'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ - name: id+ in: path+ required: true+ schema:+ type: string+ responses:+ '200':+ description: invitation resent+ content:+ application/json:+ example:+ id: inv_UkLWZg9DAJ- email: [email protected]++ email: [email protected]+ status: pending- created_at: '2026-07-26T14:24:48.796Z'- updated_at: '2026-07-26T14:24:48.796Z'- expires_at: '2026-08-09T14:24:48.791Z'++ created_at: '2026-07-27T08:33:24.971Z'++ updated_at: '2026-07-27T08:33:24.971Z'++ expires_at: '2026-08-10T08:33:24.967Z'+ role_id: role_UkLWZg9DAJ+ role_name: admin- inviter_email: [email protected]- acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=h2PjXySg75NCpLJfbRXmRd9F"++ inviter_email: [email protected]++ acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=8YSz7q8EoAg5vsZcgNZoSgWA"+ invitee_exists: false+ store:+ id: store_UkLWZg9DAJ+ name: Spree Test Store+ "/api/v3/admin/roles":+ get:+ summary: List roles+ tags:+ - Staff+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns the roles available for staff role pickers. Roles are global, not per-store.++ **Required scope:** `read_settings` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: roles } = await client.roles.list()+ - lang: bash+ label: Spree CLI+ source: spree api get /roles+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ schema:+ type: string+ responses:+ '200':+ description: roles found+ content:+ application/json:+ example:+ data:+ - id: role_UkLWZg9DAJ+ name: admin- created_at: '2026-07-26T14:25:48.887Z'- updated_at: '2026-07-26T14:25:48.887Z'++ created_at: '2026-07-27T08:34:19.553Z'++ updated_at: '2026-07-27T08:34:19.553Z'+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ "/api/v3/admin/stock_locations":+ get:+ summary: List stock locations+ tags:+ - Stock Locations+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns the configured stock locations. Stock locations are global+ (shared across stores). Filter with Ransack predicates such as+ `q[active_eq]`, `q[kind_eq]`, `q[pickup_enabled_eq]`, or+ `q[name_cont]`.++ Pickup-related attributes (`kind`, `pickup_enabled`,+ `pickup_stock_policy`, `pickup_ready_in_minutes`,+ `pickup_instructions`) drive merchant pickup support at checkout —+ customers can collect orders from any active location with+ `pickup_enabled: true`.+++ **Required scope:** `read_stock` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: stockLocations } = await client.stockLocations.list()+ - lang: bash+ label: Spree CLI+ source: spree api get /stock_locations+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: page+ in: query+ required: false+ description: Page number+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ description: Number of records per page+ schema:+ type: integer+ - name: q[name_cont]+ in: query+ required: false+ description: Filter by name (contains)+ schema:+ type: string+ - name: q[active_eq]+ in: query+ required: false+ description: Filter by active status+ schema:+ type: boolean+ - name: q[kind_eq]+ in: query+ required: false+ description: 'Filter by kind (built-in: ''warehouse'', ''store'', ''fulfillment_center'')'+ schema:+ type: string+ - name: q[pickup_enabled_eq]+ in: query+ required: false+ description: Filter by pickup-enabled flag+ schema:+ type: boolean+ - name: sort+ in: query+ required: false+ description: Sort by field. Prefix with `-` for descending (e.g., `-created_at`).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: stock locations found+ content:+ application/json:+ example:+ data:+ - id: sloc_UkLWZg9DAJ- state_abbr: STATE_ABBR_50++ state_abbr: STATE_ABBR_56+ name: Brooklyn warehouse+ address1: 1600 Pennsylvania Ave NW+ city: Washington+ zipcode: '20500'+ country_iso: US+ country_name: United States of America- state_text: STATE_ABBR_50++ state_text: STATE_ABBR_56+ admin_name:+ address2:+ state_name:+ phone: "(202) 456-1111"+ company:+ active: true+ default: false+ backorderable_default: true+ propagate_all_variants: false+ kind: warehouse+ pickup_enabled: false+ pickup_stock_policy: local+ pickup_ready_in_minutes:+ pickup_instructions:- created_at: '2026-07-26T14:25:49.185Z'- updated_at: '2026-07-26T14:25:49.185Z'++ created_at: '2026-07-27T08:34:19.833Z'++ updated_at: '2026-07-27T08:34:19.833Z'+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/StockLocation"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ required:+ - data+ - meta+ '401':+ description: unauthorized+ content:+ application/json:+ example:+ error:+ code: authentication_required+ message: Authentication required+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ post:+ summary: Create a stock location+ tags:+ - Stock Locations+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Creates a new stock location.++ Setting `default: true` automatically demotes the previous default+ location.+++ **Required scope:** `write_stock` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const stockLocation = await client.stockLocations.create({+ name: 'Brooklyn warehouse',+ kind: 'warehouse',+ country_iso: 'US',+ state_abbr: 'NY',+ city: 'Brooklyn',+ zipcode: '11201',+ pickup_enabled: true,+ pickup_stock_policy: 'local',+ pickup_ready_in_minutes: 60,+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /stock_locations -d '{"name":"Brooklyn warehouse","kind":"warehouse","country_iso":"US","state_abbr":"NY","city":"Brooklyn","zipcode":"11201","pickup_enabled":true,"pickup_stock_policy":"local","pickup_ready_in_minutes":60}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '201':+ description: stock location created+ content:+ application/json:+ example:+ id: sloc_gbHJdmfrXB+ state_abbr:+ name: Manhattan store+ address1:+ city:+ zipcode:+ country_iso:+ country_name:+ state_text:+ admin_name:+ address2:+ state_name:+ phone:+ company:+ active: true+ default: false+ backorderable_default: false+ propagate_all_variants: false+ kind: store+ pickup_enabled: true+ pickup_stock_policy: local+ pickup_ready_in_minutes: 30+ pickup_instructions:- created_at: '2026-07-26T14:25:49.790Z'- updated_at: '2026-07-26T14:25:49.790Z'++ created_at: '2026-07-27T08:34:20.377Z'++ updated_at: '2026-07-27T08:34:20.377Z'+ schema:+ "$ref": "#/components/schemas/StockLocation"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Name can't be blank+ details:+ name:+ - can't be blank+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ example: Brooklyn warehouse+ admin_name:+ type: string+ nullable: true+ description: Internal name shown only in the admin+ active:+ type: boolean+ example: true+ default:+ type: boolean+ description: Setting to true demotes the previous default.+ kind:+ type: string+ enum:+ - warehouse+ - store+ - fulfillment_center+ description: Categorizes the location.+ example: warehouse+ propagate_all_variants:+ type: boolean+ backorderable_default:+ type: boolean+ address1:+ type: string+ nullable: true+ address2:+ type: string+ nullable: true+ city:+ type: string+ nullable: true+ zipcode:+ type: string+ nullable: true+ phone:+ type: string+ nullable: true+ company:+ type: string+ nullable: true+ country_iso:+ type: string+ nullable: true+ description: ISO-3166 alpha-2 country code (e.g. "US").+ state_abbr:+ type: string+ nullable: true+ description: State / province abbreviation (e.g. "NY"). Resolved+ against the selected country.+ state_name:+ type: string+ nullable: true+ description: Free-text state for countries without a states list.+ pickup_enabled:+ type: boolean+ pickup_stock_policy:+ type: string+ enum:+ - local+ - any+ description: "'local' = items at this location only; 'any' = transfer-eligible+ (ship-to-store)."+ pickup_ready_in_minutes:+ type: number+ nullable: true+ minimum: 0+ pickup_instructions:+ type: string+ nullable: true+ required:+ - name+ "/api/v3/admin/stock_locations/{id}":+ parameters:+ - name: id+ in: path+ required: true+ description: Stock location ID+ schema:+ type: string+ get:+ summary: Get a stock location+ tags:+ - Stock Locations+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns a single stock location by prefixed ID.++ **Required scope:** `read_stock` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const stockLocation = await client.stockLocations.get('sloc_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api get /stock_locations/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: stock location found+ content:+ application/json:+ example:+ id: sloc_UkLWZg9DAJ- state_abbr: STATE_ABBR_54++ state_abbr: STATE_ABBR_60+ name: Brooklyn warehouse+ address1: 1600 Pennsylvania Ave NW+ city: Washington+ zipcode: '20500'+ country_iso: US+ country_name: United States of America- state_text: STATE_ABBR_54++ state_text: STATE_ABBR_60+ admin_name:+ address2:+ state_name:+ phone: "(202) 456-1111"+ company:+ active: true+ default: false+ backorderable_default: true+ propagate_all_variants: false+ kind: warehouse+ pickup_enabled: false+ pickup_stock_policy: local+ pickup_ready_in_minutes:+ pickup_instructions:- created_at: '2026-07-26T14:25:50.094Z'- updated_at: '2026-07-26T14:25:50.094Z'++ created_at: '2026-07-27T08:34:20.649Z'++ updated_at: '2026-07-27T08:34:20.649Z'+ schema:+ "$ref": "#/components/schemas/StockLocation"+ '404':+ description: stock location not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Stock location not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ patch:+ summary: Update a stock location+ tags:+ - Stock Locations+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Updates an existing stock location. Same address-field conventions as+ the create endpoint.++ Setting `default: true` automatically demotes the previous default.+++ **Required scope:** `write_stock` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const stockLocation = await client.stockLocations.update('sloc_UkLWZg9DAJ', {+ pickup_enabled: true,+ pickup_ready_in_minutes: 45,+ pickup_instructions: 'Enter through the back door, ring the bell.',+ })+ - lang: bash+ label: Spree CLI+ source: spree api patch /stock_locations/{id} -d '{"pickup_enabled":true,"pickup_ready_in_minutes":45,"pickup_instructions":"Enter+ through the back door, ring the bell."}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '200':+ description: stock location updated+ content:+ application/json:+ example:+ id: sloc_UkLWZg9DAJ- state_abbr: STATE_ABBR_56++ state_abbr: STATE_ABBR_62+ name: Renamed warehouse+ address1: 1600 Pennsylvania Ave NW+ city: Washington+ zipcode: '20500'+ country_iso: US+ country_name: United States of America- state_text: STATE_ABBR_56++ state_text: STATE_ABBR_62+ admin_name:+ address2:+ state_name:+ phone: "(202) 456-1111"+ company:+ active: true+ default: false+ backorderable_default: true+ propagate_all_variants: false+ kind: warehouse+ pickup_enabled: true+ pickup_stock_policy: local+ pickup_ready_in_minutes: 45+ pickup_instructions:- created_at: '2026-07-26T14:25:50.692Z'- updated_at: '2026-07-26T14:25:50.975Z'++ created_at: '2026-07-27T08:34:21.178Z'++ updated_at: '2026-07-27T08:34:21.435Z'+ schema:+ "$ref": "#/components/schemas/StockLocation"+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: Pickup stock policy is not included in the list+ details:+ pickup_stock_policy:+ - is not included in the list+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ admin_name:+ type: string+ nullable: true+ active:+ type: boolean+ default:+ type: boolean+ kind:+ type: string+ enum:+ - warehouse+ - store+ - fulfillment_center+ propagate_all_variants:+ type: boolean+ backorderable_default:+ type: boolean+ address1:+ type: string+ nullable: true+ address2:+ type: string+ nullable: true+ city:+ type: string+ nullable: true+ zipcode:+ type: string+ nullable: true+ phone:+ type: string+ nullable: true+ company:+ type: string+ nullable: true+ country_iso:+ type: string+ nullable: true+ state_abbr:+ type: string+ nullable: true+ state_name:+ type: string+ nullable: true+ pickup_enabled:+ type: boolean+ pickup_stock_policy:+ type: string+ enum:+ - local+ - any+ pickup_ready_in_minutes:+ type: number+ nullable: true+ minimum: 0+ pickup_instructions:+ type: string+ nullable: true+ delete:+ summary: Delete a stock location+ tags:+ - Stock Locations+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Soft-deletes the stock location (sets `deleted_at`). Existing+ fulfillments that referenced it keep the historical record via+ `Spree::StockLocation.with_deleted`.+++ **Required scope:** `write_stock` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.stockLocations.delete('sloc_UkLWZg9DAJ')+ - lang: bash+ label: Spree CLI+ source: spree api delete /stock_locations/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '204':+ description: stock location deleted+ "/api/v3/admin/products/{product_id}/variants":+ get:+ summary: List product variants+ tags:+ - Variants+ security:+ - api_key: []+ bearer_auth: []+ description: |-- Returns a paginated list of variants for a product, including the master variant.++ Returns a paginated list of variants for a product, including the default variant.++ **Required scope:** `read_products` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const { data: variants } = await client.products.variants.list('prod_86Rf07xd4z', {+ expand: ['prices', 'stock_items'],+ })+ - lang: bash+ label: Spree CLI+ source: spree api get /products/{product_id}/variants -d '{"expand":["prices","stock_items"]}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: product_id+ in: path+ required: true+ description: Product ID+ schema:+ type: string+ - name: page+ in: query+ required: false+ description: Page number+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ description: Number of records per page+ schema:+ type: integer+ - name: expand+ in: query+ required: false+ description: Comma-separated associations to expand (e.g., images, prices,+ stock_items, option_values). Use dot notation for nested expand (max 4 levels).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include (e.g., sku,price,stock).+ id is always included.+ schema:+ type: string+ responses:+ '200':+ description: variants found+ content:+ application/json:+ example:+ data:+ - id: variant_UkLWZg9DAJ+ product_id: prod_UkLWZg9DAJ- sku: SKU-103++ sku: SKU-109+ options_text: ''+ track_inventory: true+ media_count: 0+ preorder_ships_at:+ thumbnail_url:- purchasable: false++ purchasable: true+ in_stock: false- backorderable: false++ backorderable: true+ preorder: false+ weight: 0.0+ height:+ width:+ depth:+ price:- id:- amount:- amount_in_cents: 0++ id: price_UkLWZg9DAJ++ amount: '19.99'++ amount_in_cents: 1999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD- display_amount: "$0.00"++ display_amount: "$19.99"+ display_compare_at_amount:+ price_list_id:+ original_price:+ option_values: []+ metadata: {}+ position: 1+ cost_price: '17.0'+ cost_currency: USD+ barcode:+ weight_unit: lb+ dimensions_unit:+ backorder_limit:+ deleted_at:- created_at: '2026-07-26T14:25:55.640Z'- updated_at: '2026-07-26T14:25:55.652Z'++ created_at: '2026-07-27T08:34:25.547Z'++ updated_at: '2026-07-27T08:34:25.557Z'+ preorderable: false+ tax_category_id: taxcat_UkLWZg9DAJ+ available_stock: 0+ reserved_quantity: 0+ total_on_hand: 0- product_name: Product 844847++ product_name: Product 901061+ - id: variant_gbHJdmfrXB+ product_id: prod_UkLWZg9DAJ- sku: SKU-104++ sku: SKU-110+ options_text: 'Size: S'+ track_inventory: true+ media_count: 0+ preorder_ships_at:+ thumbnail_url:+ purchasable: true+ in_stock: false+ backorderable: true+ preorder: false- weight: 142.81- height: 131.7- width: 77.21- depth: 115.72++ weight: 63.46++ height: 184.8++ width: 65.26++ depth: 171.83+ price:+ id: price_gbHJdmfrXB+ amount: '19.99'+ amount_in_cents: 1999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$19.99"+ display_compare_at_amount:+ price_list_id:+ original_price:+ option_values:+ - id: optval_UkLWZg9DAJ+ option_type_id: opt_UkLWZg9DAJ+ name: size-19+ label: S+ position: 1+ color_code:+ option_type_name: foo-size-28+ option_type_label: Size+ image_url:+ metadata: {}- created_at: '2026-07-26T14:25:55.670Z'- updated_at: '2026-07-26T14:25:55.670Z'++ created_at: '2026-07-27T08:34:25.574Z'++ updated_at: '2026-07-27T08:34:25.574Z'+ metadata: {}+ position: 2+ cost_price: '17.0'+ cost_currency: USD+ barcode:+ weight_unit: lb+ dimensions_unit:+ backorder_limit:+ deleted_at:- created_at: '2026-07-26T14:25:55.667Z'- updated_at: '2026-07-26T14:25:55.681Z'++ created_at: '2026-07-27T08:34:25.571Z'++ updated_at: '2026-07-27T08:34:25.582Z'+ preorderable: false+ tax_category_id: taxcat_UkLWZg9DAJ+ available_stock: 0+ reserved_quantity: 0+ total_on_hand: 0- product_name: Product 844847++ product_name: Product 901061+ meta:+ page: 1+ limit: 25+ count: 2+ pages: 1+ from: 1+ to: 2+ in: 2+ previous:+ next:+ post:+ summary: Create a variant+ tags:+ - Variants+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Creates a new variant for a product. Supports nested prices and stock items.++ Option types and values are auto-created if they don't exist.+ Prices are upserted by currency. Stock items are upserted by stock location.+++ **Required scope:** `write_products` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const variant = await client.products.variants.create('prod_86Rf07xd4z', {+ sku: 'TSHIRT-L-NAVY',+ options: [+ { name: 'size', value: 'Large' },+ { name: 'color', value: 'navy' },+ ],+ prices: [+ { currency: 'USD', amount: '29.99', compare_at_amount: '34.99' },+ { currency: 'EUR', amount: '27.99' },+ ],+ stock_items: [{ stock_location_id: 'sloc_UkLWZg9DAJ', count_on_hand: 25 }],+ })+ - lang: bash+ label: Spree CLI+ source: spree api post /products/{product_id}/variants -d '{"sku":"TSHIRT-L-NAVY","options":[{"name":"size","value":"Large"},{"name":"color","value":"navy"}],"prices":[{"currency":"USD","amount":"29.99","compare_at_amount":"34.99"},{"currency":"EUR","amount":"27.99"}],"stock_items":[{"stock_location_id":"sloc_UkLWZg9DAJ","count_on_hand":25}]}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: product_id+ in: path+ required: true+ description: Product ID+ schema:+ type: string+ responses:+ '201':+ description: variant created+ content:+ application/json:+ example:+ id: variant_EfhxLZ9ck8+ product_id: prod_UkLWZg9DAJ+ sku: NEW-SKU-001+ options_text: 'Size: XL'+ track_inventory: true+ media_count: 0+ preorder_ships_at:+ thumbnail_url:+ purchasable: false+ in_stock: false+ backorderable: false+ preorder: false+ weight: 0.0+ height:+ width:+ depth:+ price:+ id: price_EfhxLZ9ck8+ amount: '24.99'+ amount_in_cents: 2499+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$24.99"+ display_compare_at_amount:+ price_list_id:+ original_price:+ option_values:+ - id: optval_gbHJdmfrXB+ option_type_id: opt_gbHJdmfrXB+ name: xl+ label: XL+ position: 1+ color_code:+ option_type_name: size+ option_type_label: Size+ image_url:+ metadata: {}- created_at: '2026-07-26T14:25:56.341Z'- updated_at: '2026-07-26T14:25:56.341Z'++ created_at: '2026-07-27T08:34:26.222Z'++ updated_at: '2026-07-27T08:34:26.222Z'+ metadata: {}+ position: 3+ cost_price:+ cost_currency: USD+ barcode:+ weight_unit: lb+ dimensions_unit:+ backorder_limit:+ deleted_at:- created_at: '2026-07-26T14:25:56.346Z'- updated_at: '2026-07-26T14:25:56.348Z'++ created_at: '2026-07-27T08:34:26.226Z'++ updated_at: '2026-07-27T08:34:26.228Z'+ preorderable: false+ tax_category_id: taxcat_UkLWZg9DAJ+ available_stock: 0+ reserved_quantity: 0+ total_on_hand: 0- product_name: Product 857165++ product_name: Product 918546+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error- message: Option value variants can't be blank++ message: SKU has already been taken+ details:- option_value_variants:- - can't be blank++ sku:++ - has already been taken+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object- required:- - options+ properties:+ sku:+ type: string+ example: SKU-001+ cost_price:+ type: string+ example: '10.00'+ cost_currency:+ type: string+ example: USD+ weight:+ type: number+ height:+ type: number+ width:+ type: number+ depth:+ type: number+ weight_unit:+ type: string+ dimensions_unit:+ type: string+ track_inventory:+ type: boolean+ tax_category_id:+ type: string+ options:+ type: array- description: Required. A variant created here is always non-master,- so it must declare at least one option pair (e.g. size + color)- or creation fails with 422. One pair per option type the variant++ description: A variant on a product with option types should declare++ its option pairs (e.g. size + color) — one per option type it+ participates in. Option types and values are auto-created if missing.+ items:+ type: object+ required:+ - name+ - value+ properties:+ name:+ type: string+ example: size+ value:+ type: string+ example: Small+ position:+ type: integer+ barcode:+ type: string+ prices:+ type: array+ description: Per-currency prices. Upserted by currency.+ items:+ type: object+ required:+ - currency+ - amount+ properties:+ currency:+ type: string+ example: USD+ amount:+ type: string+ example: '29.99'+ compare_at_amount:+ type: string+ nullable: true+ example: '39.99'+ stock_items:+ type: array+ description: Per-stock-location inventory. Upserted by stock_location_id.+ items:+ type: object+ required:+ - stock_location_id+ - count_on_hand+ properties:+ stock_location_id:+ type: string+ description: Stock location ID (e.g. sloc_xxx)+ count_on_hand:+ type: integer+ example: 50+ backorderable:+ type: boolean+ "/api/v3/admin/products/{product_id}/variants/{id}":+ get:+ summary: Get a variant+ tags:+ - Variants+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns a single variant by ID.++ **Required scope:** `read_products` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const variant = await client.products.variants.get('prod_86Rf07xd4z', 'variant_k5nR8xLq', {+ expand: ['prices', 'stock_items'],+ })+ - lang: bash+ label: Spree CLI+ source: spree api get /products/{product_id}/variants/{id} -d '{"expand":["prices","stock_items"]}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: product_id+ in: path+ required: true+ description: Product ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Variant ID+ schema:+ type: string+ - name: expand+ in: query+ required: false+ description: Comma-separated associations to expand (e.g., images, prices,+ stock_items, option_values). Use dot notation for nested expand (max 4 levels).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include (e.g., sku,price,stock).+ id is always included.+ schema:+ type: string+ responses:+ '200':+ description: variant found+ content:+ application/json:+ example:+ id: variant_gbHJdmfrXB+ product_id: prod_UkLWZg9DAJ- sku: SKU-110++ sku: SKU-116+ options_text: 'Size: S'+ track_inventory: true+ media_count: 0+ preorder_ships_at:+ thumbnail_url:+ purchasable: true+ in_stock: false+ backorderable: true+ preorder: false- weight: 67.29- height: 162.9- width: 117.53- depth: 144.42++ weight: 192.28++ height: 169.72++ width: 137.95++ depth: 23.46+ price:+ id: price_gbHJdmfrXB+ amount: '19.99'+ amount_in_cents: 1999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$19.99"+ display_compare_at_amount:+ price_list_id:+ original_price:+ option_values:+ - id: optval_UkLWZg9DAJ+ option_type_id: opt_UkLWZg9DAJ+ name: size-22+ label: S+ position: 1+ color_code:+ option_type_name: foo-size-31+ option_type_label: Size+ image_url:+ metadata: {}- created_at: '2026-07-26T14:25:56.766Z'- updated_at: '2026-07-26T14:25:56.766Z'++ created_at: '2026-07-27T08:34:26.613Z'++ updated_at: '2026-07-27T08:34:26.613Z'+ metadata: {}+ position: 2+ cost_price: '17.0'+ cost_currency: USD+ barcode:+ weight_unit: lb+ dimensions_unit:+ backorder_limit:+ deleted_at:- created_at: '2026-07-26T14:25:56.764Z'- updated_at: '2026-07-26T14:25:56.776Z'++ created_at: '2026-07-27T08:34:26.610Z'++ updated_at: '2026-07-27T08:34:26.620Z'+ preorderable: false+ tax_category_id: taxcat_UkLWZg9DAJ+ available_stock: 0+ reserved_quantity: 0+ total_on_hand: 0- product_name: Product 875702++ product_name: Product 935089+ '404':+ description: variant not found+ content:+ application/json:+ example:+ error:+ code: variant_not_found+ message: Variant not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ patch:+ summary: Update a variant+ tags:+ - Variants+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Updates a variant. Only provided fields are updated.++ **Required scope:** `write_products` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const variant = await client.products.variants.update('prod_86Rf07xd4z', 'variant_k5nR8xLq', {+ sku: 'UPDATED-SKU',+ stock_items: [+ { stock_location_id: 'sloc_UkLWZg9DAJ', count_on_hand: 75 },+ ],+ })+ - lang: bash+ label: Spree CLI+ source: spree api patch /products/{product_id}/variants/{id} -d '{"sku":"UPDATED-SKU","stock_items":[{"stock_location_id":"sloc_UkLWZg9DAJ","count_on_hand":75}]}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: product_id+ in: path+ required: true+ description: Product ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Variant ID+ schema:+ type: string+ responses:+ '200':+ description: variant updated+ content:+ application/json:+ example:+ id: variant_gbHJdmfrXB+ product_id: prod_UkLWZg9DAJ+ sku: UPDATED-SKU+ options_text: 'Size: S'+ track_inventory: true+ media_count: 0+ preorder_ships_at:+ thumbnail_url:+ purchasable: true+ in_stock: false+ backorderable: true+ preorder: false- weight: 36.32- height: 7.46- width: 167.2- depth: 51.54++ weight: 184.81++ height: 10.83++ width: 132.83++ depth: 78.91+ price:+ id: price_gbHJdmfrXB+ amount: '19.99'+ amount_in_cents: 1999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$19.99"+ display_compare_at_amount:+ price_list_id:+ original_price:+ option_values:+ - id: optval_UkLWZg9DAJ+ option_type_id: opt_UkLWZg9DAJ+ name: size-24+ label: S+ position: 1+ color_code:+ option_type_name: foo-size-33+ option_type_label: Size+ image_url:+ metadata: {}- created_at: '2026-07-26T14:25:57.499Z'- updated_at: '2026-07-26T14:25:57.499Z'++ created_at: '2026-07-27T08:34:27.242Z'++ updated_at: '2026-07-27T08:34:27.242Z'+ metadata: {}+ position: 2+ cost_price: '17.0'+ cost_currency: USD+ barcode:+ weight_unit: lb+ dimensions_unit:+ backorder_limit:+ deleted_at:- created_at: '2026-07-26T14:25:57.495Z'- updated_at: '2026-07-26T14:25:57.805Z'++ created_at: '2026-07-27T08:34:27.240Z'++ updated_at: '2026-07-27T08:34:27.505Z'+ preorderable: false+ tax_category_id: taxcat_UkLWZg9DAJ+ available_stock: 0+ reserved_quantity: 0+ total_on_hand: 0- product_name: Product 892126++ product_name: Product 953065+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ sku:+ type: string+ example: SKU-001+ cost_price:+ type: string+ example: '10.00'+ cost_currency:+ type: string+ example: USD+ weight:+ type: number+ height:+ type: number+ width:+ type: number+ depth:+ type: number+ weight_unit:+ type: string+ dimensions_unit:+ type: string+ track_inventory:+ type: boolean+ tax_category_id:+ type: string+ options:+ type: array+ description: One pair per option type the variant participates in+ (e.g. size + color). Option types and values are auto-created+ if missing.+ items:+ type: object+ required:+ - name+ - value+ properties:+ name:+ type: string+ example: size+ value:+ type: string+ example: Small+ position:+ type: integer+ barcode:+ type: string+ prices:+ type: array+ description: Per-currency prices. Upserted by currency.+ items:+ type: object+ required:+ - currency+ - amount+ properties:+ currency:+ type: string+ example: USD+ amount:+ type: string+ example: '29.99'+ compare_at_amount:+ type: string+ nullable: true+ example: '39.99'+ stock_items:+ type: array+ description: Per-stock-location inventory. Upserted by stock_location_id.+ items:+ type: object+ required:+ - stock_location_id+ - count_on_hand+ properties:+ stock_location_id:+ type: string+ description: Stock location ID (e.g. sloc_xxx)+ count_on_hand:+ type: integer+ example: 50+ backorderable:+ type: boolean+ delete:+ summary: Delete a variant+ tags:+ - Variants+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Soft-deletes a variant.++ **Required scope:** `write_products` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.products.variants.delete('prod_86Rf07xd4z', 'variant_k5nR8xLq')+ - lang: bash+ label: Spree CLI+ source: spree api delete /products/{product_id}/variants/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: product_id+ in: path+ required: true+ description: Product ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Variant ID+ schema:+ type: string+ responses:+ '204':+ description: variant deleted+ "/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries":+ parameters:+ - name: webhook_endpoint_id+ in: path+ required: true+ description: Parent webhook endpoint ID+ schema:+ type: string+ get:+ summary: List webhook deliveries+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns delivery attempts for the given endpoint, most recent first.+ Each row carries the original request payload, the response code+ (when the receiver replied), the execution time, and any transport+ error — everything needed to audit failures and decide whether to+ redeliver.+++ **Required scope:** `read_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const deliveries = await client.webhookEndpoints.deliveries.list('whe_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api get /webhook_endpoints/{webhook_endpoint_id}/deliveries+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: page+ in: query+ required: false+ description: Page number+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ description: Number of records per page+ schema:+ type: integer+ - name: q[event_name_eq]+ in: query+ required: false+ description: Filter by event name (exact)+ schema:+ type: string+ - name: q[success_eq]+ in: query+ required: false+ description: Filter by success flag+ schema:+ type: boolean+ - name: sort+ in: query+ required: false+ description: Sort by field. Prefix with `-` for descending (e.g., `-delivered_at`).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: deliveries found+ content:+ application/json:+ example:+ data:+ - id: whd_gbHJdmfrXB+ event_name: order.created+ event_id:+ response_code: 500+ execution_time: 200+ error_type:+ request_errors:+ response_body:+ success: false- created_at: '2026-07-26T14:25:58.505Z'- updated_at: '2026-07-26T14:25:58.505Z'- delivered_at: '2026-07-26T14:25:58.505Z'++ created_at: '2026-07-27T08:34:27.913Z'++ updated_at: '2026-07-27T08:34:27.913Z'++ delivered_at: '2026-07-27T08:34:27.913Z'+ payload:+ event: order.created+ data:+ id: 1+ webhook_endpoint_id: whe_UkLWZg9DAJ+ webhook_endpoint_url: https://shop.example.com/webhooks+ - id: whd_UkLWZg9DAJ+ event_name: order.created+ event_id:+ response_code: 200+ execution_time: 150+ error_type:+ request_errors:+ response_body:+ success: true- created_at: '2026-07-26T14:25:58.502Z'- updated_at: '2026-07-26T14:25:58.502Z'- delivered_at: '2026-07-26T14:25:58.501Z'++ created_at: '2026-07-27T08:34:27.912Z'++ updated_at: '2026-07-27T08:34:27.912Z'++ delivered_at: '2026-07-27T08:34:27.911Z'+ payload:+ event: order.created+ data:+ id: 1+ webhook_endpoint_id: whe_UkLWZg9DAJ+ webhook_endpoint_url: https://shop.example.com/webhooks+ meta:+ page: 1+ limit: 25+ count: 2+ pages: 1+ from: 1+ to: 2+ in: 2+ previous:+ next:+ '404':+ description: parent webhook endpoint not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Webhook endpoint not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ "/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}":+ parameters:+ - name: webhook_endpoint_id+ in: path+ required: true+ description: Parent webhook endpoint ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Webhook delivery ID+ schema:+ type: string+ get:+ summary: Get a webhook delivery+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns a single delivery attempt with the full request payload and+ the response body the receiver returned. Use this for ad-hoc debug+ of failed deliveries.+++ **Required scope:** `read_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const delivery = await client.webhookEndpoints.deliveries.get('whe_xxx', 'whd_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api get /webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: delivery found+ content:+ application/json:+ example:+ id: whd_gbHJdmfrXB+ event_name: order.created+ event_id:+ response_code: 500+ execution_time: 200+ error_type:+ request_errors:+ response_body:+ success: false- created_at: '2026-07-26T14:25:59.572Z'- updated_at: '2026-07-26T14:25:59.572Z'- delivered_at: '2026-07-26T14:25:59.571Z'++ created_at: '2026-07-27T08:34:28.491Z'++ updated_at: '2026-07-27T08:34:28.491Z'++ delivered_at: '2026-07-27T08:34:28.490Z'+ payload:+ event: order.created+ data:+ id: 1+ webhook_endpoint_id: whe_UkLWZg9DAJ+ webhook_endpoint_url: https://shop.example.com/webhooks+ '404':+ description: delivery not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Webhook delivery not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ "/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}/redeliver":+ parameters:+ - name: webhook_endpoint_id+ in: path+ required: true+ description: Parent webhook endpoint ID+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Webhook delivery ID to redeliver+ schema:+ type: string+ post:+ summary: Redeliver a webhook delivery+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Creates a new delivery row with the same payload + event_name and+ queues it. The original row is preserved for audit history.+++ **Required scope:** `write_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ // Creates a new delivery row with the same payload + event_name and queues+ // it. The original row is preserved for audit history.+ const delivery = await client.webhookEndpoints.deliveries.redeliver('whe_xxx', 'whd_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api post /webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}/redeliver+ -d '{ ... }'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '201':+ description: redelivery queued+ content:+ application/json:+ example:+ id: whd_EfhxLZ9ck8+ event_name: order.created+ event_id:+ response_code:+ execution_time:+ error_type:+ request_errors:+ response_body:+ success:- created_at: '2026-07-26T14:26:00.898Z'- updated_at: '2026-07-26T14:26:00.898Z'++ created_at: '2026-07-27T08:34:29.347Z'++ updated_at: '2026-07-27T08:34:29.347Z'+ delivered_at:+ payload:+ event: order.created+ data:+ id: 1+ webhook_endpoint_id: whe_UkLWZg9DAJ+ webhook_endpoint_url: https://shop.example.com/webhooks+ "/api/v3/admin/webhook_endpoints":+ get:+ summary: List webhook endpoints+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns outbound webhook subscriptions for the current store. Each+ endpoint receives a signed POST when any subscribed event fires.+ `secret_key` is `null` on list reads — the plaintext is delivered+ exactly once on create.+++ **Required scope:** `read_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const endpoints = await client.webhookEndpoints.list()+ - lang: bash+ label: Spree CLI+ source: spree api get /webhook_endpoints+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: page+ in: query+ required: false+ description: Page number+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ description: Number of records per page+ schema:+ type: integer+ - name: q[name_cont]+ in: query+ required: false+ description: Filter by name (contains)+ schema:+ type: string+ - name: q[url_cont]+ in: query+ required: false+ description: Filter by URL (contains)+ schema:+ type: string+ - name: sort+ in: query+ required: false+ description: Sort by field. Prefix with `-` for descending (e.g., `-created_at`).+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: webhook endpoints found+ content:+ application/json:+ example:+ data:+ - id: whe_UkLWZg9DAJ+ name: Order pipeline+ url: https://shop.example.com/webhooks/orders+ active: true+ subscriptions:+ - order.created+ - order.completed+ - product.created+ disabled_reason:- created_at: '2026-07-26T14:26:01.094Z'- updated_at: '2026-07-26T14:26:01.094Z'++ created_at: '2026-07-27T08:34:29.364Z'++ updated_at: '2026-07-27T08:34:29.364Z'+ disabled_at:+ secret_key:+ last_delivery_at:+ recent_delivery_count: 0+ recent_failure_count: 0+ total_delivery_count: 0+ successful_delivery_count: 0+ failed_delivery_count: 0+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ '401':+ description: unauthorized+ content:+ application/json:+ example:+ error:+ code: authentication_required+ message: Authentication required+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ post:+ summary: Create a webhook endpoint+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Creates a new outbound webhook subscription. The plaintext+ `secret_key` is returned **once** in this response — persist it+ immediately to verify incoming webhook signatures. Subsequent reads+ return `null` for the secret. Pass an empty `subscriptions` array or+ omit it to receive every event.+++ **Required scope:** `write_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const endpoint = await client.webhookEndpoints.create({+ name: 'Order pipeline',+ url: 'https://example.com/webhooks/orders',+ active: true,+ subscriptions: ['order.completed', 'order.canceled'],+ })++ // The plaintext `secret_key` is returned exactly once on create — persist it+ // immediately so you can verify incoming webhook signatures. Subsequent reads+ // will return `null`.+ const signingSecret = endpoint.secret_key+ - lang: bash+ label: Spree CLI+ source: spree api post /webhook_endpoints -d '{"name":"Order pipeline","url":"https://example.com/webhooks/orders","active":true,"subscriptions":["order.completed","order.canceled"]}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '201':+ description: webhook endpoint created — secret_key returned once+ content:+ application/json:+ example:+ id: whe_gbHJdmfrXB+ name: CI integration+ url: https://ci.example.com/webhooks+ active: true+ subscriptions:+ - order.completed+ disabled_reason:- created_at: '2026-07-26T14:26:02.237Z'- updated_at: '2026-07-26T14:26:02.237Z'++ created_at: '2026-07-27T08:34:29.948Z'++ updated_at: '2026-07-27T08:34:29.948Z'+ disabled_at:- secret_key: aee79844060465d31bd6f495755cc684394cdcef704ecdbbcc82a42852bbeac1++ secret_key: 424dedbf43fcbdf282701cdf77f80b03462cb924b7bccbd7a430a5fe051a275d+ last_delivery_at:+ recent_delivery_count: 0+ recent_failure_count: 0+ total_delivery_count: 0+ successful_delivery_count: 0+ failed_delivery_count: 0+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: |-+ Url Translation missing. Options considered were:+ - en.activerecord.errors.models.spree/webhook_endpoint.attributes.url.invalid_url+ - en.activerecord.errors.models.spree/webhook_endpoint.invalid_url+ - en.activerecord.errors.messages.invalid_url+ - en.errors.attributes.url.invalid_url+ - en.errors.messages.invalid_url+ details:+ url:+ - |-+ Translation missing. Options considered were:+ - en.activerecord.errors.models.spree/webhook_endpoint.attributes.url.invalid_url+ - en.activerecord.errors.models.spree/webhook_endpoint.invalid_url+ - en.activerecord.errors.messages.invalid_url+ - en.errors.attributes.url.invalid_url+ - en.errors.messages.invalid_url+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ required:+ - url+ properties:+ name:+ type: string+ example: Order pipeline+ url:+ type: string+ example: https://example.com/webhooks/orders+ active:+ type: boolean+ example: true+ subscriptions:+ type: array+ items:+ type: string+ example:+ - order.completed+ - order.canceled+ "/api/v3/admin/webhook_endpoints/{id}":+ parameters:+ - name: id+ in: path+ required: true+ description: Webhook endpoint ID+ schema:+ type: string+ get:+ summary: Get a webhook endpoint+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Returns a single webhook endpoint by prefixed ID.++ **Required scope:** `read_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const endpoint = await client.webhookEndpoints.get('whe_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api get /webhook_endpoints/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: webhook endpoint found+ content:+ application/json:+ example:+ id: whe_UkLWZg9DAJ+ name: Order pipeline+ url: https://shop.example.com/webhooks/orders+ active: true+ subscriptions:+ - order.created+ - order.completed+ - product.created+ disabled_reason:- created_at: '2026-07-26T14:26:02.729Z'- updated_at: '2026-07-26T14:26:02.729Z'++ created_at: '2026-07-27T08:34:30.244Z'++ updated_at: '2026-07-27T08:34:30.244Z'+ disabled_at:+ secret_key:+ last_delivery_at:+ recent_delivery_count: 0+ recent_failure_count: 0+ total_delivery_count: 0+ successful_delivery_count: 0+ failed_delivery_count: 0+ '404':+ description: webhook endpoint not found+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Webhook endpoint not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ patch:+ summary: Update a webhook endpoint+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Updates name, URL, active flag, or the event subscription list.+ Toggling `active` here is equivalent to calling `disable`/`enable`+ without an audit reason.+++ **Required scope:** `write_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ const endpoint = await client.webhookEndpoints.update('whe_xxx', {+ name: 'Order pipeline (v2)',+ subscriptions: ['order.completed', 'order.canceled', 'order.paid'],+ })+ - lang: bash+ label: Spree CLI+ source: spree api patch /webhook_endpoints/{id} -d '{"name":"Order pipeline+ (v2)","subscriptions":["order.completed","order.canceled","order.paid"]}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '200':+ description: webhook endpoint updated+ content:+ application/json:+ example:+ id: whe_UkLWZg9DAJ+ name: Order pipeline (renamed)+ url: https://shop.example.com/webhooks/orders+ active: true+ subscriptions:+ - order.created+ - order.completed+ - product.created+ disabled_reason:- created_at: '2026-07-26T14:26:03.735Z'- updated_at: '2026-07-26T14:26:04.044Z'++ created_at: '2026-07-27T08:34:30.791Z'++ updated_at: '2026-07-27T08:34:31.046Z'+ disabled_at:+ secret_key:+ last_delivery_at:+ recent_delivery_count: 0+ recent_failure_count: 0+ total_delivery_count: 0+ successful_delivery_count: 0+ failed_delivery_count: 0+ '422':+ description: validation error+ content:+ application/json:+ example:+ error:+ code: validation_error+ message: |-+ Url Translation missing. Options considered were:+ - en.activerecord.errors.models.spree/webhook_endpoint.attributes.url.invalid_url+ - en.activerecord.errors.models.spree/webhook_endpoint.invalid_url+ - en.activerecord.errors.messages.invalid_url+ - en.errors.attributes.url.invalid_url+ - en.errors.messages.invalid_url+ details:+ url:+ - |-+ Translation missing. Options considered were:+ - en.activerecord.errors.models.spree/webhook_endpoint.attributes.url.invalid_url+ - en.activerecord.errors.models.spree/webhook_endpoint.invalid_url+ - en.activerecord.errors.messages.invalid_url+ - en.errors.attributes.url.invalid_url+ - en.errors.messages.invalid_url+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ name:+ type: string+ url:+ type: string+ active:+ type: boolean+ subscriptions:+ type: array+ items:+ type: string+ delete:+ summary: Delete a webhook endpoint+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Soft-deletes the endpoint and stops future deliveries.++ **Required scope:** `write_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ await client.webhookEndpoints.delete('whe_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api delete /webhook_endpoints/{id}+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '204':+ description: webhook endpoint deleted+ "/api/v3/admin/webhook_endpoints/{id}/send_test":+ parameters:+ - name: id+ in: path+ required: true+ description: Webhook endpoint ID+ schema:+ type: string+ post:+ summary: Send a test delivery+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Creates a `webhook.test` delivery record and queues it. Use this to+ verify the endpoint is reachable and your signature verification+ accepts Spree's payloads.+++ **Required scope:** `write_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ // Fires a synthetic `webhook.test` delivery so you can verify the endpoint is+ // reachable and your signature-verification code accepts Spree's payloads.+ const delivery = await client.webhookEndpoints.sendTest('whe_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api post /webhook_endpoints/{id}/send_test -d '{ ... }'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '201':+ description: test delivery queued+ content:+ application/json:+ example:+ id: whd_UkLWZg9DAJ+ event_name: webhook.test+ event_id:+ response_code:+ execution_time:+ error_type:+ request_errors:+ response_body:+ success:- created_at: '2026-07-26T14:26:05.256Z'- updated_at: '2026-07-26T14:26:05.256Z'++ created_at: '2026-07-27T08:34:31.898Z'++ updated_at: '2026-07-27T08:34:31.898Z'+ delivered_at:+ payload:- id: 32be40ae-e2ae-4a63-9151-0184336fe694++ id: 599b24c0-fc94-4a4d-b35c-edee10d314c3+ name: webhook.test- created_at: '2026-07-26T14:26:05Z'++ created_at: '2026-07-27T08:34:31Z'+ data:+ message: This is a test webhook from Spree.+ metadata:+ spree_version: 5.6.0+ webhook_endpoint_id: whe_UkLWZg9DAJ+ webhook_endpoint_url: https://shop.example.com/webhooks/orders+ "/api/v3/admin/webhook_endpoints/{id}/enable":+ parameters:+ - name: id+ in: path+ required: true+ description: Webhook endpoint ID+ schema:+ type: string+ patch:+ summary: Re-enable a webhook endpoint+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Re-enables an endpoint that was manually or automatically disabled.++ **Required scope:** `write_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ // Re-enable an endpoint that was auto-disabled after repeated delivery failures.+ const endpoint = await client.webhookEndpoints.enable('whe_xxx')+ - lang: bash+ label: Spree CLI+ source: spree api patch /webhook_endpoints/{id}/enable -d '{ ... }'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '200':+ description: webhook endpoint enabled+ content:+ application/json:+ example:+ id: whe_UkLWZg9DAJ+ name: Order pipeline+ url: https://shop.example.com/webhooks/orders+ active: true+ subscriptions:+ - order.created+ - order.completed+ - product.created+ disabled_reason:- created_at: '2026-07-26T14:26:05.321Z'- updated_at: '2026-07-26T14:26:05.607Z'++ created_at: '2026-07-27T08:34:31.914Z'++ updated_at: '2026-07-27T08:34:32.169Z'+ disabled_at:+ secret_key:+ last_delivery_at:+ recent_delivery_count: 0+ recent_failure_count: 0+ total_delivery_count: 0+ successful_delivery_count: 0+ failed_delivery_count: 0+ "/api/v3/admin/webhook_endpoints/{id}/disable":+ parameters:+ - name: id+ in: path+ required: true+ description: Webhook endpoint ID+ schema:+ type: string+ patch:+ summary: Disable a webhook endpoint+ tags:+ - Webhooks+ security:+ - api_key: []+ bearer_auth: []+ description: |-+ Manually pauses an endpoint. Unlike auto-disable (triggered after+ repeated delivery failures), no notification email is sent.+++ **Required scope:** `write_webhooks` (for API-key authentication).+ x-codeSamples:+ - lang: javascript+ label: Spree Admin SDK+ source: |-+ import { createAdminClient } from '@spree/admin-sdk'++ const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+ })++ // Pause an endpoint without deleting it. The optional `reason` is shown next+ // to the disabled indicator in the admin.+ const endpoint = await client.webhookEndpoints.disable('whe_xxx', {+ reason: 'Investigating elevated 5xx rate',+ })+ - lang: bash+ label: Spree CLI+ source: spree api patch /webhook_endpoints/{id}/disable -d '{"reason":"Investigating+ elevated 5xx rate"}'+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true+ description: Bearer token for admin authentication+ schema:+ type: string+ responses:+ '200':+ description: webhook endpoint disabled+ content:+ application/json:+ example:+ id: whe_UkLWZg9DAJ+ name: Order pipeline+ url: https://shop.example.com/webhooks/orders+ active: false+ subscriptions:+ - order.created+ - order.completed+ - product.created+ disabled_reason: Investigating- created_at: '2026-07-26T14:26:05.648Z'- updated_at: '2026-07-26T14:26:05.932Z'- disabled_at: '2026-07-26T14:26:05.932Z'++ created_at: '2026-07-27T08:34:32.186Z'++ updated_at: '2026-07-27T08:34:32.443Z'++ disabled_at: '2026-07-27T08:34:32.443Z'+ secret_key:+ last_delivery_at:+ recent_delivery_count: 0+ recent_failure_count: 0+ total_delivery_count: 0+ successful_delivery_count: 0+ failed_delivery_count: 0+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:+ reason:+ type: string+ example: Investigating elevated 5xx rate-servers:-- url: http://{defaultHost}- variables:- defaultHost:- default: localhost:3000-tags:-- name: Authentication- description: Admin user login, logout, token refresh, and current user profile-- name: Allowed Origins- description: CORS allowlist for storefront and admin client origins-- name: API Keys- description: Secret and publishable API keys-- name: Categories- description: Hierarchical product categories — tree management, repositioning, and- product assignments-- name: Channels- description: Sales channels, product publication across channels, and per-channel- order routing rules-- name: Custom Fields- description: Custom field definitions for products, variants, customers, and other- resources-- name: Customer Groups- description: Customer groups for segmenting customers (e.g. wholesale, VIP) used- by pricing and promotions-- name: Customers- description: Customer profiles, addresses, credit cards, and store credits-- name: Exports- description: Async CSV exports of admin resources-- name: Fulfillments- description: Order fulfillments — shipments, fulfill, cancel, resume, split-- name: Gift Cards- description: Gift cards and gift card batches-- name: Imports- description: Async CSV imports of admin resources, with per-row status and failed-row- retry-- name: Markets- description: Markets — geographic groupings of countries used for pricing, tax,- and fulfillment rules-- name: Option Types- description: Option types and option values used to build product variants (e.g.- Size, Color)-- name: Orders- description: Orders, order items, applied gift cards, and applied store credits-- name: Payment Methods- description: Configured payment providers and their available types-- name: Payments- description: Order payments — list, capture, void-- name: Pricing- description: Prices and price lists for currency-, market-, and customer-group-specific- pricing-- name: Products- description: Products, taxons/categories, product custom field values, and bulk- product operations-- name: Promotions- description: Promotions, promotion rules, promotion actions, and coupon codes-- name: Refunds- description: Order refunds-- name: Settings- description: Store-level settings — store profile, tags, store credit categories-- name: Staff- description: Admin users, roles, and invitations to the store-- name: Stock Locations- description: Warehouses and physical fulfillment locations-- name: Variants- description: Product variants — the individual SKUs (size/color combinations) sold- under a product-- name: Webhooks- description: Webhook endpoints and webhook delivery history-components:++ "/api/v3/admin/collections":++ get:++ summary: List collections++ tags:++ - Collections++ security:++ - api_key: []++ bearer_auth: []++ description: |-++ Returns a paginated list of the store's collections.++++ **Required scope:** `read_collections` (for API-key authentication).++ parameters:++ - name: x-spree-api-key++ in: header++ required: true++ schema:++ type: string++ - name: Authorization++ in: header++ required: true++ description: Bearer token for admin authentication++ schema:++ type: string++ - name: page++ in: query++ required: false++ description: Page number++ schema:++ type: integer++ - name: limit++ in: query++ required: false++ description: Number of records per page++ schema:++ type: integer++ - name: expand++ in: query++ required: false++ description: Comma-separated associations to expand (e.g., custom_fields,++ translations).++ schema:++ type: string++ responses:++ '200':++ description: collections found++ content:++ application/json:++ example:++ data:++ - id: coll_UkLWZg9DAJ++ name: Summer Sale++ permalink: summer-sale++ position: 1++ sort_order: manual++ meta_title:++ meta_description:++ meta_keywords:++ products_count: 0++ description: ''++ description_html: ''++ image_url:++ square_image_url:++ automatic: false++ rules_match_policy: all++ metadata: {}++ created_at: '2026-07-27T08:32:55.026Z'++ updated_at: '2026-07-27T08:32:55.026Z'++ rules: []++ meta:++ page: 1++ limit: 25++ count: 1++ pages: 1++ from: 1++ to: 1++ in: 1++ previous:++ next:++ schema:++ type: object++ properties:++ data:++ type: array++ items:++ "$ref": "#/components/schemas/Collection"++ meta:++ "$ref": "#/components/schemas/PaginationMeta"++ required:++ - data++ - meta++ post:++ summary: Create a collection++ tags:++ - Collections++ security:++ - api_key: []++ bearer_auth: []++ description: |-++ Creates a manual or automatic (rule-based) collection. For automatic collections, send the full desired rule set under `rules`.++++ **Required scope:** `write_collections` (for API-key authentication).++ parameters:++ - name: x-spree-api-key++ in: header++ required: true++ schema:++ type: string++ - name: Authorization++ in: header++ required: true++ description: Bearer token for admin authentication++ schema:++ type: string++ responses:++ '201':++ description: collection created++ content:++ application/json:++ example:++ id: coll_gbHJdmfrXB++ name: On Sale++ permalink: on-sale++ position: 2++ sort_order: manual++ meta_title:++ meta_description:++ meta_keywords:++ products_count: 0++ description: ''++ description_html: ''++ image_url:++ square_image_url:++ automatic: true++ rules_match_policy: any++ metadata: {}++ created_at: '2026-07-27T08:32:55.556Z'++ updated_at: '2026-07-27T08:32:55.557Z'++ rules:++ - id: crule_UkLWZg9DAJ++ type: Spree::CollectionRules::Tag++ value: summer++ match_policy: contains++ schema:++ "$ref": "#/components/schemas/Collection"++ '422':++ description: validation error++ content:++ application/json:++ example:++ error:++ code: validation_error++ message: Name can't be blank++ details:++ name:++ - can't be blank++ schema:++ "$ref": "#/components/schemas/ErrorResponse"++ requestBody:++ content:++ application/json:++ schema:++ type: object++ properties:++ name:++ type: string++ example: On Sale++ automatic:++ type: boolean++ example: true++ rules_match_policy:++ type: string++ enum:++ - all++ - any++ example: all++ sort_order:++ type: string++ example: manual++ permalink:++ type: string++ description:++ type: string++ meta_title:++ type: string++ meta_description:++ type: string++ meta_keywords:++ type: string++ rules:++ type: array++ description: Full desired rule set. Entries with an id update, id-less++ entries create, omitted rules are removed.++ items:++ type: object++ properties:++ id:++ type: string++ example: crule_abc123++ type:++ type: string++ example: Spree::CollectionRules::Tag++ value:++ type: string++ example: summer++ match_policy:++ type: string++ example: contains++ required:++ - name++ "/api/v3/admin/collections/{id}":++ get:++ summary: Get a collection++ tags:++ - Collections++ security:++ - api_key: []++ bearer_auth: []++ description: |-++ Returns a single collection by ID, including its rules.++++ **Required scope:** `read_collections` (for API-key authentication).++ parameters:++ - name: x-spree-api-key++ in: header++ required: true++ schema:++ type: string++ - name: Authorization++ in: header++ required: true++ description: Bearer token for admin authentication++ schema:++ type: string++ - name: id++ in: path++ required: true++ description: Collection ID++ schema:++ type: string++ - name: expand++ in: query++ required: false++ description: Comma-separated associations to expand (e.g., custom_fields,++ translations).++ schema:++ type: string++ responses:++ '200':++ description: collection found++ content:++ application/json:++ example:++ id: coll_UkLWZg9DAJ++ name: Summer Sale++ permalink: summer-sale++ position: 1++ sort_order: manual++ meta_title:++ meta_description:++ meta_keywords:++ products_count: 0++ description: ''++ description_html: ''++ image_url:++ square_image_url:++ automatic: false++ rules_match_policy: all++ metadata: {}++ created_at: '2026-07-27T08:32:55.839Z'++ updated_at: '2026-07-27T08:32:55.839Z'++ rules: []++ schema:++ "$ref": "#/components/schemas/Collection"++ '404':++ description: collection not found++ content:++ application/json:++ example:++ error:++ code: record_not_found++ message: Collection not found++ schema:++ "$ref": "#/components/schemas/ErrorResponse"++ patch:++ summary: Update a collection++ tags:++ - Collections++ security:++ - api_key: []++ bearer_auth: []++ description: |-++ Updates a collection. Send `position` to reorder it within the flat list; send the full `rules` set to sync automatic rules.++++ **Required scope:** `write_collections` (for API-key authentication).++ parameters:++ - name: x-spree-api-key++ in: header++ required: true++ schema:++ type: string++ - name: Authorization++ in: header++ required: true++ description: Bearer token for admin authentication++ schema:++ type: string++ - name: id++ in: path++ required: true++ description: Collection ID++ schema:++ type: string++ responses:++ '200':++ description: collection updated++ content:++ application/json:++ example:++ id: coll_UkLWZg9DAJ++ name: Winter Sale++ permalink: summer-sale++ position: 1++ sort_order: manual++ meta_title:++ meta_description:++ meta_keywords:++ products_count: 0++ description: ''++ description_html: ''++ image_url:++ square_image_url:++ automatic: false++ rules_match_policy: all++ metadata: {}++ created_at: '2026-07-27T08:32:56.389Z'++ updated_at: '2026-07-27T08:32:56.653Z'++ rules: []++ schema:++ "$ref": "#/components/schemas/Collection"+ requestBody:+ content:+ application/json:+ schema:+ type: object+ properties:- mappings:++ name:++ type: string++ example: Winter Sale++ permalink:++ type: string++ description:++ type: string++ meta_title:++ type: string++ meta_description:++ type: string++ meta_keywords:++ type: string++ sort_order:++ type: string++ automatic:++ type: boolean++ rules_match_policy:++ type: string++ enum:++ - all++ - any++ position:++ type: integer++ description: Reorders the collection within the flat list (acts_as_list)++ rules:+ type: array- description: 'Column assignments to apply before starting. `file_column:- null` unmaps a field.'++ description: Full desired rule set (see create).+ items:+ type: object- required:- - schema_field+ properties:- schema_field:++ id:+ type: string- example: slug- file_column:++ type:+ type: string- nullable: true- example: Product Handle- "/api/v3/admin/imports/{id}/retry_failed_rows":- patch:- summary: Retry failed rows++ value:++ type: string++ match_policy:++ type: string++ delete:++ summary: Delete a collection+ tags:- - Imports++ - Collections+ security:+ - api_key: []+ bearer_auth: []+ description: |-- Re-processes the rows that failed. The import re-enters `processing`; poll `GET /admin/imports/{id}` until it completes again. Returns 422 when the import is not `completed` or has no failed rows.++ Deletes a collection.+- **Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).++ **Required scope:** `write_collections` (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true++ description: Bearer token for admin authentication+ schema:+ type: string+ - name: id+ in: path+ required: true++ description: Collection ID++ schema:++ type: string++ responses:++ '204':++ description: collection deleted++ "/api/v3/admin/collections/{collection_id}/products":++ get:++ summary: List collection products++ tags:++ - Collections++ security:++ - api_key: []++ bearer_auth: []++ description: |-++ Products curated in the collection, ordered by their membership position.++++ **Required scope:** `read_collections` (for API-key authentication).++ parameters:++ - name: x-spree-api-key++ in: header++ required: true++ schema:++ type: string++ - name: Authorization++ in: header++ required: true++ description: Bearer token for admin authentication++ schema:++ type: string++ - name: collection_id++ in: path++ required: true++ description: Collection ID+ schema:+ type: string+ responses:+ '200':- description: retry queued++ description: products found+ content:+ application/json:+ example:- id: imp_gbHJdmfrXB- number: IM445095710- type: Spree::Imports::Products- rows_count: 1- created_at: '2026-07-20T12:37:28.511Z'- updated_at: '2026-07-20T12:37:28.535Z'- status: processing- owner_type: Spree::Store- owner_id: store_UkLWZg9DAJ- user_id: admin_UkLWZg9DAJ- processing_errors:- preferred_delimiter: ","- original_filename: products_import.csv- original_byte_size: 3612- original_file_url: "/api/v3/admin/imports/imp_gbHJdmfrXB/download"- completed_rows_count: 0- failed_rows_count: 1- schema_fields:- - name: slug- label: Slug- required: true- - name: sku- label: SKU- required: true- - name: name- label: Name- required: true- - name: price- label: Price- required: true- - name: status- label: Status- required: false- - name: description- label: Description- required: false- - name: meta_title- label: Meta Title- required: false- - name: meta_description- label: Meta Description- required: false- - name: meta_keywords- label: Meta Keywords- required: false- - name: tags- label: Tags- required: false- - name: compare_at_price- label: Compare at Price- required: false- - name: currency- label: Currency- required: false- - name: width- label: Width- required: false- - name: height- label: Height- required: false- - name: depth- label: Depth- required: false- - name: dimensions_unit- label: Dimensions Unit- required: false- - name: weight- label: Weight- required: false- - name: weight_unit- label: Weight Unit- required: false- - name: available_on- label: Available On- required: false- - name: discontinue_on- label: Discontinue On- required: false- - name: track_inventory- label: Track Inventory- required: false- - name: inventory_count- label: Inventory Count- required: false- - name: inventory_backorderable- label: Inventory Backorderable- required: false- - name: tax_category- label: Tax Category- required: false- - name: shipping_category- label: Shipping Category- required: false- - name: image1_src- label: Image 1 URL- required: false- - name: image2_src- label: Image 2 URL- required: false- - name: image3_src- label: Image 3 URL- required: false- - name: option1_name- label: Option 1 Name- required: false- - name: option1_value- label: Option 1 Value- required: false- - name: option2_name- label: Option 2 Name- required: false- - name: option2_value- label: Option 2 Value- required: false- - name: option3_name- label: Option 3 Name- required: false- - name: option3_value- label: Option 3 Value- required: false- - name: category1- label: Category 1- required: false- - name: category2- label: Category 2- required: false- - name: category3- label: Category 3- required: false- csv_headers: []- sample_row: {}- mappings: []- "/api/v3/admin/imports/{import_id}/rows":- get:- summary: List import rows++ data: []++ meta:++ page: 1++ limit: 25++ count: 0++ pages: 1++ from: 0++ to: 0++ in: 0++ previous:++ next:++ schema:++ type: object++ properties:++ data:++ type: array++ items:++ "$ref": "#/components/schemas/Product"++ meta:++ "$ref": "#/components/schemas/PaginationMeta"++ required:++ - data++ - meta++ post:++ summary: Add a product to a collection+ tags:- - Imports++ - Collections+ security:+ - api_key: []+ bearer_auth: []+ description: |-- Paginated rows of an import — the failure report. Filter with `q[status_eq]=failed` to list only rows that could not be imported; each row carries the raw CSV `data` and its `validation_errors`.++ Curates a product into the collection (appended to the end).+- **Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).++ **Required scope:** `write_collections` (for API-key authentication).+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: Authorization+ in: header+ required: true++ description: Bearer token for admin authentication+ schema:+ type: string- - name: import_id++ - name: collection_id+ in: path+ required: true- schema:- type: string- - name: q[status_eq]- in: query- required: false- description: 'Filter rows by status: pending, processing, completed, failed.'++ description: Collection ID+ schema:+ type: string+ responses:- '200':- description: rows found++ '201':++ description: product added+ content:+ application/json:+ example:- data:- - id: imrow_gbHJdmfrXB- row_number: 2- status: failed- validation_errors: boom- item_type:- created_at: '2026-07-20T12:37:28.805Z'- updated_at: '2026-07-20T12:37:28.805Z'- import_id: imp_UkLWZg9DAJ- item_id:- data:- slug: test-product- name: Test Product- price: '10.00'- meta:- page: 1- limit: 25- count: 1- pages: 1- from: 1- to: 1- in: 1- previous:- next:++ id: prod_UkLWZg9DAJ++ name: Product 68732++ slug: product-68732++ meta_title:++ meta_description:++ meta_keywords:++ variant_count: 1++ available_on:++ preorder_ships_at:++ purchasable: true++ preorder: false++ in_stock: false++ backorderable: true++ available: true++ description: Soluta repellendus aliquam occaecati placeat. Quis omnis++ a non nobis neque. Possimus ea accusantium recusandae doloremque++ aut sequi ab repellendus. Quaerat laboriosam fugiat alias a accusantium++ nobis voluptatum. Sequi velit laudantium est nobis aliquid esse++ quos. Tenetur ipsa aspernatur eveniet suscipit. Sapiente eligendi++ perspiciatis quidem aspernatur impedit dolor sunt deleniti. Ipsum++ eligendi blanditiis nisi illo architecto est ipsa. Sequi rerum totam++ voluptatibus ad consectetur temporibus debitis unde. Quia corrupti++ nesciunt esse consectetur architecto facere unde. Quia ipsam rem++ a esse deleniti delectus expedita nobis. Consectetur quia dignissimos++ totam porro expedita aliquam delectus libero. Veritatis asperiores++ labore quam reiciendis quibusdam accusantium excepturi. Quos nostrum++ amet consequuntur assumenda facere cum eveniet incidunt. Delectus++ necessitatibus quam temporibus illum recusandae illo. Provident++ ullam libero fugiat nulla veritatis. Alias ullam quos perferendis++ quasi. Laboriosam minus quisquam vel explicabo. Quos non eos iure++ deserunt debitis possimus assumenda. Doloribus magni iure voluptates++ sint illum quis esse. Facere vel saepe optio perferendis incidunt++ nam.++ description_html: |-++ Soluta repellendus aliquam occaecati placeat. Quis omnis a non nobis neque. Possimus ea accusantium recusandae doloremque aut sequi ab repellendus. Quaerat laboriosam fugiat alias a accusantium nobis voluptatum.++ Sequi velit laudantium est nobis aliquid esse quos. Tenetur ipsa aspernatur eveniet suscipit. Sapiente eligendi perspiciatis quidem aspernatur impedit dolor sunt deleniti.++ Ipsum eligendi blanditiis nisi illo architecto est ipsa. Sequi rerum totam voluptatibus ad consectetur temporibus debitis unde. Quia corrupti nesciunt esse consectetur architecto facere unde. Quia ipsam rem a esse deleniti delectus expedita nobis. Consectetur quia dignissimos totam porro expedita aliquam delectus libero.++ Veritatis asperiores labore quam reiciendis quibusdam accusantium excepturi. Quos nostrum amet consequuntur assumenda facere cum eveniet incidunt. Delectus necessitatibus quam temporibus illum recusandae illo. Provident ullam libero fugiat nulla veritatis.++ Alias ullam quos perferendis quasi. Laboriosam minus quisquam vel explicabo. Quos non eos iure deserunt debitis possimus assumenda. Doloribus magni iure voluptates sint illum quis esse. Facere vel saepe optio perferendis incidunt nam.++ default_variant_id: variant_UkLWZg9DAJ++ thumbnail_url:++ tags: []++ price:++ id: price_UkLWZg9DAJ++ amount: '19.99'++ amount_in_cents: 1999++ compare_at_amount:++ compare_at_amount_in_cents:++ currency: USD++ display_amount: "$19.99"++ display_compare_at_amount:++ price_list_id:++ variant_id: variant_UkLWZg9DAJ++ created_at: '2026-07-27T08:32:57.226Z'++ updated_at: '2026-07-27T08:32:57.226Z'++ original_price:++ status: active++ metadata: {}++ deleted_at:++ created_at: '2026-07-27T08:32:57.216Z'++ updated_at: '2026-07-27T08:32:57.233Z'++ tax_category_id: taxcat_UkLWZg9DAJ++ schema:++ "$ref": "#/components/schemas/Product"++ requestBody:++ content:++ application/json:++ schema:++ type: object++ properties:++ product_id:++ type: string++ example: prod_abc123++ required:++ - product_id++ "/api/v3/admin/collections/{collection_id}/products/{id}":++ delete:++ summary: Remove a product from a collection++ tags:++ - Collections++ security:++ - api_key: []++ bearer_auth: []++ description: |-++ Removes a product from the collection's manual curation.++++ **Required scope:** `write_collections` (for API-key authentication).++ parameters:++ - name: x-spree-api-key++ in: header++ required: true++ schema:++ type: string++ - name: Authorization++ in: header++ required: true++ description: Bearer token for admin authentication++ schema:++ type: string++ - name: collection_id++ in: path++ required: true++ description: Collection ID++ schema:++ type: string++ - name: id++ in: path++ required: true++ description: Product ID++ schema:++ type: string++ responses:++ '204':++ description: product removed++ "/api/v3/admin/collections/{collection_id}/products/{id}/reposition":++ patch:++ summary: Reposition a collection product++ tags:++ - Collections++ security:++ - api_key: []++ bearer_auth: []++ description: |-++ Moves a product to a new index among the collection's products.++++ **Required scope:** `write_collections` (for API-key authentication).++ parameters:++ - name: x-spree-api-key++ in: header++ required: true++ schema:++ type: string++ - name: Authorization++ in: header++ required: true++ description: Bearer token for admin authentication++ schema:++ type: string++ - name: collection_id++ in: path++ required: true++ description: Collection ID++ schema:++ type: string++ - name: id++ in: path++ required: true++ description: Product ID++ schema:++ type: string++ responses:++ '204':++ description: product repositioned++ requestBody:++ content:++ application/json:++ schema:++ type: object++ properties:++ new_position:++ type: integer++ description: 0-based index among the collection's products++ required:++ - new_position+servers:+- url: http://{defaultHost}+ variables:+ defaultHost:+ default: localhost:3000+tags:+- name: Authentication+ description: Admin user login, logout, token refresh, and current user profile+- name: Allowed Origins+ description: CORS allowlist for storefront and admin client origins+- name: API Keys+ description: Secret and publishable API keys++- name: Categories++ description: Hierarchical product categories — tree management, repositioning, and++ product assignments+- name: Channels- description: Sales channels and product publication across channels++ description: Sales channels, product publication across channels, and per-channel++ order routing rules+- name: Custom Fields+ description: Custom field definitions for products, variants, customers, and other+ resources+- name: Customer Groups+ description: Customer groups for segmenting customers (e.g. wholesale, VIP) used+ by pricing and promotions+- name: Customers+ description: Customer profiles, addresses, credit cards, and store credits+- name: Exports+ description: Async CSV exports of admin resources+- name: Fulfillments+ description: Order fulfillments — shipments, fulfill, cancel, resume, split+- name: Gift Cards+ description: Gift cards and gift card batches++- name: Imports++ description: Async CSV imports of admin resources, with per-row status and failed-row++ retry+- name: Markets+ description: Markets — geographic groupings of countries used for pricing, tax,+ and fulfillment rules+- name: Option Types+ description: Option types and option values used to build product variants (e.g.+ Size, Color)+- name: Orders+ description: Orders, order items, applied gift cards, and applied store credits+- name: Payment Methods+ description: Configured payment providers and their available types+- name: Payments+ description: Order payments — list, capture, void+- name: Pricing+ description: Prices and price lists for currency-, market-, and customer-group-specific+ pricing+- name: Products+ description: Products, taxons/categories, product custom field values, and bulk+ product operations+- name: Promotions+ description: Promotions, promotion rules, promotion actions, and coupon codes+- name: Refunds+ description: Order refunds+- name: Settings+ description: Store-level settings — store profile, tags, store credit categories+- name: Staff+ description: Admin users, roles, and invitations to the store+- name: Stock Locations+ description: Warehouses and physical fulfillment locations+- name: Variants+ description: Product variants — the individual SKUs (size/color combinations) sold+ under a product+- name: Webhooks+ description: Webhook endpoints and webhook delivery history- x-tagGroups:- - name: Authentication- tags:- - Authentication- - name: Products & Catalog- tags:- - Products- - Variants- - Option Types- - Custom Fields- - Channels- - name: Pricing- tags:- - Pricing- - Markets- - name: Orders & Fulfillment- tags:- - Orders- - Payments- - Fulfillments- - Refunds- - name: Customers- tags:- - Customers- - Customer Groups- - name: Promotions & Gift Cards- tags:- - Promotions- - Gift Cards- - name: Data- tags:- - Exports- - name: Configuration- tags:- - Settings- - Stock Locations- - Payment Methods- - Staff- - API Keys- - Allowed Origins- - Webhooks+components:securitySchemes:api_key:type: apiKeydiff --cc docs/api-reference/store.yamlindex 7ad1a963e7,0249ae93a9..7137b989c8--- a/docs/api-reference/store.yaml+++ b/docs/api-reference/store.yaml@@@ -87,16 -87,16 +87,16 @@@ pathscontent:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImRmODQwMDg3LWU0OTUtNGVmOC05ZDk2LTE5Yzg2MDFjNDdlNCIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg0NTU0NzIwfQ.422flb5K_t6uk2xVIrgv648DkhQdMiSxv1kmdhPfTzo- refresh_token: HzUh27vZWs7JFziCx9Xsbbkf- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6Ijk5ZTI4MjcyLTk5ZWYtNDBmOC1hNjM1LTRhMTgyODc4ZjQ5ZiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg1MDEyMDYyfQ.Mpf047_zweLRDzSLZjjePB5EieHI50pUuSqgLKWsH0Y- refresh_token: LQgQuH8rdUfM5EEX3L72Jmfv++ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjI4ZTVkYTQyLThjZWEtNDIwNS1iYmQ0LWMzNTc0ZTRkMjczZCIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg1MTQ0ODc3fQ.-PUIDdgrQyum0e3zH6EIQARlL99DsucPmfayRDJD-ws++ refresh_token: 2shuEh7LQ1ERU6h2ktqfsPJEuser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Maddie- last_name: Grant- first_name: Lorri- last_name: Keebler++ first_name: Malka++ last_name: Lubowitzphone:accepts_email_marketing: false- full_name: Maddie Grant- full_name: Lorri Keebler++ full_name: Malka Lubowitzavailable_store_credit_total: '0'display_available_store_credit_total: "$0.00"addresses: []@@@ -194,16 -194,16 +194,16 @@@content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjY2ZjM4Nzk5LTJjYjQtNDQ4MC1iNjM4LWJmMjQyMDY0YTEyNCIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg0NTU0NzIxfQ.z_mpRfAwIV29uy4buBl7rWXS4SF8i1nBomG3_rPtEio- refresh_token: 1oFJmSmN8HnykXqntofHyD4k- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImMyOWVjYzMyLWM2OWYtNDc0MC1hZWMxLTAwYmI1MjAwMmM4YiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg1MDEyMDYzfQ.hPY384l3tHxqKb6PPNBFa9tDeoeOBCp6sC175Q80jgs- refresh_token: Whgj8rch8LakTYo8Aa4THTCX++ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjgwZWUzMTc5LWFlZDktNGNjYy05MmFlLTYxNWViZmNhNGE2MyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg1MTQ0ODc4fQ.NbKXf5rwJfIMAQy5by2TBOEm2p3mRsMvgVvtzTPn6ao++ refresh_token: kd8NnnTmm4ueAVYCWRhaZSSfuser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Aleta- last_name: Swift- first_name: Sharlene- last_name: Zieme++ first_name: Keira++ last_name: Fayphone:accepts_email_marketing: false- full_name: Aleta Swift- full_name: Sharlene Zieme++ full_name: Keira Fayavailable_store_credit_total: '0'display_available_store_credit_total: "$0.00"addresses: []@@@ -393,16 -393,16 +393,16 @@@content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImNkOGIwOTNmLTYzNDEtNDI5NC1hN2FkLTYyYmE4OWQ4NmRkZCIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg0NTU0NzMzfQ.NUkTYAGQjsJPgATPmHaJ0Hhn3ZnP9R5uQ-XahoSj4hk- refresh_token: VV7tYv3aVvM1QkQR3YFLKfLU- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6ImNmMWJmMTNjLTNmMjEtNGFlYy05MGM1LWVkOTViMjNjZGU1YyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg1MDEyMDc3fQ.3r4DoE_bzjyFXWDxwIbornisqHBM6tzQ7eqW-zYEUtM- refresh_token: h2NQpqVqBVhgNYoMBQ4wDChM++ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjgyOTFiMWI4LTQ2MzUtNGFmMy1iYzk0LTY4NGYzYWE3Y2Q5YyIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg1MTQ0ODkwfQ.wh9fRHbT0WGKae7FV0p37gJRLorCt0uFPWBCTuWF0iY++ refresh_token: DjwQbieiBWawP3ycCGrzv6xDuser:id: cus_UkLWZg9DAJemail: [email protected]- first_name: Glendora- last_name: Jakubowski- first_name: Joelle- last_name: Feil++ first_name: Lavone++ last_name: Schulistphone:accepts_email_marketing: false- full_name: Glendora Jakubowski- full_name: Joelle Feil++ full_name: Lavone Schulistavailable_store_credit_total: '0'display_available_store_credit_total: "$0.00"addresses: []@@@ -683,262 -683,6 +683,265 @@@message: Valid API key requiredschema:"$ref": "#/components/schemas/ErrorResponse"+ "/api/v3/store/collections":+ get:+ summary: List collections+ tags:+ - Product Catalog+ security:+ - api_key: []+ description: Returns a paginated list of collections for the current store.+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: page+ in: query+ required: false+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ schema:+ type: integer+ - name: q[name_cont]+ in: query+ required: false+ description: Filter by name+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include (e.g., name,permalink).+ id is always included.+ schema:+ type: string+ responses:+ '200':+ description: collections found+ content:+ application/json:+ example:+ data:+ - id: coll_UkLWZg9DAJ+ name: Summer Sale+ permalink: summer-sale+ position: 1+ sort_order: manual+ meta_title:+ meta_description:+ meta_keywords:+ products_count: 1+ description: ''+ description_html: ''+ image_url:+ square_image_url:+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/Collection"+ meta:+ "$ref": "#/components/schemas/PaginationMeta"+ '401':+ description: unauthorized+ content:+ application/json:+ example:+ error:+ code: invalid_token+ message: Valid API key required+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ "/api/v3/store/collections/{id}":+ get:+ summary: Get a collection+ tags:+ - Product Catalog+ security:+ - api_key: []+ description: Returns a single collection by permalink or prefix ID.+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: id+ in: path+ required: true+ description: Collection permalink (e.g., summer-sale) or prefix ID (e.g.,+ coll_abc123)+ schema:+ type: string+ - name: expand+ in: query+ required: false+ description: Expand associations (custom_fields)+ schema:+ type: string+ - name: fields+ in: query+ required: false+ description: Comma-separated list of fields to include. id is always included.+ schema:+ type: string+ responses:+ '200':+ description: collection found by prefix ID+ content:+ application/json:+ example:+ id: coll_UkLWZg9DAJ+ name: Summer Sale+ permalink: summer-sale+ position: 1+ sort_order: manual+ meta_title:+ meta_description:+ meta_keywords:+ products_count: 1+ description: ''+ description_html: ''+ image_url:+ square_image_url:+ schema:+ "$ref": "#/components/schemas/Collection"+ '404':+ description: collection from other store not accessible+ content:+ application/json:+ example:+ error:+ code: record_not_found+ message: Collection not found+ schema:+ "$ref": "#/components/schemas/ErrorResponse"+ "/api/v3/store/collections/{collection_id}/products":+ get:+ summary: List collection products+ tags:+ - Product Catalog+ security:+ - api_key: []+ description: Products in the collection. Defaults to the collection's own sort+ order and accepts the same filters, sort, and pagination as the products endpoint.+ parameters:+ - name: x-spree-api-key+ in: header+ required: true+ schema:+ type: string+ - name: collection_id+ in: path+ required: true+ description: Collection permalink or prefix ID+ schema:+ type: string+ - name: sort+ in: query+ required: false+ description: Sort order (e.g., price, -price). Defaults to the collection's+ sort_order.+ schema:+ type: string+ - name: page+ in: query+ required: false+ schema:+ type: integer+ - name: limit+ in: query+ required: false+ schema:+ type: integer+ responses:+ '200':+ description: products found+ content:+ application/json:+ example:+ data:+ - id: prod_UkLWZg9DAJ- name: Product 1233518- slug: product-1233518++ name: Product 1238166++ slug: product-1238166+ meta_title:+ meta_description:+ meta_keywords:+ variant_count: 1+ available_on:+ preorder_ships_at:+ purchasable: true+ preorder: false+ in_stock: false+ backorderable: true+ available: true- description: Veritatis velit quis cum accusantium unde. Itaque eos- dignissimos voluptates ab. Nulla ad consequatur quos quod. Sit- labore iusto dolore natus quae facilis ipsam. A magnam cumque- nostrum nulla tempora. Dolore earum cumque dolorem quod. Praesentium- nisi rerum hic commodi consequatur natus doloremque. Ipsam minus- adipisci tenetur repellat quam optio iusto similique. Consequuntur- inventore recusandae suscipit quo similique animi eligendi. Commodi- maiores minus deleniti earum ipsum. Rem sint soluta neque atque- esse. Velit quisquam fuga odio distinctio quasi. Expedita qui- neque tempora ab facere.++ description: Similique in sapiente consequatur nesciunt. Occaecati++ aliquid quo quasi eaque dolorem beatae. Rerum qui rem laboriosam++ suscipit. Odit debitis at excepturi ab inventore. Ipsam aspernatur++ dolores provident maiores sed fuga deleniti ut. Saepe animi iure++ quas vel ullam veritatis ipsa. Est sed ab officia fugit similique++ odio ipsum quo. Id amet autem occaecati laboriosam incidunt ex++ sint. Molestias architecto fuga sequi ut assumenda. Maxime distinctio++ libero porro iure. Deleniti laborum quidem asperiores praesentium.++ Beatae eligendi recusandae voluptatum dolorum placeat corrupti.++ Dolorem voluptates quaerat incidunt repudiandae corporis rem ipsum.++ Maxime occaecati vitae porro enim. Harum recusandae sequi id ratione.++ Nam quia inventore nisi officiis minima.+ description_html: |-- Veritatis velit quis cum accusantium unde. Itaque eos dignissimos voluptates ab. Nulla ad consequatur quos quod. Sit labore iusto dolore natus quae facilis ipsam.- A magnam cumque nostrum nulla tempora. Dolore earum cumque dolorem quod. Praesentium nisi rerum hic commodi consequatur natus doloremque. Ipsam minus adipisci tenetur repellat quam optio iusto similique. Consequuntur inventore recusandae suscipit quo similique animi eligendi.- Commodi maiores minus deleniti earum ipsum. Rem sint soluta neque atque esse. Velit quisquam fuga odio distinctio quasi. Expedita qui neque tempora ab facere.++ Similique in sapiente consequatur nesciunt. Occaecati aliquid quo quasi eaque dolorem beatae. Rerum qui rem laboriosam suscipit. Odit debitis at excepturi ab inventore. Ipsam aspernatur dolores provident maiores sed fuga deleniti ut.++ Saepe animi iure quas vel ullam veritatis ipsa. Est sed ab officia fugit similique odio ipsum quo. Id amet autem occaecati laboriosam incidunt ex sint. Molestias architecto fuga sequi ut assumenda. Maxime distinctio libero porro iure.++ Deleniti laborum quidem asperiores praesentium. Beatae eligendi recusandae voluptatum dolorum placeat corrupti. Dolorem voluptates quaerat incidunt repudiandae corporis rem ipsum.++ Maxime occaecati vitae porro enim. Harum recusandae sequi id ratione. Nam quia inventore nisi officiis minima.+ default_variant_id: variant_UkLWZg9DAJ+ thumbnail_url:+ tags: []+ price:+ id: price_UkLWZg9DAJ+ amount: '19.99'+ amount_in_cents: 1999+ compare_at_amount:+ compare_at_amount_in_cents:+ currency: USD+ display_amount: "$19.99"+ display_compare_at_amount:+ price_list_id:+ original_price:+ meta:+ page: 1+ limit: 25+ count: 1+ pages: 1+ from: 1+ to: 1+ in: 1+ previous:+ next:+ schema:+ type: object+ properties:+ data:+ type: array+ items:+ "$ref": "#/components/schemas/Product"+ meta:+ "$ref": "#/components/schemas/PaginationMeta""/api/v3/store/products":get:summary: List products@@@ -1060,8 -804,8 +1063,8 @@@example:data:- id: prod_UkLWZg9DAJ- name: Product 1659123- slug: product-1659123- name: Product 1524935- slug: product-1524935++ name: Product 1654288++ slug: product-1654288meta_title:meta_description:meta_keywords:@@@ -1090,8 -834,8 +1093,8 @@@price_list_id:original_price:- id: prod_gbHJdmfrXB- name: Product 1666699- slug: product-1666699- name: Product 1533120- slug: product-1533120++ name: Product 1666705++ slug: product-1666705meta_title:meta_description:meta_keywords:@@@ -1103,22 -847,15 +1106,19 @@@in_stock: falsebackorderable: trueavailable: true- description: Quos illum itaque nesciunt modi eos debitis. Repellendus- autem exercitationem reiciendis quos voluptates odit quisquam- assumenda. Molestias autem maxime officiis sapiente dolor exercitationem- saepe accusamus. Dolorum vero nemo eum veritatis at odit ea vel.- Nemo ducimus vel facere laboriosam quasi. Itaque dicta iusto numquam- distinctio voluptates. Tempora optio magni iusto inventore nihil- ipsum quasi. Harum est dolores placeat quam amet. Perspiciatis- nulla asperiores cupiditate itaque exercitationem dignissimos.- Perferendis natus voluptates quibusdam accusamus. Quae iste aliquam- debitis officiis. Tenetur maxime doloremque voluptates aliquid.- Et sequi distinctio voluptatum eaque inventore.- description: Minima error distinctio ducimus quas modi. Veniam beatae- adipisci assumenda eveniet voluptatibus. Voluptate accusamus natus- non reiciendis doloribus distinctio temporibus nam. Voluptates- eaque soluta corrupti quae ex dicta. Voluptatem laudantium dolorum- vel laborum sequi dicta. Perferendis consequuntur tempore quibusdam- eligendi repellat. Eum qui quae repellendus officiis dolorum culpa.++ description: Veritatis porro rerum enim recusandae quam pariatur++ voluptatibus suscipit. Enim ea dolorum quidem id esse. Aliquam++ ad aperiam tempora inventore laborum maiores consequatur. Ducimus++ soluta veritatis tempora dolores. Saepe iure beatae incidunt similique++ doloremque. Eos voluptates ex quaerat nesciunt nihil modi dolor++ culpa. Mollitia quidem suscipit in dolore libero voluptatem ratione.++ Dolorem vel voluptatibus perferendis quia animi. Libero officia++ commodi voluptas asperiores. Doloribus consequuntur dolorum quisquam++ animi occaecati tempore dolor.description_html: |-- Quos illum itaque nesciunt modi eos debitis. Repellendus autem exercitationem reiciendis quos voluptates odit quisquam assumenda. Molestias autem maxime officiis sapiente dolor exercitationem saepe accusamus. Dolorum vero nemo eum veritatis at odit ea vel.- Nemo ducimus vel facere laboriosam quasi. Itaque dicta iusto numquam distinctio voluptates. Tempora optio magni iusto inventore nihil ipsum quasi.- Harum est dolores placeat quam amet. Perspiciatis nulla asperiores cupiditate itaque exercitationem dignissimos. Perferendis natus voluptates quibusdam accusamus.- Quae iste aliquam debitis officiis. Tenetur maxime doloremque voluptates aliquid. Et sequi distinctio voluptatum eaque inventore.- Minima error distinctio ducimus quas modi. Veniam beatae adipisci assumenda eveniet voluptatibus. Voluptate accusamus natus non reiciendis doloribus distinctio temporibus nam. Voluptates eaque soluta corrupti quae ex dicta.- Voluptatem laudantium dolorum vel laborum sequi dicta. Perferendis consequuntur tempore quibusdam eligendi repellat. Eum qui quae repellendus officiis dolorum culpa.++ Veritatis porro rerum enim recusandae quam pariatur voluptatibus suscipit. Enim ea dolorum quidem id esse. Aliquam ad aperiam tempora inventore laborum maiores consequatur.++ Ducimus soluta veritatis tempora dolores. Saepe iure beatae incidunt similique doloremque. Eos voluptates ex quaerat nesciunt nihil modi dolor culpa.++ Mollitia quidem suscipit in dolore libero voluptatem ratione. Dolorem vel voluptatibus perferendis quia animi. Libero officia commodi voluptas asperiores. Doloribus consequuntur dolorum quisquam animi occaecati tempore dolor.default_variant_id: variant_EfhxLZ9ck8thumbnail_url:tags: []@@@ -1220,8 -957,8 +1220,8 @@@application/json:example:id: prod_UkLWZg9DAJ- name: Product 1931429- slug: product-1931429- name: Product 1809191- slug: product-1809191++ name: Product 1935443++ slug: product-1935443meta_title:meta_description:meta_keywords:@@@ -1255,7 -992,7 +1255,7 @@@amount_in_cents: 999currency: USDdisplay_amount: "$9.99"- recorded_at: '2026-07-05T12:39:28Z'- recorded_at: '2026-07-10T19:41:57Z'++ recorded_at: '2026-07-12T08:35:26Z'schema:"$ref": "#/components/schemas/Product"'404':@@@ -1495,9 -1232,9 +1495,9 @@@- id: cart_gbHJdmfrXBmarket_id:channel_id: ch_UkLWZg9DAJ- number: R401268847- token: 8jWcjZQmJSRPiF5mJSS3vzGsc92UCpSVRuD- email: [email protected]- number: R747370910- token: KL2exoBuzKh24EVAArgsr92gKcehgXAfwaK- email: [email protected]++ number: R231436232++ token: DF7cm2sHnWkhyiymT9M3e39eAoPM9djNiST++ email: [email protected]customer_note:currency: USDlocale: en@@@ -1541,8 -1278,8 +1541,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 989684- slug: product-989684- name: Product 921732- slug: product-921732++ name: Product 983745++ slug: product-983745options_text: ''price: '10.0'display_price: "$10.00"@@@ -1567,7 -1304,7 +1567,7 @@@digital_links: []fulfillments:- id: ful_gbHJdmfrXB- number: H16083334436- number: H97804265871++ number: H25672180110tracking: U10000tracking_url:cost: '100.0'@@@ -1596,7 -1333,7 +1596,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Hung Ortiz- name: Emogene Cruickshank++ name: Carson Purdyaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -1667,9 -1404,9 +1667,9 @@@- id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R832433973- token: tifQsMToGkx4S1SEcUcq8z8ESCLzP1Cpu5f- email: [email protected]- number: R392027120- token: 5YfNnvaM97uFunvE7iM924om6KCqNh3oqMk- email: [email protected]++ number: R994045635++ token: wwLfWkfohRi83QSuqVzfWH6hX4Fz1t4QveL++ email: [email protected]customer_note:currency: USDlocale: en@@@ -1713,8 -1450,8 +1713,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 973203- slug: product-973203- name: Product 919112- slug: product-919112++ name: Product 976073++ slug: product-976073options_text: ''price: '10.0'display_price: "$10.00"@@@ -1739,7 -1476,7 +1739,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H10825983179- number: H34758896458++ number: H26659659316tracking: U10000tracking_url:cost: '100.0'@@@ -1768,7 -1505,7 +1768,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Hung Ortiz- name: Emogene Cruickshank++ name: Carson Purdyaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -1912,8 -1649,8 +1912,8 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R991286739- token: oGZRkeDxfVe33s4EZW3rin32Lb7RQGdRJYp- number: R218346036- token: n5eNamrTj7vLwp5d1U9x854eMiL19r4q71U++ number: R877344132++ token: Jhd42A6dm2KmyAcZU8R7yq1MBM1RsJGEW27email:customer_note:currency: USD@@@ -2069,16 -1806,16 +2069,16 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R156659375- token: sN6UbH7J98E78RJwRuut7fqAN6E79Tbcmvk- email: [email protected]- number: R050861879- token: gPtWcdxxCHpWHUqNBmbAtAtbsioYp6amXwu- email: [email protected]++ number: R784760157++ token: Dh8LoLodddbtxHCheoYw3up6SjZ6C9RJJKj++ email: [email protected]customer_note:currency: USDlocale: entotal_quantity: 0warnings:- code: line_item_removed- message: Product 1021677 was removed because it was sold out- message: Product 963498 was removed because it was sold out++ message: Product 1029179 was removed because it was sold outline_item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJitem_total: '0.0'@@@ -2241,9 -1978,9 +2241,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R779956668- token: KBc71Hs881QPiQ14XdYYTU7Kc2kQzja6d5i- email: [email protected]- number: R940369961- token: QZrARYHAJXNZFCh63A6LiUDS5Q7YeA2H5rZ- email: [email protected]++ number: R051796841++ token: eqpqJqhKCCAKT9FJDRe3dLmobUqb4747xBZ++ email: [email protected]customer_note: Leave at doorcurrency: USDlocale: en@@@ -2289,8 -2026,8 +2289,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1036197- slug: product-1036197- name: Product 97539- slug: product-97539++ name: Product 1032314++ slug: product-1032314options_text: ''price: '19.99'display_price: "$19.99"@@@ -2315,7 -2052,7 +2315,7 @@@digital_links: []fulfillments:- id: ful_gbHJdmfrXB- number: H13318810206- number: H31836788241++ number: H71464598794tracking:tracking_url:cost: '10.0'@@@ -2344,7 -2081,7 +2344,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Elliott Schowalter- name: Keeley Skiles++ name: Wally Buckridgeaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -2589,9 -2326,9 +2589,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R686576207- token: tThSq7tnjjDgeqHZoyhs5mScm945sFB7y61- email: [email protected]- number: R399625921- token: TDadX58HdfjSGineeB9cHshgd5ZDZEYqpWh- email: [email protected]++ number: R661948308++ token: zf38VkPJGWyPNvu4ao9UM8XynyYY3qpAzij++ email: [email protected]customer_note:currency: USDlocale: en@@@ -2635,8 -2372,8 +2635,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1054840- slug: product-1054840- name: Product 995969- slug: product-995969++ name: Product 1056579++ slug: product-1056579options_text: ''price: '10.0'display_price: "$10.00"@@@ -2661,7 -2398,7 +2661,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H15907401347- number: H18212968266++ number: H44008576003tracking: U10000tracking_url:cost: '100.0'@@@ -2690,7 -2427,7 +2690,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Bebe Monahan- name: Rubye Gusikowski++ name: Joanie Sipesaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -2835,15 -2572,15 +2835,15 @@@id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R180356579- email: [email protected]- number: R106523615- email: [email protected]++ number: R827602836++ email: [email protected]customer_note:currency: USDlocale: entotal_quantity: 1fulfillment_status: backorderpayment_status: paid- completed_at: '2026-07-20T12:38:46.817Z'- completed_at: '2026-07-25T19:41:09.090Z'++ completed_at: '2026-07-27T08:34:43.656Z'item_total: '19.99'display_item_total: "$19.99"adjustment_total: '0.0'@@@ -2875,8 -2612,8 +2875,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1089621- slug: product-1089621- name: Product 1025278- slug: product-1025278++ name: Product 1086219++ slug: product-1086219options_text: ''price: '19.99'display_price: "$19.99"@@@ -2901,7 -2638,7 +2901,7 @@@digital_links: []fulfillments:- id: ful_gbHJdmfrXB- number: H73129617367- number: H04719635845++ number: H93494385977tracking:tracking_url:cost: '10.0'@@@ -2930,7 -2667,7 +2930,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Marketta Toy- name: Sidney Carroll++ name: Lili D'Amoreaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -2959,8 -2696,8 +2959,8 @@@payments:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: BGS-7fd731939ee3- number: PX1GV77I- response_code: BGS-c33567c055af- number: P40KTO0F++ response_code: BGS-aee8a8926d3b++ number: PMJDJ6NQamount: '29.99'display_amount: "$29.99"status: completed@@@ -3099,9 -2836,9 +3099,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R945870573- token: MLdPqtptsG48uRG7mXfV18ywq3XjEw3Bt4q- email: [email protected]- number: R928002715- token: L5prV5kAroDMaNZ2EknMFDwcygexRz4zXDQ- email: [email protected]++ number: R420325156++ token: zckVBSeBjbC7kypMZUsDk7PQPngrkQbWTAh++ email: [email protected]customer_note:currency: USDlocale: en@@@ -3152,8 -2889,8 +3152,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1348329- slug: product-1348329- name: Product 1218077- slug: product-1218077++ name: Product 1344050++ slug: product-1344050options_text: ''price: '10.0'display_price: "$10.00"@@@ -3178,7 -2915,7 +3178,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H63887574092- number: H83691313514++ number: H00167913199tracking: U10000tracking_url:cost: '100.0'@@@ -3207,7 -2944,7 +3207,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Malika Dietrich- name: Yolando Heller++ name: Epifania Sanfordaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -3362,9 -3099,9 +3362,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R336017019- token: 4KWoZM7BrbELvAWxNNR4UxBv88vtT3omoX6- email: [email protected]- number: R920678008- token: hgQA61MpbkxakNNon1gAu71XE1VM1vFuTvA- email: [email protected]++ number: R517958825++ token: 7PYcZnY85Y7zGEEvE5VLMwwecgGqbyTMGDj++ email: [email protected]customer_note:currency: USDlocale: en@@@ -3408,8 -3145,8 +3408,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1361593- slug: product-1361593- name: Product 1231174- slug: product-1231174++ name: Product 136888++ slug: product-136888options_text: ''price: '10.0'display_price: "$10.00"@@@ -3434,7 -3171,7 +3434,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H54914635635- number: H78674840337++ number: H61181630054tracking: U10000tracking_url:cost: '100.0'@@@ -3463,7 -3200,7 +3463,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Tressa Lueilwitz- name: Leonel Muller++ name: Verona Brakusaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -3607,9 -3344,9 +3607,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R742539048- token: hKqvWEDgmo6Qut3DJMjHPyqsiJsGs1TAo6J- email: [email protected]- number: R146081501- token: aainvU5HCjMBZVFJydWMvo1AbrrzvwCP8pV- email: [email protected]++ number: R280861113++ token: bTUumNDZBWg5mVdrPwi7kyHVTaHBwriPC6E++ email: [email protected]customer_note:currency: USDlocale: en@@@ -3655,8 -3392,8 +3655,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1381909- slug: product-1381909- name: Product 1256298- slug: product-1256298++ name: Product 1382983++ slug: product-1382983options_text: ''price: '10.0'display_price: "$10.00"@@@ -3681,7 -3418,7 +3681,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H17573190597- number: H45408931001++ number: H76466218675tracking: U10000tracking_url:cost: '100.0'@@@ -3710,7 -3447,7 +3710,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Cathey Balistreri- name: Kimbra Ritchie++ name: Vilma Gottliebaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -3868,9 -3605,9 +3868,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R974098978- token: NP9TnScGXA1BueJbc9nD7YRNLSgL2Abv28S- email: [email protected]- number: R770266035- token: wXFSUSKVkoPHm249TJ7R7mrXugs4vn8eneL- email: [email protected]++ number: R821609071++ token: QUU7N1xvSqjW1RHBGvceFD7paviVEgrLsJK++ email: [email protected]customer_note:currency: USDlocale: en@@@ -3911,8 -3648,8 +3911,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1405555- slug: product-1405555- name: Product 1271723- slug: product-1271723++ name: Product 1401630++ slug: product-1401630options_text: ''price: '10.0'display_price: "$10.00"@@@ -3937,7 -3674,7 +3937,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H05203683475- number: H93733158647++ number: H88419915435tracking: U10000tracking_url:cost: '100.0'@@@ -3966,7 -3703,7 +3966,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: January Larkin- name: Sasha Effertz++ name: Shaneka Cristaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -3995,8 -3732,8 +3995,8 @@@payments:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: 1-SC-20260720123904030666- number: PQHETVME- response_code: 1-SC-20260725194128535812- number: PIQ6KHDS++ response_code: 1-SC-20260727083500970293++ number: PCH0X6LYamount: '50.0'display_amount: "$50.00"status: checkout@@@ -4176,9 -3913,9 +4176,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R639644272- token: 5dNxMLoZvjfWkVBjPRPKqzqApzHYe3DBM6n- email: [email protected]- number: R818170564- token: s3xYyqrME8qD3gho4sducCd535KMwKZCZWe- email: [email protected]++ number: R512800902++ token: Jas8U9F4DWNKXFvTZBv6XZ5CL8jJnxq6QSi++ email: [email protected]customer_note:currency: USDlocale: en@@@ -4222,8 -3959,8 +4222,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1443278- slug: product-1443278- name: Product 1311850- slug: product-1311850++ name: Product 1446305++ slug: product-1446305options_text: ''price: '10.0'display_price: "$10.00"@@@ -4248,7 -3985,7 +4248,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H70500071018- number: H99882305400++ number: H72048537191tracking: U10000tracking_url:cost: '100.0'@@@ -4277,7 -4014,7 +4277,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Andera Quigley- name: Markus Bechtelar++ name: Fletcher Spenceraddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -4306,8 -4043,8 +4306,8 @@@payments:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: 1-SC-20260720123906340088- number: PZY1GJU6- response_code: 1-SC-20260725194131124623- number: PZB5XQ18++ response_code: 1-SC-20260727083503225026++ number: P66ENJQBamount: '50.0'display_amount: "$50.00"status: invalid@@@ -4438,9 -4175,9 +4438,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R695674129- token: 4LNvgXgDT3z61zMhvoj9e8HTksFa4Pio9AJ- email: [email protected]- number: R733456622- token: Fvbskuym7JjYCif4YiK3ZmPem9tXwBxsGVT- email: [email protected]++ number: R636007622++ token: 69r23XQLhv8dwdqEbFooYLp2mhUkcZEGwVm++ email: [email protected]customer_note:currency: USDlocale: en@@@ -4490,8 -4227,8 +4490,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 14720- slug: product-14720- name: Product 1348379- slug: product-1348379++ name: Product 147367++ slug: product-147367options_text: ''price: '10.0'display_price: "$10.00"@@@ -4520,8 -4257,8 +4520,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1481849- slug: product-1481849- name: Product 1355524- slug: product-1355524++ name: Product 1482463++ slug: product-1482463options_text: ''price: '19.99'display_price: "$19.99"@@@ -4665,9 -4402,9 +4665,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R540320583- token: XPrHTp6S1WrvaayGBYHoyBimXmYMCQD8xra- email: [email protected]- number: R843149651- token: XhP8s6PLVGXsyuuGyEzR3kjbb5NP27eiam6- email: [email protected]++ number: R561740090++ token: Lmzy7wcr3o44HY92D8N3taaWiRxEo3HDK7r++ email: [email protected]customer_note:currency: USDlocale: en@@@ -4714,8 -4451,8 +4714,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1512498- slug: product-1512498- name: Product 1383196- slug: product-1383196++ name: Product 151753++ slug: product-151753options_text: ''price: '10.0'display_price: "$10.00"@@@ -4839,9 -4576,9 +4839,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R363464524- token: EhzPhBUT3wkFr3P7pazaL1VwAgJY3XQVvjF- email: [email protected]- number: R725723396- token: BKVjbAoa8GVS68wVEkU5hL74Dy9FCHfFFUX- email: [email protected]++ number: R961009318++ token: G17eGUKntkx1qWU3JrZk61nNbnrH3QfhY2G++ email: [email protected]customer_note:currency: USDlocale: en@@@ -4988,9 -4725,9 +4988,9 @@@id: ps_gbHJdmfrXBstatus: pendingcurrency: USD- external_id: bogus_02bee5e362ed7a70108d2a2b- external_id: bogus_635c810d2ee1b5d41b126712++ external_id: bogus_fbe71829f130b6ec14b94363external_data:- client_secret: bogus_secret_17ecc0db8cc55cf7- client_secret: bogus_secret_b3a9bdfd05316696++ client_secret: bogus_secret_7ee6170795ddbb44customer_external_id:expires_at:amount: '110.0'@@@ -5088,7 -4825,7 +5088,7 @@@id: ps_UkLWZg9DAJstatus: pendingcurrency: USD- external_id: bogus_079751369cec0ffcd8b743fc- external_id: bogus_761185063658b3880fffba37++ external_id: bogus_4c9addcdd772c08374677937external_data:client_secret: secret_123customer_external_id:@@@ -5150,7 -4887,7 +5150,7 @@@id: ps_UkLWZg9DAJstatus: pendingcurrency: USD- external_id: bogus_b2e1e2def0433385d2b12661- external_id: bogus_60fab7e3b0c145ed466428ec++ external_id: bogus_9aecb1293929838db6f4f4c9external_data:client_secret: secret_123customer_external_id:@@@ -5252,7 -4989,7 +5252,7 @@@id: ps_UkLWZg9DAJstatus: completedcurrency: USD- external_id: bogus_b72e842768884c3c3c73a715- external_id: bogus_78fec2996c71cd0663195e1e++ external_id: bogus_053f4de83186ebb2769d5034external_data:client_secret: secret_123customer_external_id:@@@ -5350,7 -5087,7 +5350,7 @@@id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJresponse_code:- number: PF0XC8DT- number: P5DAWO0Q++ number: PUL84XQ7amount: '110.0'display_amount: "$110.00"status: checkout@@@ -5457,9 -5194,9 +5457,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R299641876- token: Y411HLCJENggAA582KbvbBPHQ4V8LrGf36V- email: [email protected]- number: R409425140- token: xswvgfnoez7AqFEdUxbDamrfZFqgB7r6oMU- email: [email protected]++ number: R315269833++ token: e5T7Z9DMH6wfJSF5pg26HsB88bsdkHaDx8g++ email: [email protected]customer_note:currency: USDlocale: en@@@ -5500,8 -5237,8 +5500,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 2138501- slug: product-2138501- name: Product 2005982- slug: product-2005982++ name: Product 213132++ slug: product-213132options_text: ''price: '10.0'display_price: "$10.00"@@@ -5526,7 -5263,7 +5526,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H49906305102- number: H81505158386++ number: H04067904266tracking: U10000tracking_url:cost: '100.0'@@@ -5555,7 -5292,7 +5555,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Karisa Abshire- name: Silvia Hermann++ name: Michal Langoshaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -5584,8 -5321,8 +5584,8 @@@payments:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: 1-SC-20260720123933228031- number: PQH0CPJ9- response_code: 1-SC-20260725194202800328- number: PRDKBYS4++ response_code: 1-SC-20260727083531209896++ number: PEDVV3AWamount: '10.0'display_amount: "$10.00"status: checkout@@@ -5729,9 -5466,9 +5729,9 @@@id: cart_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R118328521- token: RBoeZrzEBxmtH7LkdcDE3CKcZ1tKBGzynMT- email: [email protected]- number: R001123443- token: vTEPVBXb5hYFoCsJ8xZLBv2mmwTzQc8uq5i- email: [email protected]++ number: R461755970++ token: WEmeTia2c1nKvHcc8Nd5DS7g44ngEFL5T2t++ email: [email protected]customer_note:currency: USDlocale: en@@@ -5775,8 -5512,8 +5775,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 2154969- slug: product-2154969- name: Product 2022312- slug: product-2022312++ name: Product 2154909++ slug: product-2154909options_text: ''price: '10.0'display_price: "$10.00"@@@ -5801,7 -5538,7 +5801,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H64649111140- number: H84545543277++ number: H71308374993tracking: U10000tracking_url:cost: '100.0'@@@ -5830,7 -5567,7 +5830,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Roslyn Herman- name: Dione Turner++ name: Verline Kundeaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -5972,7 -5709,7 +5972,7 @@@id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R911466459- number: R984698608++ number: R294005223email: [email protected]customer_note:currency: USD@@@ -5980,7 -5717,7 +5980,7 @@@total_quantity: 1fulfillment_status:payment_status:- completed_at: '2026-07-20T12:39:17.739Z'- completed_at: '2026-07-25T19:41:44.353Z'++ completed_at: '2026-07-27T08:35:14.500Z'item_total: '10.0'display_item_total: "$10.00"adjustment_total: '0.0'@@@ -6012,8 -5749,8 +6012,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1555687- slug: product-1555687- name: Product 1427424- slug: product-1427424++ name: Product 1551533++ slug: product-1551533options_text: ''price: '10.0'display_price: "$10.00"@@@ -6038,7 -5775,7 +6038,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H50865506425- number: H46248291504++ number: H26998320722tracking: U10000tracking_url:cost: '100.0'@@@ -6067,7 -5804,7 +6067,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Estrella Funk- name: Yulanda Cassin++ name: Richard Bergeaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -6668,7 -6405,7 +6668,8 @@@security:- api_key: []bearer_auth: []-- description: Returns all saved credit cards for the authenticated customer++ description: Returns the authenticated customer's saved credit cards for the++ current store's payment methodsx-codeSamples:- lang: javascriptlabel: Spree SDK@@@ -7004,15 -6741,15 +7005,15 @@@- id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R026982774- email: [email protected]- number: R738167381- email: [email protected]++ number: R127800916++ email: [email protected]customer_note:currency: USDlocale: entotal_quantity: 1fulfillment_status:payment_status:- completed_at: '2026-07-20T12:38:54.157Z'- completed_at: '2026-07-25T19:41:18.090Z'++ completed_at: '2026-07-27T08:34:51.087Z'item_total: '10.0'display_item_total: "$10.00"adjustment_total: '0.0'@@@ -7044,8 -6781,8 +7045,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1242377- slug: product-1242377- name: Product 1114844- slug: product-1114844++ name: Product 1242905++ slug: product-1242905options_text: ''price: '10.0'display_price: "$10.00"@@@ -7070,7 -6807,7 +7071,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H78147130925- number: H45537721707++ number: H44389704925tracking: U10000tracking_url:cost: '100.0'@@@ -7099,7 -6836,7 +7100,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Wally Dach- name: Lanette Smith++ name: Chastity Herzogaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -7262,15 -6999,15 +7263,15 @@@id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R746815961- email: [email protected]- number: R030998792- email: [email protected]++ number: R296955256++ email: [email protected]customer_note:currency: USDlocale: entotal_quantity: 1fulfillment_status:payment_status:- completed_at: '2026-07-20T12:38:54.860Z'- completed_at: '2026-07-25T19:41:18.787Z'++ completed_at: '2026-07-27T08:34:51.718Z'item_total: '10.0'display_item_total: "$10.00"adjustment_total: '0.0'@@@ -7302,8 -7039,8 +7303,8 @@@preorder_ships_at:quantity: 1currency: USD- name: Product 1264224- slug: product-1264224- name: Product 1133247- slug: product-1133247++ name: Product 1264837++ slug: product-1264837options_text: ''price: '10.0'display_price: "$10.00"@@@ -7328,7 -7065,7 +7329,7 @@@digital_links: []fulfillments:- id: ful_UkLWZg9DAJ- number: H75092506991- number: H18740531973++ number: H13887733205tracking: U10000tracking_url:cost: '100.0'@@@ -7357,7 -7094,7 +7358,7 @@@stock_location:id: sloc_UkLWZg9DAJstate_abbr: NY- name: Jamal O'Conner- name: Marcelo Lehner++ name: Tera Bergeaddress1: 1600 Pennsylvania Ave NWcity: Washingtonzipcode: '20500'@@@ -7477,8 -7214,8 +7478,8 @@@content:application/json:example:- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjE0ZjFiYTAzLTM0NGEtNDM2NS1hZTczLTBlNzUyYzcwMTZiOCIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg0NTU0NzM2fQ.rumMkHjZ2VL50biSsN2cLIZ29jqWsFL_b4k4v51S8bk- refresh_token: G9QSSf1KfQ5DUGkcv3ZnMXB3- token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjBiNDk1ZTBmLTRhZmQtNDY1Zi1hMTA0LTU2NzdkZGRhN2U2ZiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg1MDEyMDgwfQ.XBJaPkz-mXn6KzhhDNOkzBRZDqEV6WGKR3sDC8vtbP0- refresh_token: Rwa2AmXx3wLhcxiPjH4wxbjT++ token: eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX3R5cGUiOiJjdXN0b21lciIsImp0aSI6IjkxZTBmNzRkLTk0ZmQtNGFjMi04OTM3LTE1NjIxZTZkNmI5YiIsImlzcyI6InNwcmVlIiwiYXVkIjoic3RvcmVfYXBpIiwiZXhwIjoxNzg1MTQ0ODkzfQ.kAs6yYsxnV2J6redLrYHXYiIF0iUVXaq-JxsjOHVKQc++ refresh_token: K6EXLYTz9XTZkttL1XYHysy7user:id: cus_UkLWZg9DAJemail: [email protected]@@@ -7495,10 -7232,10 +7496,10 @@@newsletter_subscriber:id: sub_UkLWZg9DAJemail: [email protected]- created_at: '2026-07-20T12:38:55.996Z'- updated_at: '2026-07-20T12:38:55.998Z'- created_at: '2026-07-25T19:41:19.980Z'- updated_at: '2026-07-25T19:41:19.981Z'++ created_at: '2026-07-27T08:34:52.831Z'++ updated_at: '2026-07-27T08:34:52.833Z'verified: true- verified_at: '2026-07-20T12:38:55Z'- verified_at: '2026-07-25T19:41:19Z'++ verified_at: '2026-07-27T08:34:52Z'customer_id: cus_UkLWZg9DAJcustomer_groups: []schema:@@@ -7601,12 -7338,12 +7602,12 @@@application/json:example:id: cus_UkLWZg9DAJ- email: [email protected]- first_name: Fermina- last_name: Pacocha- email: [email protected]- first_name: Sandy- last_name: Feeney++ email: [email protected]++ first_name: Herlinda++ last_name: Haleyphone: 555-555-0199accepts_email_marketing: false- full_name: Fermina Pacocha- full_name: Sandy Feeney++ full_name: Herlinda Haleyavailable_store_credit_total: '0'display_available_store_credit_total: "$0.00"addresses:@@@ -7742,7 -7479,7 +7743,7 @@@application/json:example:id: cus_UkLWZg9DAJ- email: [email protected]- email: [email protected]++ email: [email protected]first_name: Updatedlast_name: Namephone: 555-555-0199@@@ -7933,7 -7670,7 +7934,7 @@@example:data:- id: gc_UkLWZg9DAJ- code: D4F84BB7F57AE915- code: 1B1F2EEF61F73904++ code: 1BCAE9D2B0C1E652status: activecurrency: USDamount: '10.0'@@@ -8029,7 -7766,7 +8030,7 @@@application/json:example:id: gc_UkLWZg9DAJ- code: A111568AEDB146B0- code: DA06DD5E2C4FD382++ code: 5CC1D35D0BD33170status: activecurrency: USDamount: '10.0'@@@ -8101,8 -7838,8 +8102,8 @@@example:id: pss_gbHJdmfrXBstatus: pending- external_id: bogus_seti_9be76cc28a5701bdcf3a13c1- external_client_secret: bogus_seti_secret_503079435679d0f3- external_id: bogus_seti_9cc7ff2843f3f955ed0945c3- external_client_secret: bogus_seti_secret_b4dd83e7e5ce6b76++ external_id: bogus_seti_8f638585dffbd1739de14692++ external_client_secret: bogus_seti_secret_775960a21436fea2external_data: {}payment_method_id: pm_UkLWZg9DAJpayment_source_id:@@@ -8201,8 -7938,8 +8202,8 @@@example:id: pss_UkLWZg9DAJstatus: pending- external_id: seti_test_f98e30d8db93ddf347391cab- external_client_secret: seti_secret_81a065f2d5fd9ec640e15c8e- external_id: seti_test_c6eefdcf5c2bfba562121f09- external_client_secret: seti_secret_797cb7fd657e4309568b1031++ external_id: seti_test_34d9f6d1dc28619a63889b60++ external_client_secret: seti_secret_24d0f00a0f16441a19e2426bexternal_data:client_secret: secret_123payment_method_id: pm_UkLWZg9DAJ@@@ -8278,8 -8015,8 +8279,8 @@@example:id: pss_UkLWZg9DAJstatus: completed- external_id: seti_test_081cb18f33e7af0ecf03fe49- external_client_secret: seti_secret_54867838911caf8c8d48935c- external_id: seti_test_c0e84c5d631133265c0e20a6- external_client_secret: seti_secret_dee1775377b3d93f81105bfe++ external_id: seti_test_44dba00a8f369c80ec2bb1c4++ external_client_secret: seti_secret_33daa67e62e12390f203e123external_data:client_secret: secret_123payment_method_id: pm_UkLWZg9DAJ@@@ -9220,7 -8957,7 +9221,7 @@@data:- id: wl_UkLWZg9DAJname: My Wishlist- token: vko9qhKsb4fK1zwi9fUCXysz- token: EH8956zxZJKiKUp36sNDESk9++ token: Jz7UrRcMxJa6wuwNWYtS4pfVis_default: falseis_private: truemeta:@@@ -9296,7 -9033,7 +9297,7 @@@example:id: wl_gbHJdmfrXBname: Birthday Ideas- token: kzrjyGU2ZbCvQU1gzXBkyECH- token: 355Jp84AbFjhG5NdeggsYJg3++ token: L1b4riEV9f6iE5QQf4wbGW4tis_default: falseis_private: trueschema:@@@ -9350,11 -9087,11 +9351,15 @@@publishableKey: '<api-key>',})-- const wishlist = await client.wishlists.get('wl_abc123', {- expand: ['wished_items'],- expand: ['items.product'],-- }, {-- token: '<token>',-- })++ const wishlist = await client.wishlists.get(++ 'wl_abc123',++ {++ expand: ['items.product'],++ },++ {++ token: '<token>',++ },++ )parameters:- name: x-spree-api-keyin: header@@@ -9392,7 -9130,7 +9398,7 @@@example:id: wl_UkLWZg9DAJname: My Wishlist- token: uTBbiN4GVAoeBa58QKTGYpgS- token: ChUn1LGAz64UyN74XjVJAMP1++ token: cc2jr6tPbgBnWkM2Sb1U9FS3is_default: falseis_private: trueschema:@@@ -9454,7 -9192,7 +9460,7 @@@example:id: wl_UkLWZg9DAJname: Updated Name- token: qxqaswgdm7iqUPrnsoKgCRR9- token: wDce1DpMKWt86ZDszTj55DWi++ token: CTVWekAzfaQzN1sjmqdVvCb9is_default: falseis_private: trueschema:@@@ -9735,11 -9474,11 +9742,11 @@@application/json:example:id: sub_UkLWZg9DAJ- email: [email protected]- created_at: '2026-07-20T12:39:13.433Z'- updated_at: '2026-07-20T12:39:13.434Z'- email: [email protected]- created_at: '2026-07-25T19:41:38.859Z'- updated_at: '2026-07-25T19:41:38.861Z'++ email: [email protected]++ created_at: '2026-07-27T08:35:10.174Z'++ updated_at: '2026-07-27T08:35:10.175Z'verified: true- verified_at: '2026-07-20T12:39:13Z'- verified_at: '2026-07-25T19:41:38Z'++ verified_at: '2026-07-27T08:35:10Z'customer_id: cus_UkLWZg9DAJschema:"$ref": "#/components/schemas/NewsletterSubscriber"@@@ -9818,10 -9557,10 +9825,10 @@@example:id: sub_UkLWZg9DAJemail: [email protected]- created_at: '2026-07-20T12:39:13.453Z'- updated_at: '2026-07-20T12:39:13.457Z'- created_at: '2026-07-25T19:41:38.924Z'- updated_at: '2026-07-25T19:41:38.932Z'++ created_at: '2026-07-27T08:35:10.196Z'++ updated_at: '2026-07-27T08:35:10.200Z'verified: true- verified_at: '2026-07-20T12:39:13Z'- verified_at: '2026-07-25T19:41:38Z'++ verified_at: '2026-07-27T08:35:10Z'customer_id:schema:"$ref": "#/components/schemas/NewsletterSubscriber"@@@ -9991,7 -9730,7 +9998,7 @@@body_html: ''- id: pol_OIJLhNcSbfname: Privacy Policy- slug: privacy-policy-55806f09-3aca-4315-900d-e96d45265b63- slug: privacy-policy-432f576a-3ff5-4dd3-a07d-1ee90aa4eda8++ slug: privacy-policy-dee83a06-d73e-4b72-865e-4c440f69be1ebody: We respect your privacy.body_html: |<div class="trix-content">@@@ -11535,6 -11210,6 +11531,12 @@@ componentstype: stringemail:type: string++ created_at:++ type: string++ updated_at:++ type: string++ status:++ type: stringresource_type:type: stringnullable: true@@@ -11544,12 -11219,12 +11546,6 @@@invitee_type:type: stringnullable: true-- created_at:-- type: string-- updated_at:-- type: string-- status:-- type: stringresource_id:type: stringnullable: true@@@ -11571,12 -11246,12 +11567,12 @@@required:- id-- - resource_type-- - inviter_type-- - invitee_type- created_at- updated_at- status++ - resource_type++ - inviter_type++ - invitee_type- resource_id- inviter_id- invitee_iddiff --cc packages/admin-sdk/src/types/generated/index.tsindex 5a8f6ddead,d6629c9db3..80ceddf3d8--- a/packages/admin-sdk/src/types/generated/index.ts+++ b/packages/admin-sdk/src/types/generated/index.ts@@@ -1,4 -1,4 +1,4 @@@- // Typelizer digest 5e68d11f4baaf316f18637870339b74a-// Typelizer digest e1064363e254ce9d7c1214b4382289c0++// Typelizer digest a3a8e7a474f3994022f2f94ebdfc1e66//// DO NOT MODIFY: This file was automatically generated by Typelizer.export type { default as Address } from './Address'diff --cc packages/cli/src/generated/admin-spec.jsonindex e3d576b050,591cdf92b0..4bff0019cc--- a/packages/cli/src/generated/admin-spec.json+++ b/packages/cli/src/generated/admin-spec.json@@@ -1,1 -1,1 +1,1 @@@- {"info":{"title":"Admin API","contact":{"name":"Spree Commerce","url":"https://spreecommerce.org","email":"[email protected]"},"description":"Spree Admin API v3 - Administrative API for managing products, orders, and store settings.\n\n## Authentication\n\nThe Admin API requires a secret API key passed in the `x-spree-api-key` header.\nSecret API keys can be generated in the Spree admin dashboard.\n\n## Response Format\n\nAll responses are JSON. List endpoints return paginated responses with `data` and `meta` keys.\nSingle resource endpoints return a flat JSON object.\n\n## Resource IDs\n\nEvery resource is identified by an opaque string ID (e.g. `prod_86Rf07xd4z`,\n`variant_k5nR8xLq`, `or_UkLWZg9DAJ`). Use these IDs everywhere — URL paths,\nrequest bodies, and Ransack filters all accept them directly.\n\n## Error Handling\n\nErrors return a consistent format:\n```json\n{\n \"error\": {\n \"code\": \"validation_error\",\n \"message\": \"Validation failed\",\n \"details\": { \"name\": [\"can't be blank\"] }\n }\n}\n```\n","version":"v3"},"paths":{"/api/v3/admin/auth/login":{"post":{"summary":"Login","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Authenticates an admin user and returns a short-lived JWT access token.\nThe rotatable refresh token is set in an HttpOnly cookie — it is not\nincluded in the response body.\n\nThe `provider` field selects the authentication method. When omitted it\ndefaults to `email`, the built-in email/password login.\n\nTo authenticate against a third-party identity provider (Okta, Azure AD,\nGoogle Workspace SSO, a custom JWT issuer, SAML, etc.), send\n`{ \"provider\": \"<your_key>\", ... }` with the fields that provider\nrequires. The endpoint returns the same JWT regardless of which provider\nauthenticated the request. See\n[Custom API Authentication](https://spreecommerce.org/docs/developer/how-to/custom-api-authentication)\nfor the list of configured providers and their required fields.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"401":{"description":"invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"title":"EmailPasswordLogin","description":"Built-in email/password authentication (default when `provider` is omitted).","type":"object","properties":{"provider":{"type":"string","enum":["email"],"default":"email"},"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]},{"title":"ProviderLogin","description":"Provider-dispatched login. The `provider` key selects a configured\nauthentication provider; the remaining fields are forwarded to it.\nRequired fields depend on the provider — see\n[Custom API Authentication](https://spreecommerce.org/docs/developer/how-to/custom-api-authentication).\n","type":"object","properties":{"provider":{"type":"string","description":"Registered provider key (anything other than `email`).","not":{"enum":["email"]}}},"required":["provider"],"additionalProperties":true}]}}}}}},"/api/v3/admin/auth/refresh":{"post":{"summary":"Refresh token","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Exchanges the HttpOnly refresh-token cookie for a new access JWT and a\nrotated refresh token cookie. No request body or Authorization header\nis required — the cookie alone authenticates the call.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"refresh successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"401":{"description":"missing or invalid refresh-token cookie","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/auth/logout":{"post":{"summary":"Logout","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Revokes the refresh-token cookie, effectively logging the admin out.","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"logout successful"}}}},"/api/v3/admin/me":{"get":{"summary":"Get current admin user and permissions","tags":["Authentication"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the current admin user profile and a serialized list of permissions (CanCanCan rules). The SPA uses these to drive UI permission checks.","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"current admin user and permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update the current admin profile","tags":["Authentication"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Self-service update of the signed-in admin's own profile, such as their admin UI display language (`selected_locale`).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"profile updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"selected_locale":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}}},"/api/v3/admin/auth/password_resets":{"post":{"summary":"Request password reset","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Requests a password reset email for an admin user. Always returns `202`\nwhether or not the email matches an account, to prevent enumeration.\n\n`redirect_url` is where the emailed link should point (the reset token\nis appended as a `token` query param). It must match one of the store's\nallowed origins — otherwise it is silently ignored and the server-side\ndefault is used. The email is delivered by Spree itself via the\n`admin_user.password_reset_requested` event; this event is never\nforwarded to webhook endpoints.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"reset requested","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"redirect_url":{"type":"string","description":"Must match an allowed origin of the store; ignored otherwise."}},"required":["email"]}}}}}},"/api/v3/admin/auth/password_resets/{id}":{"patch":{"summary":"Reset password","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Consumes a password reset token (the `token` query param from the\nemailed link), sets the new password, and signs the admin in: the\nresponse carries a JWT access token and the rotatable refresh token is\nset in an HttpOnly cookie. The token is single-use — it invalidates as\nsoon as the password changes.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The reset token from the emailed link","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"password reset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"},"password_confirmation":{"type":"string"}},"required":["password","password_confirmation"]}}}}}},"/api/v3/admin/allowed_origins":{"get":{"summary":"List allowed origins","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the CORS allowlist for the current store. Each entry is a\nbare `scheme://host[:port]` permitted to call the admin API from a\nbrowser. Backs the `Rack::Cors` allowlist and the CSRF boundary of\nthe admin cookie session (see\n`docs/plans/5.5-admin-auth-cookie-refresh.md`).\n\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[origin_cont]","in":"query","required":false,"description":"Filter by origin (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"allowed origins found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AllowedOrigin"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds an origin to the admin CORS allowlist. The value must be a bare\n`scheme://host[:port]` (no path, query, or fragment) and use `http` or\n`https`.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"allowed origin created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedOrigin"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"origin":{"type":"string"}},"required":["origin"]}}}}}},"/api/v3/admin/allowed_origins/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Allowed origin ID","schema":{"type":"string"}}],"get":{"summary":"Get an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single allowed origin by prefixed ID.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"allowed origin found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedOrigin"}}}},"404":{"description":"allowed origin not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an existing allowed origin.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"allowed origin updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedOrigin"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"origin":{"type":"string"}}}}}}},"delete":{"summary":"Delete an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes an origin from the admin CORS allowlist. After deletion the\nadmin SPA running at that origin will no longer be able to call the\nadmin API from a browser.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"204":{"description":"allowed origin deleted"}}}},"/api/v3/admin/api_keys":{"get":{"summary":"List API keys","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns publishable and secret API keys for the current store. Secret keys are listed by `token_prefix` only — the plaintext token is delivered exactly once on create.\n\n**Required scope:** `read_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API keys found","content":{"application/json":{}}}}},"post":{"summary":"Create an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a publishable or secret API key. The plaintext token is included in the response **once** for secret keys; publishable keys expose their token on every read since they are intended for client-side use.\n\n**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"secret key created — plaintext token returned once","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","key_type"],"properties":{"name":{"type":"string"},"key_type":{"type":"string","enum":["publishable","secret"]},"scopes":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/api_keys/{id}":{"get":{"summary":"Show an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key found","content":{"application/json":{}}}}},"patch":{"summary":"Update an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Renames a key. `key_type` and `scopes` are fixed at creation — to change a key's authority, create a new key and revoke the old one.\n\n**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key renamed","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}}},"delete":{"summary":"Delete an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"API key deleted"}}}},"/api/v3/admin/api_keys/current":{"get":{"summary":"Describe the current API key","tags":["API Keys"],"security":[{"api_key":[]}],"description":"Returns the secret key that authenticated this request, including its live scopes. Useful to confirm a key's real, current authority. Only secret-key principals have a single key to describe.\n\n**Required scope:** none — any key can describe itself (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"current API key","content":{"application/json":{}}}}}},"/api/v3/admin/api_keys/{id}/revoke":{"patch":{"summary":"Revoke an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Marks the key revoked. Future requests using its token will fail; the row is preserved for audit.\n\n**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key revoked","content":{"application/json":{}}}}}},"/api/v3/admin/channels":{"get":{"summary":"List channels","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the channels configured for the current store.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"channels found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new channel on the current store. `code` is normalized to a\nURL-safe slug (`Point of Sale` → `point-of-sale`); when omitted it's\nderived from `name`.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"channel created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"code":{"type":"string","description":"Slug — auto-derived from `name` when blank."},"active":{"type":"boolean","default":true}}}}}}}},"/api/v3/admin/channels/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"channel found","content":{"application/json":{}}}}},"patch":{"summary":"Update a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"channel updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"channel deleted"}}}},"/api/v3/admin/channels/{id}/add_products":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Publish products on a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Publishes the listed products on this channel. Idempotent — re-publishing\nan already-published product updates its publication window. Products from\nsibling stores are silently dropped.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products published","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["product_ids"],"properties":{"product_ids":{"type":"array","items":{"type":"string"}},"published_at":{"type":"string","format":"date-time","nullable":true,"description":"When the publications go live. `null` means immediately."},"unpublished_at":{"type":"string","format":"date-time","nullable":true,"description":"When the publications come down. `null` means never."}}}}}}}},"/api/v3/admin/channels/{id}/remove_products":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Unpublish products from a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Unpublishes the listed products from this channel.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products unpublished","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["product_ids"],"properties":{"product_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/custom_field_definitions":{"get":{"summary":"List custom field definitions","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all defined custom fields. Filter by `?q[resource_type_eq]=Spree::Product` to narrow to one parent type.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,label,field_type). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"definitions returned","content":{"application/json":{}}}}},"post":{"summary":"Create a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"definition created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["key","field_type","resource_type"],"properties":{"namespace":{"type":"string","description":"Defaults to `custom`"},"key":{"type":"string"},"label":{"type":"string","description":"Human-readable name; defaults to titleized `key`"},"field_type":{"type":"string","description":"Custom field type identifier (one of the registered field-type class names)."},"resource_type":{"type":"string","description":"Owner class, e.g. `Spree::Product`"},"storefront_visible":{"type":"boolean","description":"When false, definition is admin-only (was `display_on: back_end`)"}}}}}}}},"/api/v3/admin/custom_field_definitions/{id}":{"get":{"summary":"Show a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,label,field_type). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"definition found","content":{"application/json":{}}}}},"patch":{"summary":"Update a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"definition updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"storefront_visible":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes the definition and cascades to all custom field values referencing it.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"definition deleted"}}}},"/api/v3/admin/customer_groups":{"get":{"summary":"List customer groups","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the customer groups configured for the current store. Groups\nsegment customers for targeted promotions (see the `customer_group`\npromotion rule) and reporting. The list endpoint never embeds the\nmember list — fetch a single group with `?expand=customers` if you\nneed them inline, or query `/admin/customers?customer_group_id_in=…`\nfor paginated membership.\n\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customer groups found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a customer group in the current store. `customer_ids` is\noptional; when present, customers are attached at create time.\nPass prefixed IDs (e.g. `cus_…`) — the server decodes them\nautomatically.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"customer group created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"customer_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customer_groups/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Customer group prefixed ID","schema":{"type":"string"}}],"get":{"summary":"Get a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single customer group. Pass `?expand=customers` to embed\nthe full member list inline (recommended only for single-record\nreads — embed cost scales with membership size).\n\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `customers`.","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customer group with embedded customers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"404":{"description":"customer group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates name, description, or membership. `customer_ids` is a\nfull-set replacement — the server reconciles the membership to\nmatch the array, adding new IDs and removing ones not present.\nSend `customer_ids: []` to clear all members.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customer group updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"customer_ids":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the group. Member users are not deleted; their `customer_group_users` rows are dropped.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"customer group deleted"}}}},"/api/v3/admin/customers/{customer_id}/addresses":{"get":{"summary":"List customer addresses","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the customer's saved addresses.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., country, state). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., first_name,last_name,address1,city). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"addresses found","content":{"application/json":{}}}}},"post":{"summary":"Create a customer address","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new address to the customer's address book. Pass `is_default_billing: true` or `is_default_shipping: true` to set as the default — the previous default loses its flag in the same transaction.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"address created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_iso":{"type":"string","description":"ISO-2 country code (e.g. US)"},"state_abbr":{"type":"string","description":"State/province abbreviation (e.g. NY)"},"phone":{"type":"string"},"company":{"type":"string"},"label":{"type":"string"},"is_default_billing":{"type":"boolean"},"is_default_shipping":{"type":"boolean"}}}}}}}},"/api/v3/admin/customers/{customer_id}/addresses/{id}":{"patch":{"summary":"Update a customer address","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a customer address.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"address updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"city":{"type":"string"},"is_default_billing":{"type":"boolean"},"is_default_shipping":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a customer address","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes the address. If it was a default, the customer loses that default (no auto-promotion).\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"address deleted"}}}},"/api/v3/admin/customers/{customer_id}/credit_cards":{"get":{"summary":"List customer credit cards","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the customer's saved credit cards. Useful for off-session admin charges via `POST /admin/orders/:id/payments { source_id }`.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., brand,last4,month,year). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"credit cards found","content":{"application/json":{}}}}}},"/api/v3/admin/customers/{customer_id}/credit_cards/{id}":{"get":{"summary":"Show a customer credit card","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a saved credit card by ID.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., brand,last4,month,year). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"credit card found","content":{"application/json":{}}}}},"delete":{"summary":"Delete a customer credit card","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a saved credit card.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"credit card deleted"}}}},"/api/v3/admin/customers/{customer_id}/store_credits":{"get":{"summary":"List customer store credits","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns store credits issued to the customer.\n\n**Required scope:** `read_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., category, store, created_by). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,amount_used,memo,currency). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"store credits found","content":{"application/json":{}}}}},"post":{"summary":"Issue a store credit to a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"`created_by` is set automatically from the authenticated admin.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"store credit created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount","currency","category_id"],"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"category_id":{"type":"string","description":"StoreCreditCategory ID"},"memo":{"type":"string"}}}}}}}},"/api/v3/admin/customers/{customer_id}/store_credits/{id}":{"patch":{"summary":"Update a store credit","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Update memo / category / amount. The amount can only be changed if `amount_used == 0`.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"store credit updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string"},"category_id":{"type":"string"},"memo":{"type":"string"}}}}}}},"delete":{"summary":"Delete a store credit","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes an unused store credit (amount_used == 0). Returns 422 otherwise.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"store credit deleted"}}}},"/api/v3/admin/customers":{"get":{"summary":"List customers","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of customers. Supports Ransack search/filters.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[search]","in":"query","required":false,"description":"Email + name full-text-ish search","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., addresses, store_credits). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., email,first_name,last_name). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customers found","content":{"application/json":{}}}}},"post":{"summary":"Create a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a customer. No welcome email is sent automatically.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"customer created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"accepts_email_marketing":{"type":"boolean"},"internal_note":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}}}}}}},"/api/v3/admin/customers/{id}":{"get":{"summary":"Show a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns full customer details including computed order stats (orders_count, total_spent, last_order_completed_at).\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Customer ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations: addresses, orders, store_credits, default_billing_address, default_shipping_address","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., email,first_name,last_name). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customer found","content":{"application/json":{}}}}},"patch":{"summary":"Update a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates customer attributes. `tags` replaces the full set.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customer updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"accepts_email_marketing":{"type":"boolean"},"internal_note":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}}}}}},"delete":{"summary":"Delete a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a customer. Returns 422 if the customer has any orders.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"customer deleted"}}}},"/api/v3/admin/customers/bulk_add_to_groups":{"post":{"summary":"Bulk-add customers to groups","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Attaches each customer in `ids` to every group in `customer_group_ids`.\nIdempotent — customers already in a group are skipped server-side.\nGroups from sibling stores are silently ignored. Returns counts of\ncustomers and groups that were processed (post store-scoping).\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customers added to groups","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"customer_group_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","customer_group_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customers/bulk_remove_from_groups":{"post":{"summary":"Bulk-remove customers from groups","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Detaches each customer in `ids` from every group in `customer_group_ids`.\nNo-op for non-members. Groups from sibling stores are silently ignored.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customers removed from groups","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"customer_group_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","customer_group_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customers/bulk_add_tags":{"post":{"summary":"Bulk-add tags to customers","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds each tag name in `tags` to every customer in `ids`. Tags are\nupserted by name; re-adding an existing tag is a no-op.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags added","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"tag_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customers/bulk_remove_tags":{"post":{"summary":"Bulk-remove tags from customers","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes each tag name in `tags` from every customer in `ids`. No-op\nfor customers that don't carry the tag.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags removed","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"tag_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/exports":{"get":{"summary":"List exports","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns CSV exports queued or completed for the current store. Polled by the admin SPA to detect when an export finishes (`done: true`).\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"exports found","content":{"application/json":{}}}}},"post":{"summary":"Create an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Queues a CSV export. The `type` selects the dataset; `search_params` is an\noptional Ransack query (same shape used by the `q[...]` params on list endpoints)\nthat filters which records are exported. Pass `record_selection: \"all\"` to\nclear the filter server-side and export everything in scope.\n\nGeneration is asynchronous. Poll `GET /admin/exports/{id}` until `done` is `true`,\nthen redirect the browser to `download_url` to fetch the file.\n\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"export queued","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["Spree::Exports::Products","Spree::Exports::Orders","Spree::Exports::Customers","Spree::Exports::ProductTranslations","Spree::Exports::GiftCards","Spree::Exports::CouponCodes","Spree::Exports::NewsletterSubscribers"]},"record_selection":{"type":"string","enum":["filtered","all"],"description":"Set to \"all\" to ignore search_params and export everything in scope."},"search_params":{"type":"object","description":"Ransack query hash. Same predicates accepted by the list endpoint.","additionalProperties":true},"results_url":{"type":"string","description":"Absolute URL of your admin exports view; the export-done email uses it as the download button target. Only honored when it matches one of the store's configured allowed origins."}}}}}}}},"/api/v3/admin/exports/{id}":{"get":{"summary":"Show an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns export status. While `done` is `false`, the SPA continues polling.\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"export found","content":{"application/json":{}}}}},"delete":{"summary":"Delete an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the export and purges its attachment.\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"export deleted"}}}},"/api/v3/admin/exports/{id}/download":{"get":{"summary":"Download an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Streams the exported CSV with `Content-Disposition: attachment`. Returns 422 with `code: export_not_ready` while `done` is still `false`. The endpoint is JWT/API-key protected, so SPA clients must fetch it (with `Authorization` header) and trigger the browser download via a Blob URL — a top-level navigation cannot carry the JWT.\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"CSV file","content":{"application/json":{},"text/csv":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments":{"get":{"summary":"List fulfillments","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all shipments for an order.\n\n**Required scope:** `read_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., inventory_units, stock_location, shipping_rates). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,status,tracking,cost). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillments found","content":{"application/json":{}}}}},"post":{"summary":"Create a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Manually creates a fulfillment on a completed order, bypassing order routing — for example to mirror a shipment handled by an external carrier or 3PL. Moves the requested line item quantities out of their current fulfillments; when `items` is omitted, every not-yet-shipped unit is moved. Pass `status: 'shipped'` to register an already-shipped fulfillment (fires shipped webhooks and freezes cost/carrier). When `delivery_method_id` is omitted, the fulfillment inherits the delivery method and cost of the source fulfillment(s) it fully drains — keeping the order total unchanged; partially drained splits get no carrier when shipped, and pending fulfillments are otherwise (re)priced by the standard rate engine, which selects the lowest-cost available rate. Pass `cost` to set an explicit shipping cost instead (e.g. the 3PL price) — note this changes the order total and payment state, and is guaranteed to persist only with `status: 'shipped'` (pending fulfillments are re-priced by the rate engine).\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"fulfillment created","content":{"application/json":{}}},"422":{"description":"order not completed","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["stock_location_id"],"properties":{"stock_location_id":{"type":"string","description":"Stock location the fulfillment ships from"},"tracking":{"type":"string","description":"Carrier tracking number, or a full https:// tracking link — a full URL is served back as tracking_url unchanged instead of being templated into the delivery method tracking URL"},"delivery_method_id":{"type":"string","description":"Delivery method (carrier) to attach as the selected rate. Defaults to the delivery method of the fully drained source fulfillment(s)"},"cost":{"type":"string","description":"Explicit shipping cost. Defaults to the summed cost of the fully drained source fulfillment(s), which keeps the order total unchanged; an explicit cost changes the order total and payment state. Guaranteed to persist only with status: 'shipped' — pending fulfillments are re-priced by the rate engine"},"status":{"type":"string","enum":["shipped"],"description":"Pass 'shipped' to register the fulfillment as already shipped"},"items":{"type":"array","description":"Line item quantities to fulfill. Omit to fulfill every not-yet-shipped unit.","items":{"type":"object","required":["item_id","quantity"],"properties":{"item_id":{"type":"string","description":"Line item ID"},"quantity":{"type":"integer"}}}},"metadata":{"type":"object","additionalProperties":true}}}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}":{"get":{"summary":"Show a shipment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns details of a specific shipment.\n\n**Required scope:** `read_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., inventory_units, stock_location, shipping_rates). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,status,tracking,cost). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"shipment found","content":{"application/json":{}}}}},"patch":{"summary":"Update a shipment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a fulfillment (tracking, delivery rate).\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"shipment updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tracking":{"type":"string","description":"Carrier tracking number, or a full https:// tracking link served back as tracking_url unchanged"},"selected_delivery_rate_id":{"type":"string","description":"Delivery rate ID (dr_...) to select"}}}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/fulfill":{"patch":{"summary":"Fulfill a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Marks a fulfillment as fulfilled.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment fulfilled","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/cancel":{"patch":{"summary":"Cancel a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Cancels a fulfillment.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment canceled","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/resume":{"patch":{"summary":"Resume a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Resumes a canceled fulfillment.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment resumed","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/split":{"patch":{"summary":"Split a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Transfers items from this shipment to a new shipment at a different stock location.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment split","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id","quantity"],"properties":{"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer"},"stock_location_id":{"type":"string","description":"Target stock location ID"}}}}}}}},"/api/v3/admin/gift_card_batches":{"get":{"summary":"List gift card batches","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the gift card batches issued by the current store. Each batch\ngroups the cards generated together for a campaign or bulk-issuance\n— the cards themselves live under `/admin/gift_cards` and reference\nthe batch via `gift_card_batch_id`.\n\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Records per page","schema":{"type":"integer"}},{"name":"q[prefix_cont]","in":"query","required":false,"description":"Filter by prefix (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending.","schema":{"type":"string"}}],"responses":{"200":{"description":"gift card batches found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardBatch"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a gift card batch","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Issues a batch of gift cards in a single call. The server generates\n`codes_count` cards inline for small batches (configurable via\n`Spree.config.gift_card_batch_web_limit`, default 500) or enqueues\na background job for larger ones. Each card's code is the batch\n`prefix` followed by random hex.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"gift card batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardBatch"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prefix","amount","codes_count"],"properties":{"prefix":{"type":"string","description":"Lowercased and prepended to every generated code."},"amount":{"type":"string","description":"Decimal amount per card, greater than zero."},"currency":{"type":"string","description":"ISO 4217 currency code. Defaults to the store currency."},"codes_count":{"type":"integer","description":"Number of cards to generate. Capped at `gift_card_batch_limit`."},"expires_at":{"type":"string","nullable":true}}}}}}}},"/api/v3/admin/gift_card_batches/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Gift card batch prefixed ID","schema":{"type":"string"}}],"get":{"summary":"Get a gift card batch","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single batch.\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"gift card batch found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardBatch"}}}},"404":{"description":"gift card batch not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/gift_cards":{"get":{"summary":"List gift cards","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the gift cards issued by the current store. Filter by\n`q[code_cont]` for code search, `q[user_id_eq]` for cards issued\nto a specific customer, or `q[state_eq]` for status filtering.\n\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[code_cont]","in":"query","required":false,"description":"Filter by gift card code (contains)","schema":{"type":"string"}},{"name":"q[state_eq]","in":"query","required":false,"description":"Filter by status (active, redeemed, partially_redeemed, canceled)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"gift cards found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GiftCard"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Issues a gift card scoped to the current store. The code is\nauto-generated when omitted. `currency` defaults to the store's\nconfigured currency. Pass `user_id` (prefixed ID) to attach the\ncard to a specific customer.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"gift card created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","description":"Decimal amount, greater than zero."},"currency":{"type":"string","description":"ISO 4217 currency code. Defaults to the store currency."},"code":{"type":"string","description":"Optional caller-supplied code. Auto-generated when omitted."},"expires_at":{"type":"string","description":"ISO 8601 date.","nullable":true},"user_id":{"type":"string","description":"Optional customer prefixed ID.","nullable":true}}}}}}}},"/api/v3/admin/gift_cards/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Gift card prefixed ID","schema":{"type":"string"}}],"get":{"summary":"Get a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single gift card.\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"gift card found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"404":{"description":"gift card not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an active gift card's editable attributes. Redeemed or\npartially-redeemed cards cannot be edited.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"gift card updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string"},"expires_at":{"type":"string","nullable":true},"user_id":{"type":"string","nullable":true}}}}}}},"delete":{"summary":"Delete a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes an unused gift card. Cards that have been redeemed or\npartially redeemed cannot be deleted and return 422.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"gift card deleted"},"422":{"description":"redeemed gift card cannot be deleted","content":{"application/json":{}}}}}},"/api/v3/admin/markets":{"get":{"summary":"List markets","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the markets configured for the current store. Markets are\nstore-scoped and ordered by `position` (an `acts_as_list` column —\nupdate the order via `PATCH /markets/{id}` with `position`).\n\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `countries`.","schema":{"type":"string"}}],"responses":{"200":{"description":"markets found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Market"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new market for the current store.\n\n- `country_isos` accepts 2-letter ISO country codes (e.g. `[\"DE\", \"FR\"]`);\n the market must contain at least one country. Unknown codes are\n silently dropped.\n- `supported_locales` accepts an array of locale codes; the\n `default_locale` is always implicitly included.\n- Setting `default: true` automatically demotes the previous default\n market in the store.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"market created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Market"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 currency code."},"default_locale":{"type":"string","description":"IETF locale tag used as the market default."},"supported_locales":{"type":"array","items":{"type":"string"},"description":"Locale codes available in this market. The default is always implicitly included."},"tax_inclusive":{"type":"boolean","default":false,"description":"Display prices with tax included."},"default":{"type":"boolean","default":false,"description":"Setting to true demotes the previous default."},"position":{"type":"integer","description":"Sort order within the store; lower = first."},"country_isos":{"type":"array","items":{"type":"string"},"description":"2-letter ISO country codes assigned to this market. At least one is required."}},"required":["name","currency","default_locale","country_isos"]}}}}}},"/api/v3/admin/markets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"market found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Market"}}}},"404":{"description":"market not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an existing market. Pass `country_isos` to replace the\nmarket's country list (full-set update), `supported_locales` to\nreplace the supported locales, or `position` to reorder the market\nwithin the store.\n\nSetting `default: true` automatically demotes the previous default.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"market updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Market"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"currency":{"type":"string"},"default_locale":{"type":"string"},"supported_locales":{"type":"array","items":{"type":"string"}},"tax_inclusive":{"type":"boolean"},"default":{"type":"boolean"},"position":{"type":"integer"},"country_isos":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the market (sets `deleted_at`). The default market and\nthe last remaining market in a store cannot be deleted — both return\n422 with a `validation_error`.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"market deleted"},"422":{"description":"cannot delete default or last market","content":{"application/json":{}}}}}},"/api/v3/admin/option_types":{"get":{"summary":"List option types","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of option types.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,label,position). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"option types found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OptionType"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new option type. Supports nested option values.\n\nOption values can be provided inline and will be created or updated by name.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"option type created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionType"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"},"filterable":{"type":"boolean"},"option_values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"}}}}},"required":["name","label"]}}}}}},"/api/v3/admin/option_types/{id}":{"get":{"summary":"Get an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single option type by ID, including its option values.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Option type ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,label,position). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"option type found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionType"}}}},"404":{"description":"option type not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an option type. Supports updating nested option values.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Option type ID","schema":{"type":"string"}}],"responses":{"200":{"description":"option type updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionType"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"},"filterable":{"type":"boolean"},"option_values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Existing option value ID to update"},"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"}}}}}}}}}},"delete":{"summary":"Delete an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes an option type.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Option type ID","schema":{"type":"string"}}],"responses":{"204":{"description":"option type deleted"}}}},"/api/v3/admin/orders/{order_id}/gift_cards":{"post":{"summary":"Apply a gift card to an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Applies a gift card by code to the order. Returns the gift card.\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"gift card applied","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Gift card code"}}}}}}}},"/api/v3/admin/orders/{order_id}/gift_cards/{id}":{"delete":{"summary":"Remove a gift card from an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the gift card from the order.\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Gift card ID","schema":{"type":"string"}}],"responses":{"204":{"description":"gift card removed"}}}},"/api/v3/admin/orders/{order_id}/items":{"get":{"summary":"List order items","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all line items for an order.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variant, variant.product). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., quantity,price,total). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"items found","content":{"application/json":{}}}}},"post":{"summary":"Add an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new line item to the order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"item added","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id"],"properties":{"variant_id":{"type":"string","description":"Prefixed variant ID"},"quantity":{"type":"integer","default":1}}}}}}}},"/api/v3/admin/orders/{order_id}/items/{id}":{"get":{"summary":"Show an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns details of a specific line item.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variant, variant.product). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., quantity,price,total). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"item found","content":{"application/json":{}}}}},"patch":{"summary":"Update an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an order item quantity or metadata.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}}],"responses":{"200":{"description":"item updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"integer"}}}}}}},"delete":{"summary":"Remove an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes an item from the order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}}],"responses":{"204":{"description":"line item removed"}}}},"/api/v3/admin/orders/{order_id}/store_credits":{"post":{"summary":"Apply customer's store credit to an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Applies the order customer's available store credit. When `amount` is omitted, applies up to the order outstanding balance.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"store credit applied","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","description":"Optional explicit amount; defaults to order outstanding balance"}}}}}}},"delete":{"summary":"Remove store credit from an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes any applied store credit from the order.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"204":{"description":"store credit removed"}}}},"/api/v3/admin/orders":{"get":{"summary":"List orders","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of orders for the current store.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"description":"Sort field (e.g., created_at, -created_at, completed_at)","schema":{"type":"string"}},{"name":"q[state_eq]","in":"query","required":false,"description":"Filter by state (cart, address, delivery, payment, confirm, complete, canceled)","schema":{"type":"string"}},{"name":"q[email_cont]","in":"query","required":false,"description":"Filter by email (contains)","schema":{"type":"string"}},{"name":"q[number_eq]","in":"query","required":false,"description":"Filter by order number","schema":{"type":"string"}},{"name":"q[completed_at_gt]","in":"query","required":false,"description":"Filter by completed after date","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., items, fulfillments, payments, customer, discounts, billing_address, shipping_address). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,total,status,completed_at). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"orders found","content":{"application/json":{}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a draft order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new draft order in one shot. Customer, items, addresses, currency,\nmarket, channel, locale, notes, metadata, and a coupon code can all be\nprovided inline.\n\nSetting `preferred_stock_location_id` pins the order's preferred fulfillment\nlocation — Order Routing's built-in `PreferredLocation` rule consumes it\nwhen picking which stock location ships each shipment.\n\nInvalid coupon codes are non-fatal — the order is created and the failure\nis reported on the service result (not in the API response body for now).\n\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"order created with preferred_stock_location_id","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"customer_id":{"type":"string","description":"Customer ID. Alias: user_id (legacy)."},"use_customer_default_address":{"type":"boolean","description":"When true with customer_id, copies the customer's saved billing/shipping addresses onto the order."},"currency":{"type":"string"},"market_id":{"type":"string","description":"Market ID"},"channel_id":{"type":"string","description":"Channel ID. Defaults to the store primary channel when omitted."},"preferred_stock_location_id":{"type":"string","description":"Stock Location ID to prefer for fulfillment. Order Routing's built-in PreferredLocation rule reads this and ranks the location first; routing falls back to the next rule when the preferred location can't cover the cart."},"locale":{"type":"string"},"customer_note":{"type":"string","description":"Public, customer-visible note"},"internal_note":{"type":"string","description":"Staff-only note"},"metadata":{"type":"object","description":"Arbitrary key/value metadata"},"shipping_address":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"shipping_address_id":{"type":"string","description":"Existing customer address ID"},"billing_address":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"billing_address_id":{"type":"string","description":"Existing customer address ID"},"items":{"type":"array","items":{"type":"object","required":["variant_id","quantity"],"properties":{"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer"},"metadata":{"type":"object"}}}},"coupon_code":{"type":"string","description":"Optional. Applied non-fatally; invalid codes do not block creation."}}}}}}}},"/api/v3/admin/orders/{id}":{"get":{"summary":"Show an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns full order details including admin-only fields.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID (e.g., or_xxx)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., items, fulfillments, payments, customer, discounts, billing_address, shipping_address). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,total,status,completed_at). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"order found","content":{"application/json":{}}},"404":{"description":"order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an order. Supports updating email, addresses, special instructions, and line items.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"special_instructions":{"type":"string"},"internal_note":{"type":"string"},"channel_id":{"type":"string","description":"Channel ID"},"preferred_stock_location_id":{"type":"string","description":"Stock Location ID to prefer for fulfillment. Re-runs Order Routing's PreferredLocation rule on subsequent shipment rebuilds."},"ship_address":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"zipcode":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"bill_address":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"zipcode":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"items":{"type":"array","items":{"type":"object","required":["variant_id"],"properties":{"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer"},"metadata":{"type":"object"}}}}}}}}}},"delete":{"summary":"Delete a draft order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a draft order. Completed orders cannot be deleted.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"204":{"description":"order deleted"}}}},"/api/v3/admin/orders/{id}/complete":{"patch":{"summary":"Complete an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Completes an order in the `confirm` state, marking it as placed.\n\nSet `notify_customer: true` to send the order confirmation email.\n\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order completed","content":{"application/json":{}}},"422":{"description":"order cannot be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notify_customer":{"type":"boolean","description":"Send the order confirmation email after completion."}}}}}}}},"/api/v3/admin/orders/{id}/cancel":{"patch":{"summary":"Cancel an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Cancels a completed order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order canceled","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{id}/approve":{"patch":{"summary":"Approve an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Approves an order (e.g., for fraud review).\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order approved","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{id}/resume":{"patch":{"summary":"Resume a canceled order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Resumes a previously canceled order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order resumed","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{id}/resend_confirmation":{"post":{"summary":"Resend confirmation email","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Publishes the order.completed event to trigger confirmation email delivery.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"confirmation resent","content":{"application/json":{}}}}}},"/api/v3/admin/payment_methods":{"get":{"summary":"List payment methods","tags":["Payment Methods"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the store's configured payment methods. Use `source_required: true` to know which methods need a saved source.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,type,active). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payment methods found","content":{"application/json":{}}}}}},"/api/v3/admin/payment_methods/types":{"get":{"summary":"List available payment provider types","tags":["Payment Methods"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the registered Spree::PaymentMethod subclasses that can be used to create new payment methods. Useful for populating a \"Provider\" dropdown in admin UIs.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"provider types found","content":{"application/json":{}}}}}},"/api/v3/admin/payment_methods/{id}":{"get":{"summary":"Show a payment method","tags":["Payment Methods"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a payment method by ID.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,type,active). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payment method found","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/payments":{"get":{"summary":"List payments","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all payments for an order.\n\n**Required scope:** `read_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method, source). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,status,number,response_code). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payments found","content":{"application/json":{}}}}},"post":{"summary":"Create a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new payment for the order.\n\n**Required scope:** `write_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"payment created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["payment_method_id"],"properties":{"payment_method_id":{"type":"string","description":"Payment method ID"},"amount":{"type":"string"},"source_id":{"type":"string","description":"Payment source ID"}}}}}}}},"/api/v3/admin/orders/{order_id}/payments/{id}":{"get":{"summary":"Show a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns details of a specific payment.\n\n**Required scope:** `read_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Payment ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method, source). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,status,number,response_code). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payment found","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/payments/{id}/capture":{"patch":{"summary":"Capture a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Captures a pending payment.\n\n**Required scope:** `write_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Payment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"payment captured","content":{"application/json":{}}},"422":{"description":"capture failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/orders/{order_id}/payments/{id}/void":{"patch":{"summary":"Void a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Voids a payment.\n\n**Required scope:** `write_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Payment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"payment voided","content":{"application/json":{}}}}}},"/api/v3/admin/price_lists":{"get":{"summary":"List price lists","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the price lists configured for the current store.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"schema":{"type":"string"}},{"name":"q[status_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `price_rules`.","schema":{"type":"string"}}],"responses":{"200":{"description":"price lists found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceList"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new draft price list.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"price list created (server-to-server — rules + prices, no product_ids)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"starts_at":{"type":"string","nullable":true},"ends_at":{"type":"string","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"position":{"type":"integer"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Prefixed product ids to seed the list with."},"rules":{"type":"array","description":"STI-typed price rules to attach on create. Existing rules on the same payload via PATCH reconcile by id.","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"prices":{"type":"array","description":"Server-to-server alternative to `product_ids`: ship the exact per-variant prices the list should contain. Each row upserts on the unique key `(variant_id, currency, price_list_id)`. Mix-and-match with `product_ids` is supported but typically unnecessary — `prices` alone tells the server which variants belong to the list and what the override amount is.","items":{"type":"object","required":["variant_id","currency"],"properties":{"variant_id":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}}}}}},"/api/v3/admin/price_lists/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"404":{"description":"price list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a price list. The optional `rules:` array reconciles nested\nSTI-typed price rules in a single round-trip — existing rules update\nby `id`, new rules build, missing rules destroy. Mirrors the\npromotion editor's \"save the whole thing on Save\" pattern.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list updated with nested rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"starts_at":{"type":"string","nullable":true},"ends_at":{"type":"string","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"position":{"type":"integer"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Prefixed product ids — reconciles list membership (adds + removes)."},"rules":{"type":"array","items":{"type":"object","required":["type"],"properties":{"id":{"type":"string","nullable":true},"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"prices":{"type":"array","description":"Individual price overrides (the spreadsheet payload). Each row updates by `id` if shipped, otherwise upserts on the unique key `(variant_id, currency, price_list_id)`.","items":{"type":"object","oneOf":[{"required":["id"]},{"required":["variant_id","currency"]}],"properties":{"id":{"type":"string"},"variant_id":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}}}}},"delete":{"summary":"Delete a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the price list. Associated prices are removed asynchronously.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"price list deleted"}}}},"/api/v3/admin/price_lists/{id}/activate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Activate a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Transitions a draft / inactive list to `active`. If `starts_at` is\nin the future the list is marked `scheduled` instead, matching the\nlegacy admin behaviour.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}}}}},"/api/v3/admin/price_lists/{id}/deactivate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Deactivate a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list deactivated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}}}}},"/api/v3/admin/prices":{"get":{"summary":"List prices","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Generic prices endpoint covering both base prices and price-list\noverrides. Filter with Ransack: `q[price_list_id_eq]=…`,\n`q[currency_eq]=USD`, `q[price_list_id_null]=true` (base prices only).\n\nThe admin spreadsheet uses this with server-side pagination so it\nscales past the metadata-PATCH path on `/price_lists/:id`.\n\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[price_list_id_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"q[price_list_id_null]","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"q[currency_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"q[variant_id_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Comma-separated sort keys. Supports e.g. `variant_product_name,variant_id`.","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `variant`.","schema":{"type":"string"}}],"responses":{"200":{"description":"prices found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Price"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a single price. Omit `price_list_id` to create a base price.\nFor more than a handful of rows, prefer `POST /admin/prices/bulk_upsert`.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"price created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id","currency"],"properties":{"variant_id":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true},"price_list_id":{"type":"string","nullable":true}}}}}}}},"/api/v3/admin/prices/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}},"404":{"description":"price not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}},"delete":{"summary":"Delete a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the price (acts_as_paranoid).\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"price deleted"}}}},"/api/v3/admin/prices/bulk_upsert":{"post":{"summary":"Bulk-upsert prices","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Upserts a batch of prices in a single SQL round trip.\n\nEach row either:\n* targets an existing price by `id`, OR\n* matches on the unique key `(variant_id, currency, price_list_id)` —\n updating the existing row if one exists, creating one otherwise.\n\nModel callbacks (e.g. PriceHistory) are bypassed; this is a\nbulk-write fast path for the admin spreadsheet. The response\ncarries `price_count` — the number of rows touched.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"prices upserted","content":{"application/json":{"schema":{"type":"object","properties":{"price_count":{"type":"integer"}}}}}},"422":{"description":"missing prices key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prices"],"properties":{"prices":{"type":"array","items":{"type":"object","required":["variant_id","currency"],"properties":{"id":{"type":"string","nullable":true},"variant_id":{"type":"string"},"currency":{"type":"string"},"price_list_id":{"type":"string","nullable":true},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}}}}}},"/api/v3/admin/prices/bulk_destroy":{"delete":{"summary":"Bulk-delete prices","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes each price in `ids`. Returns the count actually destroyed.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"prices deleted","content":{"application/json":{"schema":{"type":"object","properties":{"price_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/{product_id}/custom_fields":{"get":{"summary":"List product custom fields","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the product's custom field values.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_field_definition). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,value,namespace). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"custom fields found","content":{"application/json":{}}}}},"post":{"summary":"Create a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Sets a custom field value on the product. Requires an existing CustomFieldDefinition; pass its prefixed `cfdef_…` id.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"custom field created","content":{"application/json":{}}},"422":{"description":"duplicate definition for the same product","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["custom_field_definition_id","value"],"properties":{"custom_field_definition_id":{"type":"string","description":"Prefixed `cfdef_…` id"},"value":{"description":"Value matching the definition's `field_type`"}}}}}}}},"/api/v3/admin/products/{product_id}/custom_fields/{id}":{"get":{"summary":"Show a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_field_definition). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,value,namespace). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"custom field found","content":{"application/json":{}}}}},"patch":{"summary":"Update a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates the custom field's `value`. The linked definition cannot be changed — delete and recreate to switch.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"custom field updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["value"],"properties":{"value":{"description":"New value"}}}}}}},"delete":{"summary":"Delete a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"custom field deleted"}}}},"/api/v3/admin/products/{product_id}/translations":{"get":{"summary":"List product translations","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the full translation matrix for the product: the source value and content type per translatable field, plus the translated value for every supported locale.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"translations found","content":{"application/json":{}}}}}},"/api/v3/admin/products":{"get":{"summary":"List products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of products for the current store.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"description":"Sort field (e.g., name, -name, price, -price, best_selling)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variants, media, option_types, categories). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,slug,price,status). id is always included.","schema":{"type":"string"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"q[status_eq]","in":"query","required":false,"description":"Filter by status","schema":{"type":"string"}}],"responses":{"200":{"description":"products found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new product. Supports nested variants with prices and option types.\n\nOption types and values are auto-created if they don't exist.\nPrices are upserted by currency. Stock items are upserted by stock location.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"product created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"tax_category_id":{"type":"string","description":"Tax category ID"},"category_ids":{"type":"array","items":{"type":"string"},"description":"Array of category IDs"},"tags":{"type":"array","items":{"type":"string"}},"prices":{"type":"array","description":"Shorthand for a simple (no-options) product: per-currency prices that forward to the product's sole variant. For products with options, set prices per variant under `variants:` instead.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"variants":{"type":"array","description":"Array of variant payloads. Variants can declare multiple option pairs via `options:` and per-currency prices via `prices:`. Stock counts go in `stock_items:` (per stock location).","items":{"type":"object","properties":{"sku":{"type":"string"},"options":{"type":"array","description":"One pair per option type the variant participates in (e.g. size + color). Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}},"required":["name"]}}}}}},"/api/v3/admin/products/{id}":{"get":{"summary":"Get a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single product by ID.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID (e.g., prod_xxx)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variants, media, option_types, categories). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,slug,price,status). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"product found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"product not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a product. Only provided fields are updated.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"product updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"tax_category_id":{"type":"string","description":"Tax category ID"},"category_ids":{"type":"array","items":{"type":"string"},"description":"Array of category IDs"},"tags":{"type":"array","items":{"type":"string"}},"prices":{"type":"array","description":"Shorthand for a simple (no-options) product: per-currency prices that forward to the product's sole variant. For products with options, set prices per variant under `variants:` instead.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"variants":{"type":"array","description":"Array of variant payloads. Variants can declare multiple option pairs via `options:` and per-currency prices via `prices:`. Stock counts go in `stock_items:` (per stock location).","items":{"type":"object","properties":{"sku":{"type":"string"},"options":{"type":"array","description":"One pair per option type the variant participates in (e.g. size + color). Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}}}}}}},"delete":{"summary":"Delete a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes a product.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product deleted"}}}},"/api/v3/admin/products/bulk_status_update":{"post":{"summary":"Bulk-update product status","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Sets `status` on each product in `ids`. Reindexes the affected products\nfor search. Cross-store IDs are silently dropped. Returns counts.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"cross-store products silently dropped","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"status":{"type":"string"}}}}}},"422":{"description":"invalid status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","status"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["draft","active","archived"]}}}}}}}},"/api/v3/admin/products/bulk_add_to_categories":{"post":{"summary":"Bulk-add products to categories","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Attaches each product in `ids` to every category (taxon) in `category_ids`.\nCategories from sibling stores are silently ignored.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products added to categories","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"category_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","category_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_from_categories":{"post":{"summary":"Bulk-remove products from categories","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Detaches each product in `ids` from every category in `category_ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products removed from categories","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","category_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_add_to_collections":{"post":{"summary":"Bulk-add products to collections","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Attaches each product in `ids` to every manual collection in `collection_ids`.\nAutomatic (rule-based) and sibling-store collections are silently ignored.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products added to collections","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"collection_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","collection_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"collection_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_from_collections":{"post":{"summary":"Bulk-remove products from collections","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Detaches each product in `ids` from every collection in `collection_ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products removed from collections","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","collection_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"collection_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_add_to_channels":{"post":{"summary":"Bulk-add products to channels","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Publishes each product in `ids` on every channel in `channel_ids`. Idempotent —\nre-publishing on an existing channel is a no-op. Channels from sibling stores\nare silently ignored.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products published on channels","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"channel_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","channel_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"channel_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_from_channels":{"post":{"summary":"Bulk-remove products from channels","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Unpublishes each product in `ids` from every channel in `channel_ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products unpublished from channels","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"channel_count":{"type":"integer"},"removed":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","channel_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"channel_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_add_tags":{"post":{"summary":"Bulk-add tags to products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds each tag name in `tags` to every product in `ids`. Tags are upserted by name.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags added","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"tag_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_tags":{"post":{"summary":"Bulk-remove tags from products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes each tag in `tags` from every product in `ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags removed","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_destroy":{"delete":{"summary":"Bulk-delete products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes each product in `ids`. Returns the count actually destroyed.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products deleted","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/promotions/{promotion_id}/coupon_codes":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List coupon codes for a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the auto-generated coupon codes for a multi-code promotion. Single-code promotions store the code on the promotion itself; this endpoint returns an empty list for them.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"coupon codes found","content":{"application/json":{}}}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_actions":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List actions for a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"actions found","content":{"application/json":{}}}}},"post":{"summary":"Create an action on a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new action to a promotion. The `type` is the wire shorthand from `GET /promotion_actions/types` (e.g. `free_shipping`, `create_item_adjustments`). Fully-qualified Ruby class names are also accepted for backward compatibility.\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"action created","content":{"application/json":{}}},"422":{"description":"unknown action type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}},"required":["type"]}}}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_actions/{id}":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete an action from a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"action deleted"}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_rules":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List rules for a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rules found","content":{"application/json":{}}}}},"post":{"summary":"Create a rule on a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new rule to a promotion. The `type` is the wire shorthand from `GET /promotion_rules/types` (e.g. `currency`, `item_total`, `product`). Fully-qualified Ruby class names are also accepted for backward compatibility.\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"rule created with preferences","content":{"application/json":{}}},"422":{"description":"unknown rule type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}},"required":["type"]}}}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_rules/{id}":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update a rule's preferences","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rule updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","additionalProperties":true}}}}}}},"delete":{"summary":"Delete a rule from a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"rule deleted"}}}},"/api/v3/admin/promotions":{"get":{"summary":"List promotions","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the store's promotions, including manual coupon and automatic promotions.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"promotions found","content":{"application/json":{}}}}},"post":{"summary":"Create a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new promotion. `code` is required for single-code coupon promotions;\npass `multi_codes: true` with `number_of_codes` to auto-generate a batch.\n\nRules and actions can be created in the same request by passing arrays of\n`{ type, preferences, ... }` rows. The server reconciles to the desired set:\nnew rows are built, existing rows (by `id`) are updated, omitted rows are removed.\n\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"promotion created with rules and actions","content":{"application/json":{}}},"422":{"description":"invalid params","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"starts_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"usage_limit":{"type":"integer","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"kind":{"type":"string","enum":["coupon_code","automatic"]},"multi_codes":{"type":"boolean"},"number_of_codes":{"type":"integer","nullable":true},"code_prefix":{"type":"string","nullable":true},"promotion_category_id":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"product_ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}},"customer_ids":{"type":"array","items":{"type":"string"}}},"required":["type"]}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"calculator":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"required":["type"]}}},"required":["name"]}}}}}},"/api/v3/admin/promotions/{id}":{"get":{"summary":"Show a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"promotion found","content":{"application/json":{}}}}},"patch":{"summary":"Update a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a promotion. The `rules` and `actions` arrays are treated as\na *desired set* — rows with `id` update in place, rows without `id` are\nbuilt fresh, and any existing row not present in the array is destroyed.\nPass `rules: []` or `actions: []` to clear them.\n\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rules and actions cleared with empty arrays","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"starts_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"usage_limit":{"type":"integer","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"kind":{"type":"string","enum":["coupon_code","automatic"]},"promotion_category_id":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"Pass to update an existing rule; omit to build a new one"},"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"product_ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}},"customer_ids":{"type":"array","items":{"type":"string"}}},"required":["type"]}},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"calculator":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"required":["type"]}}}}}}}},"delete":{"summary":"Delete a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"promotion deleted"}}}},"/api/v3/admin/promotion_actions/types":{"get":{"summary":"List available promotion action types","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the registered Spree::PromotionAction subclasses with their preference schemas. Used by admin UIs to populate the \"Add action\" picker and render generic preference forms.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"action types found","content":{"application/json":{}}}}}},"/api/v3/admin/promotion_rules/types":{"get":{"summary":"List available promotion rule types","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the registered Spree::PromotionRule subclasses with their preference schemas.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rule types found","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/refunds":{"get":{"summary":"List refunds","tags":["Refunds"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all refunds for an order.\n\n**Required scope:** `read_refunds` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment, refund_reason). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,reason,transaction_id). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"refunds found","content":{"application/json":{}}}}},"post":{"summary":"Create a refund","tags":["Refunds"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a refund for a payment on the order. The refund is automatically processed via the payment gateway.\n\n**Required scope:** `write_refunds` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"refund created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["payment_id","amount"],"properties":{"payment_id":{"type":"string","description":"Payment ID"},"amount":{"type":"string"},"refund_reason_id":{"type":"string","description":"Refund reason ID"}}}}}}}},"/api/v3/admin/locales":{"get":{"summary":"List supported locales","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the locales a merchant can translate content into for the current store, with the default and right-to-left flags.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"locales found","content":{"application/json":{}}}}}},"/api/v3/admin/store_credit_categories":{"get":{"summary":"List store credit categories","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the configured store credit categories. Categories classify\nstore credits (e.g., \"Goodwill\", \"Gift Card\", \"Refund\") and surface\nin the admin UI as a dropdown when issuing or editing a store\ncredit. Category names matching `Spree::Config[:non_expiring_credit_types]`\nare flagged via `non_expiring: true`.\n\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"store credit categories found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StoreCreditCategory"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/store_credit_categories/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Store credit category ID","schema":{"type":"string"}}],"get":{"summary":"Get a store credit category","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single store credit category by prefixed ID.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"store credit category found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreCreditCategory"}}}},"404":{"description":"store credit category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/store":{"get":{"summary":"Get the current store","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the current store configuration. The store is resolved from the request context (host or admin selection); there is no `id` parameter.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"current store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update the current store","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates the current store configuration.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"store updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"preferred_admin_locale":{"type":"string"},"preferred_timezone":{"type":"string"},"preferred_weight_unit":{"type":"string"},"preferred_unit_system":{"type":"string"}}}}}}}},"/api/v3/admin/tags":{"get":{"summary":"List tags","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns tag names for a given taggable type. Used for autocomplete in tag inputs on products, orders, and customers.","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"taggable_type","in":"query","required":true,"description":"Taggable type (`Spree::Product`, `Spree::Order`, or `Spree::User`)","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Optional case-insensitive substring filter","schema":{"type":"string"}}],"responses":{"200":{"description":"tags found","content":{"application/json":{}}},"422":{"description":"invalid taggable type","content":{"application/json":{}}}}}},"/api/v3/admin/translatable_resources":{"get":{"summary":"List translatable resources","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns every translatable resource type and its translatable fields (key + content type), so clients can render translation editors generically.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"translatable resources found","content":{"application/json":{}}}}}},"/api/v3/admin/translations/batch":{"post":{"summary":"Batch upsert translations","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Atomically upserts translations across many records of (possibly) different translatable resource types in one request — e.g. an option type and all its option values in one save. A flat list of independent registry writes; all entries succeed or none do.\n\n**Required scope:** `write_<resource>` for every resource type in the batch (for API-key authentication) (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"translations upserted","content":{"application/json":{}}},"422":{"description":"unsupported locale rolls back the whole batch","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["translations"],"properties":{"translations":{"type":"array","items":{"type":"object","required":["resource_type","resource_id","values"],"properties":{"resource_type":{"type":"string","description":"Translatable resource type token, e.g. `option_type`"},"resource_id":{"type":"string","description":"Prefixed id of the record"},"values":{"type":"object","description":"Map of locale code to { field: value }","additionalProperties":{"type":"object","additionalProperties":true}}}}}}}}}}}},"/api/v3/admin/admin_users":{"get":{"summary":"List staff","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns admin users with at least one role assignment on the current store.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"staff found","content":{"application/json":{}}}}}},"/api/v3/admin/admin_users/{id}":{"get":{"summary":"Show a staff member","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"staff member found","content":{"application/json":{}}}}},"patch":{"summary":"Update a staff member","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates name fields and reassigns roles for the current store. `role_ids` is a complete replacement — roles not in the array are removed for this store.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"staff member updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"role_ids":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Remove a staff member from this store","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the user's role assignments on the current store. The account is preserved — the user keeps access to any other stores.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"staff removed from store"}}}},"/api/v3/admin/invitations":{"get":{"summary":"List invitations","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns invitations for the current store, including pending and accepted.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"invitations found","content":{"application/json":{}}}}},"post":{"summary":"Create an invitation","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Invites a teammate by email. The invitation is scoped to the current store and carries the chosen role; on accept, a `RoleUser` is created via the invitation's `after_accept` callback.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"invitation created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","role_id"],"properties":{"email":{"type":"string"},"role_id":{"type":"string"}}}}}}}},"/api/v3/admin/invitations/{id}":{"delete":{"summary":"Revoke an invitation","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"invitation revoked"}}}},"/api/v3/admin/invitations/{id}/resend":{"patch":{"summary":"Resend an invitation","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Issues a fresh token and dispatches the invitation email again.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"invitation resent","content":{"application/json":{}}}}}},"/api/v3/admin/roles":{"get":{"summary":"List roles","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the roles available for staff role pickers. Roles are global, not per-store.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"roles found","content":{"application/json":{}}}}}},"/api/v3/admin/stock_locations":{"get":{"summary":"List stock locations","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the configured stock locations. Stock locations are global\n(shared across stores). Filter with Ransack predicates such as\n`q[active_eq]`, `q[kind_eq]`, `q[pickup_enabled_eq]`, or\n`q[name_cont]`.\n\nPickup-related attributes (`kind`, `pickup_enabled`,\n`pickup_stock_policy`, `pickup_ready_in_minutes`,\n`pickup_instructions`) drive merchant pickup support at checkout —\ncustomers can collect orders from any active location with\n`pickup_enabled: true`.\n\n\n**Required scope:** `read_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"q[active_eq]","in":"query","required":false,"description":"Filter by active status","schema":{"type":"boolean"}},{"name":"q[kind_eq]","in":"query","required":false,"description":"Filter by kind (built-in: 'warehouse', 'store', 'fulfillment_center')","schema":{"type":"string"}},{"name":"q[pickup_enabled_eq]","in":"query","required":false,"description":"Filter by pickup-enabled flag","schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"stock locations found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StockLocation"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new stock location.\n\nSetting `default: true` automatically demotes the previous default\nlocation.\n\n\n**Required scope:** `write_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"stock location created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLocation"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"admin_name":{"type":"string","nullable":true,"description":"Internal name shown only in the admin"},"active":{"type":"boolean"},"default":{"type":"boolean","description":"Setting to true demotes the previous default."},"kind":{"type":"string","enum":["warehouse","store","fulfillment_center"],"description":"Categorizes the location."},"propagate_all_variants":{"type":"boolean"},"backorderable_default":{"type":"boolean"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"country_iso":{"type":"string","nullable":true,"description":"ISO-3166 alpha-2 country code (e.g. \"US\")."},"state_abbr":{"type":"string","nullable":true,"description":"State / province abbreviation (e.g. \"NY\"). Resolved against the selected country."},"state_name":{"type":"string","nullable":true,"description":"Free-text state for countries without a states list."},"pickup_enabled":{"type":"boolean"},"pickup_stock_policy":{"type":"string","enum":["local","any"],"description":"'local' = items at this location only; 'any' = transfer-eligible (ship-to-store)."},"pickup_ready_in_minutes":{"type":"number","nullable":true,"minimum":0},"pickup_instructions":{"type":"string","nullable":true}},"required":["name"]}}}}}},"/api/v3/admin/stock_locations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Stock location ID","schema":{"type":"string"}}],"get":{"summary":"Get a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single stock location by prefixed ID.\n\n**Required scope:** `read_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"stock location found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLocation"}}}},"404":{"description":"stock location not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an existing stock location. Same address-field conventions as\nthe create endpoint.\n\nSetting `default: true` automatically demotes the previous default.\n\n\n**Required scope:** `write_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"stock location updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLocation"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"admin_name":{"type":"string","nullable":true},"active":{"type":"boolean"},"default":{"type":"boolean"},"kind":{"type":"string","enum":["warehouse","store","fulfillment_center"]},"propagate_all_variants":{"type":"boolean"},"backorderable_default":{"type":"boolean"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"country_iso":{"type":"string","nullable":true},"state_abbr":{"type":"string","nullable":true},"state_name":{"type":"string","nullable":true},"pickup_enabled":{"type":"boolean"},"pickup_stock_policy":{"type":"string","enum":["local","any"]},"pickup_ready_in_minutes":{"type":"number","nullable":true,"minimum":0},"pickup_instructions":{"type":"string","nullable":true}}}}}}},"delete":{"summary":"Delete a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the stock location (sets `deleted_at`). Existing\nfulfillments that referenced it keep the historical record via\n`Spree::StockLocation.with_deleted`.\n\n\n**Required scope:** `write_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"204":{"description":"stock location deleted"}}}},"/api/v3/admin/products/{product_id}/variants":{"get":{"summary":"List product variants","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of variants for a product, including the default variant.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., images, prices, stock_items, option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., sku,price,stock). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"variants found","content":{"application/json":{}}}}},"post":{"summary":"Create a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new variant for a product. Supports nested prices and stock items.\n\nOption types and values are auto-created if they don't exist.\nPrices are upserted by currency. Stock items are upserted by stock location.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"201":{"description":"variant created","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string"},"cost_price":{"type":"string"},"cost_currency":{"type":"string"},"weight":{"type":"number"},"height":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"weight_unit":{"type":"string"},"dimensions_unit":{"type":"string"},"track_inventory":{"type":"boolean"},"tax_category_id":{"type":"string"},"options":{"type":"array","description":"A variant on a product with option types should declare its option pairs (e.g. size + color) — one per option type it participates in. Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"position":{"type":"integer"},"barcode":{"type":"string"},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}}}}},"/api/v3/admin/products/{product_id}/variants/{id}":{"get":{"summary":"Get a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single variant by ID.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Variant ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., images, prices, stock_items, option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., sku,price,stock). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"variant found","content":{"application/json":{}}},"404":{"description":"variant not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a variant. Only provided fields are updated.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Variant ID","schema":{"type":"string"}}],"responses":{"200":{"description":"variant updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string"},"cost_price":{"type":"string"},"cost_currency":{"type":"string"},"weight":{"type":"number"},"height":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"weight_unit":{"type":"string"},"dimensions_unit":{"type":"string"},"track_inventory":{"type":"boolean"},"tax_category_id":{"type":"string"},"options":{"type":"array","description":"One pair per option type the variant participates in (e.g. size + color). Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"position":{"type":"integer"},"barcode":{"type":"string"},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}}}},"delete":{"summary":"Delete a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes a variant.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Variant ID","schema":{"type":"string"}}],"responses":{"204":{"description":"variant deleted"}}}},"/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries":{"parameters":[{"name":"webhook_endpoint_id","in":"path","required":true,"description":"Parent webhook endpoint ID","schema":{"type":"string"}}],"get":{"summary":"List webhook deliveries","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns delivery attempts for the given endpoint, most recent first.\nEach row carries the original request payload, the response code\n(when the receiver replied), the execution time, and any transport\nerror — everything needed to audit failures and decide whether to\nredeliver.\n\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[event_name_eq]","in":"query","required":false,"description":"Filter by event name (exact)","schema":{"type":"string"}},{"name":"q[success_eq]","in":"query","required":false,"description":"Filter by success flag","schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-delivered_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"deliveries found","content":{"application/json":{}}},"404":{"description":"parent webhook endpoint not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}":{"parameters":[{"name":"webhook_endpoint_id","in":"path","required":true,"description":"Parent webhook endpoint ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Webhook delivery ID","schema":{"type":"string"}}],"get":{"summary":"Get a webhook delivery","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single delivery attempt with the full request payload and\nthe response body the receiver returned. Use this for ad-hoc debug\nof failed deliveries.\n\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"delivery found","content":{"application/json":{}}},"404":{"description":"delivery not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}/redeliver":{"parameters":[{"name":"webhook_endpoint_id","in":"path","required":true,"description":"Parent webhook endpoint ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Webhook delivery ID to redeliver","schema":{"type":"string"}}],"post":{"summary":"Redeliver a webhook delivery","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new delivery row with the same payload + event_name and\nqueues it. The original row is preserved for audit history.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"redelivery queued","content":{"application/json":{}}}}}},"/api/v3/admin/webhook_endpoints":{"get":{"summary":"List webhook endpoints","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns outbound webhook subscriptions for the current store. Each\nendpoint receives a signed POST when any subscribed event fires.\n`secret_key` is `null` on list reads — the plaintext is delivered\nexactly once on create.\n\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"q[url_cont]","in":"query","required":false,"description":"Filter by URL (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoints found","content":{"application/json":{}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new outbound webhook subscription. The plaintext\n`secret_key` is returned **once** in this response — persist it\nimmediately to verify incoming webhook signatures. Subsequent reads\nreturn `null` for the secret. Pass an empty `subscriptions` array or\nomit it to receive every event.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"webhook endpoint created — secret_key returned once","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"name":{"type":"string"},"url":{"type":"string"},"active":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/webhook_endpoints/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"get":{"summary":"Get a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single webhook endpoint by prefixed ID.\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint found","content":{"application/json":{}}},"404":{"description":"webhook endpoint not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates name, URL, active flag, or the event subscription list.\nToggling `active` here is equivalent to calling `disable`/`enable`\nwithout an audit reason.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint updated","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"active":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the endpoint and stops future deliveries.\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"204":{"description":"webhook endpoint deleted"}}}},"/api/v3/admin/webhook_endpoints/{id}/send_test":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"post":{"summary":"Send a test delivery","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a `webhook.test` delivery record and queues it. Use this to\nverify the endpoint is reachable and your signature verification\naccepts Spree's payloads.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"test delivery queued","content":{"application/json":{}}}}}},"/api/v3/admin/webhook_endpoints/{id}/enable":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"patch":{"summary":"Re-enable a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Re-enables an endpoint that was manually or automatically disabled.\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint enabled","content":{"application/json":{}}}}}},"/api/v3/admin/webhook_endpoints/{id}/disable":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"patch":{"summary":"Disable a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Manually pauses an endpoint. Unlike auto-disable (triggered after\nrepeated delivery failures), no notification email is sent.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint disabled","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}}}},"/api/v3/admin/categories":{"get":{"summary":"List categories","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of the store's categories (manual hierarchical taxons; rule-based collections are excluded).\n\n**Required scope:** `read_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., children, parent, ancestors).","schema":{"type":"string"}}],"responses":{"200":{"description":"categories found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a category. Nests under the parent when parent_id is given, otherwise creates a top-level category.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"category created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"parent_id":{"type":"string","description":"Prefixed ID of the parent category"},"description":{"type":"string"},"permalink":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"hide_from_nav":{"type":"boolean"}},"required":["name"]}}}}}},"/api/v3/admin/categories/{id}":{"get":{"summary":"Get a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single category by ID.\n\n**Required scope:** `read_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., children, parent, ancestors).","schema":{"type":"string"}}],"responses":{"200":{"description":"category found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"404":{"description":"category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a category.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"category updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"parent_id":{"type":"string","description":"Prefixed ID of the parent category"},"description":{"type":"string"},"permalink":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"hide_from_nav":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a category and its descendants.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"204":{"description":"category deleted"}}}},"/api/v3/admin/categories/{id}/reposition":{"patch":{"summary":"Reposition a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Moves a category to a new parent and/or index within the tree.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"category repositioned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"new_parent_id":{"type":"string","description":"Prefixed ID of the new parent (omit for top level)"},"new_position":{"type":"integer","description":"0-based index among the new parent's children"}},"required":["new_position"]}}}}}},"/api/v3/admin/categories/{category_id}/products":{"get":{"summary":"List category products","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Products classified under the category, ordered by their classification position.\n\n**Required scope:** `read_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"products found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Add a product to a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Classifies a product under the category (appended to the end).\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"201":{"description":"product added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"}},"required":["product_id"]}}}}}},"/api/v3/admin/categories/{category_id}/products/{id}":{"delete":{"summary":"Remove a product from a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes a product from the category's manual classification.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product removed"}}}},"/api/v3/admin/categories/{category_id}/products/{id}/reposition":{"patch":{"summary":"Reposition a category product","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Moves a product to a new index among the category's products.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product repositioned"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"new_position":{"type":"integer","description":"0-based index among the category's products"}},"required":["new_position"]}}}}}},"/api/v3/admin/collections":{"get":{"summary":"List collections","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of the store's collections.\n\n**Required scope:** `read_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_fields, translations).","schema":{"type":"string"}}],"responses":{"200":{"description":"collections found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a manual or automatic (rule-based) collection. For automatic collections, send the full desired rule set under `rules`.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"collection created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"automatic":{"type":"boolean"},"rules_match_policy":{"type":"string","enum":["all","any"]},"sort_order":{"type":"string"},"permalink":{"type":"string"},"description":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"rules":{"type":"array","description":"Full desired rule set. Entries with an id update, id-less entries create, omitted rules are removed.","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"match_policy":{"type":"string"}}}}},"required":["name"]}}}}}},"/api/v3/admin/collections/{id}":{"get":{"summary":"Get a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single collection by ID, including its rules.\n\n**Required scope:** `read_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_fields, translations).","schema":{"type":"string"}}],"responses":{"200":{"description":"collection found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"404":{"description":"collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a collection. Send `position` to reorder it within the flat list; send the full `rules` set to sync automatic rules.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}}],"responses":{"200":{"description":"collection updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"permalink":{"type":"string"},"description":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"sort_order":{"type":"string"},"automatic":{"type":"boolean"},"rules_match_policy":{"type":"string","enum":["all","any"]},"position":{"type":"integer","description":"Reorders the collection within the flat list (acts_as_list)"},"rules":{"type":"array","description":"Full desired rule set (see create).","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"match_policy":{"type":"string"}}}}}}}}}},"delete":{"summary":"Delete a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a collection.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}}],"responses":{"204":{"description":"collection deleted"}}}},"/api/v3/admin/collections/{collection_id}/products":{"get":{"summary":"List collection products","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Products curated in the collection, ordered by their membership position.\n\n**Required scope:** `read_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"collection_id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}}],"responses":{"200":{"description":"products found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Add a product to a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Curates a product into the collection (appended to the end).\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"collection_id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}}],"responses":{"201":{"description":"product added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"}},"required":["product_id"]}}}}}},"/api/v3/admin/collections/{collection_id}/products/{id}":{"delete":{"summary":"Remove a product from a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes a product from the collection's manual curation.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"collection_id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product removed"}}}},"/api/v3/admin/collections/{collection_id}/products/{id}/reposition":{"patch":{"summary":"Reposition a collection product","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Moves a product to a new index among the collection's products.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"collection_id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product repositioned"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"new_position":{"type":"integer","description":"0-based index among the collection's products"}},"required":["new_position"]}}}}}},"/api/v3/admin/imports":{"get":{"summary":"List imports","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns CSV imports queued or completed for the current store.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"imports found","content":{"application/json":{}}}}},"post":{"summary":"Create an import","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Queues a CSV import. Upload the file first via `POST /api/v3/admin/direct_uploads`\nand pass the returned `signed_id` as `attachment`. On success the import is in the\n`mapping` state and the response carries the mapping payload: `schema_fields`\n(the canonical columns for the type), `csv_headers`, a `sample_row`, and the\nauto-assigned `mappings`.\n\nAdjust mappings if needed, then call `PATCH /admin/imports/{id}/complete_mapping`\nto start processing. Poll `GET /admin/imports/{id}` while `status` is\n`completed_mapping`/`processing`; terminal statuses are `completed` and `failed`.\n\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"import created in mapping state","content":{"application/json":{}}},"422":{"description":"unknown import type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["type","attachment"],"properties":{"type":{"type":"string","enum":["Spree::Imports::Products","Spree::Imports::Customers","Spree::Imports::ProductTranslations"]},"attachment":{"type":"string","description":"ActiveStorage signed blob id from POST /api/v3/admin/direct_uploads."},"preferred_delimiter":{"type":"string","enum":[",",";","|","\t"],"description":"CSV column separator. Defaults to a comma."},"results_url":{"type":"string","description":"Absolute URL of your admin imports view; the import-done email links back to it with `?import=<id>` appended. Only honored when it matches one of the store's configured allowed origins."}}}}}}}},"/api/v3/admin/imports/template":{"get":{"summary":"Download an import template","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a CSV header row for the given import type, including the custom field columns available for the model.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":true,"description":"Registered import type, e.g. Spree::Imports::Products.","schema":{"type":"string"}}],"responses":{"200":{"description":"CSV template","content":{"application/json":{},"text/csv":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v3/admin/imports/{id}":{"get":{"summary":"Show an import","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns import status and row counters. The admin dashboard polls this endpoint while `status` is `completed_mapping` or `processing`; `rows_count`, `completed_rows_count` and `failed_rows_count` drive the progress bar. The mapping payload (`csv_headers`, `sample_row`) is only present while `status` is `mapping`.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"import found","content":{"application/json":{}}}}},"delete":{"summary":"Delete an import","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the import, its rows and the uploaded file. Returns 422 while the import is being processed.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"import deleted"}}}},"/api/v3/admin/imports/{id}/download":{"get":{"summary":"Download the originally uploaded file","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Streams the CSV exactly as it was uploaded — the audit trail for what was imported. JWT/API-key protected; SPA clients fetch it with the Authorization header and trigger the browser download via a Blob URL.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"CSV file","content":{"application/json":{},"text/csv":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v3/admin/imports/{id}/complete_mapping":{"patch":{"summary":"Complete mapping and start processing","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Applies the submitted column mappings, then starts row processing. Omit `mappings`\nto accept the auto-assigned ones from the create response. Returns 422 when a\nrequired schema field is left unmapped (`details.missing_required_fields`) or a\nfile column is assigned twice.\n\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"mapping completed, processing queued","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mappings":{"type":"array","description":"Column assignments to apply before starting. `file_column: null` unmaps a field.","items":{"type":"object","required":["schema_field"],"properties":{"schema_field":{"type":"string"},"file_column":{"type":"string","nullable":true}}}}}}}}}}},"/api/v3/admin/imports/{id}/retry_failed_rows":{"patch":{"summary":"Retry failed rows","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Re-processes the rows that failed. The import re-enters `processing`; poll `GET /admin/imports/{id}` until it completes again. Returns 422 when the import is not `completed` or has no failed rows.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"retry queued","content":{"application/json":{}}}}}},"/api/v3/admin/imports/{import_id}/rows":{"get":{"summary":"List import rows","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Paginated rows of an import — the failure report. Filter with `q[status_eq]=failed` to list only rows that could not be imported; each row carries the raw CSV `data` and its `validation_errors`.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"import_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"q[status_eq]","in":"query","required":false,"description":"Filter rows by status: pending, processing, completed, failed.","schema":{"type":"string"}}],"responses":{"200":{"description":"rows found","content":{"application/json":{}}}}}}},"components":{"schemas":{"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"count":{"type":"integer","description":"Total number of records"},"pages":{"type":"integer","description":"Total number of pages"},"from":{"type":"integer","description":"Index of first record on this page"},"to":{"type":"integer","description":"Index of last record on this page"},"in":{"type":"integer","description":"Number of records on this page"},"previous":{"type":"integer","nullable":true,"description":"Previous page number"},"next":{"type":"integer","nullable":true,"description":"Next page number"}},"required":["page","limit","count","pages","from","to","in"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","description":"Field-specific validation errors","nullable":true}},"required":["code","message"]}},"required":["error"]},"AuthResponse":{"type":"object","properties":{"token":{"type":"string","description":"JWT access token"},"user":{"$ref":"#/components/schemas/AdminUser"}},"required":["token","user"]},"PermissionRule":{"type":"object","description":"A single permission rule (CanCanCan rule). Rules are applied in order, last-matching-wins.","properties":{"allow":{"type":"boolean","description":"true for `can`, false for `cannot`"},"actions":{"type":"array","items":{"type":"string"},"description":"Action names, e.g. [\"read\", \"update\"] or [\"manage\"]"},"subjects":{"type":"array","items":{"type":"string"},"description":"Subject class names, e.g. [\"Spree::Product\"] or [\"all\"]"},"has_conditions":{"type":"boolean","description":"True if the server-side rule has per-record conditions. The SPA shows the action optimistically and handles 403 from the API."}},"required":["allow","actions","subjects","has_conditions"]},"MeResponse":{"type":"object","description":"Current admin user profile and serialized permissions","properties":{"user":{"$ref":"#/components/schemas/AdminUser"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionRule"}}},"required":["user","permissions"]},"ImportSchemaField":{"type":"object","description":"A canonical column of an import type, including per-store custom field columns","properties":{"name":{"type":"string","description":"Canonical field name used in mappings"},"label":{"type":"string","description":"Human-readable label"},"required":{"type":"boolean","description":"Whether the field must be mapped before processing"}},"required":["name","label","required"]},"CheckoutRequirement":{"type":"object","properties":{"step":{"type":"string","description":"Checkout step this requirement belongs to"},"field":{"type":"string","description":"Field that needs to be satisfied"},"message":{"type":"string","description":"Human-readable requirement message"}},"required":["step","field","message"]},"CartWarning":{"type":"object","description":"A warning about a cart issue (e.g., item removed due to stock change)","properties":{"code":{"type":"string","description":"Machine-readable warning code"},"message":{"type":"string","description":"Human-readable warning message"},"line_item_id":{"type":"string","nullable":true,"description":"Prefixed line item ID (when applicable)"},"variant_id":{"type":"string","nullable":true,"description":"Prefixed variant ID (when applicable)"}},"required":["code","message"]},"FulfillmentManifestItem":{"type":"object","description":"An item within a fulfillment — which line item and how many units are in this fulfillment","properties":{"item_id":{"type":"string","description":"Line item ID"},"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer","description":"Quantity in this fulfillment"}},"required":["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"},"name":{"type":"string","description":"Role name"}},"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"},"type":{"type":"string","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","description":"Wire shorthand for the calculator subclass"},"label":{"type":"string"},"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"},"quantity":{"type":"integer"}},"required":["variant_id","quantity"]},"Address":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"country_name":{"type":"string"},"country_iso":{"type":"string"},"state_text":{"type":"string","nullable":true},"state_abbr":{"type":"string","nullable":true},"quick_checkout":{"type":"boolean"},"is_default_billing":{"type":"boolean"},"is_default_shipping":{"type":"boolean"},"state_name":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customer_id":{"type":"string","nullable":true}},"required":["id","first_name","last_name","full_name","address1","address2","postal_code","city","phone","company","country_name","country_iso","state_text","state_abbr","quick_checkout","is_default_billing","is_default_shipping","state_name","label","metadata","created_at","updated_at","customer_id"],"x-typelizer":true},"Adjustment":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"display_amount":{"type":"string"},"included":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"amount":{"type":"string"},"order_id":{"type":"string","nullable":true}},"required":["id","label","display_amount","included","created_at","updated_at","amount","order_id"],"x-typelizer":true},"AdminUser":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string","nullable":true},"selected_locale":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"avatar_url":{"type":"string","nullable":true},"roles":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserRoleAssignment"}}},"required":["id","email","first_name","last_name","full_name","selected_locale","created_at","updated_at","avatar_url","roles"],"x-typelizer":true},"AllowedOrigin":{"type":"object","properties":{"id":{"type":"string"},"origin":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","origin","created_at","updated_at"],"x-typelizer":true},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key_type":{"type":"string"},"token_prefix":{"type":"string","nullable":true},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"revoked_at":{"type":"string","nullable":true},"last_used_at":{"type":"string","nullable":true},"channel_id":{"type":"string","nullable":true},"plaintext_token":{"type":"string","nullable":true},"created_by_email":{"type":"string","nullable":true}},"required":["id","name","key_type","token_prefix","scopes","created_at","updated_at","revoked_at","last_used_at","channel_id","plaintext_token","created_by_email"],"x-typelizer":true},"Category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"permalink":{"type":"string"},"position":{"type":"number"},"depth":{"type":"number"},"meta_title":{"type":"string","nullable":true},"meta_description":{"type":"string","nullable":true},"meta_keywords":{"type":"string","nullable":true},"children_count":{"type":"number"},"parent_id":{"type":"string","nullable":true},"description":{"type":"string"},"description_html":{"type":"string"},"image_url":{"type":"string","nullable":true},"square_image_url":{"type":"string","nullable":true},"is_root":{"type":"boolean"},"is_child":{"type":"boolean"},"is_leaf":{"type":"boolean"},"parent":{"$ref":"#/components/schemas/Category"},"children":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"ancestors":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"translations":{"type":"object"},"metadata":{"type":"object"},"pretty_name":{"type":"string"},"lft":{"type":"number"},"rgt":{"type":"number"},"products_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","permalink","position","depth","meta_title","meta_description","meta_keywords","children_count","parent_id","description","description_html","image_url","square_image_url","is_root","is_child","is_leaf","metadata","pretty_name","lft","rgt","products_count","created_at","updated_at"],"x-typelizer":true},"Channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"default":{"type":"boolean"},"storefront_access":{"type":"string"},"guest_checkout":{"type":"boolean"},"preferred_order_routing_strategy":{"type":"string","nullable":true},"preferred_storefront_access":{"type":"string","nullable":true},"preferred_guest_checkout":{"type":"boolean","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","code","active","default","storefront_access","guest_checkout","preferred_order_routing_strategy","preferred_storefront_access","preferred_guest_checkout","created_at","updated_at"],"x-typelizer":true},"CollectionRule":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string","nullable":true},"match_policy":{"type":"string"}},"required":["id","type","value","match_policy"],"x-typelizer":true},"Collection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"permalink":{"type":"string"},"position":{"type":"number"},"sort_order":{"type":"string"},"meta_title":{"type":"string","nullable":true},"meta_description":{"type":"string","nullable":true},"meta_keywords":{"type":"string","nullable":true},"products_count":{"type":"number"},"description":{"type":"string"},"description_html":{"type":"string"},"image_url":{"type":"string","nullable":true},"square_image_url":{"type":"string","nullable":true},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"translations":{"type":"object"},"automatic":{"type":"boolean"},"rules_match_policy":{"type":"string"},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/CollectionRule"}}},"required":["id","name","permalink","position","sort_order","meta_title","meta_description","meta_keywords","products_count","description","description_html","image_url","square_image_url","automatic","rules_match_policy","metadata","created_at","updated_at","rules"],"x-typelizer":true},"Country":{"type":"object","properties":{"iso":{"type":"string"},"iso3":{"type":"string"},"name":{"type":"string"},"states_required":{"type":"boolean"},"zipcode_required":{"type":"boolean"},"states":{"type":"array","items":{"$ref":"#/components/schemas/State"}},"market":{"allOf":[{"$ref":"#/components/schemas/Market"}],"nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["iso","iso3","name","states_required","zipcode_required","created_at","updated_at"],"x-typelizer":true},"CouponCode":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"state":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"promotion_id":{"type":"string"},"order_id":{"type":"string","nullable":true}},"required":["id","code","state","created_at","updated_at","promotion_id","order_id"],"x-typelizer":true},"CreditCard":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"last4":{"type":"string"},"month":{"type":"number"},"year":{"type":"number"},"name":{"type":"string","nullable":true},"default":{"type":"boolean"},"gateway_payment_profile_id":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true},"payment_method_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","brand","last4","month","year","name","default","gateway_payment_profile_id","customer_id","payment_method_id","metadata","created_at","updated_at"],"x-typelizer":true},"CustomFieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"field_type":{"type":"string","enum":["short_text","long_text","rich_text","number","boolean","json"]},"resource_type":{"type":"string"},"storefront_visible":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","namespace","key","label","field_type","resource_type","storefront_visible","created_at","updated_at"],"x-typelizer":true},"CustomField":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","deprecated":true},"field_type":{"type":"string","enum":["short_text","long_text","rich_text","number","boolean","json"]},"key":{"type":"string"},"value":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"storefront_visible":{"type":"boolean"},"custom_field_definition_id":{"type":"string"}},"required":["id","label","type","field_type","key","value","created_at","updated_at","storefront_visible","custom_field_definition_id"],"x-typelizer":true},"CustomerGroup":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"customers_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":["id","name","description","customers_count","created_at","updated_at"],"x-typelizer":true},"Customer":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"accepts_email_marketing":{"type":"boolean"},"full_name":{"type":"string"},"available_store_credit_total":{"type":"string"},"display_available_store_credit_total":{"type":"string"},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"default_billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"default_shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"newsletter_subscriber":{"allOf":[{"$ref":"#/components/schemas/NewsletterSubscriber"}],"nullable":true},"customer_groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"login":{"type":"string","nullable":true},"metadata":{"type":"object"},"last_sign_in_at":{"type":"string","nullable":true},"current_sign_in_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sign_in_count":{"type":"number"},"failed_attempts":{"type":"number"},"last_sign_in_ip":{"type":"string","nullable":true},"current_sign_in_ip":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"internal_note_html":{"type":"string","nullable":true},"default_billing_address_id":{"type":"string","nullable":true},"default_shipping_address_id":{"type":"string","nullable":true},"orders_count":{"type":"number"},"total_spent":{"type":"string"},"display_total_spent":{"type":"string"},"last_order_completed_at":{"type":"string","nullable":true},"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"store_credits":{"type":"array","items":{"$ref":"#/components/schemas/StoreCredit"}},"customer_group_ids":{"type":"array","items":{"type":"string"}}},"required":["id","email","first_name","last_name","phone","accepts_email_marketing","full_name","available_store_credit_total","display_available_store_credit_total","login","metadata","last_sign_in_at","current_sign_in_at","created_at","updated_at","sign_in_count","failed_attempts","last_sign_in_ip","current_sign_in_ip","tags","internal_note_html","default_billing_address_id","default_shipping_address_id","orders_count","total_spent","display_total_spent","last_order_completed_at","customer_group_ids"],"x-typelizer":true},"DeliveryMethod":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","code","created_at","updated_at"],"x-typelizer":true},"DeliveryRate":{"type":"object","properties":{"id":{"type":"string"},"delivery_method_id":{"type":"string"},"name":{"type":"string"},"selected":{"type":"boolean"},"cost":{"type":"string"},"total":{"type":"string"},"additional_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"tax_total":{"type":"string"},"display_cost":{"type":"string"},"display_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"display_tax_total":{"type":"string"},"delivery_method":{"$ref":"#/components/schemas/DeliveryMethod"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","delivery_method_id","name","selected","cost","total","additional_tax_total","included_tax_total","tax_total","display_cost","display_total","display_additional_tax_total","display_included_tax_total","display_tax_total","created_at","updated_at"],"x-typelizer":true},"DigitalLink":{"type":"object","properties":{"id":{"type":"string"},"access_counter":{"type":"number"},"filename":{"type":"string"},"content_type":{"type":"string"},"download_url":{"type":"string"},"authorizable":{"type":"boolean"},"expired":{"type":"boolean"},"access_limit_exceeded":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","access_counter","filename","content_type","download_url","authorizable","expired","access_limit_exceeded","created_at","updated_at"],"x-typelizer":true},"Discount":{"type":"object","properties":{"id":{"type":"string"},"promotion_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"amount":{"type":"string"},"display_amount":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","promotion_id","name","description","code","amount","display_amount","created_at","updated_at"],"x-typelizer":true},"Export":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"type":{"type":"string","nullable":true},"format":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"user_id":{"type":"string","nullable":true},"done":{"type":"boolean"},"filename":{"type":"string","nullable":true},"byte_size":{"type":"number","nullable":true},"download_url":{"type":"string","nullable":true}},"required":["id","number","type","format","created_at","updated_at","user_id","done","filename","byte_size","download_url"],"x-typelizer":true},"Fulfillment":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"tracking":{"type":"string","nullable":true},"tracking_url":{"type":"string","nullable":true},"cost":{"type":"string"},"display_cost":{"type":"string"},"total":{"type":"string"},"display_total":{"type":"string"},"discount_total":{"type":"string"},"display_discount_total":{"type":"string"},"additional_tax_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"tax_total":{"type":"string"},"display_tax_total":{"type":"string"},"status":{"type":"string"},"fulfillment_type":{"type":"string"},"fulfilled_at":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/FulfillmentManifestItem"}},"delivery_method":{"$ref":"#/components/schemas/DeliveryMethod"},"stock_location":{"$ref":"#/components/schemas/StockLocation"},"delivery_rates":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryRate"}},"metadata":{"type":"object"},"adjustment_total":{"type":"string"},"pre_tax_amount":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"order_id":{"type":"string","nullable":true},"stock_location_id":{"type":"string","nullable":true},"order":{"$ref":"#/components/schemas/Order"},"adjustments":{"type":"array","items":{"$ref":"#/components/schemas/Adjustment"}}},"required":["id","number","tracking","tracking_url","cost","display_cost","total","display_total","discount_total","display_discount_total","additional_tax_total","display_additional_tax_total","included_tax_total","display_included_tax_total","tax_total","display_tax_total","status","fulfillment_type","fulfilled_at","items","metadata","adjustment_total","pre_tax_amount","created_at","updated_at","order_id","stock_location_id"],"x-typelizer":true},"GiftCardBatch":{"type":"object","properties":{"id":{"type":"string"},"codes_count":{"type":"number"},"currency":{"type":"string","nullable":true},"prefix":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"amount":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true}},"required":["id","codes_count","currency","prefix","created_at","updated_at","amount","expires_at","created_by_id"],"x-typelizer":true},"GiftCard":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string"},"amount_used":{"type":"string"},"amount_authorized":{"type":"string"},"amount_remaining":{"type":"string"},"display_amount":{"type":"string"},"display_amount_used":{"type":"string"},"display_amount_remaining":{"type":"string"},"expires_at":{"type":"string","nullable":true},"redeemed_at":{"type":"string","nullable":true},"expired":{"type":"boolean"},"active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customer_id":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true},"customer":{"$ref":"#/components/schemas/Customer"},"created_by":{"$ref":"#/components/schemas/AdminUser"},"gift_card_batch":{"$ref":"#/components/schemas/GiftCardBatch"},"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}},"required":["id","code","status","currency","amount","amount_used","amount_authorized","amount_remaining","display_amount","display_amount_used","display_amount_remaining","expires_at","redeemed_at","expired","active","created_at","updated_at","customer_id","created_by_id"],"x-typelizer":true},"ImportMapping":{"type":"object","properties":{"id":{"type":"string"},"schema_field":{"type":"string"},"file_column":{"type":"string","nullable":true},"required":{"type":"boolean"}},"required":["id","schema_field","file_column","required"],"x-typelizer":true},"ImportRow":{"type":"object","properties":{"id":{"type":"string"},"row_number":{"type":"number"},"status":{"type":"string"},"validation_errors":{"type":"string","nullable":true},"item_type":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"import_id":{"type":"string","nullable":true},"item_id":{"type":"string","nullable":true},"data":{"type":"object"}},"required":["id","row_number","status","validation_errors","item_type","created_at","updated_at","import_id","item_id","data"],"x-typelizer":true},"Import":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"type":{"type":"string","nullable":true},"rows_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"status":{"type":"string"},"owner_type":{"type":"string","nullable":true},"owner_id":{"type":"string","nullable":true},"user_id":{"type":"string","nullable":true},"processing_errors":{"type":"string","nullable":true},"preferred_delimiter":{"type":"string"},"original_filename":{"type":"string","nullable":true},"original_byte_size":{"type":"number","nullable":true},"original_file_url":{"type":"string","nullable":true},"completed_rows_count":{"type":"number"},"failed_rows_count":{"type":"number"},"schema_fields":{"type":"array","items":{"$ref":"#/components/schemas/ImportSchemaField"}},"csv_headers":{"type":"array","items":{"type":"string"}},"sample_row":{"type":"object"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/ImportMapping"}}},"required":["id","number","type","rows_count","created_at","updated_at","status","owner_type","owner_id","user_id","processing_errors","preferred_delimiter","original_filename","original_byte_size","original_file_url","completed_rows_count","failed_rows_count","schema_fields","csv_headers","sample_row","mappings"],"x-typelizer":true},"Invitation":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"expires_at":{"type":"string"},"role_id":{"type":"string"},"role_name":{"type":"string"},"inviter_email":{"type":"string"},"acceptance_url":{"type":"string"},"invitee_exists":{"type":"boolean"},"store":{"type":"object"}},"required":["id","email","status","created_at","updated_at","expires_at","role_id","role_name","inviter_email","acceptance_url","invitee_exists","store"],"x-typelizer":true},"LineItem":{"type":"object","properties":{"id":{"type":"string"},"variant_id":{"type":"string"},"preorder":{"type":"boolean"},"preorder_ships_at":{"type":"string","nullable":true},"quantity":{"type":"number"},"currency":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"options_text":{"type":"string"},"price":{"type":"string"},"display_price":{"type":"string"},"total":{"type":"string"},"display_total":{"type":"string"},"adjustment_total":{"type":"string"},"display_adjustment_total":{"type":"string"},"additional_tax_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"discount_total":{"type":"string"},"display_discount_total":{"type":"string"},"pre_tax_amount":{"type":"string"},"display_pre_tax_amount":{"type":"string"},"discounted_amount":{"type":"string"},"display_discounted_amount":{"type":"string"},"display_compare_at_amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true},"thumbnail_url":{"type":"string","nullable":true},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}},"digital_links":{"type":"array","items":{"$ref":"#/components/schemas/DigitalLink"}},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"cost_price":{"type":"string","nullable":true},"tax_category_id":{"type":"string","nullable":true},"variant":{"$ref":"#/components/schemas/Variant"},"tax_category":{"$ref":"#/components/schemas/TaxCategory"},"adjustments":{"type":"array","items":{"$ref":"#/components/schemas/Adjustment"}}},"required":["id","variant_id","preorder","preorder_ships_at","quantity","currency","name","slug","options_text","price","display_price","total","display_total","adjustment_total","display_adjustment_total","additional_tax_total","display_additional_tax_total","included_tax_total","display_included_tax_total","discount_total","display_discount_total","pre_tax_amount","display_pre_tax_amount","discounted_amount","display_discounted_amount","display_compare_at_amount","compare_at_amount","thumbnail_url","option_values","digital_links","metadata","created_at","updated_at","cost_price","tax_category_id"],"x-typelizer":true},"Market":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"default_locale":{"type":"string"},"tax_inclusive":{"type":"boolean"},"default":{"type":"boolean"},"country_isos":{"type":"array","items":{"type":"string"}},"supported_locales":{"type":"array","items":{"type":"string"}},"countries":{"type":"array","items":{"$ref":"#/components/schemas/Country"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","currency","default_locale","tax_inclusive","default","country_isos","supported_locales","created_at","updated_at"],"x-typelizer":true},"Media":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string","nullable":true},"variant_ids":{"type":"array","items":{"type":"string"}},"position":{"type":"number"},"alt":{"type":"string","nullable":true},"media_type":{"type":"string"},"focal_point_x":{"type":"number","nullable":true},"focal_point_y":{"type":"number","nullable":true},"external_video_url":{"type":"string","nullable":true},"original_url":{"type":"string","nullable":true},"mini_url":{"type":"string","nullable":true},"small_url":{"type":"string","nullable":true},"medium_url":{"type":"string","nullable":true},"large_url":{"type":"string","nullable":true},"xlarge_url":{"type":"string","nullable":true},"og_image_url":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"viewable_id":{"type":"string"},"download_url":{"type":"string","nullable":true},"metadata":{"type":"object"},"viewable_type":{"type":"string"}},"required":["id","product_id","variant_ids","position","alt","media_type","focal_point_x","focal_point_y","external_video_url","original_url","mini_url","small_url","medium_url","large_url","xlarge_url","og_image_url","created_at","updated_at","viewable_id","download_url","metadata","viewable_type"],"x-typelizer":true},"NewsletterSubscriber":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"verified":{"type":"boolean"},"verified_at":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true}},"required":["id","email","created_at","updated_at","verified","verified_at","customer_id"],"x-typelizer":true},"OptionType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"number"},"kind":{"type":"string"},"translations":{"type":"object"},"metadata":{"type":"object"},"filterable":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}}},"required":["id","name","label","position","kind","metadata","filterable","created_at","updated_at"],"x-typelizer":true},"OptionValue":{"type":"object","properties":{"id":{"type":"string"},"option_type_id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"number"},"color_code":{"type":"string","nullable":true},"option_type_name":{"type":"string"},"option_type_label":{"type":"string"},"image_url":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"option_type":{"$ref":"#/components/schemas/OptionType"}},"required":["id","option_type_id","name","label","position","color_code","option_type_name","option_type_label","image_url","metadata","created_at","updated_at"],"x-typelizer":true},"Order":{"type":"object","properties":{"id":{"type":"string"},"market_id":{"type":"string","nullable":true},"channel_id":{"type":"string","nullable":true},"number":{"type":"string"},"email":{"type":"string"},"customer_note":{"type":"string","nullable":true},"currency":{"type":"string"},"locale":{"type":"string","nullable":true},"total_quantity":{"type":"number"},"fulfillment_status":{"type":"string","nullable":true},"payment_status":{"type":"string","nullable":true},"completed_at":{"type":"string","nullable":true},"item_total":{"type":"string"},"display_item_total":{"type":"string"},"adjustment_total":{"type":"string"},"display_adjustment_total":{"type":"string"},"discount_total":{"type":"string"},"display_discount_total":{"type":"string"},"tax_total":{"type":"string"},"display_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"additional_tax_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"total":{"type":"string"},"display_total":{"type":"string"},"gift_card_total":{"type":"string"},"display_gift_card_total":{"type":"string"},"amount_due":{"type":"string"},"display_amount_due":{"type":"string"},"delivery_total":{"type":"string"},"display_delivery_total":{"type":"string"},"store_credit_total":{"type":"string"},"display_store_credit_total":{"type":"string"},"covered_by_store_credit":{"type":"boolean"},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}},"fulfillments":{"type":"array","items":{"$ref":"#/components/schemas/Fulfillment"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"gift_card":{"allOf":[{"$ref":"#/components/schemas/GiftCard"}],"nullable":true},"market":{"allOf":[{"$ref":"#/components/schemas/Market"}],"nullable":true},"status":{"type":"string"},"last_ip_address":{"type":"string","nullable":true},"considered_risky":{"type":"boolean"},"confirmation_delivered":{"type":"boolean"},"store_owner_notification_delivered":{"type":"boolean"},"payment_total":{"type":"string"},"display_payment_total":{"type":"string"},"metadata":{"type":"object"},"canceled_at":{"type":"string","nullable":true},"approved_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"preferred_stock_location_id":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"internal_note":{"type":"string","nullable":true},"approver_id":{"type":"string","nullable":true},"canceler_id":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true},"channel":{"$ref":"#/components/schemas/Channel"},"preferred_stock_location":{"$ref":"#/components/schemas/StockLocation"},"payment_methods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"customer":{"$ref":"#/components/schemas/Customer"},"approver":{"$ref":"#/components/schemas/Customer"},"canceler":{"$ref":"#/components/schemas/Customer"},"created_by":{"$ref":"#/components/schemas/Customer"},"adjustments":{"type":"array","items":{"$ref":"#/components/schemas/Adjustment"}},"return_authorizations":{"type":"array","items":{"$ref":"#/components/schemas/ReturnAuthorization"}},"reimbursements":{"type":"array","items":{"$ref":"#/components/schemas/Reimbursement"}}},"required":["id","market_id","channel_id","number","email","customer_note","currency","locale","total_quantity","fulfillment_status","payment_status","completed_at","item_total","display_item_total","adjustment_total","display_adjustment_total","discount_total","display_discount_total","tax_total","display_tax_total","included_tax_total","display_included_tax_total","additional_tax_total","display_additional_tax_total","total","display_total","gift_card_total","display_gift_card_total","amount_due","display_amount_due","delivery_total","display_delivery_total","store_credit_total","display_store_credit_total","covered_by_store_credit","gift_card","market","status","last_ip_address","considered_risky","confirmation_delivered","store_owner_notification_delivered","payment_total","display_payment_total","metadata","canceled_at","approved_at","created_at","updated_at","preferred_stock_location_id","tags","internal_note","approver_id","canceler_id","created_by_id","customer_id"],"x-typelizer":true},"PaymentMethod":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string"},"session_required":{"type":"boolean"},"source_required":{"type":"boolean"},"metadata":{"type":"object"},"active":{"type":"boolean"},"auto_capture":{"type":"boolean","nullable":true},"storefront_visible":{"type":"boolean"},"position":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"object"}},"required":["id","name","description","type","session_required","source_required","metadata","active","auto_capture","storefront_visible","position","created_at","updated_at","preferences","preference_schema"],"x-typelizer":true},"Payment":{"type":"object","properties":{"id":{"type":"string"},"payment_method_id":{"type":"string"},"response_code":{"type":"string","nullable":true},"number":{"type":"string"},"amount":{"type":"string"},"display_amount":{"type":"string"},"status":{"type":"string"},"source_type":{"type":"string","nullable":true,"enum":["credit_card","store_credit","payment_source"]},"source_id":{"type":"string","nullable":true},"source":{"anyOf":[{"$ref":"#/components/schemas/CreditCard"},{"$ref":"#/components/schemas/StoreCredit"},{"$ref":"#/components/schemas/PaymentSource"}],"nullable":true},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"},"metadata":{"type":"object"},"avs_response":{"type":"string","nullable":true},"cvv_response_code":{"type":"string","nullable":true},"cvv_response_message":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"captured_amount":{"type":"string"},"order_id":{"type":"string","nullable":true},"order":{"$ref":"#/components/schemas/Order"},"refunds":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}}},"required":["id","payment_method_id","response_code","number","amount","display_amount","status","source_type","source_id","source","metadata","avs_response","cvv_response_code","cvv_response_message","created_at","updated_at","captured_amount","order_id"],"x-typelizer":true},"PaymentSource":{"type":"object","properties":{"id":{"type":"string"},"gateway_payment_profile_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","gateway_payment_profile_id","metadata","created_at","updated_at"],"x-typelizer":true},"PriceHistory":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"amount_in_cents":{"type":"number"},"currency":{"type":"string"},"display_amount":{"type":"string"},"recorded_at":{"type":"string"},"variant_id":{"type":"string"},"price_id":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true},"created_at":{"type":"string"}},"required":["id","amount","amount_in_cents","currency","display_amount","recorded_at","variant_id","price_id","compare_at_amount","created_at"],"x-typelizer":true},"PriceList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string"},"position":{"type":"number"},"match_policy":{"type":"string"},"starts_at":{"type":"string","nullable":true},"ends_at":{"type":"string","nullable":true},"deleted_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"currently_active":{"type":"boolean"},"products_count":{"type":"number"},"prices_count":{"type":"number"},"product_ids":{"type":"array","items":{"type":"string"}},"price_rules":{"type":"array","items":{"$ref":"#/components/schemas/PriceRule"}}},"required":["id","name","description","status","position","match_policy","starts_at","ends_at","deleted_at","created_at","updated_at","currently_active","products_count","prices_count","product_ids"],"x-typelizer":true},"PriceRule":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"price_list_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceField"}},"label":{"type":"string"},"description":{"type":"string","nullable":true},"markets":{"type":"array","items":{"$ref":"#/components/schemas/Market"}},"customer_groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":["id","created_at","updated_at","type","price_list_id","preferences","preference_schema","label","description"],"x-typelizer":true},"Price":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string","nullable":true},"amount_in_cents":{"type":"number","nullable":true},"compare_at_amount":{"type":"string","nullable":true},"compare_at_amount_in_cents":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true},"display_amount":{"type":"string","nullable":true},"display_compare_at_amount":{"type":"string","nullable":true},"price_list_id":{"type":"string","nullable":true},"variant_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"variant":{"$ref":"#/components/schemas/Variant"}},"required":["id","amount","amount_in_cents","compare_at_amount","compare_at_amount_in_cents","currency","display_amount","display_compare_at_amount","price_list_id","variant_id","created_at","updated_at"],"x-typelizer":true},"ProductPublication":{"type":"object","properties":{"id":{"type":"string"},"published_at":{"type":"string","nullable":true},"unpublished_at":{"type":"string","nullable":true},"product_id":{"type":"string"},"channel_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","published_at","unpublished_at","product_id","channel_id","created_at","updated_at"],"x-typelizer":true},"Product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"meta_title":{"type":"string","nullable":true},"meta_description":{"type":"string","nullable":true},"meta_keywords":{"type":"string","nullable":true},"variant_count":{"type":"number"},"available_on":{"type":"string","nullable":true},"preorder_ships_at":{"type":"string","nullable":true},"purchasable":{"type":"boolean"},"preorder":{"type":"boolean"},"in_stock":{"type":"boolean"},"backorderable":{"type":"boolean"},"available":{"type":"boolean"},"description":{"type":"string","nullable":true},"description_html":{"type":"string","nullable":true},"default_variant_id":{"type":"string"},"thumbnail_url":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"nullable":true},"original_price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"nullable":true},"primary_media":{"$ref":"#/components/schemas/Media"},"media":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/Variant"}},"default_variant":{"$ref":"#/components/schemas/Variant"},"option_types":{"type":"array","items":{"$ref":"#/components/schemas/OptionType"}},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"prior_price":{"allOf":[{"$ref":"#/components/schemas/PriceHistory"}],"nullable":true},"translations":{"type":"object"},"status":{"type":"string"},"metadata":{"type":"object"},"deleted_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"tax_category_id":{"type":"string","nullable":true},"product_publications":{"type":"array","items":{"$ref":"#/components/schemas/ProductPublication"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}}},"required":["id","name","slug","meta_title","meta_description","meta_keywords","variant_count","available_on","preorder_ships_at","purchasable","preorder","in_stock","backorderable","available","description","description_html","default_variant_id","thumbnail_url","tags","price","original_price","status","metadata","deleted_at","created_at","updated_at","tax_category_id"],"x-typelizer":true},"PromotionAction":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"promotion_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceField"}},"label":{"type":"string"},"calculator":{"allOf":[{"$ref":"#/components/schemas/PromotionActionCalculator"}],"nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/PromotionActionLineItem"},"nullable":true}},"required":["id","created_at","updated_at","type","promotion_id","preferences","preference_schema","label","calculator","line_items"],"x-typelizer":true},"PromotionRule":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"promotion_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceField"}},"label":{"type":"string"},"product_ids":{"type":"array","items":{"type":"string"},"nullable":true},"category_ids":{"type":"array","items":{"type":"string"},"nullable":true},"customer_ids":{"type":"array","items":{"type":"string"},"nullable":true},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"customer_groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"countries":{"type":"array","items":{"$ref":"#/components/schemas/Country"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"markets":{"type":"array","items":{"$ref":"#/components/schemas/Market"}}},"required":["id","created_at","updated_at","type","promotion_id","preferences","preference_schema","label","product_ids","category_ids","customer_ids"],"x-typelizer":true},"Promotion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"starts_at":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true},"usage_limit":{"type":"number","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"path":{"type":"string","nullable":true},"kind":{"type":"string","enum":["coupon_code","automatic"]},"multi_codes":{"type":"boolean"},"number_of_codes":{"type":"number","nullable":true},"code_prefix":{"type":"string","nullable":true},"promotion_category_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"action_ids":{"type":"array","items":{"type":"string"}},"rule_ids":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","code","starts_at","expires_at","usage_limit","match_policy","path","kind","multi_codes","number_of_codes","code_prefix","promotion_category_id","metadata","created_at","updated_at","action_ids","rule_ids"],"x-typelizer":true},"Refund":{"type":"object","properties":{"id":{"type":"string"},"transaction_id":{"type":"string","nullable":true},"amount":{"type":"string","nullable":true},"payment_id":{"type":"string","nullable":true},"refund_reason_id":{"type":"string","nullable":true},"reimbursement_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment":{"$ref":"#/components/schemas/Payment"},"reimbursement":{"$ref":"#/components/schemas/Reimbursement"}},"required":["id","transaction_id","amount","payment_id","refund_reason_id","reimbursement_id","metadata","created_at","updated_at"],"x-typelizer":true},"Reimbursement":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"reimbursement_status":{"type":"string","nullable":true},"total":{"type":"string","nullable":true},"order_id":{"type":"string","nullable":true},"customer_return_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"order":{"$ref":"#/components/schemas/Order"}},"required":["id","number","reimbursement_status","total","order_id","customer_return_id","created_at","updated_at"],"x-typelizer":true},"ReturnAuthorization":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"status":{"type":"string"},"order_id":{"type":"string","nullable":true},"stock_location_id":{"type":"string","nullable":true},"return_authorization_reason_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"order":{"$ref":"#/components/schemas/Order"},"stock_location":{"$ref":"#/components/schemas/StockLocation"}},"required":["id","number","status","order_id","stock_location_id","return_authorization_reason_id","created_at","updated_at"],"x-typelizer":true},"Role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","created_at","updated_at"],"x-typelizer":true},"SetupTask":{"type":"object","properties":{"name":{"type":"string"},"done":{"type":"boolean"}},"required":["name","done"],"x-typelizer":true},"State":{"type":"object","properties":{"abbr":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["abbr","name","created_at","updated_at"],"x-typelizer":true},"StockItem":{"type":"object","properties":{"id":{"type":"string"},"count_on_hand":{"type":"number"},"backorderable":{"type":"boolean"},"stock_location_id":{"type":"string","nullable":true},"variant_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"allocated_count":{"type":"number"},"available_count":{"type":"number"},"stock_location":{"$ref":"#/components/schemas/StockLocation"},"variant":{"$ref":"#/components/schemas/Variant"}},"required":["id","count_on_hand","backorderable","stock_location_id","variant_id","metadata","created_at","updated_at","allocated_count","available_count"],"x-typelizer":true},"StockLocation":{"type":"object","properties":{"id":{"type":"string"},"state_abbr":{"type":"string","nullable":true},"name":{"type":"string"},"address1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"country_iso":{"type":"string","nullable":true},"country_name":{"type":"string","nullable":true},"state_text":{"type":"string","nullable":true},"admin_name":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"state_name":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"active":{"type":"boolean"},"default":{"type":"boolean"},"backorderable_default":{"type":"boolean"},"propagate_all_variants":{"type":"boolean"},"kind":{"type":"string"},"pickup_enabled":{"type":"boolean"},"pickup_stock_policy":{"type":"string"},"pickup_ready_in_minutes":{"type":"number","nullable":true},"pickup_instructions":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","state_abbr","name","address1","city","zipcode","country_iso","country_name","state_text","admin_name","address2","state_name","phone","company","active","default","backorderable_default","propagate_all_variants","kind","pickup_enabled","pickup_stock_policy","pickup_ready_in_minutes","pickup_instructions","created_at","updated_at"],"x-typelizer":true},"StockReservation":{"type":"object","properties":{"id":{"type":"string"},"stock_item_id":{"type":"string"},"line_item_id":{"type":"string"},"order_id":{"type":"string"},"variant_id":{"type":"string","nullable":true},"stock_location_id":{"type":"string","nullable":true},"quantity":{"type":"number"},"expires_at":{"type":"string"},"active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","stock_item_id","line_item_id","order_id","variant_id","stock_location_id","quantity","expires_at","active","created_at","updated_at"],"x-typelizer":true},"StockTransfer":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"reference":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"source_location_id":{"type":"string","nullable":true},"destination_location_id":{"type":"string","nullable":true},"source_location":{"$ref":"#/components/schemas/StockLocation"},"destination_location":{"$ref":"#/components/schemas/StockLocation"}},"required":["id","number","reference","metadata","created_at","updated_at","source_location_id","destination_location_id"],"x-typelizer":true},"StoreCreditCategory":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"non_expiring":{"type":"boolean"}},"required":["id","name","created_at","updated_at","non_expiring"],"x-typelizer":true},"StoreCredit":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"amount_used":{"type":"string"},"amount_remaining":{"type":"string"},"display_amount":{"type":"string"},"display_amount_used":{"type":"string"},"display_amount_remaining":{"type":"string"},"currency":{"type":"string"},"memo":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customer_id":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true},"category_id":{"type":"string","nullable":true},"category_name":{"type":"string","nullable":true}},"required":["id","amount","amount_used","amount_remaining","display_amount","display_amount_used","display_amount_remaining","currency","memo","metadata","created_at","updated_at","customer_id","created_by_id","category_id","category_name"],"x-typelizer":true},"Store":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object"},"name":{"type":"string"},"code":{"type":"string"},"preferred_storefront_url":{"type":"string","nullable":true},"default_currency":{"type":"string"},"default_locale":{"type":"string"},"mail_from_address":{"type":"string","nullable":true},"customer_support_email":{"type":"string","nullable":true},"new_order_notifications_email":{"type":"string","nullable":true},"preferred_send_consumer_transactional_emails":{"type":"boolean"},"preferred_admin_locale":{"type":"string","nullable":true},"preferred_timezone":{"type":"string"},"preferred_weight_unit":{"type":"string"},"preferred_unit_system":{"type":"string"},"preferred_storefront_access":{"type":"string"},"preferred_guest_checkout":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"url":{"type":"string"},"api_url":{"type":"string"},"setup_tasks":{"type":"array","items":{"$ref":"#/components/schemas/SetupTask"}},"supported_currencies":{"type":"array","items":{"type":"string"}},"supported_locales":{"type":"array","items":{"type":"string"}},"available_locales":{"type":"array","items":{"type":"string"}},"logo_url":{"type":"string","nullable":true},"mailer_logo_url":{"type":"string","nullable":true}},"required":["id","metadata","name","code","preferred_storefront_url","default_currency","default_locale","mail_from_address","customer_support_email","new_order_notifications_email","preferred_send_consumer_transactional_emails","preferred_admin_locale","preferred_timezone","preferred_weight_unit","preferred_unit_system","preferred_storefront_access","preferred_guest_checkout","created_at","updated_at","url","api_url","setup_tasks","supported_currencies","supported_locales","available_locales","logo_url","mailer_logo_url"],"x-typelizer":true},"TaxCategory":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tax_code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"is_default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","tax_code","description","is_default","created_at","updated_at"],"x-typelizer":true},"Variant":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"sku":{"type":"string","nullable":true},"options_text":{"type":"string"},"track_inventory":{"type":"boolean"},"media_count":{"type":"number"},"preorder_ships_at":{"type":"string","nullable":true},"thumbnail_url":{"type":"string","nullable":true},"purchasable":{"type":"boolean"},"in_stock":{"type":"boolean"},"backorderable":{"type":"boolean"},"preorder":{"type":"boolean"},"weight":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"width":{"type":"number","nullable":true},"depth":{"type":"number","nullable":true},"price":{"$ref":"#/components/schemas/Price"},"original_price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"nullable":true},"primary_media":{"$ref":"#/components/schemas/Media"},"media":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"prior_price":{"allOf":[{"$ref":"#/components/schemas/PriceHistory"}],"nullable":true},"metadata":{"type":"object"},"position":{"type":"number"},"cost_price":{"type":"string","nullable":true},"cost_currency":{"type":"string","nullable":true},"barcode":{"type":"string","nullable":true},"weight_unit":{"type":"string","nullable":true},"dimensions_unit":{"type":"string","nullable":true},"backorder_limit":{"type":"number","nullable":true},"deleted_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"preorderable":{"type":"boolean"},"tax_category_id":{"type":"string","nullable":true},"available_stock":{"type":"number","nullable":true},"reserved_quantity":{"type":"number"},"total_on_hand":{"type":"number","nullable":true},"product_name":{"type":"string"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/Price"}},"stock_items":{"type":"array","items":{"$ref":"#/components/schemas/StockItem"}}},"required":["id","product_id","sku","options_text","track_inventory","media_count","preorder_ships_at","thumbnail_url","purchasable","in_stock","backorderable","preorder","weight","height","width","depth","price","original_price","option_values","metadata","position","cost_price","cost_currency","barcode","weight_unit","dimensions_unit","backorder_limit","deleted_at","created_at","updated_at","preorderable","tax_category_id","available_stock","reserved_quantity","total_on_hand","product_name"],"x-typelizer":true},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"event_name":{"type":"string"},"event_id":{"type":"string","nullable":true},"response_code":{"type":"number","nullable":true},"execution_time":{"type":"number","nullable":true},"error_type":{"type":"string","nullable":true},"request_errors":{"type":"string","nullable":true},"response_body":{"type":"string","nullable":true},"success":{"type":"boolean","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"delivered_at":{"type":"string","nullable":true},"payload":{"type":"object"},"webhook_endpoint_id":{"type":"string"},"webhook_endpoint_url":{"type":"string"}},"required":["id","event_name","event_id","response_code","execution_time","error_type","request_errors","response_body","success","created_at","updated_at","delivered_at","payload","webhook_endpoint_id","webhook_endpoint_url"],"x-typelizer":true},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"url":{"type":"string"},"active":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string"}},"disabled_reason":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"disabled_at":{"type":"string","nullable":true},"secret_key":{"type":"string","nullable":true},"last_delivery_at":{"type":"string","nullable":true},"recent_delivery_count":{"type":"number"},"recent_failure_count":{"type":"number"},"total_delivery_count":{"type":"number"},"successful_delivery_count":{"type":"number"},"failed_delivery_count":{"type":"number"}},"required":["id","name","url","active","subscriptions","disabled_reason","created_at","updated_at","disabled_at","secret_key","last_delivery_at","recent_delivery_count","recent_failure_count","total_delivery_count","successful_delivery_count","failed_delivery_count"],"x-typelizer":true}}}}-{"info":{"title":"Admin API","contact":{"name":"Spree Commerce","url":"https://spreecommerce.org","email":"[email protected]"},"description":"Spree Admin API v3 - Administrative API for managing products, orders, and store settings.\n\n## Authentication\n\nThe Admin API requires a secret API key passed in the `x-spree-api-key` header.\nSecret API keys can be generated in the Spree admin dashboard.\n\n## Response Format\n\nAll responses are JSON. List endpoints return paginated responses with `data` and `meta` keys.\nSingle resource endpoints return a flat JSON object.\n\n## Resource IDs\n\nEvery resource is identified by an opaque string ID (e.g. `prod_86Rf07xd4z`,\n`variant_k5nR8xLq`, `or_UkLWZg9DAJ`). Use these IDs everywhere — URL paths,\nrequest bodies, and Ransack filters all accept them directly.\n\n## Error Handling\n\nErrors return a consistent format:\n```json\n{\n \"error\": {\n \"code\": \"validation_error\",\n \"message\": \"Validation failed\",\n \"details\": { \"name\": [\"can't be blank\"] }\n }\n}\n```\n","version":"v3"},"paths":{"/api/v3/admin/auth/login":{"post":{"summary":"Login","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Authenticates an admin user and returns a short-lived JWT access token.\nThe rotatable refresh token is set in an HttpOnly cookie — it is not\nincluded in the response body.\n\nThe `provider` field selects the authentication method. When omitted it\ndefaults to `email`, the built-in email/password login.\n\nTo authenticate against a third-party identity provider (Okta, Azure AD,\nGoogle Workspace SSO, a custom JWT issuer, SAML, etc.), send\n`{ \"provider\": \"<your_key>\", ... }` with the fields that provider\nrequires. The endpoint returns the same JWT regardless of which provider\nauthenticated the request. See\n[Custom API Authentication](https://spreecommerce.org/docs/developer/how-to/custom-api-authentication)\nfor the list of configured providers and their required fields.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"401":{"description":"invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"title":"EmailPasswordLogin","description":"Built-in email/password authentication (default when `provider` is omitted).","type":"object","properties":{"provider":{"type":"string","enum":["email"],"default":"email"},"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]},{"title":"ProviderLogin","description":"Provider-dispatched login. The `provider` key selects a configured\nauthentication provider; the remaining fields are forwarded to it.\nRequired fields depend on the provider — see\n[Custom API Authentication](https://spreecommerce.org/docs/developer/how-to/custom-api-authentication).\n","type":"object","properties":{"provider":{"type":"string","description":"Registered provider key (anything other than `email`).","not":{"enum":["email"]}}},"required":["provider"],"additionalProperties":true}]}}}}}},"/api/v3/admin/auth/refresh":{"post":{"summary":"Refresh token","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Exchanges the HttpOnly refresh-token cookie for a new access JWT and a\nrotated refresh token cookie. No request body or Authorization header\nis required — the cookie alone authenticates the call.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"refresh successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"401":{"description":"missing or invalid refresh-token cookie","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/auth/logout":{"post":{"summary":"Logout","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Revokes the refresh-token cookie, effectively logging the admin out.","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"logout successful"}}}},"/api/v3/admin/me":{"get":{"summary":"Get current admin user and permissions","tags":["Authentication"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the current admin user profile and a serialized list of permissions (CanCanCan rules). The SPA uses these to drive UI permission checks.","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"current admin user and permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update the current admin profile","tags":["Authentication"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Self-service update of the signed-in admin's own profile, such as their admin UI display language (`selected_locale`).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"profile updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"selected_locale":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}}},"/api/v3/admin/auth/password_resets":{"post":{"summary":"Request password reset","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Requests a password reset email for an admin user. Always returns `202`\nwhether or not the email matches an account, to prevent enumeration.\n\n`redirect_url` is where the emailed link should point (the reset token\nis appended as a `token` query param). It must match one of the store's\nallowed origins — otherwise it is silently ignored and the server-side\ndefault is used. The email is delivered by Spree itself via the\n`admin_user.password_reset_requested` event; this event is never\nforwarded to webhook endpoints.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"reset requested","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"redirect_url":{"type":"string","description":"Must match an allowed origin of the store; ignored otherwise."}},"required":["email"]}}}}}},"/api/v3/admin/auth/password_resets/{id}":{"patch":{"summary":"Reset password","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Consumes a password reset token (the `token` query param from the\nemailed link), sets the new password, and signs the admin in: the\nresponse carries a JWT access token and the rotatable refresh token is\nset in an HttpOnly cookie. The token is single-use — it invalidates as\nsoon as the password changes.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The reset token from the emailed link","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"password reset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"},"password_confirmation":{"type":"string"}},"required":["password","password_confirmation"]}}}}}},"/api/v3/admin/allowed_origins":{"get":{"summary":"List allowed origins","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the CORS allowlist for the current store. Each entry is a\nbare `scheme://host[:port]` permitted to call the admin API from a\nbrowser. Backs the `Rack::Cors` allowlist and the CSRF boundary of\nthe admin cookie session (see\n`docs/plans/5.5-admin-auth-cookie-refresh.md`).\n\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[origin_cont]","in":"query","required":false,"description":"Filter by origin (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"allowed origins found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AllowedOrigin"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds an origin to the admin CORS allowlist. The value must be a bare\n`scheme://host[:port]` (no path, query, or fragment) and use `http` or\n`https`.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"allowed origin created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedOrigin"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"origin":{"type":"string"}},"required":["origin"]}}}}}},"/api/v3/admin/allowed_origins/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Allowed origin ID","schema":{"type":"string"}}],"get":{"summary":"Get an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single allowed origin by prefixed ID.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"allowed origin found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedOrigin"}}}},"404":{"description":"allowed origin not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an existing allowed origin.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"allowed origin updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedOrigin"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"origin":{"type":"string"}}}}}}},"delete":{"summary":"Delete an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes an origin from the admin CORS allowlist. After deletion the\nadmin SPA running at that origin will no longer be able to call the\nadmin API from a browser.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"204":{"description":"allowed origin deleted"}}}},"/api/v3/admin/api_keys":{"get":{"summary":"List API keys","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns publishable and secret API keys for the current store. Secret keys are listed by `token_prefix` only — the plaintext token is delivered exactly once on create.\n\n**Required scope:** `read_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API keys found","content":{"application/json":{}}}}},"post":{"summary":"Create an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a publishable or secret API key. The plaintext token is included in the response **once** for secret keys; publishable keys expose their token on every read since they are intended for client-side use.\n\n**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"secret key created — plaintext token returned once","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","key_type"],"properties":{"name":{"type":"string"},"key_type":{"type":"string","enum":["publishable","secret"]},"scopes":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/api_keys/{id}":{"get":{"summary":"Show an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key found","content":{"application/json":{}}}}},"patch":{"summary":"Update an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Renames a key. `key_type` and `scopes` are fixed at creation — to change a key's authority, create a new key and revoke the old one.\n\n**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key renamed","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}}},"delete":{"summary":"Delete an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"API key deleted"}}}},"/api/v3/admin/api_keys/current":{"get":{"summary":"Describe the current API key","tags":["API Keys"],"security":[{"api_key":[]}],"description":"Returns the secret key that authenticated this request, including its live scopes. Useful to confirm a key's real, current authority. Only secret-key principals have a single key to describe.\n\n**Required scope:** none — any key can describe itself (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"current API key","content":{"application/json":{}}}}}},"/api/v3/admin/api_keys/{id}/revoke":{"patch":{"summary":"Revoke an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Marks the key revoked. Future requests using its token will fail; the row is preserved for audit.\n\n**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key revoked","content":{"application/json":{}}}}}},"/api/v3/admin/categories":{"get":{"summary":"List categories","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of the store's categories (manual hierarchical taxons; rule-based collections are excluded).\n\n**Required scope:** `read_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., children, parent, ancestors).","schema":{"type":"string"}}],"responses":{"200":{"description":"categories found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a category. Nests under the parent when parent_id is given, otherwise creates a top-level category.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"category created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"parent_id":{"type":"string","description":"Prefixed ID of the parent category"},"description":{"type":"string"},"permalink":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"hide_from_nav":{"type":"boolean"}},"required":["name"]}}}}}},"/api/v3/admin/categories/{id}":{"get":{"summary":"Get a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single category by ID.\n\n**Required scope:** `read_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., children, parent, ancestors).","schema":{"type":"string"}}],"responses":{"200":{"description":"category found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"404":{"description":"category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a category.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"category updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"parent_id":{"type":"string","description":"Prefixed ID of the parent category"},"description":{"type":"string"},"permalink":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"hide_from_nav":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a category and its descendants.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"204":{"description":"category deleted"}}}},"/api/v3/admin/categories/{id}/reposition":{"patch":{"summary":"Reposition a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Moves a category to a new parent and/or index within the tree.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"category repositioned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"new_parent_id":{"type":"string","description":"Prefixed ID of the new parent (omit for top level)"},"new_position":{"type":"integer","description":"0-based index among the new parent's children"}},"required":["new_position"]}}}}}},"/api/v3/admin/categories/{category_id}/products":{"get":{"summary":"List category products","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Products classified under the category, ordered by their classification position.\n\n**Required scope:** `read_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"products found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Add a product to a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Classifies a product under the category (appended to the end).\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"201":{"description":"product added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"}},"required":["product_id"]}}}}}},"/api/v3/admin/categories/{category_id}/products/{id}/reposition":{"patch":{"summary":"Reposition a category product","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Moves a product to a new index among the category's products.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product repositioned"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"new_position":{"type":"integer","description":"0-based index among the category's products"}},"required":["new_position"]}}}}}},"/api/v3/admin/channels":{"get":{"summary":"List channels","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the channels configured for the current store.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"channels found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new channel on the current store. `code` is normalized to a\nURL-safe slug (`Point of Sale` → `point-of-sale`); when omitted it's\nderived from `name`.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"channel created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"code":{"type":"string","description":"Slug — auto-derived from `name` when blank."},"active":{"type":"boolean","default":true},"default":{"type":"boolean","default":false},"preferred_order_routing_strategy":{"type":"string","nullable":true,"description":"Routing strategy class name. `null` inherits the store setting."},"preferred_storefront_access":{"type":"string","nullable":true,"enum":["public","prices_hidden","login_required"],"description":"Anonymous-visitor access posture. `null` inherits the store setting."},"preferred_guest_checkout":{"type":"boolean","nullable":true,"description":"Whether guests can check out without an account. `null` inherits the store setting."}}}}}}}},"/api/v3/admin/channels/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"channel found","content":{"application/json":{}}}}},"patch":{"summary":"Update a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"channel updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"default":{"type":"boolean"},"preferred_order_routing_strategy":{"type":"string","nullable":true,"description":"Routing strategy class name. `null` inherits the store setting."},"preferred_storefront_access":{"type":"string","nullable":true,"enum":["public","prices_hidden","login_required"],"description":"Anonymous-visitor access posture. `null` inherits the store setting."},"preferred_guest_checkout":{"type":"boolean","nullable":true,"description":"Whether guests can check out without an account. `null` inherits the store setting."}}}}}}},"delete":{"summary":"Delete a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"channel deleted"}}}},"/api/v3/admin/channels/{id}/add_products":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Publish products on a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Publishes the listed products on this channel. Idempotent — re-publishing\nan already-published product updates its publication window. Products from\nsibling stores are silently dropped.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products published","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["product_ids"],"properties":{"product_ids":{"type":"array","items":{"type":"string"}},"published_at":{"type":"string","format":"date-time","nullable":true,"description":"When the publications go live. `null` means immediately."},"unpublished_at":{"type":"string","format":"date-time","nullable":true,"description":"When the publications come down. `null` means never."}}}}}}}},"/api/v3/admin/channels/{id}/remove_products":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Unpublish products from a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Unpublishes the listed products from this channel.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products unpublished","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["product_ids"],"properties":{"product_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/channels/{channel_id}/order_routing_rules":{"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List order routing rules for a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the channel's routing rules in priority order. The rules engine walks them top-down; see the Order Routing guide.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rules found","content":{"application/json":{}}}}},"post":{"summary":"Create an order routing rule on a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a rule to the channel's routing list. The `type` is the wire shorthand from `GET /order_routing_rules/types` (e.g. `preferred_location`). Omitting `position` appends the rule at the end of the list. Each rule kind can appear at most once per channel — a duplicate `type` is rejected with a validation error.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"rule created","content":{"application/json":{}}},"422":{"description":"unknown rule type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"active":{"type":"boolean"},"position":{"type":"integer"},"preferences":{"type":"object","additionalProperties":true}},"required":["type"]}}}}}},"/api/v3/admin/channels/{channel_id}/order_routing_rules/{id}":{"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update an order routing rule","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a rule's `active` flag, `position` (the list reorders around it), or `preferences`. The rule kind cannot be changed — delete and re-create instead.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rule updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"position":{"type":"integer"},"preferences":{"type":"object","additionalProperties":true}}}}}}},"delete":{"summary":"Delete an order routing rule","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"rule deleted"}}}},"/api/v3/admin/order_routing_rules/types":{"get":{"summary":"List available order routing rule types","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Enumerates the registered rule kinds with their labels, descriptions and preference schemas — drives the \"Add rule\" picker in the admin dashboard. Plugins extend the list by registering `Spree::OrderRoutingRule` subclasses via `Spree.order_routing.rules`.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"types found","content":{"application/json":{}}}}}},"/api/v3/admin/custom_field_definitions":{"get":{"summary":"List custom field definitions","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all defined custom fields. Filter by `?q[resource_type_eq]=Spree::Product` to narrow to one parent type.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,label,field_type). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"definitions returned","content":{"application/json":{}}}}},"post":{"summary":"Create a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"definition created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["key","field_type","resource_type"],"properties":{"namespace":{"type":"string","description":"Defaults to `custom`"},"key":{"type":"string"},"label":{"type":"string","description":"Human-readable name; defaults to titleized `key`"},"field_type":{"type":"string","description":"Custom field type identifier (one of the registered field-type class names)."},"resource_type":{"type":"string","description":"Owner class, e.g. `Spree::Product`"},"storefront_visible":{"type":"boolean","description":"When false, definition is admin-only (was `display_on: back_end`)"}}}}}}}},"/api/v3/admin/custom_field_definitions/{id}":{"get":{"summary":"Show a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,label,field_type). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"definition found","content":{"application/json":{}}}}},"patch":{"summary":"Update a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"definition updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"storefront_visible":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes the definition and cascades to all custom field values referencing it.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"definition deleted"}}}},"/api/v3/admin/customer_groups":{"get":{"summary":"List customer groups","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the customer groups configured for the current store. Groups\nsegment customers for targeted promotions (see the `customer_group`\npromotion rule) and reporting. The list endpoint never embeds the\nmember list — fetch a single group with `?expand=customers` if you\nneed them inline, or query `/admin/customers?customer_group_id_in=…`\nfor paginated membership.\n\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customer groups found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a customer group in the current store. `customer_ids` is\noptional; when present, customers are attached at create time.\nPass prefixed IDs (e.g. `cus_…`) — the server decodes them\nautomatically.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"customer group created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"customer_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customer_groups/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Customer group prefixed ID","schema":{"type":"string"}}],"get":{"summary":"Get a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single customer group. Pass `?expand=customers` to embed\nthe full member list inline (recommended only for single-record\nreads — embed cost scales with membership size).\n\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `customers`.","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customer group with embedded customers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"404":{"description":"customer group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates name, description, or membership. `customer_ids` is a\nfull-set replacement — the server reconciles the membership to\nmatch the array, adding new IDs and removing ones not present.\nSend `customer_ids: []` to clear all members.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customer group updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"customer_ids":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the group. Member users are not deleted; their `customer_group_users` rows are dropped.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"customer group deleted"}}}},"/api/v3/admin/customers/{customer_id}/addresses":{"get":{"summary":"List customer addresses","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the customer's saved addresses.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., country, state). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., first_name,last_name,address1,city). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"addresses found","content":{"application/json":{}}}}},"post":{"summary":"Create a customer address","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new address to the customer's address book. Pass `is_default_billing: true` or `is_default_shipping: true` to set as the default — the previous default loses its flag in the same transaction.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"address created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_iso":{"type":"string","description":"ISO-2 country code (e.g. US)"},"state_abbr":{"type":"string","description":"State/province abbreviation (e.g. NY)"},"phone":{"type":"string"},"company":{"type":"string"},"label":{"type":"string"},"is_default_billing":{"type":"boolean"},"is_default_shipping":{"type":"boolean"}}}}}}}},"/api/v3/admin/customers/{customer_id}/addresses/{id}":{"patch":{"summary":"Update a customer address","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a customer address.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"address updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"city":{"type":"string"},"is_default_billing":{"type":"boolean"},"is_default_shipping":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a customer address","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes the address. If it was a default, the customer loses that default (no auto-promotion).\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"address deleted"}}}},"/api/v3/admin/customers/{customer_id}/credit_cards":{"get":{"summary":"List customer credit cards","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the customer's saved credit cards. Useful for off-session admin charges via `POST /admin/orders/:id/payments { source_id }`.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., brand,last4,month,year). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"credit cards found","content":{"application/json":{}}}}}},"/api/v3/admin/customers/{customer_id}/credit_cards/{id}":{"get":{"summary":"Show a customer credit card","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a saved credit card by ID.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., brand,last4,month,year). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"credit card found","content":{"application/json":{}}}}},"delete":{"summary":"Delete a customer credit card","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a saved credit card.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"credit card deleted"}}}},"/api/v3/admin/customers/{customer_id}/store_credits":{"get":{"summary":"List customer store credits","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns store credits issued to the customer.\n\n**Required scope:** `read_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., category, store, created_by). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,amount_used,memo,currency). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"store credits found","content":{"application/json":{}}}}},"post":{"summary":"Issue a store credit to a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"`created_by` is set automatically from the authenticated admin.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"store credit created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount","currency","category_id"],"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"category_id":{"type":"string","description":"StoreCreditCategory ID"},"memo":{"type":"string"}}}}}}}},"/api/v3/admin/customers/{customer_id}/store_credits/{id}":{"patch":{"summary":"Update a store credit","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Update memo / category / amount. The amount can only be changed if `amount_used == 0`.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"store credit updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string"},"category_id":{"type":"string"},"memo":{"type":"string"}}}}}}},"delete":{"summary":"Delete a store credit","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes an unused store credit (amount_used == 0). Returns 422 otherwise.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"store credit deleted"}}}},"/api/v3/admin/customers":{"get":{"summary":"List customers","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of customers. Supports Ransack search/filters.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[search]","in":"query","required":false,"description":"Email + name full-text-ish search","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., addresses, store_credits). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., email,first_name,last_name). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customers found","content":{"application/json":{}}}}},"post":{"summary":"Create a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a customer. No welcome email is sent automatically.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"customer created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"accepts_email_marketing":{"type":"boolean"},"internal_note":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}}}}}}},"/api/v3/admin/customers/{id}":{"get":{"summary":"Show a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns full customer details including computed order stats (orders_count, total_spent, last_order_completed_at).\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Customer ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations: addresses, orders, store_credits, default_billing_address, default_shipping_address","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., email,first_name,last_name). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customer found","content":{"application/json":{}}}}},"patch":{"summary":"Update a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates customer attributes. `tags` replaces the full set.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customer updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"accepts_email_marketing":{"type":"boolean"},"internal_note":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}}}}}},"delete":{"summary":"Delete a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a customer. Returns 422 if the customer has any orders.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"customer deleted"}}}},"/api/v3/admin/customers/bulk_add_to_groups":{"post":{"summary":"Bulk-add customers to groups","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Attaches each customer in `ids` to every group in `customer_group_ids`.\nIdempotent — customers already in a group are skipped server-side.\nGroups from sibling stores are silently ignored. Returns counts of\ncustomers and groups that were processed (post store-scoping).\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customers added to groups","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"customer_group_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","customer_group_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customers/bulk_remove_from_groups":{"post":{"summary":"Bulk-remove customers from groups","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Detaches each customer in `ids` from every group in `customer_group_ids`.\nNo-op for non-members. Groups from sibling stores are silently ignored.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customers removed from groups","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"customer_group_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","customer_group_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customers/bulk_add_tags":{"post":{"summary":"Bulk-add tags to customers","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds each tag name in `tags` to every customer in `ids`. Tags are\nupserted by name; re-adding an existing tag is a no-op.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags added","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"tag_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customers/bulk_remove_tags":{"post":{"summary":"Bulk-remove tags from customers","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes each tag name in `tags` from every customer in `ids`. No-op\nfor customers that don't carry the tag.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags removed","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"tag_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/exports":{"get":{"summary":"List exports","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns CSV exports queued or completed for the current store. Polled by the admin SPA to detect when an export finishes (`done: true`).\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"exports found","content":{"application/json":{}}}}},"post":{"summary":"Create an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Queues a CSV export. The `type` selects the dataset; `search_params` is an\noptional Ransack query (same shape used by the `q[...]` params on list endpoints)\nthat filters which records are exported. Pass `record_selection: \"all\"` to\nclear the filter server-side and export everything in scope.\n\nGeneration is asynchronous. Poll `GET /admin/exports/{id}` until `done` is `true`,\nthen redirect the browser to `download_url` to fetch the file.\n\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"export queued","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["products","orders","customers","product_translations","gift_cards","coupon_codes","newsletter_subscribers"]},"record_selection":{"type":"string","enum":["filtered","all"],"description":"Set to \"all\" to ignore search_params and export everything in scope."},"search_params":{"type":"object","description":"Ransack query hash. Same predicates accepted by the list endpoint.","additionalProperties":true},"results_url":{"type":"string","description":"Absolute URL of your admin exports view; the export-done email uses it as the download button target. Only honored when it matches one of the store's configured allowed origins."}}}}}}}},"/api/v3/admin/exports/{id}":{"get":{"summary":"Show an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns export status. While `done` is `false`, the SPA continues polling.\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"export found","content":{"application/json":{}}}}},"delete":{"summary":"Delete an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the export and purges its attachment.\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"export deleted"}}}},"/api/v3/admin/exports/{id}/download":{"get":{"summary":"Download an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Streams the exported CSV with `Content-Disposition: attachment`. Returns 422 with `code: export_not_ready` while `done` is still `false`. The endpoint is JWT/API-key protected, so SPA clients must fetch it (with `Authorization` header) and trigger the browser download via a Blob URL — a top-level navigation cannot carry the JWT.\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"CSV file","content":{"application/json":{},"text/csv":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments":{"get":{"summary":"List fulfillments","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all shipments for an order.\n\n**Required scope:** `read_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., inventory_units, stock_location, shipping_rates). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,status,tracking,cost). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillments found","content":{"application/json":{}}}}},"post":{"summary":"Create a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Manually creates a fulfillment on a completed order, bypassing order routing — for example to mirror a shipment handled by an external carrier or 3PL. Moves the requested line item quantities out of their current fulfillments; when `items` is omitted, every not-yet-shipped unit is moved. Pass `status: 'shipped'` to register an already-shipped fulfillment (fires shipped webhooks and freezes cost/carrier). When `delivery_method_id` is omitted, the fulfillment inherits the delivery method and cost of the source fulfillment(s) it fully drains — keeping the order total unchanged; partially drained splits get no carrier when shipped, and pending fulfillments are otherwise (re)priced by the standard rate engine, which selects the lowest-cost available rate. Pass `cost` to set an explicit shipping cost instead (e.g. the 3PL price) — note this changes the order total and payment state, and is guaranteed to persist only with `status: 'shipped'` (pending fulfillments are re-priced by the rate engine).\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"fulfillment created","content":{"application/json":{}}},"422":{"description":"order not completed","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["stock_location_id"],"properties":{"stock_location_id":{"type":"string","description":"Stock location the fulfillment ships from"},"tracking":{"type":"string","description":"Carrier tracking number, or a full https:// tracking link — a full URL is served back as tracking_url unchanged instead of being templated into the delivery method tracking URL"},"delivery_method_id":{"type":"string","description":"Delivery method (carrier) to attach as the selected rate. Defaults to the delivery method of the fully drained source fulfillment(s)"},"cost":{"type":"string","description":"Explicit shipping cost. Defaults to the summed cost of the fully drained source fulfillment(s), which keeps the order total unchanged; an explicit cost changes the order total and payment state. Guaranteed to persist only with status: 'shipped' — pending fulfillments are re-priced by the rate engine"},"status":{"type":"string","enum":["shipped"],"description":"Pass 'shipped' to register the fulfillment as already shipped"},"items":{"type":"array","description":"Line item quantities to fulfill. Omit to fulfill every not-yet-shipped unit.","items":{"type":"object","required":["item_id","quantity"],"properties":{"item_id":{"type":"string","description":"Line item ID"},"quantity":{"type":"integer"}}}},"metadata":{"type":"object","additionalProperties":true}}}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}":{"get":{"summary":"Show a shipment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns details of a specific shipment.\n\n**Required scope:** `read_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., inventory_units, stock_location, shipping_rates). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,status,tracking,cost). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"shipment found","content":{"application/json":{}}}}},"patch":{"summary":"Update a shipment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a fulfillment (tracking, delivery rate).\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"shipment updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tracking":{"type":"string","description":"Carrier tracking number, or a full https:// tracking link served back as tracking_url unchanged"},"selected_delivery_rate_id":{"type":"string","description":"Delivery rate ID (dr_...) to select"}}}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/fulfill":{"patch":{"summary":"Fulfill a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Marks a fulfillment as fulfilled.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment fulfilled","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/cancel":{"patch":{"summary":"Cancel a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Cancels a fulfillment.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment canceled","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/resume":{"patch":{"summary":"Resume a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Resumes a canceled fulfillment.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment resumed","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/split":{"patch":{"summary":"Split a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Transfers items from this shipment to a new shipment at a different stock location.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment split","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id","quantity"],"properties":{"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer"},"stock_location_id":{"type":"string","description":"Target stock location ID"}}}}}}}},"/api/v3/admin/gift_card_batches":{"get":{"summary":"List gift card batches","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the gift card batches issued by the current store. Each batch\ngroups the cards generated together for a campaign or bulk-issuance\n— the cards themselves live under `/admin/gift_cards` and reference\nthe batch via `gift_card_batch_id`.\n\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Records per page","schema":{"type":"integer"}},{"name":"q[prefix_cont]","in":"query","required":false,"description":"Filter by prefix (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending.","schema":{"type":"string"}}],"responses":{"200":{"description":"gift card batches found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardBatch"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a gift card batch","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Issues a batch of gift cards in a single call. The server generates\n`codes_count` cards inline for small batches (configurable via\n`Spree.config.gift_card_batch_web_limit`, default 500) or enqueues\na background job for larger ones. Each card's code is the batch\n`prefix` followed by random hex.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"gift card batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardBatch"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prefix","amount","codes_count"],"properties":{"prefix":{"type":"string","description":"Lowercased and prepended to every generated code."},"amount":{"type":"string","description":"Decimal amount per card, greater than zero."},"currency":{"type":"string","description":"ISO 4217 currency code. Defaults to the store currency."},"codes_count":{"type":"integer","description":"Number of cards to generate. Capped at `gift_card_batch_limit`."},"expires_at":{"type":"string","nullable":true}}}}}}}},"/api/v3/admin/gift_card_batches/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Gift card batch prefixed ID","schema":{"type":"string"}}],"get":{"summary":"Get a gift card batch","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single batch.\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"gift card batch found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardBatch"}}}},"404":{"description":"gift card batch not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/gift_cards":{"get":{"summary":"List gift cards","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the gift cards issued by the current store. Filter by\n`q[code_cont]` for code search, `q[user_id_eq]` for cards issued\nto a specific customer, or `q[state_eq]` for status filtering.\n\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[code_cont]","in":"query","required":false,"description":"Filter by gift card code (contains)","schema":{"type":"string"}},{"name":"q[state_eq]","in":"query","required":false,"description":"Filter by status (active, redeemed, partially_redeemed, canceled)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"gift cards found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GiftCard"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Issues a gift card scoped to the current store. The code is\nauto-generated when omitted. `currency` defaults to the store's\nconfigured currency. Pass `user_id` (prefixed ID) to attach the\ncard to a specific customer.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"gift card created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","description":"Decimal amount, greater than zero."},"currency":{"type":"string","description":"ISO 4217 currency code. Defaults to the store currency."},"code":{"type":"string","description":"Optional caller-supplied code. Auto-generated when omitted."},"expires_at":{"type":"string","description":"ISO 8601 date.","nullable":true},"user_id":{"type":"string","description":"Optional customer prefixed ID.","nullable":true}}}}}}}},"/api/v3/admin/gift_cards/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Gift card prefixed ID","schema":{"type":"string"}}],"get":{"summary":"Get a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single gift card.\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"gift card found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"404":{"description":"gift card not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an active gift card's editable attributes. Redeemed or\npartially-redeemed cards cannot be edited.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"gift card updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string"},"expires_at":{"type":"string","nullable":true},"user_id":{"type":"string","nullable":true}}}}}}},"delete":{"summary":"Delete a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes an unused gift card. Cards that have been redeemed or\npartially redeemed cannot be deleted and return 422.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"gift card deleted"},"422":{"description":"redeemed gift card cannot be deleted","content":{"application/json":{}}}}}},"/api/v3/admin/imports":{"get":{"summary":"List imports","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns CSV imports queued or completed for the current store.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"imports found","content":{"application/json":{}}}}},"post":{"summary":"Create an import","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Queues a CSV import. Upload the file first via `POST /api/v3/admin/direct_uploads`\nand pass the returned `signed_id` as `attachment`. On success the import is in the\n`mapping` state and the response carries the mapping payload: `schema_fields`\n(the canonical columns for the type), `csv_headers`, a `sample_row`, and the\nauto-assigned `mappings`.\n\nAdjust mappings if needed, then call `PATCH /admin/imports/{id}/complete_mapping`\nto start processing. Poll `GET /admin/imports/{id}` while `status` is\n`completed_mapping`/`processing`; terminal statuses are `completed` and `failed`.\n\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"import created in mapping state","content":{"application/json":{}}},"422":{"description":"unknown import type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["type","attachment"],"properties":{"type":{"type":"string","enum":["products","customers","product_translations"]},"attachment":{"type":"string","description":"ActiveStorage signed blob id from POST /api/v3/admin/direct_uploads."},"preferred_delimiter":{"type":"string","enum":[",",";","|","\t"],"description":"CSV column separator. Defaults to a comma."},"results_url":{"type":"string","description":"Absolute URL of your admin imports view; the import-done email links back to it with `?import=<id>` appended. Only honored when it matches one of the store's configured allowed origins."}}}}}}}},"/api/v3/admin/imports/template":{"get":{"summary":"Download an import template","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a CSV header row for the given import type, including the custom field columns available for the model.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":true,"description":"Registered import type, e.g. products.","schema":{"type":"string"}}],"responses":{"200":{"description":"CSV template","content":{"application/json":{},"text/csv":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v3/admin/imports/{id}":{"get":{"summary":"Show an import","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns import status and row counters. The admin dashboard polls this endpoint while `status` is `completed_mapping` or `processing`; `rows_count`, `completed_rows_count` and `failed_rows_count` drive the progress bar. The mapping payload (`csv_headers`, `sample_row`) is only present while `status` is `mapping`.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"import found","content":{"application/json":{}}}}},"delete":{"summary":"Delete an import","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the import, its rows and the uploaded file. Returns 422 while the import is being processed.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"import deleted"}}}},"/api/v3/admin/imports/{id}/download":{"get":{"summary":"Download the originally uploaded file","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Streams the CSV exactly as it was uploaded — the audit trail for what was imported. JWT/API-key protected; SPA clients fetch it with the Authorization header and trigger the browser download via a Blob URL.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"CSV file","content":{"application/json":{},"text/csv":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v3/admin/imports/{id}/complete_mapping":{"patch":{"summary":"Complete mapping and start processing","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Applies the submitted column mappings, then starts row processing. Omit `mappings`\nto accept the auto-assigned ones from the create response. Returns 422 when a\nrequired schema field is left unmapped (`details.missing_required_fields`) or a\nfile column is assigned twice.\n\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"mapping completed, processing queued","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mappings":{"type":"array","description":"Column assignments to apply before starting. `file_column: null` unmaps a field.","items":{"type":"object","required":["schema_field"],"properties":{"schema_field":{"type":"string"},"file_column":{"type":"string","nullable":true}}}}}}}}}}},"/api/v3/admin/imports/{id}/retry_failed_rows":{"patch":{"summary":"Retry failed rows","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Re-processes the rows that failed. The import re-enters `processing`; poll `GET /admin/imports/{id}` until it completes again. Returns 422 when the import is not `completed` or has no failed rows.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"retry queued","content":{"application/json":{}}}}}},"/api/v3/admin/imports/{import_id}/rows":{"get":{"summary":"List import rows","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Paginated rows of an import — the failure report. Filter with `q[status_eq]=failed` to list only rows that could not be imported; each row carries the raw CSV `data` and its `validation_errors`.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"import_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"q[status_eq]","in":"query","required":false,"description":"Filter rows by status: pending, processing, completed, failed.","schema":{"type":"string"}}],"responses":{"200":{"description":"rows found","content":{"application/json":{}}}}}},"/api/v3/admin/markets":{"get":{"summary":"List markets","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the markets configured for the current store. Markets are\nstore-scoped and ordered by `position` (an `acts_as_list` column —\nupdate the order via `PATCH /markets/{id}` with `position`).\n\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `countries`.","schema":{"type":"string"}}],"responses":{"200":{"description":"markets found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Market"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new market for the current store.\n\n- `country_isos` accepts 2-letter ISO country codes (e.g. `[\"DE\", \"FR\"]`);\n the market must contain at least one country. Unknown codes are\n silently dropped.\n- `supported_locales` accepts an array of locale codes; the\n `default_locale` is always implicitly included.\n- Setting `default: true` automatically demotes the previous default\n market in the store.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"market created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Market"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 currency code."},"default_locale":{"type":"string","description":"IETF locale tag used as the market default."},"supported_locales":{"type":"array","items":{"type":"string"},"description":"Locale codes available in this market. The default is always implicitly included."},"tax_inclusive":{"type":"boolean","default":false,"description":"Display prices with tax included."},"default":{"type":"boolean","default":false,"description":"Setting to true demotes the previous default."},"position":{"type":"integer","description":"Sort order within the store; lower = first."},"country_isos":{"type":"array","items":{"type":"string"},"description":"2-letter ISO country codes assigned to this market. At least one is required."}},"required":["name","currency","default_locale","country_isos"]}}}}}},"/api/v3/admin/markets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"market found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Market"}}}},"404":{"description":"market not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an existing market. Pass `country_isos` to replace the\nmarket's country list (full-set update), `supported_locales` to\nreplace the supported locales, or `position` to reorder the market\nwithin the store.\n\nSetting `default: true` automatically demotes the previous default.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"market updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Market"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"currency":{"type":"string"},"default_locale":{"type":"string"},"supported_locales":{"type":"array","items":{"type":"string"}},"tax_inclusive":{"type":"boolean"},"default":{"type":"boolean"},"position":{"type":"integer"},"country_isos":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the market (sets `deleted_at`). The default market and\nthe last remaining market in a store cannot be deleted — both return\n422 with a `validation_error`.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"market deleted"},"422":{"description":"cannot delete default or last market","content":{"application/json":{}}}}}},"/api/v3/admin/option_types":{"get":{"summary":"List option types","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of option types.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,label,position). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"option types found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OptionType"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new option type. Supports nested option values.\n\nOption values can be provided inline and will be created or updated by name.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"option type created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionType"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"},"filterable":{"type":"boolean"},"option_values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"}}}}},"required":["name","label"]}}}}}},"/api/v3/admin/option_types/{id}":{"get":{"summary":"Get an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single option type by ID, including its option values.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Option type ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,label,position). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"option type found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionType"}}}},"404":{"description":"option type not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an option type. Supports updating nested option values.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Option type ID","schema":{"type":"string"}}],"responses":{"200":{"description":"option type updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionType"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"},"filterable":{"type":"boolean"},"option_values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Existing option value ID to update"},"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"}}}}}}}}}},"delete":{"summary":"Delete an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes an option type.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Option type ID","schema":{"type":"string"}}],"responses":{"204":{"description":"option type deleted"}}}},"/api/v3/admin/orders/{order_id}/gift_cards":{"post":{"summary":"Apply a gift card to an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Applies a gift card by code to the order. Returns the gift card.\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"gift card applied","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Gift card code"}}}}}}}},"/api/v3/admin/orders/{order_id}/gift_cards/{id}":{"delete":{"summary":"Remove a gift card from an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the gift card from the order.\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Gift card ID","schema":{"type":"string"}}],"responses":{"204":{"description":"gift card removed"}}}},"/api/v3/admin/orders/{order_id}/items":{"get":{"summary":"List order items","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all line items for an order.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variant, variant.product). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., quantity,price,total). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"items found","content":{"application/json":{}}}}},"post":{"summary":"Add an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new line item to the order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"item added","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id"],"properties":{"variant_id":{"type":"string","description":"Prefixed variant ID"},"quantity":{"type":"integer","default":1}}}}}}}},"/api/v3/admin/orders/{order_id}/items/{id}":{"get":{"summary":"Show an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns details of a specific line item.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variant, variant.product). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., quantity,price,total). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"item found","content":{"application/json":{}}}}},"patch":{"summary":"Update an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an order item quantity or metadata.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}}],"responses":{"200":{"description":"item updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"integer"}}}}}}},"delete":{"summary":"Remove an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes an item from the order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}}],"responses":{"204":{"description":"line item removed"}}}},"/api/v3/admin/orders/{order_id}/store_credits":{"post":{"summary":"Apply customer's store credit to an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Applies the order customer's available store credit. When `amount` is omitted, applies up to the order outstanding balance.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"store credit applied","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","description":"Optional explicit amount; defaults to order outstanding balance"}}}}}}},"delete":{"summary":"Remove store credit from an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes any applied store credit from the order.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"204":{"description":"store credit removed"}}}},"/api/v3/admin/orders":{"get":{"summary":"List orders","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of orders for the current store.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"description":"Sort field (e.g., created_at, -created_at, completed_at)","schema":{"type":"string"}},{"name":"q[state_eq]","in":"query","required":false,"description":"Filter by state (cart, address, delivery, payment, confirm, complete, canceled)","schema":{"type":"string"}},{"name":"q[email_cont]","in":"query","required":false,"description":"Filter by email (contains)","schema":{"type":"string"}},{"name":"q[number_eq]","in":"query","required":false,"description":"Filter by order number","schema":{"type":"string"}},{"name":"q[completed_at_gt]","in":"query","required":false,"description":"Filter by completed after date","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., items, fulfillments, payments, customer, discounts, billing_address, shipping_address). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,total,status,completed_at). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"orders found","content":{"application/json":{}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a draft order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new draft order in one shot. Customer, items, addresses, currency,\nmarket, channel, locale, notes, metadata, and a coupon code can all be\nprovided inline.\n\nSetting `preferred_stock_location_id` pins the order's preferred fulfillment\nlocation — Order Routing's built-in `PreferredLocation` rule consumes it\nwhen picking which stock location ships each shipment.\n\nInvalid coupon codes are non-fatal — the order is created and the failure\nis reported on the service result (not in the API response body for now).\n\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"order created with preferred_stock_location_id","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"customer_id":{"type":"string","description":"Customer ID. Alias: user_id (legacy)."},"use_customer_default_address":{"type":"boolean","description":"When true with customer_id, copies the customer's saved billing/shipping addresses onto the order."},"currency":{"type":"string"},"market_id":{"type":"string","description":"Market ID"},"channel_id":{"type":"string","description":"Channel ID. Defaults to the store primary channel when omitted."},"preferred_stock_location_id":{"type":"string","description":"Stock Location ID to prefer for fulfillment. Order Routing's built-in PreferredLocation rule reads this and ranks the location first; routing falls back to the next rule when the preferred location can't cover the cart."},"locale":{"type":"string"},"customer_note":{"type":"string","description":"Public, customer-visible note"},"internal_note":{"type":"string","description":"Staff-only note"},"metadata":{"type":"object","description":"Arbitrary key/value metadata"},"shipping_address":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"shipping_address_id":{"type":"string","description":"Existing customer address ID"},"billing_address":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"billing_address_id":{"type":"string","description":"Existing customer address ID"},"items":{"type":"array","items":{"type":"object","required":["variant_id","quantity"],"properties":{"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer"},"metadata":{"type":"object"}}}},"coupon_code":{"type":"string","description":"Optional. Applied non-fatally; invalid codes do not block creation."}}}}}}}},"/api/v3/admin/orders/{id}":{"get":{"summary":"Show an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns full order details including admin-only fields.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID (e.g., or_xxx)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., items, fulfillments, payments, customer, discounts, billing_address, shipping_address). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,total,status,completed_at). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"order found","content":{"application/json":{}}},"404":{"description":"order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an order. Supports updating email, addresses, special instructions, and line items.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"special_instructions":{"type":"string"},"internal_note":{"type":"string"},"channel_id":{"type":"string","description":"Channel ID"},"preferred_stock_location_id":{"type":"string","description":"Stock Location ID to prefer for fulfillment. Re-runs Order Routing's PreferredLocation rule on subsequent shipment rebuilds."},"ship_address":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"zipcode":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"bill_address":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"zipcode":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"items":{"type":"array","items":{"type":"object","required":["variant_id"],"properties":{"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer"},"metadata":{"type":"object"}}}}}}}}}},"delete":{"summary":"Delete a draft order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a draft order. Completed orders cannot be deleted.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"204":{"description":"order deleted"}}}},"/api/v3/admin/orders/{id}/complete":{"patch":{"summary":"Complete an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Completes an order in the `confirm` state, marking it as placed.\n\nSet `notify_customer: true` to send the order confirmation email.\n\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order completed","content":{"application/json":{}}},"422":{"description":"order cannot be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notify_customer":{"type":"boolean","description":"Send the order confirmation email after completion."}}}}}}}},"/api/v3/admin/orders/{id}/cancel":{"patch":{"summary":"Cancel an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Cancels a completed order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order canceled","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{id}/approve":{"patch":{"summary":"Approve an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Approves an order (e.g., for fraud review).\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order approved","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{id}/resume":{"patch":{"summary":"Resume a canceled order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Resumes a previously canceled order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order resumed","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{id}/resend_confirmation":{"post":{"summary":"Resend confirmation email","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Publishes the order.completed event to trigger confirmation email delivery.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"confirmation resent","content":{"application/json":{}}}}}},"/api/v3/admin/payment_methods":{"get":{"summary":"List payment methods","tags":["Payment Methods"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the store's configured payment methods. Use `source_required: true` to know which methods need a saved source.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,type,active). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payment methods found","content":{"application/json":{}}}}}},"/api/v3/admin/payment_methods/types":{"get":{"summary":"List available payment provider types","tags":["Payment Methods"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the registered Spree::PaymentMethod subclasses that can be used to create new payment methods. Useful for populating a \"Provider\" dropdown in admin UIs.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"provider types found","content":{"application/json":{}}}}}},"/api/v3/admin/payment_methods/{id}":{"get":{"summary":"Show a payment method","tags":["Payment Methods"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a payment method by ID.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,type,active). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payment method found","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/payments":{"get":{"summary":"List payments","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all payments for an order.\n\n**Required scope:** `read_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method, source). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,status,number,response_code). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payments found","content":{"application/json":{}}}}},"post":{"summary":"Create a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new payment for the order.\n\n**Required scope:** `write_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"payment created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["payment_method_id"],"properties":{"payment_method_id":{"type":"string","description":"Payment method ID"},"amount":{"type":"string"},"source_id":{"type":"string","description":"Payment source ID"}}}}}}}},"/api/v3/admin/orders/{order_id}/payments/{id}":{"get":{"summary":"Show a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns details of a specific payment.\n\n**Required scope:** `read_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Payment ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method, source). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,status,number,response_code). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payment found","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/payments/{id}/capture":{"patch":{"summary":"Capture a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Captures a pending payment.\n\n**Required scope:** `write_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Payment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"payment captured","content":{"application/json":{}}},"422":{"description":"capture failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/orders/{order_id}/payments/{id}/void":{"patch":{"summary":"Void a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Voids a payment.\n\n**Required scope:** `write_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Payment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"payment voided","content":{"application/json":{}}}}}},"/api/v3/admin/price_lists":{"get":{"summary":"List price lists","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the price lists configured for the current store.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"schema":{"type":"string"}},{"name":"q[status_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `price_rules`.","schema":{"type":"string"}}],"responses":{"200":{"description":"price lists found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceList"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new draft price list.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"price list created (server-to-server — rules + prices, no product_ids)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"starts_at":{"type":"string","nullable":true},"ends_at":{"type":"string","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"position":{"type":"integer"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Prefixed product ids to seed the list with."},"rules":{"type":"array","description":"STI-typed price rules to attach on create. Existing rules on the same payload via PATCH reconcile by id.","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"prices":{"type":"array","description":"Server-to-server alternative to `product_ids`: ship the exact per-variant prices the list should contain. Each row upserts on the unique key `(variant_id, currency, price_list_id)`. Mix-and-match with `product_ids` is supported but typically unnecessary — `prices` alone tells the server which variants belong to the list and what the override amount is.","items":{"type":"object","required":["variant_id","currency"],"properties":{"variant_id":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}}}}}},"/api/v3/admin/price_lists/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"404":{"description":"price list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a price list. The optional `rules:` array reconciles nested\nSTI-typed price rules in a single round-trip — existing rules update\nby `id`, new rules build, missing rules destroy. Mirrors the\npromotion editor's \"save the whole thing on Save\" pattern.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list updated with nested rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"starts_at":{"type":"string","nullable":true},"ends_at":{"type":"string","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"position":{"type":"integer"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Prefixed product ids — reconciles list membership (adds + removes)."},"rules":{"type":"array","items":{"type":"object","required":["type"],"properties":{"id":{"type":"string","nullable":true},"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"prices":{"type":"array","description":"Individual price overrides (the spreadsheet payload). Each row updates by `id` if shipped, otherwise upserts on the unique key `(variant_id, currency, price_list_id)`.","items":{"type":"object","oneOf":[{"required":["id"]},{"required":["variant_id","currency"]}],"properties":{"id":{"type":"string"},"variant_id":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}}}}},"delete":{"summary":"Delete a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the price list. Associated prices are removed asynchronously.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"price list deleted"}}}},"/api/v3/admin/price_lists/{id}/activate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Activate a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Transitions a draft / inactive list to `active`. If `starts_at` is\nin the future the list is marked `scheduled` instead, matching the\nlegacy admin behaviour.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}}}}},"/api/v3/admin/price_lists/{id}/deactivate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Deactivate a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list deactivated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}}}}},"/api/v3/admin/prices":{"get":{"summary":"List prices","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Generic prices endpoint covering both base prices and price-list\noverrides. Filter with Ransack: `q[price_list_id_eq]=…`,\n`q[currency_eq]=USD`, `q[price_list_id_null]=true` (base prices only).\n\nThe admin spreadsheet uses this with server-side pagination so it\nscales past the metadata-PATCH path on `/price_lists/:id`.\n\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[price_list_id_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"q[price_list_id_null]","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"q[currency_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"q[variant_id_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Comma-separated sort keys. Supports e.g. `variant_product_name,variant_id`.","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `variant`.","schema":{"type":"string"}}],"responses":{"200":{"description":"prices found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Price"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a single price. Omit `price_list_id` to create a base price.\nFor more than a handful of rows, prefer `POST /admin/prices/bulk_upsert`.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"price created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id","currency"],"properties":{"variant_id":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true},"price_list_id":{"type":"string","nullable":true}}}}}}}},"/api/v3/admin/prices/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}},"404":{"description":"price not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}},"delete":{"summary":"Delete a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the price (acts_as_paranoid).\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"price deleted"}}}},"/api/v3/admin/prices/bulk_upsert":{"post":{"summary":"Bulk-upsert prices","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Upserts a batch of prices in a single SQL round trip.\n\nEach row either:\n* targets an existing price by `id`, OR\n* matches on the unique key `(variant_id, currency, price_list_id)` —\n updating the existing row if one exists, creating one otherwise.\n\nModel callbacks (e.g. PriceHistory) are bypassed; this is a\nbulk-write fast path for the admin spreadsheet. The response\ncarries `price_count` — the number of rows touched.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"prices upserted","content":{"application/json":{"schema":{"type":"object","properties":{"price_count":{"type":"integer"}}}}}},"422":{"description":"missing prices key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prices"],"properties":{"prices":{"type":"array","items":{"type":"object","required":["variant_id","currency"],"properties":{"id":{"type":"string","nullable":true},"variant_id":{"type":"string"},"currency":{"type":"string"},"price_list_id":{"type":"string","nullable":true},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}}}}}},"/api/v3/admin/prices/bulk_destroy":{"delete":{"summary":"Bulk-delete prices","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes each price in `ids`. Returns the count actually destroyed.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"prices deleted","content":{"application/json":{"schema":{"type":"object","properties":{"price_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/{product_id}/custom_fields":{"get":{"summary":"List product custom fields","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the product's custom field values.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_field_definition). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,value,namespace). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"custom fields found","content":{"application/json":{}}}}},"post":{"summary":"Create a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Sets a custom field value on the product. Requires an existing CustomFieldDefinition; pass its prefixed `cfdef_…` id.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"custom field created","content":{"application/json":{}}},"422":{"description":"duplicate definition for the same product","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["custom_field_definition_id","value"],"properties":{"custom_field_definition_id":{"type":"string","description":"Prefixed `cfdef_…` id"},"value":{"description":"Value matching the definition's `field_type`"}}}}}}}},"/api/v3/admin/products/{product_id}/custom_fields/{id}":{"get":{"summary":"Show a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_field_definition). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,value,namespace). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"custom field found","content":{"application/json":{}}}}},"patch":{"summary":"Update a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates the custom field's `value`. The linked definition cannot be changed — delete and recreate to switch.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"custom field updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["value"],"properties":{"value":{"description":"New value"}}}}}}},"delete":{"summary":"Delete a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"custom field deleted"}}}},"/api/v3/admin/products/{product_id}/translations":{"get":{"summary":"List product translations","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the full translation matrix for the product: the source value and content type per translatable field, plus the translated value for every supported locale.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"translations found","content":{"application/json":{}}}}}},"/api/v3/admin/products":{"get":{"summary":"List products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of products for the current store.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"description":"Sort field (e.g., name, -name, price, -price, best_selling)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variants, media, option_types, categories). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,slug,price,status). id is always included.","schema":{"type":"string"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"q[status_eq]","in":"query","required":false,"description":"Filter by status","schema":{"type":"string"}}],"responses":{"200":{"description":"products found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new product. Supports nested variants with prices and option types.\n\nOption types and values are auto-created if they don't exist.\nPrices are upserted by currency. Stock items are upserted by stock location.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"product created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"tax_category_id":{"type":"string","description":"Tax category ID"},"category_ids":{"type":"array","items":{"type":"string"},"description":"Array of category IDs"},"tags":{"type":"array","items":{"type":"string"}},"prices":{"type":"array","description":"Shorthand for a simple (no-options) product: per-currency prices that forward to the product's sole variant. For products with options, set prices per variant under `variants:` instead.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"variants":{"type":"array","description":"Array of variant payloads. Variants can declare multiple option pairs via `options:` and per-currency prices via `prices:`. Stock counts go in `stock_items:` (per stock location).","items":{"type":"object","properties":{"sku":{"type":"string"},"options":{"type":"array","description":"One pair per option type the variant participates in (e.g. size + color). Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}},"required":["name"]}}}}}},"/api/v3/admin/products/{id}":{"get":{"summary":"Get a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single product by ID.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID (e.g., prod_xxx)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variants, media, option_types, categories). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,slug,price,status). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"product found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"product not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a product. Only provided fields are updated.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"product updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"tax_category_id":{"type":"string","description":"Tax category ID"},"category_ids":{"type":"array","items":{"type":"string"},"description":"Array of category IDs"},"tags":{"type":"array","items":{"type":"string"}},"prices":{"type":"array","description":"Shorthand for a simple (no-options) product: per-currency prices that forward to the product's sole variant. For products with options, set prices per variant under `variants:` instead.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"variants":{"type":"array","description":"Array of variant payloads. Variants can declare multiple option pairs via `options:` and per-currency prices via `prices:`. Stock counts go in `stock_items:` (per stock location).","items":{"type":"object","properties":{"sku":{"type":"string"},"options":{"type":"array","description":"One pair per option type the variant participates in (e.g. size + color). Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}}}}}}},"delete":{"summary":"Delete a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes a product.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product deleted"}}}},"/api/v3/admin/products/bulk_status_update":{"post":{"summary":"Bulk-update product status","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Sets `status` on each product in `ids`. Reindexes the affected products\nfor search. Cross-store IDs are silently dropped. Returns counts.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"cross-store products silently dropped","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"status":{"type":"string"}}}}}},"422":{"description":"invalid status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","status"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["draft","active","archived"]}}}}}}}},"/api/v3/admin/products/bulk_add_to_categories":{"post":{"summary":"Bulk-add products to categories","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Attaches each product in `ids` to every category (taxon) in `category_ids`.\nCategories from sibling stores are silently ignored.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products added to categories","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"category_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","category_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_from_categories":{"post":{"summary":"Bulk-remove products from categories","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Detaches each product in `ids` from every category in `category_ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products removed from categories","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","category_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_add_to_channels":{"post":{"summary":"Bulk-add products to channels","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Publishes each product in `ids` on every channel in `channel_ids`. Idempotent —\nre-publishing on an existing channel is a no-op. Channels from sibling stores\nare silently ignored.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products published on channels","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"channel_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","channel_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"channel_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_from_channels":{"post":{"summary":"Bulk-remove products from channels","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Unpublishes each product in `ids` from every channel in `channel_ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products unpublished from channels","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"channel_count":{"type":"integer"},"removed":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","channel_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"channel_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_add_tags":{"post":{"summary":"Bulk-add tags to products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds each tag name in `tags` to every product in `ids`. Tags are upserted by name.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags added","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"tag_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_tags":{"post":{"summary":"Bulk-remove tags from products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes each tag in `tags` from every product in `ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags removed","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_destroy":{"delete":{"summary":"Bulk-delete products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes each product in `ids`. Returns the count actually destroyed.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products deleted","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/promotions/{promotion_id}/coupon_codes":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List coupon codes for a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the auto-generated coupon codes for a multi-code promotion. Single-code promotions store the code on the promotion itself; this endpoint returns an empty list for them.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"coupon codes found","content":{"application/json":{}}}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_actions":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List actions for a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"actions found","content":{"application/json":{}}}}},"post":{"summary":"Create an action on a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new action to a promotion. The `type` is the wire shorthand from `GET /promotion_actions/types` (e.g. `free_shipping`, `create_item_adjustments`). Fully-qualified Ruby class names are also accepted for backward compatibility.\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"action created","content":{"application/json":{}}},"422":{"description":"unknown action type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}},"required":["type"]}}}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_actions/{id}":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete an action from a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"action deleted"}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_rules":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List rules for a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rules found","content":{"application/json":{}}}}},"post":{"summary":"Create a rule on a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new rule to a promotion. The `type` is the wire shorthand from `GET /promotion_rules/types` (e.g. `currency`, `item_total`, `product`). Fully-qualified Ruby class names are also accepted for backward compatibility.\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"rule created with preferences","content":{"application/json":{}}},"422":{"description":"unknown rule type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}},"required":["type"]}}}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_rules/{id}":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update a rule's preferences","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rule updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","additionalProperties":true}}}}}}},"delete":{"summary":"Delete a rule from a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"rule deleted"}}}},"/api/v3/admin/promotions":{"get":{"summary":"List promotions","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the store's promotions, including manual coupon and automatic promotions.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"promotions found","content":{"application/json":{}}}}},"post":{"summary":"Create a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new promotion. `code` is required for single-code coupon promotions;\npass `multi_codes: true` with `number_of_codes` to auto-generate a batch.\n\nRules and actions can be created in the same request by passing arrays of\n`{ type, preferences, ... }` rows. The server reconciles to the desired set:\nnew rows are built, existing rows (by `id`) are updated, omitted rows are removed.\n\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"promotion created with rules and actions","content":{"application/json":{}}},"422":{"description":"invalid params","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"starts_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"usage_limit":{"type":"integer","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"kind":{"type":"string","enum":["coupon_code","automatic"]},"multi_codes":{"type":"boolean"},"number_of_codes":{"type":"integer","nullable":true},"code_prefix":{"type":"string","nullable":true},"promotion_category_id":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"product_ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}},"customer_ids":{"type":"array","items":{"type":"string"}}},"required":["type"]}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"calculator":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"required":["type"]}}},"required":["name"]}}}}}},"/api/v3/admin/promotions/{id}":{"get":{"summary":"Show a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"promotion found","content":{"application/json":{}}}}},"patch":{"summary":"Update a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a promotion. The `rules` and `actions` arrays are treated as\na *desired set* — rows with `id` update in place, rows without `id` are\nbuilt fresh, and any existing row not present in the array is destroyed.\nPass `rules: []` or `actions: []` to clear them.\n\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rules and actions cleared with empty arrays","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"starts_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"usage_limit":{"type":"integer","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"kind":{"type":"string","enum":["coupon_code","automatic"]},"promotion_category_id":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"Pass to update an existing rule; omit to build a new one"},"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"product_ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}},"customer_ids":{"type":"array","items":{"type":"string"}}},"required":["type"]}},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"calculator":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"required":["type"]}}}}}}}},"delete":{"summary":"Delete a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"promotion deleted"}}}},"/api/v3/admin/promotion_actions/types":{"get":{"summary":"List available promotion action types","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the registered Spree::PromotionAction subclasses with their preference schemas. Used by admin UIs to populate the \"Add action\" picker and render generic preference forms.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"action types found","content":{"application/json":{}}}}}},"/api/v3/admin/promotion_rules/types":{"get":{"summary":"List available promotion rule types","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the registered Spree::PromotionRule subclasses with their preference schemas.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rule types found","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/refunds":{"get":{"summary":"List refunds","tags":["Refunds"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all refunds for an order.\n\n**Required scope:** `read_refunds` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment, refund_reason). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,reason,transaction_id). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"refunds found","content":{"application/json":{}}}}},"post":{"summary":"Create a refund","tags":["Refunds"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a refund for a payment on the order. The refund is automatically processed via the payment gateway.\n\n**Required scope:** `write_refunds` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"refund created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["payment_id","amount"],"properties":{"payment_id":{"type":"string","description":"Payment ID"},"amount":{"type":"string"},"refund_reason_id":{"type":"string","description":"Refund reason ID"}}}}}}}},"/api/v3/admin/locales":{"get":{"summary":"List supported locales","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the locales a merchant can translate content into for the current store, with the default and right-to-left flags.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"locales found","content":{"application/json":{}}}}}},"/api/v3/admin/store_credit_categories":{"get":{"summary":"List store credit categories","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the configured store credit categories. Categories classify\nstore credits (e.g., \"Goodwill\", \"Gift Card\", \"Refund\") and surface\nin the admin UI as a dropdown when issuing or editing a store\ncredit. Category names matching `Spree::Config[:non_expiring_credit_types]`\nare flagged via `non_expiring: true`.\n\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"store credit categories found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StoreCreditCategory"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/store_credit_categories/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Store credit category ID","schema":{"type":"string"}}],"get":{"summary":"Get a store credit category","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single store credit category by prefixed ID.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"store credit category found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreCreditCategory"}}}},"404":{"description":"store credit category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/store":{"get":{"summary":"Get the current store","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the current store configuration. The store is resolved from the request context (host or admin selection); there is no `id` parameter.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"current store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update the current store","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates the current store configuration.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"store updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"preferred_admin_locale":{"type":"string"},"preferred_timezone":{"type":"string"},"preferred_weight_unit":{"type":"string"},"preferred_unit_system":{"type":"string"}}}}}}}},"/api/v3/admin/tags":{"get":{"summary":"List tags","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns tag names for a given taggable type. Used for autocomplete in tag inputs on products, orders, and customers.","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"taggable_type","in":"query","required":true,"description":"Taggable type (`Spree::Product`, `Spree::Order`, or `Spree::User`)","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Optional case-insensitive substring filter","schema":{"type":"string"}}],"responses":{"200":{"description":"tags found","content":{"application/json":{}}},"422":{"description":"invalid taggable type","content":{"application/json":{}}}}}},"/api/v3/admin/translatable_resources":{"get":{"summary":"List translatable resources","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns every translatable resource type and its translatable fields (key + content type), so clients can render translation editors generically.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"translatable resources found","content":{"application/json":{}}}}}},"/api/v3/admin/translations/batch":{"post":{"summary":"Batch upsert translations","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Atomically upserts translations across many records of (possibly) different translatable resource types in one request — e.g. an option type and all its option values in one save. A flat list of independent registry writes; all entries succeed or none do.\n\n**Required scope:** `write_<resource>` for every resource type in the batch (for API-key authentication) (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"translations upserted","content":{"application/json":{}}},"422":{"description":"unsupported locale rolls back the whole batch","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["translations"],"properties":{"translations":{"type":"array","items":{"type":"object","required":["resource_type","resource_id","values"],"properties":{"resource_type":{"type":"string","description":"Translatable resource type token, e.g. `option_type`"},"resource_id":{"type":"string","description":"Prefixed id of the record"},"values":{"type":"object","description":"Map of locale code to { field: value }","additionalProperties":{"type":"object","additionalProperties":true}}}}}}}}}}}},"/api/v3/admin/admin_users":{"get":{"summary":"List staff","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns admin users with at least one role assignment on the current store.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"staff found","content":{"application/json":{}}}}}},"/api/v3/admin/admin_users/{id}":{"get":{"summary":"Show a staff member","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"staff member found","content":{"application/json":{}}}}},"patch":{"summary":"Update a staff member","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates name fields and reassigns roles for the current store. `role_ids` is a complete replacement — roles not in the array are removed for this store.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"staff member updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"role_ids":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Remove a staff member from this store","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the user's role assignments on the current store. The account is preserved — the user keeps access to any other stores.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"staff removed from store"}}}},"/api/v3/admin/invitations":{"get":{"summary":"List invitations","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns invitations for the current store, including pending and accepted.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"invitations found","content":{"application/json":{}}}}},"post":{"summary":"Create an invitation","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Invites a teammate by email. The invitation is scoped to the current store and carries the chosen role; on accept, a `RoleUser` is created via the invitation's `after_accept` callback.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"invitation created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","role_id"],"properties":{"email":{"type":"string"},"role_id":{"type":"string"}}}}}}}},"/api/v3/admin/invitations/{id}":{"delete":{"summary":"Revoke an invitation","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"invitation revoked"}}}},"/api/v3/admin/invitations/{id}/resend":{"patch":{"summary":"Resend an invitation","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Issues a fresh token and dispatches the invitation email again.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"invitation resent","content":{"application/json":{}}}}}},"/api/v3/admin/roles":{"get":{"summary":"List roles","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the roles available for staff role pickers. Roles are global, not per-store.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"roles found","content":{"application/json":{}}}}}},"/api/v3/admin/stock_locations":{"get":{"summary":"List stock locations","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the configured stock locations. Stock locations are global\n(shared across stores). Filter with Ransack predicates such as\n`q[active_eq]`, `q[kind_eq]`, `q[pickup_enabled_eq]`, or\n`q[name_cont]`.\n\nPickup-related attributes (`kind`, `pickup_enabled`,\n`pickup_stock_policy`, `pickup_ready_in_minutes`,\n`pickup_instructions`) drive merchant pickup support at checkout —\ncustomers can collect orders from any active location with\n`pickup_enabled: true`.\n\n\n**Required scope:** `read_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"q[active_eq]","in":"query","required":false,"description":"Filter by active status","schema":{"type":"boolean"}},{"name":"q[kind_eq]","in":"query","required":false,"description":"Filter by kind (built-in: 'warehouse', 'store', 'fulfillment_center')","schema":{"type":"string"}},{"name":"q[pickup_enabled_eq]","in":"query","required":false,"description":"Filter by pickup-enabled flag","schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"stock locations found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StockLocation"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new stock location.\n\nSetting `default: true` automatically demotes the previous default\nlocation.\n\n\n**Required scope:** `write_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"stock location created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLocation"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"admin_name":{"type":"string","nullable":true,"description":"Internal name shown only in the admin"},"active":{"type":"boolean"},"default":{"type":"boolean","description":"Setting to true demotes the previous default."},"kind":{"type":"string","enum":["warehouse","store","fulfillment_center"],"description":"Categorizes the location."},"propagate_all_variants":{"type":"boolean"},"backorderable_default":{"type":"boolean"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"country_iso":{"type":"string","nullable":true,"description":"ISO-3166 alpha-2 country code (e.g. \"US\")."},"state_abbr":{"type":"string","nullable":true,"description":"State / province abbreviation (e.g. \"NY\"). Resolved against the selected country."},"state_name":{"type":"string","nullable":true,"description":"Free-text state for countries without a states list."},"pickup_enabled":{"type":"boolean"},"pickup_stock_policy":{"type":"string","enum":["local","any"],"description":"'local' = items at this location only; 'any' = transfer-eligible (ship-to-store)."},"pickup_ready_in_minutes":{"type":"number","nullable":true,"minimum":0},"pickup_instructions":{"type":"string","nullable":true}},"required":["name"]}}}}}},"/api/v3/admin/stock_locations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Stock location ID","schema":{"type":"string"}}],"get":{"summary":"Get a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single stock location by prefixed ID.\n\n**Required scope:** `read_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"stock location found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLocation"}}}},"404":{"description":"stock location not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an existing stock location. Same address-field conventions as\nthe create endpoint.\n\nSetting `default: true` automatically demotes the previous default.\n\n\n**Required scope:** `write_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"stock location updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLocation"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"admin_name":{"type":"string","nullable":true},"active":{"type":"boolean"},"default":{"type":"boolean"},"kind":{"type":"string","enum":["warehouse","store","fulfillment_center"]},"propagate_all_variants":{"type":"boolean"},"backorderable_default":{"type":"boolean"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"country_iso":{"type":"string","nullable":true},"state_abbr":{"type":"string","nullable":true},"state_name":{"type":"string","nullable":true},"pickup_enabled":{"type":"boolean"},"pickup_stock_policy":{"type":"string","enum":["local","any"]},"pickup_ready_in_minutes":{"type":"number","nullable":true,"minimum":0},"pickup_instructions":{"type":"string","nullable":true}}}}}}},"delete":{"summary":"Delete a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the stock location (sets `deleted_at`). Existing\nfulfillments that referenced it keep the historical record via\n`Spree::StockLocation.with_deleted`.\n\n\n**Required scope:** `write_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"204":{"description":"stock location deleted"}}}},"/api/v3/admin/products/{product_id}/variants":{"get":{"summary":"List product variants","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of variants for a product, including the master variant.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., images, prices, stock_items, option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., sku,price,stock). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"variants found","content":{"application/json":{}}}}},"post":{"summary":"Create a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new variant for a product. Supports nested prices and stock items.\n\nOption types and values are auto-created if they don't exist.\nPrices are upserted by currency. Stock items are upserted by stock location.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"201":{"description":"variant created","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["options"],"properties":{"sku":{"type":"string"},"cost_price":{"type":"string"},"cost_currency":{"type":"string"},"weight":{"type":"number"},"height":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"weight_unit":{"type":"string"},"dimensions_unit":{"type":"string"},"track_inventory":{"type":"boolean"},"tax_category_id":{"type":"string"},"options":{"type":"array","description":"Required. A variant created here is always non-master, so it must declare at least one option pair (e.g. size + color) or creation fails with 422. One pair per option type the variant participates in. Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"position":{"type":"integer"},"barcode":{"type":"string"},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}}}}},"/api/v3/admin/products/{product_id}/variants/{id}":{"get":{"summary":"Get a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single variant by ID.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Variant ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., images, prices, stock_items, option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., sku,price,stock). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"variant found","content":{"application/json":{}}},"404":{"description":"variant not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a variant. Only provided fields are updated.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Variant ID","schema":{"type":"string"}}],"responses":{"200":{"description":"variant updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string"},"cost_price":{"type":"string"},"cost_currency":{"type":"string"},"weight":{"type":"number"},"height":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"weight_unit":{"type":"string"},"dimensions_unit":{"type":"string"},"track_inventory":{"type":"boolean"},"tax_category_id":{"type":"string"},"options":{"type":"array","description":"One pair per option type the variant participates in (e.g. size + color). Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"position":{"type":"integer"},"barcode":{"type":"string"},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}}}},"delete":{"summary":"Delete a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes a variant.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Variant ID","schema":{"type":"string"}}],"responses":{"204":{"description":"variant deleted"}}}},"/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries":{"parameters":[{"name":"webhook_endpoint_id","in":"path","required":true,"description":"Parent webhook endpoint ID","schema":{"type":"string"}}],"get":{"summary":"List webhook deliveries","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns delivery attempts for the given endpoint, most recent first.\nEach row carries the original request payload, the response code\n(when the receiver replied), the execution time, and any transport\nerror — everything needed to audit failures and decide whether to\nredeliver.\n\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[event_name_eq]","in":"query","required":false,"description":"Filter by event name (exact)","schema":{"type":"string"}},{"name":"q[success_eq]","in":"query","required":false,"description":"Filter by success flag","schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-delivered_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"deliveries found","content":{"application/json":{}}},"404":{"description":"parent webhook endpoint not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}":{"parameters":[{"name":"webhook_endpoint_id","in":"path","required":true,"description":"Parent webhook endpoint ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Webhook delivery ID","schema":{"type":"string"}}],"get":{"summary":"Get a webhook delivery","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single delivery attempt with the full request payload and\nthe response body the receiver returned. Use this for ad-hoc debug\nof failed deliveries.\n\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"delivery found","content":{"application/json":{}}},"404":{"description":"delivery not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}/redeliver":{"parameters":[{"name":"webhook_endpoint_id","in":"path","required":true,"description":"Parent webhook endpoint ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Webhook delivery ID to redeliver","schema":{"type":"string"}}],"post":{"summary":"Redeliver a webhook delivery","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new delivery row with the same payload + event_name and\nqueues it. The original row is preserved for audit history.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"redelivery queued","content":{"application/json":{}}}}}},"/api/v3/admin/webhook_endpoints":{"get":{"summary":"List webhook endpoints","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns outbound webhook subscriptions for the current store. Each\nendpoint receives a signed POST when any subscribed event fires.\n`secret_key` is `null` on list reads — the plaintext is delivered\nexactly once on create.\n\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"q[url_cont]","in":"query","required":false,"description":"Filter by URL (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoints found","content":{"application/json":{}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new outbound webhook subscription. The plaintext\n`secret_key` is returned **once** in this response — persist it\nimmediately to verify incoming webhook signatures. Subsequent reads\nreturn `null` for the secret. Pass an empty `subscriptions` array or\nomit it to receive every event.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"webhook endpoint created — secret_key returned once","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"name":{"type":"string"},"url":{"type":"string"},"active":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/webhook_endpoints/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"get":{"summary":"Get a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single webhook endpoint by prefixed ID.\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint found","content":{"application/json":{}}},"404":{"description":"webhook endpoint not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates name, URL, active flag, or the event subscription list.\nToggling `active` here is equivalent to calling `disable`/`enable`\nwithout an audit reason.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint updated","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"active":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the endpoint and stops future deliveries.\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"204":{"description":"webhook endpoint deleted"}}}},"/api/v3/admin/webhook_endpoints/{id}/send_test":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"post":{"summary":"Send a test delivery","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a `webhook.test` delivery record and queues it. Use this to\nverify the endpoint is reachable and your signature verification\naccepts Spree's payloads.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"test delivery queued","content":{"application/json":{}}}}}},"/api/v3/admin/webhook_endpoints/{id}/enable":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"patch":{"summary":"Re-enable a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Re-enables an endpoint that was manually or automatically disabled.\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint enabled","content":{"application/json":{}}}}}},"/api/v3/admin/webhook_endpoints/{id}/disable":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"patch":{"summary":"Disable a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Manually pauses an endpoint. Unlike auto-disable (triggered after\nrepeated delivery failures), no notification email is sent.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint disabled","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}}}}},"components":{"schemas":{"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"count":{"type":"integer","description":"Total number of records"},"pages":{"type":"integer","description":"Total number of pages"},"from":{"type":"integer","description":"Index of first record on this page"},"to":{"type":"integer","description":"Index of last record on this page"},"in":{"type":"integer","description":"Number of records on this page"},"previous":{"type":"integer","nullable":true,"description":"Previous page number"},"next":{"type":"integer","nullable":true,"description":"Next page number"}},"required":["page","limit","count","pages","from","to","in"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","description":"Field-specific validation errors","nullable":true}},"required":["code","message"]}},"required":["error"]},"AuthResponse":{"type":"object","properties":{"token":{"type":"string","description":"JWT access token"},"user":{"$ref":"#/components/schemas/AdminUser"}},"required":["token","user"]},"PermissionRule":{"type":"object","description":"A single permission rule (CanCanCan rule). Rules are applied in order, last-matching-wins.","properties":{"allow":{"type":"boolean","description":"true for `can`, false for `cannot`"},"actions":{"type":"array","items":{"type":"string"},"description":"Action names, e.g. [\"read\", \"update\"] or [\"manage\"]"},"subjects":{"type":"array","items":{"type":"string"},"description":"Subject class names, e.g. [\"Spree::Product\"] or [\"all\"]"},"has_conditions":{"type":"boolean","description":"True if the server-side rule has per-record conditions. The SPA shows the action optimistically and handles 403 from the API."}},"required":["allow","actions","subjects","has_conditions"]},"MeResponse":{"type":"object","description":"Current admin user profile and serialized permissions","properties":{"user":{"$ref":"#/components/schemas/AdminUser"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionRule"}}},"required":["user","permissions"]},"ImportSchemaField":{"type":"object","description":"A canonical column of an import type, including per-store custom field columns","properties":{"name":{"type":"string","description":"Canonical field name used in mappings"},"label":{"type":"string","description":"Human-readable label"},"required":{"type":"boolean","description":"Whether the field must be mapped before processing"}},"required":["name","label","required"]},"CheckoutRequirement":{"type":"object","properties":{"step":{"type":"string","description":"Checkout step this requirement belongs to"},"field":{"type":"string","description":"Field that needs to be satisfied"},"message":{"type":"string","description":"Human-readable requirement message"}},"required":["step","field","message"]},"CartWarning":{"type":"object","description":"A warning about a cart issue (e.g., item removed due to stock change)","properties":{"code":{"type":"string","description":"Machine-readable warning code"},"message":{"type":"string","description":"Human-readable warning message"},"line_item_id":{"type":"string","nullable":true,"description":"Prefixed line item ID (when applicable)"},"variant_id":{"type":"string","nullable":true,"description":"Prefixed variant ID (when applicable)"}},"required":["code","message"]},"FulfillmentManifestItem":{"type":"object","description":"An item within a fulfillment — which line item and how many units are in this fulfillment","properties":{"item_id":{"type":"string","description":"Line item ID"},"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer","description":"Quantity in this fulfillment"}},"required":["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"},"name":{"type":"string","description":"Role name"}},"required":["id","name"]},"AdminUserStore":{"type":"object","description":"A store the staff member can access through a role assignment","properties":{"id":{"type":"string","description":"Prefixed store ID"},"name":{"type":"string","description":"Store name"},"code":{"type":"string","description":"Store code"}},"required":["id","name","code"]},"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"},"type":{"type":"string","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","description":"Wire shorthand for the calculator subclass"},"label":{"type":"string"},"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"},"quantity":{"type":"integer"}},"required":["variant_id","quantity"]},"Address":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"country_name":{"type":"string"},"country_iso":{"type":"string"},"state_text":{"type":"string","nullable":true},"state_abbr":{"type":"string","nullable":true},"quick_checkout":{"type":"boolean"},"is_default_billing":{"type":"boolean"},"is_default_shipping":{"type":"boolean"},"state_name":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customer_id":{"type":"string","nullable":true}},"required":["id","first_name","last_name","full_name","address1","address2","postal_code","city","phone","company","country_name","country_iso","state_text","state_abbr","quick_checkout","is_default_billing","is_default_shipping","state_name","label","metadata","created_at","updated_at","customer_id"],"x-typelizer":true},"Adjustment":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"display_amount":{"type":"string"},"included":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"amount":{"type":"string"},"order_id":{"type":"string","nullable":true}},"required":["id","label","display_amount","included","created_at","updated_at","amount","order_id"],"x-typelizer":true},"AdminUser":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string","nullable":true},"selected_locale":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"avatar_url":{"type":"string","nullable":true},"roles":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserRoleAssignment"}},"stores":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserStore"}}},"required":["id","email","first_name","last_name","full_name","selected_locale","created_at","updated_at","avatar_url","roles","stores"],"x-typelizer":true},"AllowedOrigin":{"type":"object","properties":{"id":{"type":"string"},"origin":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","origin","created_at","updated_at"],"x-typelizer":true},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key_type":{"type":"string"},"token_prefix":{"type":"string","nullable":true},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"revoked_at":{"type":"string","nullable":true},"last_used_at":{"type":"string","nullable":true},"channel_id":{"type":"string","nullable":true},"plaintext_token":{"type":"string","nullable":true},"created_by_email":{"type":"string","nullable":true}},"required":["id","name","key_type","token_prefix","scopes","created_at","updated_at","revoked_at","last_used_at","channel_id","plaintext_token","created_by_email"],"x-typelizer":true},"Category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"permalink":{"type":"string"},"position":{"type":"number"},"depth":{"type":"number"},"meta_title":{"type":"string","nullable":true},"meta_description":{"type":"string","nullable":true},"meta_keywords":{"type":"string","nullable":true},"children_count":{"type":"number"},"parent_id":{"type":"string","nullable":true},"description":{"type":"string"},"description_html":{"type":"string"},"image_url":{"type":"string","nullable":true},"square_image_url":{"type":"string","nullable":true},"is_root":{"type":"boolean"},"is_child":{"type":"boolean"},"is_leaf":{"type":"boolean"},"parent":{"$ref":"#/components/schemas/Category"},"children":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"ancestors":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"translations":{"type":"object"},"metadata":{"type":"object"},"pretty_name":{"type":"string"},"lft":{"type":"number"},"rgt":{"type":"number"},"products_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","permalink","position","depth","meta_title","meta_description","meta_keywords","children_count","parent_id","description","description_html","image_url","square_image_url","is_root","is_child","is_leaf","metadata","pretty_name","lft","rgt","products_count","created_at","updated_at"],"x-typelizer":true},"Channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"default":{"type":"boolean"},"storefront_access":{"type":"string"},"guest_checkout":{"type":"boolean"},"preferred_order_routing_strategy":{"type":"string","nullable":true},"preferred_storefront_access":{"type":"string","nullable":true},"preferred_guest_checkout":{"type":"boolean","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","code","active","default","storefront_access","guest_checkout","preferred_order_routing_strategy","preferred_storefront_access","preferred_guest_checkout","created_at","updated_at"],"x-typelizer":true},"Country":{"type":"object","properties":{"iso":{"type":"string"},"iso3":{"type":"string"},"name":{"type":"string"},"states_required":{"type":"boolean"},"zipcode_required":{"type":"boolean"},"states":{"type":"array","items":{"$ref":"#/components/schemas/State"}},"market":{"allOf":[{"$ref":"#/components/schemas/Market"}],"nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["iso","iso3","name","states_required","zipcode_required","created_at","updated_at"],"x-typelizer":true},"CouponCode":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"state":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"promotion_id":{"type":"string"},"order_id":{"type":"string","nullable":true}},"required":["id","code","state","created_at","updated_at","promotion_id","order_id"],"x-typelizer":true},"CreditCard":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"last4":{"type":"string"},"month":{"type":"number"},"year":{"type":"number"},"name":{"type":"string","nullable":true},"default":{"type":"boolean"},"gateway_payment_profile_id":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true},"payment_method_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","brand","last4","month","year","name","default","gateway_payment_profile_id","customer_id","payment_method_id","metadata","created_at","updated_at"],"x-typelizer":true},"CustomFieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"field_type":{"type":"string","enum":["short_text","long_text","rich_text","number","boolean","json"]},"resource_type":{"type":"string"},"storefront_visible":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","namespace","key","label","field_type","resource_type","storefront_visible","created_at","updated_at"],"x-typelizer":true},"CustomField":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","deprecated":true},"field_type":{"type":"string","enum":["short_text","long_text","rich_text","number","boolean","json"]},"key":{"type":"string"},"value":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"storefront_visible":{"type":"boolean"},"custom_field_definition_id":{"type":"string"}},"required":["id","label","type","field_type","key","value","created_at","updated_at","storefront_visible","custom_field_definition_id"],"x-typelizer":true},"CustomerGroup":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"customers_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":["id","name","description","customers_count","created_at","updated_at"],"x-typelizer":true},"Customer":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"accepts_email_marketing":{"type":"boolean"},"full_name":{"type":"string"},"available_store_credit_total":{"type":"string"},"display_available_store_credit_total":{"type":"string"},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"default_billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"default_shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"newsletter_subscriber":{"allOf":[{"$ref":"#/components/schemas/NewsletterSubscriber"}],"nullable":true},"customer_groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"login":{"type":"string","nullable":true},"metadata":{"type":"object"},"last_sign_in_at":{"type":"string","nullable":true},"current_sign_in_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sign_in_count":{"type":"number"},"failed_attempts":{"type":"number"},"last_sign_in_ip":{"type":"string","nullable":true},"current_sign_in_ip":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"internal_note_html":{"type":"string","nullable":true},"default_billing_address_id":{"type":"string","nullable":true},"default_shipping_address_id":{"type":"string","nullable":true},"orders_count":{"type":"number"},"total_spent":{"type":"string"},"display_total_spent":{"type":"string"},"last_order_completed_at":{"type":"string","nullable":true},"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"store_credits":{"type":"array","items":{"$ref":"#/components/schemas/StoreCredit"}},"customer_group_ids":{"type":"array","items":{"type":"string"}}},"required":["id","email","first_name","last_name","phone","accepts_email_marketing","full_name","available_store_credit_total","display_available_store_credit_total","login","metadata","last_sign_in_at","current_sign_in_at","created_at","updated_at","sign_in_count","failed_attempts","last_sign_in_ip","current_sign_in_ip","tags","internal_note_html","default_billing_address_id","default_shipping_address_id","orders_count","total_spent","display_total_spent","last_order_completed_at","customer_group_ids"],"x-typelizer":true},"DeliveryMethod":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","code","created_at","updated_at"],"x-typelizer":true},"DeliveryRate":{"type":"object","properties":{"id":{"type":"string"},"delivery_method_id":{"type":"string"},"name":{"type":"string"},"selected":{"type":"boolean"},"cost":{"type":"string"},"total":{"type":"string"},"additional_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"tax_total":{"type":"string"},"display_cost":{"type":"string"},"display_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"display_tax_total":{"type":"string"},"delivery_method":{"$ref":"#/components/schemas/DeliveryMethod"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","delivery_method_id","name","selected","cost","total","additional_tax_total","included_tax_total","tax_total","display_cost","display_total","display_additional_tax_total","display_included_tax_total","display_tax_total","created_at","updated_at"],"x-typelizer":true},"DigitalLink":{"type":"object","properties":{"id":{"type":"string"},"access_counter":{"type":"number"},"filename":{"type":"string"},"content_type":{"type":"string"},"download_url":{"type":"string"},"authorizable":{"type":"boolean"},"expired":{"type":"boolean"},"access_limit_exceeded":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","access_counter","filename","content_type","download_url","authorizable","expired","access_limit_exceeded","created_at","updated_at"],"x-typelizer":true},"Discount":{"type":"object","properties":{"id":{"type":"string"},"promotion_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"amount":{"type":"string"},"display_amount":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","promotion_id","name","description","code","amount","display_amount","created_at","updated_at"],"x-typelizer":true},"Export":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"format":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string","nullable":true},"user_id":{"type":"string","nullable":true},"done":{"type":"boolean"},"filename":{"type":"string","nullable":true},"byte_size":{"type":"number","nullable":true},"download_url":{"type":"string","nullable":true}},"required":["id","number","format","created_at","updated_at","type","user_id","done","filename","byte_size","download_url"],"x-typelizer":true},"Fulfillment":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"tracking":{"type":"string","nullable":true},"tracking_url":{"type":"string","nullable":true},"cost":{"type":"string"},"display_cost":{"type":"string"},"total":{"type":"string"},"display_total":{"type":"string"},"discount_total":{"type":"string"},"display_discount_total":{"type":"string"},"additional_tax_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"tax_total":{"type":"string"},"display_tax_total":{"type":"string"},"status":{"type":"string"},"fulfillment_type":{"type":"string"},"fulfilled_at":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/FulfillmentManifestItem"}},"delivery_method":{"$ref":"#/components/schemas/DeliveryMethod"},"stock_location":{"$ref":"#/components/schemas/StockLocation"},"delivery_rates":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryRate"}},"metadata":{"type":"object"},"adjustment_total":{"type":"string"},"pre_tax_amount":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"order_id":{"type":"string","nullable":true},"stock_location_id":{"type":"string","nullable":true},"order":{"$ref":"#/components/schemas/Order"},"adjustments":{"type":"array","items":{"$ref":"#/components/schemas/Adjustment"}}},"required":["id","number","tracking","tracking_url","cost","display_cost","total","display_total","discount_total","display_discount_total","additional_tax_total","display_additional_tax_total","included_tax_total","display_included_tax_total","tax_total","display_tax_total","status","fulfillment_type","fulfilled_at","items","metadata","adjustment_total","pre_tax_amount","created_at","updated_at","order_id","stock_location_id"],"x-typelizer":true},"GiftCardBatch":{"type":"object","properties":{"id":{"type":"string"},"codes_count":{"type":"number"},"currency":{"type":"string","nullable":true},"prefix":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"amount":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true}},"required":["id","codes_count","currency","prefix","created_at","updated_at","amount","expires_at","created_by_id"],"x-typelizer":true},"GiftCard":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string"},"amount_used":{"type":"string"},"amount_authorized":{"type":"string"},"amount_remaining":{"type":"string"},"display_amount":{"type":"string"},"display_amount_used":{"type":"string"},"display_amount_remaining":{"type":"string"},"expires_at":{"type":"string","nullable":true},"redeemed_at":{"type":"string","nullable":true},"expired":{"type":"boolean"},"active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customer_id":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true},"customer":{"$ref":"#/components/schemas/Customer"},"created_by":{"$ref":"#/components/schemas/AdminUser"},"gift_card_batch":{"$ref":"#/components/schemas/GiftCardBatch"},"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}},"required":["id","code","status","currency","amount","amount_used","amount_authorized","amount_remaining","display_amount","display_amount_used","display_amount_remaining","expires_at","redeemed_at","expired","active","created_at","updated_at","customer_id","created_by_id"],"x-typelizer":true},"ImportMapping":{"type":"object","properties":{"id":{"type":"string"},"schema_field":{"type":"string"},"file_column":{"type":"string","nullable":true},"required":{"type":"boolean"}},"required":["id","schema_field","file_column","required"],"x-typelizer":true},"ImportRow":{"type":"object","properties":{"id":{"type":"string"},"row_number":{"type":"number"},"status":{"type":"string"},"validation_errors":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"import_id":{"type":"string","nullable":true},"item_type":{"type":"string","nullable":true},"item_id":{"type":"string","nullable":true},"data":{"type":"object"}},"required":["id","row_number","status","validation_errors","created_at","updated_at","import_id","item_type","item_id","data"],"x-typelizer":true},"Import":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"rows_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string","nullable":true},"status":{"type":"string"},"owner_type":{"type":"string","nullable":true},"owner_id":{"type":"string","nullable":true},"user_id":{"type":"string","nullable":true},"processing_errors":{"type":"string","nullable":true},"preferred_delimiter":{"type":"string"},"original_filename":{"type":"string","nullable":true},"original_byte_size":{"type":"number","nullable":true},"original_file_url":{"type":"string","nullable":true},"completed_rows_count":{"type":"number"},"failed_rows_count":{"type":"number"},"schema_fields":{"type":"array","items":{"$ref":"#/components/schemas/ImportSchemaField"}},"csv_headers":{"type":"array","items":{"type":"string"}},"sample_row":{"type":"object"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/ImportMapping"}}},"required":["id","number","rows_count","created_at","updated_at","type","status","owner_type","owner_id","user_id","processing_errors","preferred_delimiter","original_filename","original_byte_size","original_file_url","completed_rows_count","failed_rows_count","schema_fields","csv_headers","sample_row","mappings"],"x-typelizer":true},"Invitation":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"expires_at":{"type":"string"},"role_id":{"type":"string"},"role_name":{"type":"string"},"inviter_email":{"type":"string"},"acceptance_url":{"type":"string"},"invitee_exists":{"type":"boolean"},"store":{"type":"object"}},"required":["id","email","status","created_at","updated_at","expires_at","role_id","role_name","inviter_email","acceptance_url","invitee_exists","store"],"x-typelizer":true},"LineItem":{"type":"object","properties":{"id":{"type":"string"},"variant_id":{"type":"string"},"preorder":{"type":"boolean"},"preorder_ships_at":{"type":"string","nullable":true},"quantity":{"type":"number"},"currency":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"options_text":{"type":"string"},"price":{"type":"string"},"display_price":{"type":"string"},"total":{"type":"string"},"display_total":{"type":"string"},"adjustment_total":{"type":"string"},"display_adjustment_total":{"type":"string"},"additional_tax_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"discount_total":{"type":"string"},"display_discount_total":{"type":"string"},"pre_tax_amount":{"type":"string"},"display_pre_tax_amount":{"type":"string"},"discounted_amount":{"type":"string"},"display_discounted_amount":{"type":"string"},"display_compare_at_amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true},"thumbnail_url":{"type":"string","nullable":true},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}},"digital_links":{"type":"array","items":{"$ref":"#/components/schemas/DigitalLink"}},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"cost_price":{"type":"string","nullable":true},"tax_category_id":{"type":"string","nullable":true},"variant":{"$ref":"#/components/schemas/Variant"},"tax_category":{"$ref":"#/components/schemas/TaxCategory"},"adjustments":{"type":"array","items":{"$ref":"#/components/schemas/Adjustment"}}},"required":["id","variant_id","preorder","preorder_ships_at","quantity","currency","name","slug","options_text","price","display_price","total","display_total","adjustment_total","display_adjustment_total","additional_tax_total","display_additional_tax_total","included_tax_total","display_included_tax_total","discount_total","display_discount_total","pre_tax_amount","display_pre_tax_amount","discounted_amount","display_discounted_amount","display_compare_at_amount","compare_at_amount","thumbnail_url","option_values","digital_links","metadata","created_at","updated_at","cost_price","tax_category_id"],"x-typelizer":true},"Market":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"default_locale":{"type":"string"},"tax_inclusive":{"type":"boolean"},"default":{"type":"boolean"},"country_isos":{"type":"array","items":{"type":"string"}},"supported_locales":{"type":"array","items":{"type":"string"}},"countries":{"type":"array","items":{"$ref":"#/components/schemas/Country"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","currency","default_locale","tax_inclusive","default","country_isos","supported_locales","created_at","updated_at"],"x-typelizer":true},"Media":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string","nullable":true},"variant_ids":{"type":"array","items":{"type":"string"}},"position":{"type":"number"},"alt":{"type":"string","nullable":true},"media_type":{"type":"string"},"focal_point_x":{"type":"number","nullable":true},"focal_point_y":{"type":"number","nullable":true},"external_video_url":{"type":"string","nullable":true},"original_url":{"type":"string","nullable":true},"mini_url":{"type":"string","nullable":true},"small_url":{"type":"string","nullable":true},"medium_url":{"type":"string","nullable":true},"large_url":{"type":"string","nullable":true},"xlarge_url":{"type":"string","nullable":true},"og_image_url":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"viewable_id":{"type":"string"},"download_url":{"type":"string","nullable":true},"metadata":{"type":"object"},"viewable_type":{"type":"string"}},"required":["id","product_id","variant_ids","position","alt","media_type","focal_point_x","focal_point_y","external_video_url","original_url","mini_url","small_url","medium_url","large_url","xlarge_url","og_image_url","created_at","updated_at","viewable_id","download_url","metadata","viewable_type"],"x-typelizer":true},"NewsletterSubscriber":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"verified":{"type":"boolean"},"verified_at":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true}},"required":["id","email","created_at","updated_at","verified","verified_at","customer_id"],"x-typelizer":true},"OptionType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"number"},"kind":{"type":"string"},"translations":{"type":"object"},"metadata":{"type":"object"},"filterable":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}}},"required":["id","name","label","position","kind","metadata","filterable","created_at","updated_at"],"x-typelizer":true},"OptionValue":{"type":"object","properties":{"id":{"type":"string"},"option_type_id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"number"},"color_code":{"type":"string","nullable":true},"option_type_name":{"type":"string"},"option_type_label":{"type":"string"},"image_url":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"option_type":{"$ref":"#/components/schemas/OptionType"}},"required":["id","option_type_id","name","label","position","color_code","option_type_name","option_type_label","image_url","metadata","created_at","updated_at"],"x-typelizer":true},"OrderRoutingRule":{"type":"object","properties":{"id":{"type":"string"},"position":{"type":"number"},"active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"channel_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"object"},"label":{"type":"string"},"description":{"type":"string"}},"required":["id","position","active","created_at","updated_at","type","channel_id","preferences","preference_schema","label","description"],"x-typelizer":true},"Order":{"type":"object","properties":{"id":{"type":"string"},"market_id":{"type":"string","nullable":true},"channel_id":{"type":"string","nullable":true},"number":{"type":"string"},"email":{"type":"string"},"customer_note":{"type":"string","nullable":true},"currency":{"type":"string"},"locale":{"type":"string","nullable":true},"total_quantity":{"type":"number"},"fulfillment_status":{"type":"string","nullable":true},"payment_status":{"type":"string","nullable":true},"completed_at":{"type":"string","nullable":true},"item_total":{"type":"string"},"display_item_total":{"type":"string"},"adjustment_total":{"type":"string"},"display_adjustment_total":{"type":"string"},"discount_total":{"type":"string"},"display_discount_total":{"type":"string"},"tax_total":{"type":"string"},"display_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"additional_tax_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"total":{"type":"string"},"display_total":{"type":"string"},"gift_card_total":{"type":"string"},"display_gift_card_total":{"type":"string"},"amount_due":{"type":"string"},"display_amount_due":{"type":"string"},"delivery_total":{"type":"string"},"display_delivery_total":{"type":"string"},"store_credit_total":{"type":"string"},"display_store_credit_total":{"type":"string"},"covered_by_store_credit":{"type":"boolean"},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}},"fulfillments":{"type":"array","items":{"$ref":"#/components/schemas/Fulfillment"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"gift_card":{"allOf":[{"$ref":"#/components/schemas/GiftCard"}],"nullable":true},"market":{"allOf":[{"$ref":"#/components/schemas/Market"}],"nullable":true},"status":{"type":"string"},"last_ip_address":{"type":"string","nullable":true},"considered_risky":{"type":"boolean"},"confirmation_delivered":{"type":"boolean"},"store_owner_notification_delivered":{"type":"boolean"},"payment_total":{"type":"string"},"display_payment_total":{"type":"string"},"metadata":{"type":"object"},"canceled_at":{"type":"string","nullable":true},"approved_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"preferred_stock_location_id":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"internal_note":{"type":"string","nullable":true},"approver_id":{"type":"string","nullable":true},"canceler_id":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true},"channel":{"$ref":"#/components/schemas/Channel"},"preferred_stock_location":{"$ref":"#/components/schemas/StockLocation"},"payment_methods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"customer":{"$ref":"#/components/schemas/Customer"},"approver":{"$ref":"#/components/schemas/Customer"},"canceler":{"$ref":"#/components/schemas/Customer"},"created_by":{"$ref":"#/components/schemas/Customer"},"adjustments":{"type":"array","items":{"$ref":"#/components/schemas/Adjustment"}},"return_authorizations":{"type":"array","items":{"$ref":"#/components/schemas/ReturnAuthorization"}},"reimbursements":{"type":"array","items":{"$ref":"#/components/schemas/Reimbursement"}}},"required":["id","market_id","channel_id","number","email","customer_note","currency","locale","total_quantity","fulfillment_status","payment_status","completed_at","item_total","display_item_total","adjustment_total","display_adjustment_total","discount_total","display_discount_total","tax_total","display_tax_total","included_tax_total","display_included_tax_total","additional_tax_total","display_additional_tax_total","total","display_total","gift_card_total","display_gift_card_total","amount_due","display_amount_due","delivery_total","display_delivery_total","store_credit_total","display_store_credit_total","covered_by_store_credit","gift_card","market","status","last_ip_address","considered_risky","confirmation_delivered","store_owner_notification_delivered","payment_total","display_payment_total","metadata","canceled_at","approved_at","created_at","updated_at","preferred_stock_location_id","tags","internal_note","approver_id","canceler_id","created_by_id","customer_id"],"x-typelizer":true},"PaymentMethod":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string"},"session_required":{"type":"boolean"},"source_required":{"type":"boolean"},"metadata":{"type":"object"},"active":{"type":"boolean"},"auto_capture":{"type":"boolean","nullable":true},"storefront_visible":{"type":"boolean"},"position":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"object"}},"required":["id","name","description","type","session_required","source_required","metadata","active","auto_capture","storefront_visible","position","created_at","updated_at","preferences","preference_schema"],"x-typelizer":true},"Payment":{"type":"object","properties":{"id":{"type":"string"},"payment_method_id":{"type":"string"},"response_code":{"type":"string","nullable":true},"number":{"type":"string"},"amount":{"type":"string"},"display_amount":{"type":"string"},"status":{"type":"string"},"source_type":{"type":"string","nullable":true,"enum":["credit_card","store_credit","payment_source"]},"source_id":{"type":"string","nullable":true},"source":{"anyOf":[{"$ref":"#/components/schemas/CreditCard"},{"$ref":"#/components/schemas/StoreCredit"},{"$ref":"#/components/schemas/PaymentSource"}],"nullable":true},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"},"metadata":{"type":"object"},"avs_response":{"type":"string","nullable":true},"cvv_response_code":{"type":"string","nullable":true},"cvv_response_message":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"captured_amount":{"type":"string"},"order_id":{"type":"string","nullable":true},"order":{"$ref":"#/components/schemas/Order"},"refunds":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}}},"required":["id","payment_method_id","response_code","number","amount","display_amount","status","source_type","source_id","source","metadata","avs_response","cvv_response_code","cvv_response_message","created_at","updated_at","captured_amount","order_id"],"x-typelizer":true},"PaymentSource":{"type":"object","properties":{"id":{"type":"string"},"gateway_payment_profile_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","gateway_payment_profile_id","metadata","created_at","updated_at"],"x-typelizer":true},"PriceHistory":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"amount_in_cents":{"type":"number"},"currency":{"type":"string"},"display_amount":{"type":"string"},"recorded_at":{"type":"string"},"variant_id":{"type":"string"},"price_id":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true},"created_at":{"type":"string"}},"required":["id","amount","amount_in_cents","currency","display_amount","recorded_at","variant_id","price_id","compare_at_amount","created_at"],"x-typelizer":true},"PriceList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string"},"position":{"type":"number"},"match_policy":{"type":"string"},"starts_at":{"type":"string","nullable":true},"ends_at":{"type":"string","nullable":true},"deleted_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"currently_active":{"type":"boolean"},"products_count":{"type":"number"},"prices_count":{"type":"number"},"product_ids":{"type":"array","items":{"type":"string"}},"price_rules":{"type":"array","items":{"$ref":"#/components/schemas/PriceRule"}}},"required":["id","name","description","status","position","match_policy","starts_at","ends_at","deleted_at","created_at","updated_at","currently_active","products_count","prices_count","product_ids"],"x-typelizer":true},"PriceRule":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"price_list_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceField"}},"label":{"type":"string"},"description":{"type":"string","nullable":true},"markets":{"type":"array","items":{"$ref":"#/components/schemas/Market"}},"customer_groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":["id","created_at","updated_at","type","price_list_id","preferences","preference_schema","label","description"],"x-typelizer":true},"Price":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string","nullable":true},"amount_in_cents":{"type":"number","nullable":true},"compare_at_amount":{"type":"string","nullable":true},"compare_at_amount_in_cents":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true},"display_amount":{"type":"string","nullable":true},"display_compare_at_amount":{"type":"string","nullable":true},"price_list_id":{"type":"string","nullable":true},"variant_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"variant":{"$ref":"#/components/schemas/Variant"}},"required":["id","amount","amount_in_cents","compare_at_amount","compare_at_amount_in_cents","currency","display_amount","display_compare_at_amount","price_list_id","variant_id","created_at","updated_at"],"x-typelizer":true},"ProductPublication":{"type":"object","properties":{"id":{"type":"string"},"published_at":{"type":"string","nullable":true},"unpublished_at":{"type":"string","nullable":true},"product_id":{"type":"string"},"channel_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","published_at","unpublished_at","product_id","channel_id","created_at","updated_at"],"x-typelizer":true},"Product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"meta_title":{"type":"string","nullable":true},"meta_description":{"type":"string","nullable":true},"meta_keywords":{"type":"string","nullable":true},"variant_count":{"type":"number"},"available_on":{"type":"string","nullable":true},"preorder_ships_at":{"type":"string","nullable":true},"purchasable":{"type":"boolean"},"preorder":{"type":"boolean"},"in_stock":{"type":"boolean"},"backorderable":{"type":"boolean"},"available":{"type":"boolean"},"description":{"type":"string","nullable":true},"description_html":{"type":"string","nullable":true},"default_variant_id":{"type":"string"},"thumbnail_url":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"nullable":true},"original_price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"nullable":true},"primary_media":{"$ref":"#/components/schemas/Media"},"media":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/Variant"}},"default_variant":{"$ref":"#/components/schemas/Variant"},"option_types":{"type":"array","items":{"$ref":"#/components/schemas/OptionType"}},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"prior_price":{"allOf":[{"$ref":"#/components/schemas/PriceHistory"}],"nullable":true},"translations":{"type":"object"},"status":{"type":"string"},"metadata":{"type":"object"},"deleted_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"tax_category_id":{"type":"string","nullable":true},"product_publications":{"type":"array","items":{"$ref":"#/components/schemas/ProductPublication"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}}},"required":["id","name","slug","meta_title","meta_description","meta_keywords","variant_count","available_on","preorder_ships_at","purchasable","preorder","in_stock","backorderable","available","description","description_html","default_variant_id","thumbnail_url","tags","price","original_price","status","metadata","deleted_at","created_at","updated_at","tax_category_id"],"x-typelizer":true},"PromotionAction":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"promotion_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceField"}},"label":{"type":"string"},"calculator":{"allOf":[{"$ref":"#/components/schemas/PromotionActionCalculator"}],"nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/PromotionActionLineItem"},"nullable":true}},"required":["id","created_at","updated_at","type","promotion_id","preferences","preference_schema","label","calculator","line_items"],"x-typelizer":true},"PromotionRule":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"promotion_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceField"}},"label":{"type":"string"},"product_ids":{"type":"array","items":{"type":"string"},"nullable":true},"category_ids":{"type":"array","items":{"type":"string"},"nullable":true},"customer_ids":{"type":"array","items":{"type":"string"},"nullable":true},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"customer_groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"countries":{"type":"array","items":{"$ref":"#/components/schemas/Country"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"markets":{"type":"array","items":{"$ref":"#/components/schemas/Market"}}},"required":["id","created_at","updated_at","type","promotion_id","preferences","preference_schema","label","product_ids","category_ids","customer_ids"],"x-typelizer":true},"Promotion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"starts_at":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true},"usage_limit":{"type":"number","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"path":{"type":"string","nullable":true},"kind":{"type":"string","enum":["coupon_code","automatic"]},"multi_codes":{"type":"boolean"},"number_of_codes":{"type":"number","nullable":true},"code_prefix":{"type":"string","nullable":true},"promotion_category_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"action_ids":{"type":"array","items":{"type":"string"}},"rule_ids":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","code","starts_at","expires_at","usage_limit","match_policy","path","kind","multi_codes","number_of_codes","code_prefix","promotion_category_id","metadata","created_at","updated_at","action_ids","rule_ids"],"x-typelizer":true},"Refund":{"type":"object","properties":{"id":{"type":"string"},"transaction_id":{"type":"string","nullable":true},"amount":{"type":"string","nullable":true},"payment_id":{"type":"string","nullable":true},"refund_reason_id":{"type":"string","nullable":true},"reimbursement_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment":{"$ref":"#/components/schemas/Payment"},"reimbursement":{"$ref":"#/components/schemas/Reimbursement"}},"required":["id","transaction_id","amount","payment_id","refund_reason_id","reimbursement_id","metadata","created_at","updated_at"],"x-typelizer":true},"Reimbursement":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"reimbursement_status":{"type":"string","nullable":true},"total":{"type":"string","nullable":true},"order_id":{"type":"string","nullable":true},"customer_return_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"order":{"$ref":"#/components/schemas/Order"}},"required":["id","number","reimbursement_status","total","order_id","customer_return_id","created_at","updated_at"],"x-typelizer":true},"ReturnAuthorization":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"status":{"type":"string"},"order_id":{"type":"string","nullable":true},"stock_location_id":{"type":"string","nullable":true},"return_authorization_reason_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"order":{"$ref":"#/components/schemas/Order"},"stock_location":{"$ref":"#/components/schemas/StockLocation"}},"required":["id","number","status","order_id","stock_location_id","return_authorization_reason_id","created_at","updated_at"],"x-typelizer":true},"Role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","created_at","updated_at"],"x-typelizer":true},"SetupTask":{"type":"object","properties":{"name":{"type":"string"},"done":{"type":"boolean"}},"required":["name","done"],"x-typelizer":true},"State":{"type":"object","properties":{"abbr":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["abbr","name","created_at","updated_at"],"x-typelizer":true},"StockItem":{"type":"object","properties":{"id":{"type":"string"},"count_on_hand":{"type":"number"},"backorderable":{"type":"boolean"},"stock_location_id":{"type":"string","nullable":true},"variant_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"allocated_count":{"type":"number"},"available_count":{"type":"number"},"stock_location":{"$ref":"#/components/schemas/StockLocation"},"variant":{"$ref":"#/components/schemas/Variant"}},"required":["id","count_on_hand","backorderable","stock_location_id","variant_id","metadata","created_at","updated_at","allocated_count","available_count"],"x-typelizer":true},"StockLocation":{"type":"object","properties":{"id":{"type":"string"},"state_abbr":{"type":"string","nullable":true},"name":{"type":"string"},"address1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"country_iso":{"type":"string","nullable":true},"country_name":{"type":"string","nullable":true},"state_text":{"type":"string","nullable":true},"admin_name":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"state_name":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"active":{"type":"boolean"},"default":{"type":"boolean"},"backorderable_default":{"type":"boolean"},"propagate_all_variants":{"type":"boolean"},"kind":{"type":"string"},"pickup_enabled":{"type":"boolean"},"pickup_stock_policy":{"type":"string"},"pickup_ready_in_minutes":{"type":"number","nullable":true},"pickup_instructions":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","state_abbr","name","address1","city","zipcode","country_iso","country_name","state_text","admin_name","address2","state_name","phone","company","active","default","backorderable_default","propagate_all_variants","kind","pickup_enabled","pickup_stock_policy","pickup_ready_in_minutes","pickup_instructions","created_at","updated_at"],"x-typelizer":true},"StockReservation":{"type":"object","properties":{"id":{"type":"string"},"stock_item_id":{"type":"string"},"line_item_id":{"type":"string"},"order_id":{"type":"string"},"variant_id":{"type":"string","nullable":true},"stock_location_id":{"type":"string","nullable":true},"quantity":{"type":"number"},"expires_at":{"type":"string"},"active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","stock_item_id","line_item_id","order_id","variant_id","stock_location_id","quantity","expires_at","active","created_at","updated_at"],"x-typelizer":true},"StockTransfer":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"reference":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"source_location_id":{"type":"string","nullable":true},"destination_location_id":{"type":"string","nullable":true},"source_location":{"$ref":"#/components/schemas/StockLocation"},"destination_location":{"$ref":"#/components/schemas/StockLocation"}},"required":["id","number","reference","metadata","created_at","updated_at","source_location_id","destination_location_id"],"x-typelizer":true},"StoreCreditCategory":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"non_expiring":{"type":"boolean"}},"required":["id","name","created_at","updated_at","non_expiring"],"x-typelizer":true},"StoreCredit":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"amount_used":{"type":"string"},"amount_remaining":{"type":"string"},"display_amount":{"type":"string"},"display_amount_used":{"type":"string"},"display_amount_remaining":{"type":"string"},"currency":{"type":"string"},"memo":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customer_id":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true},"category_id":{"type":"string","nullable":true},"category_name":{"type":"string","nullable":true}},"required":["id","amount","amount_used","amount_remaining","display_amount","display_amount_used","display_amount_remaining","currency","memo","metadata","created_at","updated_at","customer_id","created_by_id","category_id","category_name"],"x-typelizer":true},"Store":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object"},"name":{"type":"string"},"code":{"type":"string"},"preferred_storefront_url":{"type":"string","nullable":true},"default_currency":{"type":"string"},"default_locale":{"type":"string"},"mail_from_address":{"type":"string","nullable":true},"customer_support_email":{"type":"string","nullable":true},"new_order_notifications_email":{"type":"string","nullable":true},"preferred_send_consumer_transactional_emails":{"type":"boolean"},"preferred_admin_locale":{"type":"string","nullable":true},"preferred_timezone":{"type":"string"},"preferred_weight_unit":{"type":"string"},"preferred_unit_system":{"type":"string"},"preferred_storefront_access":{"type":"string"},"preferred_guest_checkout":{"type":"boolean"},"preferred_order_routing_strategy":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"url":{"type":"string"},"api_url":{"type":"string"},"setup_tasks":{"type":"array","items":{"$ref":"#/components/schemas/SetupTask"}},"supported_currencies":{"type":"array","items":{"type":"string"}},"supported_locales":{"type":"array","items":{"type":"string"}},"available_locales":{"type":"array","items":{"type":"string"}},"logo_url":{"type":"string","nullable":true},"mailer_logo_url":{"type":"string","nullable":true}},"required":["id","metadata","name","code","preferred_storefront_url","default_currency","default_locale","mail_from_address","customer_support_email","new_order_notifications_email","preferred_send_consumer_transactional_emails","preferred_admin_locale","preferred_timezone","preferred_weight_unit","preferred_unit_system","preferred_storefront_access","preferred_guest_checkout","preferred_order_routing_strategy","created_at","updated_at","url","api_url","setup_tasks","supported_currencies","supported_locales","available_locales","logo_url","mailer_logo_url"],"x-typelizer":true},"TaxCategory":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tax_code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"is_default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","tax_code","description","is_default","created_at","updated_at"],"x-typelizer":true},"Variant":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"sku":{"type":"string","nullable":true},"options_text":{"type":"string"},"track_inventory":{"type":"boolean"},"media_count":{"type":"number"},"preorder_ships_at":{"type":"string","nullable":true},"thumbnail_url":{"type":"string","nullable":true},"purchasable":{"type":"boolean"},"in_stock":{"type":"boolean"},"backorderable":{"type":"boolean"},"preorder":{"type":"boolean"},"weight":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"width":{"type":"number","nullable":true},"depth":{"type":"number","nullable":true},"price":{"$ref":"#/components/schemas/Price"},"original_price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"nullable":true},"primary_media":{"$ref":"#/components/schemas/Media"},"media":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"prior_price":{"allOf":[{"$ref":"#/components/schemas/PriceHistory"}],"nullable":true},"metadata":{"type":"object"},"position":{"type":"number"},"cost_price":{"type":"string","nullable":true},"cost_currency":{"type":"string","nullable":true},"barcode":{"type":"string","nullable":true},"weight_unit":{"type":"string","nullable":true},"dimensions_unit":{"type":"string","nullable":true},"backorder_limit":{"type":"number","nullable":true},"deleted_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"preorderable":{"type":"boolean"},"tax_category_id":{"type":"string","nullable":true},"available_stock":{"type":"number","nullable":true},"reserved_quantity":{"type":"number"},"total_on_hand":{"type":"number","nullable":true},"product_name":{"type":"string"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/Price"}},"stock_items":{"type":"array","items":{"$ref":"#/components/schemas/StockItem"}}},"required":["id","product_id","sku","options_text","track_inventory","media_count","preorder_ships_at","thumbnail_url","purchasable","in_stock","backorderable","preorder","weight","height","width","depth","price","original_price","option_values","metadata","position","cost_price","cost_currency","barcode","weight_unit","dimensions_unit","backorder_limit","deleted_at","created_at","updated_at","preorderable","tax_category_id","available_stock","reserved_quantity","total_on_hand","product_name"],"x-typelizer":true},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"event_name":{"type":"string"},"event_id":{"type":"string","nullable":true},"response_code":{"type":"number","nullable":true},"execution_time":{"type":"number","nullable":true},"error_type":{"type":"string","nullable":true},"request_errors":{"type":"string","nullable":true},"response_body":{"type":"string","nullable":true},"success":{"type":"boolean","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"delivered_at":{"type":"string","nullable":true},"payload":{"type":"object"},"webhook_endpoint_id":{"type":"string"},"webhook_endpoint_url":{"type":"string"}},"required":["id","event_name","event_id","response_code","execution_time","error_type","request_errors","response_body","success","created_at","updated_at","delivered_at","payload","webhook_endpoint_id","webhook_endpoint_url"],"x-typelizer":true},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"url":{"type":"string"},"active":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string"}},"disabled_reason":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"disabled_at":{"type":"string","nullable":true},"secret_key":{"type":"string","nullable":true},"last_delivery_at":{"type":"string","nullable":true},"recent_delivery_count":{"type":"number"},"recent_failure_count":{"type":"number"},"total_delivery_count":{"type":"number"},"successful_delivery_count":{"type":"number"},"failed_delivery_count":{"type":"number"}},"required":["id","name","url","active","subscriptions","disabled_reason","created_at","updated_at","disabled_at","secret_key","last_delivery_at","recent_delivery_count","recent_failure_count","total_delivery_count","successful_delivery_count","failed_delivery_count"],"x-typelizer":true}}}}++{"info":{"title":"Admin API","contact":{"name":"Spree Commerce","url":"https://spreecommerce.org","email":"[email protected]"},"description":"Spree Admin API v3 - Administrative API for managing products, orders, and store settings.\n\n## Authentication\n\nThe Admin API requires a secret API key passed in the `x-spree-api-key` header.\nSecret API keys can be generated in the Spree admin dashboard.\n\n## Response Format\n\nAll responses are JSON. List endpoints return paginated responses with `data` and `meta` keys.\nSingle resource endpoints return a flat JSON object.\n\n## Resource IDs\n\nEvery resource is identified by an opaque string ID (e.g. `prod_86Rf07xd4z`,\n`variant_k5nR8xLq`, `or_UkLWZg9DAJ`). Use these IDs everywhere — URL paths,\nrequest bodies, and Ransack filters all accept them directly.\n\n## Error Handling\n\nErrors return a consistent format:\n```json\n{\n \"error\": {\n \"code\": \"validation_error\",\n \"message\": \"Validation failed\",\n \"details\": { \"name\": [\"can't be blank\"] }\n }\n}\n```\n","version":"v3"},"paths":{"/api/v3/admin/auth/login":{"post":{"summary":"Login","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Authenticates an admin user and returns a short-lived JWT access token.\nThe rotatable refresh token is set in an HttpOnly cookie — it is not\nincluded in the response body.\n\nThe `provider` field selects the authentication method. When omitted it\ndefaults to `email`, the built-in email/password login.\n\nTo authenticate against a third-party identity provider (Okta, Azure AD,\nGoogle Workspace SSO, a custom JWT issuer, SAML, etc.), send\n`{ \"provider\": \"<your_key>\", ... }` with the fields that provider\nrequires. The endpoint returns the same JWT regardless of which provider\nauthenticated the request. See\n[Custom API Authentication](https://spreecommerce.org/docs/developer/how-to/custom-api-authentication)\nfor the list of configured providers and their required fields.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"login successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"401":{"description":"invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"title":"EmailPasswordLogin","description":"Built-in email/password authentication (default when `provider` is omitted).","type":"object","properties":{"provider":{"type":"string","enum":["email"],"default":"email"},"email":{"type":"string","format":"email"},"password":{"type":"string"}},"required":["email","password"]},{"title":"ProviderLogin","description":"Provider-dispatched login. The `provider` key selects a configured\nauthentication provider; the remaining fields are forwarded to it.\nRequired fields depend on the provider — see\n[Custom API Authentication](https://spreecommerce.org/docs/developer/how-to/custom-api-authentication).\n","type":"object","properties":{"provider":{"type":"string","description":"Registered provider key (anything other than `email`).","not":{"enum":["email"]}}},"required":["provider"],"additionalProperties":true}]}}}}}},"/api/v3/admin/auth/refresh":{"post":{"summary":"Refresh token","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Exchanges the HttpOnly refresh-token cookie for a new access JWT and a\nrotated refresh token cookie. No request body or Authorization header\nis required — the cookie alone authenticates the call.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"refresh successful","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"401":{"description":"missing or invalid refresh-token cookie","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/auth/logout":{"post":{"summary":"Logout","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Revokes the refresh-token cookie, effectively logging the admin out.","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"logout successful"}}}},"/api/v3/admin/me":{"get":{"summary":"Get current admin user and permissions","tags":["Authentication"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the current admin user profile and a serialized list of permissions (CanCanCan rules). The SPA uses these to drive UI permission checks.","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"current admin user and permissions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update the current admin profile","tags":["Authentication"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Self-service update of the signed-in admin's own profile, such as their admin UI display language (`selected_locale`).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"profile updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"selected_locale":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"}}}}}}}},"/api/v3/admin/auth/password_resets":{"post":{"summary":"Request password reset","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Requests a password reset email for an admin user. Always returns `202`\nwhether or not the email matches an account, to prevent enumeration.\n\n`redirect_url` is where the emailed link should point (the reset token\nis appended as a `token` query param). It must match one of the store's\nallowed origins — otherwise it is silently ignored and the server-side\ndefault is used. The email is delivered by Spree itself via the\n`admin_user.password_reset_requested` event; this event is never\nforwarded to webhook endpoints.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"reset requested","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"redirect_url":{"type":"string","description":"Must match an allowed origin of the store; ignored otherwise."}},"required":["email"]}}}}}},"/api/v3/admin/auth/password_resets/{id}":{"patch":{"summary":"Reset password","tags":["Authentication"],"security":[{"api_key":[]}],"description":"Consumes a password reset token (the `token` query param from the\nemailed link), sets the new password, and signs the admin in: the\nresponse carries a JWT access token and the rotatable refresh token is\nset in an HttpOnly cookie. The token is single-use — it invalidates as\nsoon as the password changes.\n","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"The reset token from the emailed link","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"password reset","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string"},"password_confirmation":{"type":"string"}},"required":["password","password_confirmation"]}}}}}},"/api/v3/admin/allowed_origins":{"get":{"summary":"List allowed origins","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the CORS allowlist for the current store. Each entry is a\nbare `scheme://host[:port]` permitted to call the admin API from a\nbrowser. Backs the `Rack::Cors` allowlist and the CSRF boundary of\nthe admin cookie session (see\n`docs/plans/5.5-admin-auth-cookie-refresh.md`).\n\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[origin_cont]","in":"query","required":false,"description":"Filter by origin (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"allowed origins found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AllowedOrigin"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds an origin to the admin CORS allowlist. The value must be a bare\n`scheme://host[:port]` (no path, query, or fragment) and use `http` or\n`https`.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"allowed origin created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedOrigin"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"origin":{"type":"string"}},"required":["origin"]}}}}}},"/api/v3/admin/allowed_origins/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Allowed origin ID","schema":{"type":"string"}}],"get":{"summary":"Get an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single allowed origin by prefixed ID.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"allowed origin found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedOrigin"}}}},"404":{"description":"allowed origin not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an existing allowed origin.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"allowed origin updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllowedOrigin"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"origin":{"type":"string"}}}}}}},"delete":{"summary":"Delete an allowed origin","tags":["Allowed Origins"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes an origin from the admin CORS allowlist. After deletion the\nadmin SPA running at that origin will no longer be able to call the\nadmin API from a browser.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"204":{"description":"allowed origin deleted"}}}},"/api/v3/admin/api_keys":{"get":{"summary":"List API keys","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns publishable and secret API keys for the current store. Secret keys are listed by `token_prefix` only — the plaintext token is delivered exactly once on create.\n\n**Required scope:** `read_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API keys found","content":{"application/json":{}}}}},"post":{"summary":"Create an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a publishable or secret API key. The plaintext token is included in the response **once** for secret keys; publishable keys expose their token on every read since they are intended for client-side use.\n\n**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"secret key created — plaintext token returned once","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name","key_type"],"properties":{"name":{"type":"string"},"key_type":{"type":"string","enum":["publishable","secret"]},"scopes":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/api_keys/{id}":{"get":{"summary":"Show an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key found","content":{"application/json":{}}}}},"patch":{"summary":"Update an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Renames a key. `key_type` and `scopes` are fixed at creation — to change a key's authority, create a new key and revoke the old one.\n\n**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key renamed","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}}},"delete":{"summary":"Delete an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"API key deleted"}}}},"/api/v3/admin/api_keys/current":{"get":{"summary":"Describe the current API key","tags":["API Keys"],"security":[{"api_key":[]}],"description":"Returns the secret key that authenticated this request, including its live scopes. Useful to confirm a key's real, current authority. Only secret-key principals have a single key to describe.\n\n**Required scope:** none — any key can describe itself (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"current API key","content":{"application/json":{}}}}}},"/api/v3/admin/api_keys/{id}/revoke":{"patch":{"summary":"Revoke an API key","tags":["API Keys"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Marks the key revoked. Future requests using its token will fail; the row is preserved for audit.\n\n**Required scope:** `write_api_keys` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"API key revoked","content":{"application/json":{}}}}}},"/api/v3/admin/categories":{"get":{"summary":"List categories","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of the store's categories (manual hierarchical taxons; rule-based collections are excluded).\n\n**Required scope:** `read_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., children, parent, ancestors).","schema":{"type":"string"}}],"responses":{"200":{"description":"categories found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a category. Nests under the parent when parent_id is given, otherwise creates a top-level category.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"category created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"parent_id":{"type":"string","description":"Prefixed ID of the parent category"},"description":{"type":"string"},"permalink":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"hide_from_nav":{"type":"boolean"}},"required":["name"]}}}}}},"/api/v3/admin/categories/{id}":{"get":{"summary":"Get a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single category by ID.\n\n**Required scope:** `read_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., children, parent, ancestors).","schema":{"type":"string"}}],"responses":{"200":{"description":"category found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"404":{"description":"category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a category.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"category updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"parent_id":{"type":"string","description":"Prefixed ID of the parent category"},"description":{"type":"string"},"permalink":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"hide_from_nav":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a category and its descendants.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"204":{"description":"category deleted"}}}},"/api/v3/admin/categories/{id}/reposition":{"patch":{"summary":"Reposition a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Moves a category to a new parent and/or index within the tree.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"category repositioned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"new_parent_id":{"type":"string","description":"Prefixed ID of the new parent (omit for top level)"},"new_position":{"type":"integer","description":"0-based index among the new parent's children"}},"required":["new_position"]}}}}}},"/api/v3/admin/categories/{category_id}/products":{"get":{"summary":"List category products","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Products classified under the category, ordered by their classification position.\n\n**Required scope:** `read_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"200":{"description":"products found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Add a product to a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Classifies a product under the category (appended to the end).\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}}],"responses":{"201":{"description":"product added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"}},"required":["product_id"]}}}}}},"/api/v3/admin/categories/{category_id}/products/{id}":{"delete":{"summary":"Remove a product from a category","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes a product from the category's manual classification.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product removed"}}}},"/api/v3/admin/categories/{category_id}/products/{id}/reposition":{"patch":{"summary":"Reposition a category product","tags":["Categories"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Moves a product to a new index among the category's products.\n\n**Required scope:** `write_categories` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"category_id","in":"path","required":true,"description":"Category ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product repositioned"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"new_position":{"type":"integer","description":"0-based index among the category's products"}},"required":["new_position"]}}}}}},"/api/v3/admin/channels":{"get":{"summary":"List channels","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the channels configured for the current store.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"channels found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new channel on the current store. `code` is normalized to a\nURL-safe slug (`Point of Sale` → `point-of-sale`); when omitted it's\nderived from `name`.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"channel created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"code":{"type":"string","description":"Slug — auto-derived from `name` when blank."},"active":{"type":"boolean","default":true},"default":{"type":"boolean","default":false},"preferred_order_routing_strategy":{"type":"string","nullable":true,"description":"Routing strategy class name. `null` inherits the store setting."},"preferred_storefront_access":{"type":"string","nullable":true,"enum":["public","prices_hidden","login_required"],"description":"Anonymous-visitor access posture. `null` inherits the store setting."},"preferred_guest_checkout":{"type":"boolean","nullable":true,"description":"Whether guests can check out without an account. `null` inherits the store setting."}}}}}}}},"/api/v3/admin/channels/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"channel found","content":{"application/json":{}}}}},"patch":{"summary":"Update a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"channel updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"default":{"type":"boolean"},"preferred_order_routing_strategy":{"type":"string","nullable":true,"description":"Routing strategy class name. `null` inherits the store setting."},"preferred_storefront_access":{"type":"string","nullable":true,"enum":["public","prices_hidden","login_required"],"description":"Anonymous-visitor access posture. `null` inherits the store setting."},"preferred_guest_checkout":{"type":"boolean","nullable":true,"description":"Whether guests can check out without an account. `null` inherits the store setting."}}}}}}},"delete":{"summary":"Delete a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"channel deleted"}}}},"/api/v3/admin/channels/{id}/add_products":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Publish products on a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Publishes the listed products on this channel. Idempotent — re-publishing\nan already-published product updates its publication window. Products from\nsibling stores are silently dropped.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products published","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["product_ids"],"properties":{"product_ids":{"type":"array","items":{"type":"string"}},"published_at":{"type":"string","format":"date-time","nullable":true,"description":"When the publications go live. `null` means immediately."},"unpublished_at":{"type":"string","format":"date-time","nullable":true,"description":"When the publications come down. `null` means never."}}}}}}}},"/api/v3/admin/channels/{id}/remove_products":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Unpublish products from a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Unpublishes the listed products from this channel.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products unpublished","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["product_ids"],"properties":{"product_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/channels/{channel_id}/order_routing_rules":{"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List order routing rules for a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the channel's routing rules in priority order. The rules engine walks them top-down; see the Order Routing guide.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rules found","content":{"application/json":{}}}}},"post":{"summary":"Create an order routing rule on a channel","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a rule to the channel's routing list. The `type` is the wire shorthand from `GET /order_routing_rules/types` (e.g. `preferred_location`). Omitting `position` appends the rule at the end of the list. Each rule kind can appear at most once per channel — a duplicate `type` is rejected with a validation error.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"rule created","content":{"application/json":{}}},"422":{"description":"unknown rule type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"active":{"type":"boolean"},"position":{"type":"integer"},"preferences":{"type":"object","additionalProperties":true}},"required":["type"]}}}}}},"/api/v3/admin/channels/{channel_id}/order_routing_rules/{id}":{"parameters":[{"name":"channel_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update an order routing rule","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a rule's `active` flag, `position` (the list reorders around it), or `preferences`. The rule kind cannot be changed — delete and re-create instead.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rule updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"position":{"type":"integer"},"preferences":{"type":"object","additionalProperties":true}}}}}}},"delete":{"summary":"Delete an order routing rule","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"rule deleted"}}}},"/api/v3/admin/order_routing_rules/types":{"get":{"summary":"List available order routing rule types","tags":["Channels"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Enumerates the registered rule kinds with their labels, descriptions and preference schemas — drives the \"Add rule\" picker in the admin dashboard. Plugins extend the list by registering `Spree::OrderRoutingRule` subclasses via `Spree.order_routing.rules`.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"types found","content":{"application/json":{}}}}}},"/api/v3/admin/custom_field_definitions":{"get":{"summary":"List custom field definitions","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all defined custom fields. Filter by `?q[resource_type_eq]=Spree::Product` to narrow to one parent type.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,label,field_type). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"definitions returned","content":{"application/json":{}}}}},"post":{"summary":"Create a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"definition created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["key","field_type","resource_type"],"properties":{"namespace":{"type":"string","description":"Defaults to `custom`"},"key":{"type":"string"},"label":{"type":"string","description":"Human-readable name; defaults to titleized `key`"},"field_type":{"type":"string","description":"Custom field type identifier (one of the registered field-type class names)."},"resource_type":{"type":"string","description":"Owner class, e.g. `Spree::Product`"},"storefront_visible":{"type":"boolean","description":"When false, definition is admin-only (was `display_on: back_end`)"}}}}}}}},"/api/v3/admin/custom_field_definitions/{id}":{"get":{"summary":"Show a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,label,field_type). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"definition found","content":{"application/json":{}}}}},"patch":{"summary":"Update a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"definition updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"},"storefront_visible":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a custom field definition","tags":["Custom Fields"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes the definition and cascades to all custom field values referencing it.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"definition deleted"}}}},"/api/v3/admin/customer_groups":{"get":{"summary":"List customer groups","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the customer groups configured for the current store. Groups\nsegment customers for targeted promotions (see the `customer_group`\npromotion rule) and reporting. The list endpoint never embeds the\nmember list — fetch a single group with `?expand=customers` if you\nneed them inline, or query `/admin/customers?customer_group_id_in=…`\nfor paginated membership.\n\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customer groups found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a customer group in the current store. `customer_ids` is\noptional; when present, customers are attached at create time.\nPass prefixed IDs (e.g. `cus_…`) — the server decodes them\nautomatically.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"customer group created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"customer_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customer_groups/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Customer group prefixed ID","schema":{"type":"string"}}],"get":{"summary":"Get a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single customer group. Pass `?expand=customers` to embed\nthe full member list inline (recommended only for single-record\nreads — embed cost scales with membership size).\n\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `customers`.","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customer group with embedded customers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"404":{"description":"customer group not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates name, description, or membership. `customer_ids` is a\nfull-set replacement — the server reconciles the membership to\nmatch the array, adding new IDs and removing ones not present.\nSend `customer_ids: []` to clear all members.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customer group updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"customer_ids":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a customer group","tags":["Customer Groups"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the group. Member users are not deleted; their `customer_group_users` rows are dropped.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"customer group deleted"}}}},"/api/v3/admin/customers/{customer_id}/addresses":{"get":{"summary":"List customer addresses","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the customer's saved addresses.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., country, state). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., first_name,last_name,address1,city). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"addresses found","content":{"application/json":{}}}}},"post":{"summary":"Create a customer address","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new address to the customer's address book. Pass `is_default_billing: true` or `is_default_shipping: true` to set as the default — the previous default loses its flag in the same transaction.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"address created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_iso":{"type":"string","description":"ISO-2 country code (e.g. US)"},"state_abbr":{"type":"string","description":"State/province abbreviation (e.g. NY)"},"phone":{"type":"string"},"company":{"type":"string"},"label":{"type":"string"},"is_default_billing":{"type":"boolean"},"is_default_shipping":{"type":"boolean"}}}}}}}},"/api/v3/admin/customers/{customer_id}/addresses/{id}":{"patch":{"summary":"Update a customer address","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a customer address.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"address updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"city":{"type":"string"},"is_default_billing":{"type":"boolean"},"is_default_shipping":{"type":"boolean"}}}}}}},"delete":{"summary":"Delete a customer address","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes the address. If it was a default, the customer loses that default (no auto-promotion).\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"address deleted"}}}},"/api/v3/admin/customers/{customer_id}/credit_cards":{"get":{"summary":"List customer credit cards","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the customer's saved credit cards. Useful for off-session admin charges via `POST /admin/orders/:id/payments { source_id }`.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., brand,last4,month,year). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"credit cards found","content":{"application/json":{}}}}}},"/api/v3/admin/customers/{customer_id}/credit_cards/{id}":{"get":{"summary":"Show a customer credit card","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a saved credit card by ID.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., brand,last4,month,year). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"credit card found","content":{"application/json":{}}}}},"delete":{"summary":"Delete a customer credit card","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a saved credit card.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"credit card deleted"}}}},"/api/v3/admin/customers/{customer_id}/store_credits":{"get":{"summary":"List customer store credits","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns store credits issued to the customer.\n\n**Required scope:** `read_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., category, store, created_by). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,amount_used,memo,currency). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"store credits found","content":{"application/json":{}}}}},"post":{"summary":"Issue a store credit to a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"`created_by` is set automatically from the authenticated admin.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"store credit created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount","currency","category_id"],"properties":{"amount":{"type":"string"},"currency":{"type":"string"},"category_id":{"type":"string","description":"StoreCreditCategory ID"},"memo":{"type":"string"}}}}}}}},"/api/v3/admin/customers/{customer_id}/store_credits/{id}":{"patch":{"summary":"Update a store credit","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Update memo / category / amount. The amount can only be changed if `amount_used == 0`.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"store credit updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string"},"category_id":{"type":"string"},"memo":{"type":"string"}}}}}}},"delete":{"summary":"Delete a store credit","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes an unused store credit (amount_used == 0). Returns 422 otherwise.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"customer_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"store credit deleted"}}}},"/api/v3/admin/customers":{"get":{"summary":"List customers","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of customers. Supports Ransack search/filters.\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[search]","in":"query","required":false,"description":"Email + name full-text-ish search","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., addresses, store_credits). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., email,first_name,last_name). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customers found","content":{"application/json":{}}}}},"post":{"summary":"Create a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a customer. No welcome email is sent automatically.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"customer created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"accepts_email_marketing":{"type":"boolean"},"internal_note":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}}}}}}},"/api/v3/admin/customers/{id}":{"get":{"summary":"Show a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns full customer details including computed order stats (orders_count, total_spent, last_order_completed_at).\n\n**Required scope:** `read_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Customer ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations: addresses, orders, store_credits, default_billing_address, default_shipping_address","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., email,first_name,last_name). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"customer found","content":{"application/json":{}}}}},"patch":{"summary":"Update a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates customer attributes. `tags` replaces the full set.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customer updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"accepts_email_marketing":{"type":"boolean"},"internal_note":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object"}}}}}}},"delete":{"summary":"Delete a customer","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a customer. Returns 422 if the customer has any orders.\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"customer deleted"}}}},"/api/v3/admin/customers/bulk_add_to_groups":{"post":{"summary":"Bulk-add customers to groups","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Attaches each customer in `ids` to every group in `customer_group_ids`.\nIdempotent — customers already in a group are skipped server-side.\nGroups from sibling stores are silently ignored. Returns counts of\ncustomers and groups that were processed (post store-scoping).\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customers added to groups","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"customer_group_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","customer_group_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customers/bulk_remove_from_groups":{"post":{"summary":"Bulk-remove customers from groups","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Detaches each customer in `ids` from every group in `customer_group_ids`.\nNo-op for non-members. Groups from sibling stores are silently ignored.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"customers removed from groups","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"customer_group_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","customer_group_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"customer_group_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customers/bulk_add_tags":{"post":{"summary":"Bulk-add tags to customers","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds each tag name in `tags` to every customer in `ids`. Tags are\nupserted by name; re-adding an existing tag is a no-op.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags added","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"tag_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/customers/bulk_remove_tags":{"post":{"summary":"Bulk-remove tags from customers","tags":["Customers"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes each tag name in `tags` from every customer in `ids`. No-op\nfor customers that don't carry the tag.\n\n\n**Required scope:** `write_customers` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags removed","content":{"application/json":{"schema":{"type":"object","properties":{"customer_count":{"type":"integer"},"tag_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/exports":{"get":{"summary":"List exports","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns CSV exports queued or completed for the current store. Polled by the admin SPA to detect when an export finishes (`done: true`).\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"exports found","content":{"application/json":{}}}}},"post":{"summary":"Create an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Queues a CSV export. The `type` selects the dataset; `search_params` is an\noptional Ransack query (same shape used by the `q[...]` params on list endpoints)\nthat filters which records are exported. Pass `record_selection: \"all\"` to\nclear the filter server-side and export everything in scope.\n\nGeneration is asynchronous. Poll `GET /admin/exports/{id}` until `done` is `true`,\nthen redirect the browser to `download_url` to fetch the file.\n\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"export queued","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["products","orders","customers","product_translations","gift_cards","coupon_codes","newsletter_subscribers"]},"record_selection":{"type":"string","enum":["filtered","all"],"description":"Set to \"all\" to ignore search_params and export everything in scope."},"search_params":{"type":"object","description":"Ransack query hash. Same predicates accepted by the list endpoint.","additionalProperties":true},"results_url":{"type":"string","description":"Absolute URL of your admin exports view; the export-done email uses it as the download button target. Only honored when it matches one of the store's configured allowed origins."}}}}}}}},"/api/v3/admin/exports/{id}":{"get":{"summary":"Show an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns export status. While `done` is `false`, the SPA continues polling.\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"export found","content":{"application/json":{}}}}},"delete":{"summary":"Delete an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the export and purges its attachment.\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"export deleted"}}}},"/api/v3/admin/exports/{id}/download":{"get":{"summary":"Download an export","tags":["Exports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Streams the exported CSV with `Content-Disposition: attachment`. Returns 422 with `code: export_not_ready` while `done` is still `false`. The endpoint is JWT/API-key protected, so SPA clients must fetch it (with `Authorization` header) and trigger the browser download via a Blob URL — a top-level navigation cannot carry the JWT.\n\n**Required scope:** the read scope of the exported resource — `read_products` for product exports, `read_customers` for customer exports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"CSV file","content":{"application/json":{},"text/csv":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments":{"get":{"summary":"List fulfillments","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all shipments for an order.\n\n**Required scope:** `read_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., inventory_units, stock_location, shipping_rates). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,status,tracking,cost). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillments found","content":{"application/json":{}}}}},"post":{"summary":"Create a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Manually creates a fulfillment on a completed order, bypassing order routing — for example to mirror a shipment handled by an external carrier or 3PL. Moves the requested line item quantities out of their current fulfillments; when `items` is omitted, every not-yet-shipped unit is moved. Pass `status: 'shipped'` to register an already-shipped fulfillment (fires shipped webhooks and freezes cost/carrier). When `delivery_method_id` is omitted, the fulfillment inherits the delivery method and cost of the source fulfillment(s) it fully drains — keeping the order total unchanged; partially drained splits get no carrier when shipped, and pending fulfillments are otherwise (re)priced by the standard rate engine, which selects the lowest-cost available rate. Pass `cost` to set an explicit shipping cost instead (e.g. the 3PL price) — note this changes the order total and payment state, and is guaranteed to persist only with `status: 'shipped'` (pending fulfillments are re-priced by the rate engine).\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"fulfillment created","content":{"application/json":{}}},"422":{"description":"order not completed","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["stock_location_id"],"properties":{"stock_location_id":{"type":"string","description":"Stock location the fulfillment ships from"},"tracking":{"type":"string","description":"Carrier tracking number, or a full https:// tracking link — a full URL is served back as tracking_url unchanged instead of being templated into the delivery method tracking URL"},"delivery_method_id":{"type":"string","description":"Delivery method (carrier) to attach as the selected rate. Defaults to the delivery method of the fully drained source fulfillment(s)"},"cost":{"type":"string","description":"Explicit shipping cost. Defaults to the summed cost of the fully drained source fulfillment(s), which keeps the order total unchanged; an explicit cost changes the order total and payment state. Guaranteed to persist only with status: 'shipped' — pending fulfillments are re-priced by the rate engine"},"status":{"type":"string","enum":["shipped"],"description":"Pass 'shipped' to register the fulfillment as already shipped"},"items":{"type":"array","description":"Line item quantities to fulfill. Omit to fulfill every not-yet-shipped unit.","items":{"type":"object","required":["item_id","quantity"],"properties":{"item_id":{"type":"string","description":"Line item ID"},"quantity":{"type":"integer"}}}},"metadata":{"type":"object","additionalProperties":true}}}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}":{"get":{"summary":"Show a shipment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns details of a specific shipment.\n\n**Required scope:** `read_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., inventory_units, stock_location, shipping_rates). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,status,tracking,cost). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"shipment found","content":{"application/json":{}}}}},"patch":{"summary":"Update a shipment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a fulfillment (tracking, delivery rate).\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"shipment updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"tracking":{"type":"string","description":"Carrier tracking number, or a full https:// tracking link served back as tracking_url unchanged"},"selected_delivery_rate_id":{"type":"string","description":"Delivery rate ID (dr_...) to select"}}}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/fulfill":{"patch":{"summary":"Fulfill a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Marks a fulfillment as fulfilled.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment fulfilled","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/cancel":{"patch":{"summary":"Cancel a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Cancels a fulfillment.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment canceled","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/resume":{"patch":{"summary":"Resume a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Resumes a canceled fulfillment.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment resumed","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/fulfillments/{id}/split":{"patch":{"summary":"Split a fulfillment","tags":["Fulfillments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Transfers items from this shipment to a new shipment at a different stock location.\n\n**Required scope:** `write_fulfillments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Fulfillment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"fulfillment split","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id","quantity"],"properties":{"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer"},"stock_location_id":{"type":"string","description":"Target stock location ID"}}}}}}}},"/api/v3/admin/gift_card_batches":{"get":{"summary":"List gift card batches","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the gift card batches issued by the current store. Each batch\ngroups the cards generated together for a campaign or bulk-issuance\n— the cards themselves live under `/admin/gift_cards` and reference\nthe batch via `gift_card_batch_id`.\n\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Records per page","schema":{"type":"integer"}},{"name":"q[prefix_cont]","in":"query","required":false,"description":"Filter by prefix (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending.","schema":{"type":"string"}}],"responses":{"200":{"description":"gift card batches found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardBatch"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a gift card batch","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Issues a batch of gift cards in a single call. The server generates\n`codes_count` cards inline for small batches (configurable via\n`Spree.config.gift_card_batch_web_limit`, default 500) or enqueues\na background job for larger ones. Each card's code is the batch\n`prefix` followed by random hex.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"gift card batch created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardBatch"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prefix","amount","codes_count"],"properties":{"prefix":{"type":"string","description":"Lowercased and prepended to every generated code."},"amount":{"type":"string","description":"Decimal amount per card, greater than zero."},"currency":{"type":"string","description":"ISO 4217 currency code. Defaults to the store currency."},"codes_count":{"type":"integer","description":"Number of cards to generate. Capped at `gift_card_batch_limit`."},"expires_at":{"type":"string","nullable":true}}}}}}}},"/api/v3/admin/gift_card_batches/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Gift card batch prefixed ID","schema":{"type":"string"}}],"get":{"summary":"Get a gift card batch","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single batch.\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"gift card batch found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardBatch"}}}},"404":{"description":"gift card batch not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/gift_cards":{"get":{"summary":"List gift cards","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the gift cards issued by the current store. Filter by\n`q[code_cont]` for code search, `q[user_id_eq]` for cards issued\nto a specific customer, or `q[state_eq]` for status filtering.\n\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[code_cont]","in":"query","required":false,"description":"Filter by gift card code (contains)","schema":{"type":"string"}},{"name":"q[state_eq]","in":"query","required":false,"description":"Filter by status (active, redeemed, partially_redeemed, canceled)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"gift cards found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GiftCard"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Issues a gift card scoped to the current store. The code is\nauto-generated when omitted. `currency` defaults to the store's\nconfigured currency. Pass `user_id` (prefixed ID) to attach the\ncard to a specific customer.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"gift card created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"string","description":"Decimal amount, greater than zero."},"currency":{"type":"string","description":"ISO 4217 currency code. Defaults to the store currency."},"code":{"type":"string","description":"Optional caller-supplied code. Auto-generated when omitted."},"expires_at":{"type":"string","description":"ISO 8601 date.","nullable":true},"user_id":{"type":"string","description":"Optional customer prefixed ID.","nullable":true}}}}}}}},"/api/v3/admin/gift_cards/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Gift card prefixed ID","schema":{"type":"string"}}],"get":{"summary":"Get a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single gift card.\n\n**Required scope:** `read_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"gift card found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}},"404":{"description":"gift card not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an active gift card's editable attributes. Redeemed or\npartially-redeemed cards cannot be edited.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"gift card updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCard"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string"},"expires_at":{"type":"string","nullable":true},"user_id":{"type":"string","nullable":true}}}}}}},"delete":{"summary":"Delete a gift card","tags":["Gift Cards"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes an unused gift card. Cards that have been redeemed or\npartially redeemed cannot be deleted and return 422.\n\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"gift card deleted"},"422":{"description":"redeemed gift card cannot be deleted","content":{"application/json":{}}}}}},"/api/v3/admin/imports":{"get":{"summary":"List imports","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns CSV imports queued or completed for the current store.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"imports found","content":{"application/json":{}}}}},"post":{"summary":"Create an import","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Queues a CSV import. Upload the file first via `POST /api/v3/admin/direct_uploads`\nand pass the returned `signed_id` as `attachment`. On success the import is in the\n`mapping` state and the response carries the mapping payload: `schema_fields`\n(the canonical columns for the type), `csv_headers`, a `sample_row`, and the\nauto-assigned `mappings`.\n\nAdjust mappings if needed, then call `PATCH /admin/imports/{id}/complete_mapping`\nto start processing. Poll `GET /admin/imports/{id}` while `status` is\n`completed_mapping`/`processing`; terminal statuses are `completed` and `failed`.\n\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"import created in mapping state","content":{"application/json":{}}},"422":{"description":"unknown import type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["type","attachment"],"properties":{"type":{"type":"string","enum":["products","customers","product_translations"]},"attachment":{"type":"string","description":"ActiveStorage signed blob id from POST /api/v3/admin/direct_uploads."},"preferred_delimiter":{"type":"string","enum":[",",";","|","\t"],"description":"CSV column separator. Defaults to a comma."},"results_url":{"type":"string","description":"Absolute URL of your admin imports view; the import-done email links back to it with `?import=<id>` appended. Only honored when it matches one of the store's configured allowed origins."}}}}}}}},"/api/v3/admin/imports/template":{"get":{"summary":"Download an import template","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a CSV header row for the given import type, including the custom field columns available for the model.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":true,"description":"Registered import type, e.g. products.","schema":{"type":"string"}}],"responses":{"200":{"description":"CSV template","content":{"application/json":{},"text/csv":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v3/admin/imports/example":{"get":{"summary":"Download an example import file","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Redirects to a populated example CSV for the given import type — the same sample data `rake spree:load_sample_data` uses, pinned to the installed Spree version. Returns 404 for a type that ships no example file.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","required":true,"description":"Registered import type, e.g. products.","schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect to the example CSV"}}}},"/api/v3/admin/imports/{id}":{"get":{"summary":"Show an import","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns import status and row counters. The admin dashboard polls this endpoint while `status` is `completed_mapping` or `processing`; `rows_count`, `completed_rows_count` and `failed_rows_count` drive the progress bar. The mapping payload (`csv_headers`, `sample_row`) is only present while `status` is `mapping`.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"import found","content":{"application/json":{}}}}},"delete":{"summary":"Delete an import","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the import, its rows and the uploaded file. Returns 422 while the import is being processed.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"import deleted"}}}},"/api/v3/admin/imports/{id}/download":{"get":{"summary":"Download the originally uploaded file","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Streams the CSV exactly as it was uploaded — the audit trail for what was imported. JWT/API-key protected; SPA clients fetch it with the Authorization header and trigger the browser download via a Blob URL.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"CSV file","content":{"application/json":{},"text/csv":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v3/admin/imports/{id}/complete_mapping":{"patch":{"summary":"Complete mapping and start processing","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Applies the submitted column mappings, then starts row processing. Omit `mappings`\nto accept the auto-assigned ones from the create response. Returns 422 when a\nrequired schema field is left unmapped (`details.missing_required_fields`) or a\nfile column is assigned twice.\n\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"mapping completed, processing queued","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mappings":{"type":"array","description":"Column assignments to apply before starting. `file_column: null` unmaps a field.","items":{"type":"object","required":["schema_field"],"properties":{"schema_field":{"type":"string"},"file_column":{"type":"string","nullable":true}}}}}}}}}}},"/api/v3/admin/imports/{id}/retry_failed_rows":{"patch":{"summary":"Retry failed rows","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Re-processes the rows that failed. The import re-enters `processing`; poll `GET /admin/imports/{id}` until it completes again. Returns 422 when the import is not `completed` or has no failed rows.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"retry queued","content":{"application/json":{}}}}}},"/api/v3/admin/imports/{import_id}/rows":{"get":{"summary":"List import rows","tags":["Imports"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Paginated rows of an import — the failure report. Filter with `q[status_eq]=failed` to list only rows that could not be imported; each row carries the raw CSV `data` and its `validation_errors`.\n\n**Required scope:** the write scope of the imported resource — `write_products` for product imports, `write_customers` for customer imports, etc. (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"import_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"q[status_eq]","in":"query","required":false,"description":"Filter rows by status: pending, processing, completed, failed.","schema":{"type":"string"}}],"responses":{"200":{"description":"rows found","content":{"application/json":{}}}}}},"/api/v3/admin/markets":{"get":{"summary":"List markets","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the markets configured for the current store. Markets are\nstore-scoped and ordered by `position` (an `acts_as_list` column —\nupdate the order via `PATCH /markets/{id}` with `position`).\n\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `countries`.","schema":{"type":"string"}}],"responses":{"200":{"description":"markets found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Market"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new market for the current store.\n\n- `country_isos` accepts 2-letter ISO country codes (e.g. `[\"DE\", \"FR\"]`);\n the market must contain at least one country. Unknown codes are\n silently dropped.\n- `supported_locales` accepts an array of locale codes; the\n `default_locale` is always implicitly included.\n- Setting `default: true` automatically demotes the previous default\n market in the store.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"market created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Market"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"currency":{"type":"string","description":"ISO 4217 currency code."},"default_locale":{"type":"string","description":"IETF locale tag used as the market default."},"supported_locales":{"type":"array","items":{"type":"string"},"description":"Locale codes available in this market. The default is always implicitly included."},"tax_inclusive":{"type":"boolean","default":false,"description":"Display prices with tax included."},"default":{"type":"boolean","default":false,"description":"Setting to true demotes the previous default."},"position":{"type":"integer","description":"Sort order within the store; lower = first."},"country_isos":{"type":"array","items":{"type":"string"},"description":"2-letter ISO country codes assigned to this market. At least one is required."}},"required":["name","currency","default_locale","country_isos"]}}}}}},"/api/v3/admin/markets/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"market found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Market"}}}},"404":{"description":"market not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an existing market. Pass `country_isos` to replace the\nmarket's country list (full-set update), `supported_locales` to\nreplace the supported locales, or `position` to reorder the market\nwithin the store.\n\nSetting `default: true` automatically demotes the previous default.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"market updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Market"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"currency":{"type":"string"},"default_locale":{"type":"string"},"supported_locales":{"type":"array","items":{"type":"string"}},"tax_inclusive":{"type":"boolean"},"default":{"type":"boolean"},"position":{"type":"integer"},"country_isos":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a market","tags":["Markets"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the market (sets `deleted_at`). The default market and\nthe last remaining market in a store cannot be deleted — both return\n422 with a `validation_error`.\n\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"market deleted"},"422":{"description":"cannot delete default or last market","content":{"application/json":{}}}}}},"/api/v3/admin/option_types":{"get":{"summary":"List option types","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of option types.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,label,position). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"option types found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OptionType"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new option type. Supports nested option values.\n\nOption values can be provided inline and will be created or updated by name.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"option type created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionType"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"},"filterable":{"type":"boolean"},"option_values":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"}}}}},"required":["name","label"]}}}}}},"/api/v3/admin/option_types/{id}":{"get":{"summary":"Get an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single option type by ID, including its option values.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Option type ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,label,position). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"option type found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionType"}}}},"404":{"description":"option type not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an option type. Supports updating nested option values.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Option type ID","schema":{"type":"string"}}],"responses":{"200":{"description":"option type updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptionType"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"},"filterable":{"type":"boolean"},"option_values":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Existing option value ID to update"},"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"integer"}}}}}}}}}},"delete":{"summary":"Delete an option type","tags":["Option Types"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes an option type.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Option type ID","schema":{"type":"string"}}],"responses":{"204":{"description":"option type deleted"}}}},"/api/v3/admin/orders/{order_id}/gift_cards":{"post":{"summary":"Apply a gift card to an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Applies a gift card by code to the order. Returns the gift card.\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"gift card applied","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Gift card code"}}}}}}}},"/api/v3/admin/orders/{order_id}/gift_cards/{id}":{"delete":{"summary":"Remove a gift card from an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the gift card from the order.\n\n**Required scope:** `write_gift_cards` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Gift card ID","schema":{"type":"string"}}],"responses":{"204":{"description":"gift card removed"}}}},"/api/v3/admin/orders/{order_id}/items":{"get":{"summary":"List order items","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all line items for an order.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variant, variant.product). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., quantity,price,total). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"items found","content":{"application/json":{}}}}},"post":{"summary":"Add an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new line item to the order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"item added","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id"],"properties":{"variant_id":{"type":"string","description":"Prefixed variant ID"},"quantity":{"type":"integer","default":1}}}}}}}},"/api/v3/admin/orders/{order_id}/items/{id}":{"get":{"summary":"Show an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns details of a specific line item.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variant, variant.product). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., quantity,price,total). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"item found","content":{"application/json":{}}}}},"patch":{"summary":"Update an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an order item quantity or metadata.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}}],"responses":{"200":{"description":"item updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"quantity":{"type":"integer"}}}}}}},"delete":{"summary":"Remove an item","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes an item from the order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Item ID","schema":{"type":"string"}}],"responses":{"204":{"description":"line item removed"}}}},"/api/v3/admin/orders/{order_id}/store_credits":{"post":{"summary":"Apply customer's store credit to an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Applies the order customer's available store credit. When `amount` is omitted, applies up to the order outstanding balance.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"store credit applied","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","description":"Optional explicit amount; defaults to order outstanding balance"}}}}}}},"delete":{"summary":"Remove store credit from an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes any applied store credit from the order.\n\n**Required scope:** `write_store_credits` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"204":{"description":"store credit removed"}}}},"/api/v3/admin/orders":{"get":{"summary":"List orders","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of orders for the current store.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"description":"Sort field (e.g., created_at, -created_at, completed_at)","schema":{"type":"string"}},{"name":"q[state_eq]","in":"query","required":false,"description":"Filter by state (cart, address, delivery, payment, confirm, complete, canceled)","schema":{"type":"string"}},{"name":"q[email_cont]","in":"query","required":false,"description":"Filter by email (contains)","schema":{"type":"string"}},{"name":"q[number_eq]","in":"query","required":false,"description":"Filter by order number","schema":{"type":"string"}},{"name":"q[completed_at_gt]","in":"query","required":false,"description":"Filter by completed after date","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., items, fulfillments, payments, customer, discounts, billing_address, shipping_address). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,total,status,completed_at). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"orders found","content":{"application/json":{}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a draft order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new draft order in one shot. Customer, items, addresses, currency,\nmarket, channel, locale, notes, metadata, and a coupon code can all be\nprovided inline.\n\nSetting `preferred_stock_location_id` pins the order's preferred fulfillment\nlocation — Order Routing's built-in `PreferredLocation` rule consumes it\nwhen picking which stock location ships each shipment.\n\nInvalid coupon codes are non-fatal — the order is created and the failure\nis reported on the service result (not in the API response body for now).\n\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"order created with preferred_stock_location_id","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"customer_id":{"type":"string","description":"Customer ID. Alias: user_id (legacy)."},"use_customer_default_address":{"type":"boolean","description":"When true with customer_id, copies the customer's saved billing/shipping addresses onto the order."},"currency":{"type":"string"},"market_id":{"type":"string","description":"Market ID"},"channel_id":{"type":"string","description":"Channel ID. Defaults to the store primary channel when omitted."},"preferred_stock_location_id":{"type":"string","description":"Stock Location ID to prefer for fulfillment. Order Routing's built-in PreferredLocation rule reads this and ranks the location first; routing falls back to the next rule when the preferred location can't cover the cart."},"locale":{"type":"string"},"customer_note":{"type":"string","description":"Public, customer-visible note"},"internal_note":{"type":"string","description":"Staff-only note"},"metadata":{"type":"object","description":"Arbitrary key/value metadata"},"shipping_address":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"shipping_address_id":{"type":"string","description":"Existing customer address ID"},"billing_address":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"billing_address_id":{"type":"string","description":"Existing customer address ID"},"items":{"type":"array","items":{"type":"object","required":["variant_id","quantity"],"properties":{"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer"},"metadata":{"type":"object"}}}},"coupon_code":{"type":"string","description":"Optional. Applied non-fatally; invalid codes do not block creation."}}}}}}}},"/api/v3/admin/orders/{id}":{"get":{"summary":"Show an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns full order details including admin-only fields.\n\n**Required scope:** `read_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID (e.g., or_xxx)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., items, fulfillments, payments, customer, discounts, billing_address, shipping_address). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., number,total,status,completed_at). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"order found","content":{"application/json":{}}},"404":{"description":"order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an order. Supports updating email, addresses, special instructions, and line items.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"special_instructions":{"type":"string"},"internal_note":{"type":"string"},"channel_id":{"type":"string","description":"Channel ID"},"preferred_stock_location_id":{"type":"string","description":"Stock Location ID to prefer for fulfillment. Re-runs Order Routing's PreferredLocation rule on subsequent shipment rebuilds."},"ship_address":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"zipcode":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"bill_address":{"type":"object","properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"address1":{"type":"string"},"city":{"type":"string"},"zipcode":{"type":"string"},"country_iso":{"type":"string"},"state_abbr":{"type":"string"},"phone":{"type":"string"}}},"items":{"type":"array","items":{"type":"object","required":["variant_id"],"properties":{"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer"},"metadata":{"type":"object"}}}}}}}}}},"delete":{"summary":"Delete a draft order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a draft order. Completed orders cannot be deleted.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"204":{"description":"order deleted"}}}},"/api/v3/admin/orders/{id}/complete":{"patch":{"summary":"Complete an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Completes an order in the `confirm` state, marking it as placed.\n\nSet `notify_customer: true` to send the order confirmation email.\n\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order completed","content":{"application/json":{}}},"422":{"description":"order cannot be completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"notify_customer":{"type":"boolean","description":"Send the order confirmation email after completion."}}}}}}}},"/api/v3/admin/orders/{id}/cancel":{"patch":{"summary":"Cancel an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Cancels a completed order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order canceled","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{id}/approve":{"patch":{"summary":"Approve an order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Approves an order (e.g., for fraud review).\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order approved","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{id}/resume":{"patch":{"summary":"Resume a canceled order","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Resumes a previously canceled order.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"order resumed","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{id}/resend_confirmation":{"post":{"summary":"Resend confirmation email","tags":["Orders"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Publishes the order.completed event to trigger confirmation email delivery.\n\n**Required scope:** `write_orders` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"200":{"description":"confirmation resent","content":{"application/json":{}}}}}},"/api/v3/admin/payment_methods":{"get":{"summary":"List payment methods","tags":["Payment Methods"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the store's configured payment methods. Use `source_required: true` to know which methods need a saved source.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,type,active). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payment methods found","content":{"application/json":{}}}}}},"/api/v3/admin/payment_methods/types":{"get":{"summary":"List available payment provider types","tags":["Payment Methods"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the registered Spree::PaymentMethod subclasses that can be used to create new payment methods. Useful for populating a \"Provider\" dropdown in admin UIs.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"provider types found","content":{"application/json":{}}}}}},"/api/v3/admin/payment_methods/{id}":{"get":{"summary":"Show a payment method","tags":["Payment Methods"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a payment method by ID.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,type,active). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payment method found","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/payments":{"get":{"summary":"List payments","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all payments for an order.\n\n**Required scope:** `read_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method, source). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,status,number,response_code). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payments found","content":{"application/json":{}}}}},"post":{"summary":"Create a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new payment for the order.\n\n**Required scope:** `write_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"payment created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["payment_method_id"],"properties":{"payment_method_id":{"type":"string","description":"Payment method ID"},"amount":{"type":"string"},"source_id":{"type":"string","description":"Payment source ID"}}}}}}}},"/api/v3/admin/orders/{order_id}/payments/{id}":{"get":{"summary":"Show a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns details of a specific payment.\n\n**Required scope:** `read_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Payment ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment_method, source). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,status,number,response_code). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"payment found","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/payments/{id}/capture":{"patch":{"summary":"Capture a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Captures a pending payment.\n\n**Required scope:** `write_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Payment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"payment captured","content":{"application/json":{}}},"422":{"description":"capture failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/orders/{order_id}/payments/{id}/void":{"patch":{"summary":"Void a payment","tags":["Payments"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Voids a payment.\n\n**Required scope:** `write_payments` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Payment ID","schema":{"type":"string"}}],"responses":{"200":{"description":"payment voided","content":{"application/json":{}}}}}},"/api/v3/admin/price_lists":{"get":{"summary":"List price lists","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the price lists configured for the current store.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"schema":{"type":"string"}},{"name":"q[status_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `price_rules`.","schema":{"type":"string"}}],"responses":{"200":{"description":"price lists found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceList"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new draft price list.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"price list created (server-to-server — rules + prices, no product_ids)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"starts_at":{"type":"string","nullable":true},"ends_at":{"type":"string","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"position":{"type":"integer"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Prefixed product ids to seed the list with."},"rules":{"type":"array","description":"STI-typed price rules to attach on create. Existing rules on the same payload via PATCH reconcile by id.","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"prices":{"type":"array","description":"Server-to-server alternative to `product_ids`: ship the exact per-variant prices the list should contain. Each row upserts on the unique key `(variant_id, currency, price_list_id)`. Mix-and-match with `product_ids` is supported but typically unnecessary — `prices` alone tells the server which variants belong to the list and what the override amount is.","items":{"type":"object","required":["variant_id","currency"],"properties":{"variant_id":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}}}}}},"/api/v3/admin/price_lists/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"404":{"description":"price list not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a price list. The optional `rules:` array reconciles nested\nSTI-typed price rules in a single round-trip — existing rules update\nby `id`, new rules build, missing rules destroy. Mirrors the\npromotion editor's \"save the whole thing on Save\" pattern.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list updated with nested rules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"starts_at":{"type":"string","nullable":true},"ends_at":{"type":"string","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"position":{"type":"integer"},"product_ids":{"type":"array","items":{"type":"string"},"description":"Prefixed product ids — reconciles list membership (adds + removes)."},"rules":{"type":"array","items":{"type":"object","required":["type"],"properties":{"id":{"type":"string","nullable":true},"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"prices":{"type":"array","description":"Individual price overrides (the spreadsheet payload). Each row updates by `id` if shipped, otherwise upserts on the unique key `(variant_id, currency, price_list_id)`.","items":{"type":"object","oneOf":[{"required":["id"]},{"required":["variant_id","currency"]}],"properties":{"id":{"type":"string"},"variant_id":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}}}}},"delete":{"summary":"Delete a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the price list. Associated prices are removed asynchronously.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"price list deleted"}}}},"/api/v3/admin/price_lists/{id}/activate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Activate a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Transitions a draft / inactive list to `active`. If `starts_at` is\nin the future the list is marked `scheduled` instead, matching the\nlegacy admin behaviour.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list activated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}}}}},"/api/v3/admin/price_lists/{id}/deactivate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Deactivate a price list","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price list deactivated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}}}}},"/api/v3/admin/prices":{"get":{"summary":"List prices","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Generic prices endpoint covering both base prices and price-list\noverrides. Filter with Ransack: `q[price_list_id_eq]=…`,\n`q[currency_eq]=USD`, `q[price_list_id_null]=true` (base prices only).\n\nThe admin spreadsheet uses this with server-side pagination so it\nscales past the metadata-PATCH path on `/price_lists/:id`.\n\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"q[price_list_id_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"q[price_list_id_null]","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"q[currency_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"q[variant_id_eq]","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Comma-separated sort keys. Supports e.g. `variant_product_name,variant_id`.","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to embed. Supported: `variant`.","schema":{"type":"string"}}],"responses":{"200":{"description":"prices found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Price"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a single price. Omit `price_list_id` to create a base price.\nFor more than a handful of rows, prefer `POST /admin/prices/bulk_upsert`.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"price created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["variant_id","currency"],"properties":{"variant_id":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true},"price_list_id":{"type":"string","nullable":true}}}}}}}},"/api/v3/admin/prices/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}},"404":{"description":"price not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"price updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Price"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}},"delete":{"summary":"Delete a price","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the price (acts_as_paranoid).\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"price deleted"}}}},"/api/v3/admin/prices/bulk_upsert":{"post":{"summary":"Bulk-upsert prices","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Upserts a batch of prices in a single SQL round trip.\n\nEach row either:\n* targets an existing price by `id`, OR\n* matches on the unique key `(variant_id, currency, price_list_id)` —\n updating the existing row if one exists, creating one otherwise.\n\nModel callbacks (e.g. PriceHistory) are bypassed; this is a\nbulk-write fast path for the admin spreadsheet. The response\ncarries `price_count` — the number of rows touched.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"prices upserted","content":{"application/json":{"schema":{"type":"object","properties":{"price_count":{"type":"integer"}}}}}},"422":{"description":"missing prices key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["prices"],"properties":{"prices":{"type":"array","items":{"type":"object","required":["variant_id","currency"],"properties":{"id":{"type":"string","nullable":true},"variant_id":{"type":"string"},"currency":{"type":"string"},"price_list_id":{"type":"string","nullable":true},"amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true}}}}}}}}}}},"/api/v3/admin/prices/bulk_destroy":{"delete":{"summary":"Bulk-delete prices","tags":["Pricing"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes each price in `ids`. Returns the count actually destroyed.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"prices deleted","content":{"application/json":{"schema":{"type":"object","properties":{"price_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/{product_id}/custom_fields":{"get":{"summary":"List product custom fields","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the product's custom field values.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_field_definition). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,value,namespace). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"custom fields found","content":{"application/json":{}}}}},"post":{"summary":"Create a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Sets a custom field value on the product. Requires an existing CustomFieldDefinition; pass its prefixed `cfdef_…` id.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"custom field created","content":{"application/json":{}}},"422":{"description":"duplicate definition for the same product","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["custom_field_definition_id","value"],"properties":{"custom_field_definition_id":{"type":"string","description":"Prefixed `cfdef_…` id"},"value":{"description":"Value matching the definition's `field_type`"}}}}}}}},"/api/v3/admin/products/{product_id}/custom_fields/{id}":{"get":{"summary":"Show a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_field_definition). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., key,value,namespace). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"custom field found","content":{"application/json":{}}}}},"patch":{"summary":"Update a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates the custom field's `value`. The linked definition cannot be changed — delete and recreate to switch.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"custom field updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["value"],"properties":{"value":{"description":"New value"}}}}}}},"delete":{"summary":"Delete a product custom field","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"custom field deleted"}}}},"/api/v3/admin/products/{product_id}/translations":{"get":{"summary":"List product translations","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the full translation matrix for the product: the source value and content type per translatable field, plus the translated value for every supported locale.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"translations found","content":{"application/json":{}}}}}},"/api/v3/admin/products":{"get":{"summary":"List products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of products for the current store.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"sort","in":"query","required":false,"description":"Sort field (e.g., name, -name, price, -price, best_selling)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variants, media, option_types, categories). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,slug,price,status). id is always included.","schema":{"type":"string"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"q[status_eq]","in":"query","required":false,"description":"Filter by status","schema":{"type":"string"}}],"responses":{"200":{"description":"products found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new product. Supports nested variants with prices and option types.\n\nOption types and values are auto-created if they don't exist.\nPrices are upserted by currency. Stock items are upserted by stock location.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"product created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"tax_category_id":{"type":"string","description":"Tax category ID"},"category_ids":{"type":"array","items":{"type":"string"},"description":"Array of category IDs"},"tags":{"type":"array","items":{"type":"string"}},"prices":{"type":"array","description":"Shorthand for a simple (no-options) product: per-currency prices that forward to the product's sole variant. For products with options, set prices per variant under `variants:` instead.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"variants":{"type":"array","description":"Array of variant payloads. Variants can declare multiple option pairs via `options:` and per-currency prices via `prices:`. Stock counts go in `stock_items:` (per stock location).","items":{"type":"object","properties":{"sku":{"type":"string"},"options":{"type":"array","description":"One pair per option type the variant participates in (e.g. size + color). Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}},"required":["name"]}}}}}},"/api/v3/admin/products/{id}":{"get":{"summary":"Get a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single product by ID.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID (e.g., prod_xxx)","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., variants, media, option_types, categories). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., name,slug,price,status). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"product found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"404":{"description":"product not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a product. Only provided fields are updated.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"200":{"description":"product updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"tax_category_id":{"type":"string","description":"Tax category ID"},"category_ids":{"type":"array","items":{"type":"string"},"description":"Array of category IDs"},"tags":{"type":"array","items":{"type":"string"}},"prices":{"type":"array","description":"Shorthand for a simple (no-options) product: per-currency prices that forward to the product's sole variant. For products with options, set prices per variant under `variants:` instead.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"variants":{"type":"array","description":"Array of variant payloads. Variants can declare multiple option pairs via `options:` and per-currency prices via `prices:`. Stock counts go in `stock_items:` (per stock location).","items":{"type":"object","properties":{"sku":{"type":"string"},"options":{"type":"array","description":"One pair per option type the variant participates in (e.g. size + color). Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}}}}}}},"delete":{"summary":"Delete a product","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes a product.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product deleted"}}}},"/api/v3/admin/products/bulk_status_update":{"post":{"summary":"Bulk-update product status","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Sets `status` on each product in `ids`. Reindexes the affected products\nfor search. Cross-store IDs are silently dropped. Returns counts.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"cross-store products silently dropped","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"status":{"type":"string"}}}}}},"422":{"description":"invalid status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","status"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["draft","active","archived"]}}}}}}}},"/api/v3/admin/products/bulk_add_to_categories":{"post":{"summary":"Bulk-add products to categories","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Attaches each product in `ids` to every category (taxon) in `category_ids`.\nCategories from sibling stores are silently ignored.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products added to categories","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"category_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","category_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_from_categories":{"post":{"summary":"Bulk-remove products from categories","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Detaches each product in `ids` from every category in `category_ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products removed from categories","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","category_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_add_to_collections":{"post":{"summary":"Bulk-add products to collections","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Attaches each product in `ids` to every manual collection in `collection_ids`.\nAutomatic (rule-based) and sibling-store collections are silently ignored.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products added to collections","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"collection_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","collection_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"collection_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_from_collections":{"post":{"summary":"Bulk-remove products from collections","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Detaches each product in `ids` from every collection in `collection_ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products removed from collections","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","collection_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"collection_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_add_to_channels":{"post":{"summary":"Bulk-add products to channels","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Publishes each product in `ids` on every channel in `channel_ids`. Idempotent —\nre-publishing on an existing channel is a no-op. Channels from sibling stores\nare silently ignored.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products published on channels","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"channel_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","channel_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"channel_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_from_channels":{"post":{"summary":"Bulk-remove products from channels","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Unpublishes each product in `ids` from every channel in `channel_ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products unpublished from channels","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"channel_count":{"type":"integer"},"removed":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","channel_ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"channel_ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_add_tags":{"post":{"summary":"Bulk-add tags to products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds each tag name in `tags` to every product in `ids`. Tags are upserted by name.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags added","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"},"tag_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_remove_tags":{"post":{"summary":"Bulk-remove tags from products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes each tag in `tags` from every product in `ids`.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"tags removed","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids","tags"],"properties":{"ids":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/products/bulk_destroy":{"delete":{"summary":"Bulk-delete products","tags":["Products"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes each product in `ids`. Returns the count actually destroyed.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"products deleted","content":{"application/json":{"schema":{"type":"object","properties":{"product_count":{"type":"integer"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ids"],"properties":{"ids":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/promotions/{promotion_id}/coupon_codes":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List coupon codes for a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the auto-generated coupon codes for a multi-code promotion. Single-code promotions store the code on the promotion itself; this endpoint returns an empty list for them.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"coupon codes found","content":{"application/json":{}}}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_actions":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List actions for a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"actions found","content":{"application/json":{}}}}},"post":{"summary":"Create an action on a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new action to a promotion. The `type` is the wire shorthand from `GET /promotion_actions/types` (e.g. `free_shipping`, `create_item_adjustments`). Fully-qualified Ruby class names are also accepted for backward compatibility.\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"action created","content":{"application/json":{}}},"422":{"description":"unknown action type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}},"required":["type"]}}}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_actions/{id}":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete an action from a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"action deleted"}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_rules":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List rules for a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rules found","content":{"application/json":{}}}}},"post":{"summary":"Create a rule on a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Adds a new rule to a promotion. The `type` is the wire shorthand from `GET /promotion_rules/types` (e.g. `currency`, `item_total`, `product`). Fully-qualified Ruby class names are also accepted for backward compatibility.\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"rule created with preferences","content":{"application/json":{}}},"422":{"description":"unknown rule type","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}},"required":["type"]}}}}}},"/api/v3/admin/promotions/{promotion_id}/promotion_rules/{id}":{"parameters":[{"name":"promotion_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Update a rule's preferences","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rule updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","additionalProperties":true}}}}}}},"delete":{"summary":"Delete a rule from a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"rule deleted"}}}},"/api/v3/admin/promotions":{"get":{"summary":"List promotions","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the store's promotions, including manual coupon and automatic promotions.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"promotions found","content":{"application/json":{}}}}},"post":{"summary":"Create a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new promotion. `code` is required for single-code coupon promotions;\npass `multi_codes: true` with `number_of_codes` to auto-generate a batch.\n\nRules and actions can be created in the same request by passing arrays of\n`{ type, preferences, ... }` rows. The server reconciles to the desired set:\nnew rows are built, existing rows (by `id`) are updated, omitted rows are removed.\n\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"promotion created with rules and actions","content":{"application/json":{}}},"422":{"description":"invalid params","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"starts_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"usage_limit":{"type":"integer","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"kind":{"type":"string","enum":["coupon_code","automatic"]},"multi_codes":{"type":"boolean"},"number_of_codes":{"type":"integer","nullable":true},"code_prefix":{"type":"string","nullable":true},"promotion_category_id":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"product_ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}},"customer_ids":{"type":"array","items":{"type":"string"}}},"required":["type"]}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"calculator":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"required":["type"]}}},"required":["name"]}}}}}},"/api/v3/admin/promotions/{id}":{"get":{"summary":"Show a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"promotion found","content":{"application/json":{}}}}},"patch":{"summary":"Update a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a promotion. The `rules` and `actions` arrays are treated as\na *desired set* — rows with `id` update in place, rows without `id` are\nbuilt fresh, and any existing row not present in the array is destroyed.\nPass `rules: []` or `actions: []` to clear them.\n\n\n**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rules and actions cleared with empty arrays","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"starts_at":{"type":"string","format":"date-time","nullable":true},"expires_at":{"type":"string","format":"date-time","nullable":true},"usage_limit":{"type":"integer","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"kind":{"type":"string","enum":["coupon_code","automatic"]},"promotion_category_id":{"type":"string","nullable":true},"rules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true,"description":"Pass to update an existing rule; omit to build a new one"},"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"product_ids":{"type":"array","items":{"type":"string"}},"category_ids":{"type":"array","items":{"type":"string"}},"customer_ids":{"type":"array","items":{"type":"string"}}},"required":["type"]}},"actions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true},"calculator":{"type":"object","properties":{"type":{"type":"string"},"preferences":{"type":"object","additionalProperties":true}}}},"required":["type"]}}}}}}}},"delete":{"summary":"Delete a promotion","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"promotion deleted"}}}},"/api/v3/admin/promotion_actions/types":{"get":{"summary":"List available promotion action types","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the registered Spree::PromotionAction subclasses with their preference schemas. Used by admin UIs to populate the \"Add action\" picker and render generic preference forms.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"action types found","content":{"application/json":{}}}}}},"/api/v3/admin/promotion_rules/types":{"get":{"summary":"List available promotion rule types","tags":["Promotions"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the registered Spree::PromotionRule subclasses with their preference schemas.\n\n**Required scope:** `read_promotions` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"rule types found","content":{"application/json":{}}}}}},"/api/v3/admin/orders/{order_id}/refunds":{"get":{"summary":"List refunds","tags":["Refunds"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns all refunds for an order.\n\n**Required scope:** `read_refunds` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., payment, refund_reason). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., amount,reason,transaction_id). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"refunds found","content":{"application/json":{}}}}},"post":{"summary":"Create a refund","tags":["Refunds"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a refund for a payment on the order. The refund is automatically processed via the payment gateway.\n\n**Required scope:** `write_refunds` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"order_id","in":"path","required":true,"description":"Order ID","schema":{"type":"string"}}],"responses":{"201":{"description":"refund created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["payment_id","amount"],"properties":{"payment_id":{"type":"string","description":"Payment ID"},"amount":{"type":"string"},"refund_reason_id":{"type":"string","description":"Refund reason ID"}}}}}}}},"/api/v3/admin/locales":{"get":{"summary":"List supported locales","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the locales a merchant can translate content into for the current store, with the default and right-to-left flags.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"locales found","content":{"application/json":{}}}}}},"/api/v3/admin/store_credit_categories":{"get":{"summary":"List store credit categories","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the configured store credit categories. Categories classify\nstore credits (e.g., \"Goodwill\", \"Gift Card\", \"Refund\") and surface\nin the admin UI as a dropdown when issuing or editing a store\ncredit. Category names matching `Spree::Config[:non_expiring_credit_types]`\nare flagged via `non_expiring: true`.\n\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"store credit categories found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StoreCreditCategory"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/store_credit_categories/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Store credit category ID","schema":{"type":"string"}}],"get":{"summary":"Get a store credit category","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single store credit category by prefixed ID.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"store credit category found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoreCreditCategory"}}}},"404":{"description":"store credit category not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/store":{"get":{"summary":"Get the current store","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the current store configuration. The store is resolved from the request context (host or admin selection); there is no `id` parameter.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"current store","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update the current store","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates the current store configuration.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"store updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Store"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"preferred_admin_locale":{"type":"string"},"preferred_timezone":{"type":"string"},"preferred_weight_unit":{"type":"string"},"preferred_unit_system":{"type":"string"}}}}}}}},"/api/v3/admin/tags":{"get":{"summary":"List tags","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns tag names for a given taggable type. Used for autocomplete in tag inputs on products, orders, and customers.","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"taggable_type","in":"query","required":true,"description":"Taggable type (`Spree::Product`, `Spree::Order`, or `Spree::User`)","schema":{"type":"string"}},{"name":"q","in":"query","required":false,"description":"Optional case-insensitive substring filter","schema":{"type":"string"}}],"responses":{"200":{"description":"tags found","content":{"application/json":{}}},"422":{"description":"invalid taggable type","content":{"application/json":{}}}}}},"/api/v3/admin/translatable_resources":{"get":{"summary":"List translatable resources","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns every translatable resource type and its translatable fields (key + content type), so clients can render translation editors generically.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"translatable resources found","content":{"application/json":{}}}}}},"/api/v3/admin/translations/batch":{"post":{"summary":"Batch upsert translations","tags":["Settings"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Atomically upserts translations across many records of (possibly) different translatable resource types in one request — e.g. an option type and all its option values in one save. A flat list of independent registry writes; all entries succeed or none do.\n\n**Required scope:** `write_<resource>` for every resource type in the batch (for API-key authentication) (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"translations upserted","content":{"application/json":{}}},"422":{"description":"unsupported locale rolls back the whole batch","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["translations"],"properties":{"translations":{"type":"array","items":{"type":"object","required":["resource_type","resource_id","values"],"properties":{"resource_type":{"type":"string","description":"Translatable resource type token, e.g. `option_type`"},"resource_id":{"type":"string","description":"Prefixed id of the record"},"values":{"type":"object","description":"Map of locale code to { field: value }","additionalProperties":{"type":"object","additionalProperties":true}}}}}}}}}}}},"/api/v3/admin/admin_users":{"get":{"summary":"List staff","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns admin users with at least one role assignment on the current store.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"staff found","content":{"application/json":{}}}}}},"/api/v3/admin/admin_users/{id}":{"get":{"summary":"Show a staff member","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"staff member found","content":{"application/json":{}}}}},"patch":{"summary":"Update a staff member","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates name fields and reassigns roles for the current store. `role_ids` is a complete replacement — roles not in the array are removed for this store.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"staff member updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"role_ids":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Remove a staff member from this store","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes the user's role assignments on the current store. The account is preserved — the user keeps access to any other stores.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"staff removed from store"}}}},"/api/v3/admin/invitations":{"get":{"summary":"List invitations","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns invitations for the current store, including pending and accepted.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"invitations found","content":{"application/json":{}}}}},"post":{"summary":"Create an invitation","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Invites a teammate by email. The invitation is scoped to the current store and carries the chosen role; on accept, a `RoleUser` is created via the invitation's `after_accept` callback.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"invitation created","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","role_id"],"properties":{"email":{"type":"string"},"role_id":{"type":"string"}}}}}}}},"/api/v3/admin/invitations/{id}":{"delete":{"summary":"Revoke an invitation","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"invitation revoked"}}}},"/api/v3/admin/invitations/{id}/resend":{"patch":{"summary":"Resend an invitation","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Issues a fresh token and dispatches the invitation email again.\n\n**Required scope:** `write_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"invitation resent","content":{"application/json":{}}}}}},"/api/v3/admin/roles":{"get":{"summary":"List roles","tags":["Staff"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the roles available for staff role pickers. Roles are global, not per-store.\n\n**Required scope:** `read_settings` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"roles found","content":{"application/json":{}}}}}},"/api/v3/admin/stock_locations":{"get":{"summary":"List stock locations","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns the configured stock locations. Stock locations are global\n(shared across stores). Filter with Ransack predicates such as\n`q[active_eq]`, `q[kind_eq]`, `q[pickup_enabled_eq]`, or\n`q[name_cont]`.\n\nPickup-related attributes (`kind`, `pickup_enabled`,\n`pickup_stock_policy`, `pickup_ready_in_minutes`,\n`pickup_instructions`) drive merchant pickup support at checkout —\ncustomers can collect orders from any active location with\n`pickup_enabled: true`.\n\n\n**Required scope:** `read_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"q[active_eq]","in":"query","required":false,"description":"Filter by active status","schema":{"type":"boolean"}},{"name":"q[kind_eq]","in":"query","required":false,"description":"Filter by kind (built-in: 'warehouse', 'store', 'fulfillment_center')","schema":{"type":"string"}},{"name":"q[pickup_enabled_eq]","in":"query","required":false,"description":"Filter by pickup-enabled flag","schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"stock locations found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StockLocation"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new stock location.\n\nSetting `default: true` automatically demotes the previous default\nlocation.\n\n\n**Required scope:** `write_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"stock location created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLocation"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"admin_name":{"type":"string","nullable":true,"description":"Internal name shown only in the admin"},"active":{"type":"boolean"},"default":{"type":"boolean","description":"Setting to true demotes the previous default."},"kind":{"type":"string","enum":["warehouse","store","fulfillment_center"],"description":"Categorizes the location."},"propagate_all_variants":{"type":"boolean"},"backorderable_default":{"type":"boolean"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"country_iso":{"type":"string","nullable":true,"description":"ISO-3166 alpha-2 country code (e.g. \"US\")."},"state_abbr":{"type":"string","nullable":true,"description":"State / province abbreviation (e.g. \"NY\"). Resolved against the selected country."},"state_name":{"type":"string","nullable":true,"description":"Free-text state for countries without a states list."},"pickup_enabled":{"type":"boolean"},"pickup_stock_policy":{"type":"string","enum":["local","any"],"description":"'local' = items at this location only; 'any' = transfer-eligible (ship-to-store)."},"pickup_ready_in_minutes":{"type":"number","nullable":true,"minimum":0},"pickup_instructions":{"type":"string","nullable":true}},"required":["name"]}}}}}},"/api/v3/admin/stock_locations/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Stock location ID","schema":{"type":"string"}}],"get":{"summary":"Get a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single stock location by prefixed ID.\n\n**Required scope:** `read_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"stock location found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLocation"}}}},"404":{"description":"stock location not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates an existing stock location. Same address-field conventions as\nthe create endpoint.\n\nSetting `default: true` automatically demotes the previous default.\n\n\n**Required scope:** `write_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"stock location updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLocation"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"admin_name":{"type":"string","nullable":true},"active":{"type":"boolean"},"default":{"type":"boolean"},"kind":{"type":"string","enum":["warehouse","store","fulfillment_center"]},"propagate_all_variants":{"type":"boolean"},"backorderable_default":{"type":"boolean"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"country_iso":{"type":"string","nullable":true},"state_abbr":{"type":"string","nullable":true},"state_name":{"type":"string","nullable":true},"pickup_enabled":{"type":"boolean"},"pickup_stock_policy":{"type":"string","enum":["local","any"]},"pickup_ready_in_minutes":{"type":"number","nullable":true,"minimum":0},"pickup_instructions":{"type":"string","nullable":true}}}}}}},"delete":{"summary":"Delete a stock location","tags":["Stock Locations"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the stock location (sets `deleted_at`). Existing\nfulfillments that referenced it keep the historical record via\n`Spree::StockLocation.with_deleted`.\n\n\n**Required scope:** `write_stock` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"204":{"description":"stock location deleted"}}}},"/api/v3/admin/products/{product_id}/variants":{"get":{"summary":"List product variants","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of variants for a product, including the default variant.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., images, prices, stock_items, option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., sku,price,stock). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"variants found","content":{"application/json":{}}}}},"post":{"summary":"Create a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new variant for a product. Supports nested prices and stock items.\n\nOption types and values are auto-created if they don't exist.\nPrices are upserted by currency. Stock items are upserted by stock location.\n\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"201":{"description":"variant created","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string"},"cost_price":{"type":"string"},"cost_currency":{"type":"string"},"weight":{"type":"number"},"height":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"weight_unit":{"type":"string"},"dimensions_unit":{"type":"string"},"track_inventory":{"type":"boolean"},"tax_category_id":{"type":"string"},"options":{"type":"array","description":"A variant on a product with option types should declare its option pairs (e.g. size + color) — one per option type it participates in. Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"position":{"type":"integer"},"barcode":{"type":"string"},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}}}}},"/api/v3/admin/products/{product_id}/variants/{id}":{"get":{"summary":"Get a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single variant by ID.\n\n**Required scope:** `read_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Variant ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., images, prices, stock_items, option_values). Use dot notation for nested expand (max 4 levels).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include (e.g., sku,price,stock). id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"variant found","content":{"application/json":{}}},"404":{"description":"variant not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a variant. Only provided fields are updated.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Variant ID","schema":{"type":"string"}}],"responses":{"200":{"description":"variant updated","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string"},"cost_price":{"type":"string"},"cost_currency":{"type":"string"},"weight":{"type":"number"},"height":{"type":"number"},"width":{"type":"number"},"depth":{"type":"number"},"weight_unit":{"type":"string"},"dimensions_unit":{"type":"string"},"track_inventory":{"type":"boolean"},"tax_category_id":{"type":"string"},"options":{"type":"array","description":"One pair per option type the variant participates in (e.g. size + color). Option types and values are auto-created if missing.","items":{"type":"object","required":["name","value"],"properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"position":{"type":"integer"},"barcode":{"type":"string"},"prices":{"type":"array","description":"Per-currency prices. Upserted by currency.","items":{"type":"object","required":["currency","amount"],"properties":{"currency":{"type":"string"},"amount":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true}}}},"stock_items":{"type":"array","description":"Per-stock-location inventory. Upserted by stock_location_id.","items":{"type":"object","required":["stock_location_id","count_on_hand"],"properties":{"stock_location_id":{"type":"string","description":"Stock location ID (e.g. sloc_xxx)"},"count_on_hand":{"type":"integer"},"backorderable":{"type":"boolean"}}}}}}}}}},"delete":{"summary":"Delete a variant","tags":["Variants"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes a variant.\n\n**Required scope:** `write_products` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"product_id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Variant ID","schema":{"type":"string"}}],"responses":{"204":{"description":"variant deleted"}}}},"/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries":{"parameters":[{"name":"webhook_endpoint_id","in":"path","required":true,"description":"Parent webhook endpoint ID","schema":{"type":"string"}}],"get":{"summary":"List webhook deliveries","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns delivery attempts for the given endpoint, most recent first.\nEach row carries the original request payload, the response code\n(when the receiver replied), the execution time, and any transport\nerror — everything needed to audit failures and decide whether to\nredeliver.\n\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[event_name_eq]","in":"query","required":false,"description":"Filter by event name (exact)","schema":{"type":"string"}},{"name":"q[success_eq]","in":"query","required":false,"description":"Filter by success flag","schema":{"type":"boolean"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-delivered_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"deliveries found","content":{"application/json":{}}},"404":{"description":"parent webhook endpoint not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}":{"parameters":[{"name":"webhook_endpoint_id","in":"path","required":true,"description":"Parent webhook endpoint ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Webhook delivery ID","schema":{"type":"string"}}],"get":{"summary":"Get a webhook delivery","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single delivery attempt with the full request payload and\nthe response body the receiver returned. Use this for ad-hoc debug\nof failed deliveries.\n\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"delivery found","content":{"application/json":{}}},"404":{"description":"delivery not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v3/admin/webhook_endpoints/{webhook_endpoint_id}/deliveries/{id}/redeliver":{"parameters":[{"name":"webhook_endpoint_id","in":"path","required":true,"description":"Parent webhook endpoint ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Webhook delivery ID to redeliver","schema":{"type":"string"}}],"post":{"summary":"Redeliver a webhook delivery","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new delivery row with the same payload + event_name and\nqueues it. The original row is preserved for audit history.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"redelivery queued","content":{"application/json":{}}}}}},"/api/v3/admin/webhook_endpoints":{"get":{"summary":"List webhook endpoints","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns outbound webhook subscriptions for the current store. Each\nendpoint receives a signed POST when any subscribed event fires.\n`secret_key` is `null` on list reads — the plaintext is delivered\nexactly once on create.\n\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"q[name_cont]","in":"query","required":false,"description":"Filter by name (contains)","schema":{"type":"string"}},{"name":"q[url_cont]","in":"query","required":false,"description":"Filter by URL (contains)","schema":{"type":"string"}},{"name":"sort","in":"query","required":false,"description":"Sort by field. Prefix with `-` for descending (e.g., `-created_at`).","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoints found","content":{"application/json":{}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"summary":"Create a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a new outbound webhook subscription. The plaintext\n`secret_key` is returned **once** in this response — persist it\nimmediately to verify incoming webhook signatures. Subsequent reads\nreturn `null` for the secret. Pass an empty `subscriptions` array or\nomit it to receive every event.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"webhook endpoint created — secret_key returned once","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"name":{"type":"string"},"url":{"type":"string"},"active":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string"}}}}}}}}},"/api/v3/admin/webhook_endpoints/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"get":{"summary":"Get a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single webhook endpoint by prefixed ID.\n\n**Required scope:** `read_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"fields","in":"query","required":false,"description":"Comma-separated list of fields to include. id is always included.","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint found","content":{"application/json":{}}},"404":{"description":"webhook endpoint not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates name, URL, active flag, or the event subscription list.\nToggling `active` here is equivalent to calling `disable`/`enable`\nwithout an audit reason.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint updated","content":{"application/json":{}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"active":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string"}}}}}}}},"delete":{"summary":"Delete a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Soft-deletes the endpoint and stops future deliveries.\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"204":{"description":"webhook endpoint deleted"}}}},"/api/v3/admin/webhook_endpoints/{id}/send_test":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"post":{"summary":"Send a test delivery","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a `webhook.test` delivery record and queues it. Use this to\nverify the endpoint is reachable and your signature verification\naccepts Spree's payloads.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"test delivery queued","content":{"application/json":{}}}}}},"/api/v3/admin/webhook_endpoints/{id}/enable":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"patch":{"summary":"Re-enable a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Re-enables an endpoint that was manually or automatically disabled.\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint enabled","content":{"application/json":{}}}}}},"/api/v3/admin/webhook_endpoints/{id}/disable":{"parameters":[{"name":"id","in":"path","required":true,"description":"Webhook endpoint ID","schema":{"type":"string"}}],"patch":{"summary":"Disable a webhook endpoint","tags":["Webhooks"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Manually pauses an endpoint. Unlike auto-disable (triggered after\nrepeated delivery failures), no notification email is sent.\n\n\n**Required scope:** `write_webhooks` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"200":{"description":"webhook endpoint disabled","content":{"application/json":{}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}}}},"/api/v3/admin/collections":{"get":{"summary":"List collections","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a paginated list of the store's collections.\n\n**Required scope:** `read_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number","schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"description":"Number of records per page","schema":{"type":"integer"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_fields, translations).","schema":{"type":"string"}}],"responses":{"200":{"description":"collections found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Create a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Creates a manual or automatic (rule-based) collection. For automatic collections, send the full desired rule set under `rules`.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}}],"responses":{"201":{"description":"collection created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"422":{"description":"validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"automatic":{"type":"boolean"},"rules_match_policy":{"type":"string","enum":["all","any"]},"sort_order":{"type":"string"},"permalink":{"type":"string"},"description":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"rules":{"type":"array","description":"Full desired rule set. Entries with an id update, id-less entries create, omitted rules are removed.","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"match_policy":{"type":"string"}}}}},"required":["name"]}}}}}},"/api/v3/admin/collections/{id}":{"get":{"summary":"Get a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Returns a single collection by ID, including its rules.\n\n**Required scope:** `read_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}},{"name":"expand","in":"query","required":false,"description":"Comma-separated associations to expand (e.g., custom_fields, translations).","schema":{"type":"string"}}],"responses":{"200":{"description":"collection found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"404":{"description":"collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"summary":"Update a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Updates a collection. Send `position` to reorder it within the flat list; send the full `rules` set to sync automatic rules.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}}],"responses":{"200":{"description":"collection updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"permalink":{"type":"string"},"description":{"type":"string"},"meta_title":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"sort_order":{"type":"string"},"automatic":{"type":"boolean"},"rules_match_policy":{"type":"string","enum":["all","any"]},"position":{"type":"integer","description":"Reorders the collection within the flat list (acts_as_list)"},"rules":{"type":"array","description":"Full desired rule set (see create).","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"match_policy":{"type":"string"}}}}}}}}}},"delete":{"summary":"Delete a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Deletes a collection.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}}],"responses":{"204":{"description":"collection deleted"}}}},"/api/v3/admin/collections/{collection_id}/products":{"get":{"summary":"List collection products","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Products curated in the collection, ordered by their membership position.\n\n**Required scope:** `read_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"collection_id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}}],"responses":{"200":{"description":"products found","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}},"required":["data","meta"]}}}}}},"post":{"summary":"Add a product to a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Curates a product into the collection (appended to the end).\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"collection_id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}}],"responses":{"201":{"description":"product added","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_id":{"type":"string"}},"required":["product_id"]}}}}}},"/api/v3/admin/collections/{collection_id}/products/{id}":{"delete":{"summary":"Remove a product from a collection","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Removes a product from the collection's manual curation.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"collection_id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product removed"}}}},"/api/v3/admin/collections/{collection_id}/products/{id}/reposition":{"patch":{"summary":"Reposition a collection product","tags":["Collections"],"security":[{"api_key":[],"bearer_auth":[]}],"description":"Moves a product to a new index among the collection's products.\n\n**Required scope:** `write_collections` (for API-key authentication).","parameters":[{"name":"x-spree-api-key","in":"header","required":true,"schema":{"type":"string"}},{"name":"Authorization","in":"header","required":true,"description":"Bearer token for admin authentication","schema":{"type":"string"}},{"name":"collection_id","in":"path","required":true,"description":"Collection ID","schema":{"type":"string"}},{"name":"id","in":"path","required":true,"description":"Product ID","schema":{"type":"string"}}],"responses":{"204":{"description":"product repositioned"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"new_position":{"type":"integer","description":"0-based index among the collection's products"}},"required":["new_position"]}}}}}}},"components":{"schemas":{"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"count":{"type":"integer","description":"Total number of records"},"pages":{"type":"integer","description":"Total number of pages"},"from":{"type":"integer","description":"Index of first record on this page"},"to":{"type":"integer","description":"Index of last record on this page"},"in":{"type":"integer","description":"Number of records on this page"},"previous":{"type":"integer","nullable":true,"description":"Previous page number"},"next":{"type":"integer","nullable":true,"description":"Next page number"}},"required":["page","limit","count","pages","from","to","in"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","description":"Field-specific validation errors","nullable":true}},"required":["code","message"]}},"required":["error"]},"AuthResponse":{"type":"object","properties":{"token":{"type":"string","description":"JWT access token"},"user":{"$ref":"#/components/schemas/AdminUser"}},"required":["token","user"]},"PermissionRule":{"type":"object","description":"A single permission rule (CanCanCan rule). Rules are applied in order, last-matching-wins.","properties":{"allow":{"type":"boolean","description":"true for `can`, false for `cannot`"},"actions":{"type":"array","items":{"type":"string"},"description":"Action names, e.g. [\"read\", \"update\"] or [\"manage\"]"},"subjects":{"type":"array","items":{"type":"string"},"description":"Subject class names, e.g. [\"Spree::Product\"] or [\"all\"]"},"has_conditions":{"type":"boolean","description":"True if the server-side rule has per-record conditions. The SPA shows the action optimistically and handles 403 from the API."}},"required":["allow","actions","subjects","has_conditions"]},"MeResponse":{"type":"object","description":"Current admin user profile and serialized permissions","properties":{"user":{"$ref":"#/components/schemas/AdminUser"},"permissions":{"type":"array","items":{"$ref":"#/components/schemas/PermissionRule"}}},"required":["user","permissions"]},"ImportSchemaField":{"type":"object","description":"A canonical column of an import type, including per-store custom field columns","properties":{"name":{"type":"string","description":"Canonical field name used in mappings"},"label":{"type":"string","description":"Human-readable label"},"required":{"type":"boolean","description":"Whether the field must be mapped before processing"}},"required":["name","label","required"]},"CheckoutRequirement":{"type":"object","properties":{"step":{"type":"string","description":"Checkout step this requirement belongs to"},"field":{"type":"string","description":"Field that needs to be satisfied"},"message":{"type":"string","description":"Human-readable requirement message"}},"required":["step","field","message"]},"CartWarning":{"type":"object","description":"A warning about a cart issue (e.g., item removed due to stock change)","properties":{"code":{"type":"string","description":"Machine-readable warning code"},"message":{"type":"string","description":"Human-readable warning message"},"line_item_id":{"type":"string","nullable":true,"description":"Prefixed line item ID (when applicable)"},"variant_id":{"type":"string","nullable":true,"description":"Prefixed variant ID (when applicable)"}},"required":["code","message"]},"FulfillmentManifestItem":{"type":"object","description":"An item within a fulfillment — which line item and how many units are in this fulfillment","properties":{"item_id":{"type":"string","description":"Line item ID"},"variant_id":{"type":"string","description":"Variant ID"},"quantity":{"type":"integer","description":"Quantity in this fulfillment"}},"required":["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"},"name":{"type":"string","description":"Role name"}},"required":["id","name"]},"AdminUserStore":{"type":"object","description":"A store the staff member can access through a role assignment","properties":{"id":{"type":"string","description":"Prefixed store ID"},"name":{"type":"string","description":"Store name"},"code":{"type":"string","description":"Store code"}},"required":["id","name","code"]},"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"},"type":{"type":"string","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","description":"Wire shorthand for the calculator subclass"},"label":{"type":"string"},"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"},"quantity":{"type":"integer"}},"required":["variant_id","quantity"]},"Address":{"type":"object","properties":{"id":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"country_name":{"type":"string"},"country_iso":{"type":"string"},"state_text":{"type":"string","nullable":true},"state_abbr":{"type":"string","nullable":true},"quick_checkout":{"type":"boolean"},"is_default_billing":{"type":"boolean"},"is_default_shipping":{"type":"boolean"},"state_name":{"type":"string","nullable":true},"label":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customer_id":{"type":"string","nullable":true}},"required":["id","first_name","last_name","full_name","address1","address2","postal_code","city","phone","company","country_name","country_iso","state_text","state_abbr","quick_checkout","is_default_billing","is_default_shipping","state_name","label","metadata","created_at","updated_at","customer_id"],"x-typelizer":true},"Adjustment":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"display_amount":{"type":"string"},"included":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"amount":{"type":"string"},"order_id":{"type":"string","nullable":true}},"required":["id","label","display_amount","included","created_at","updated_at","amount","order_id"],"x-typelizer":true},"AdminUser":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string","nullable":true},"selected_locale":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"avatar_url":{"type":"string","nullable":true},"roles":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserRoleAssignment"}},"stores":{"type":"array","items":{"$ref":"#/components/schemas/AdminUserStore"}}},"required":["id","email","first_name","last_name","full_name","selected_locale","created_at","updated_at","avatar_url","roles","stores"],"x-typelizer":true},"AllowedOrigin":{"type":"object","properties":{"id":{"type":"string"},"origin":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","origin","created_at","updated_at"],"x-typelizer":true},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"key_type":{"type":"string"},"token_prefix":{"type":"string","nullable":true},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"revoked_at":{"type":"string","nullable":true},"last_used_at":{"type":"string","nullable":true},"channel_id":{"type":"string","nullable":true},"plaintext_token":{"type":"string","nullable":true},"created_by_email":{"type":"string","nullable":true}},"required":["id","name","key_type","token_prefix","scopes","created_at","updated_at","revoked_at","last_used_at","channel_id","plaintext_token","created_by_email"],"x-typelizer":true},"Category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"permalink":{"type":"string"},"position":{"type":"number"},"depth":{"type":"number"},"meta_title":{"type":"string","nullable":true},"meta_description":{"type":"string","nullable":true},"meta_keywords":{"type":"string","nullable":true},"children_count":{"type":"number"},"parent_id":{"type":"string","nullable":true},"description":{"type":"string"},"description_html":{"type":"string"},"image_url":{"type":"string","nullable":true},"square_image_url":{"type":"string","nullable":true},"is_root":{"type":"boolean"},"is_child":{"type":"boolean"},"is_leaf":{"type":"boolean"},"parent":{"$ref":"#/components/schemas/Category"},"children":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"ancestors":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"translations":{"type":"object"},"metadata":{"type":"object"},"pretty_name":{"type":"string"},"lft":{"type":"number"},"rgt":{"type":"number"},"products_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","permalink","position","depth","meta_title","meta_description","meta_keywords","children_count","parent_id","description","description_html","image_url","square_image_url","is_root","is_child","is_leaf","metadata","pretty_name","lft","rgt","products_count","created_at","updated_at"],"x-typelizer":true},"Channel":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"default":{"type":"boolean"},"storefront_access":{"type":"string"},"guest_checkout":{"type":"boolean"},"preferred_order_routing_strategy":{"type":"string","nullable":true},"preferred_storefront_access":{"type":"string","nullable":true},"preferred_guest_checkout":{"type":"boolean","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","code","active","default","storefront_access","guest_checkout","preferred_order_routing_strategy","preferred_storefront_access","preferred_guest_checkout","created_at","updated_at"],"x-typelizer":true},"CollectionRule":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string","nullable":true},"match_policy":{"type":"string"}},"required":["id","type","value","match_policy"],"x-typelizer":true},"Collection":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"permalink":{"type":"string"},"position":{"type":"number"},"sort_order":{"type":"string"},"meta_title":{"type":"string","nullable":true},"meta_description":{"type":"string","nullable":true},"meta_keywords":{"type":"string","nullable":true},"products_count":{"type":"number"},"description":{"type":"string"},"description_html":{"type":"string"},"image_url":{"type":"string","nullable":true},"square_image_url":{"type":"string","nullable":true},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"translations":{"type":"object"},"automatic":{"type":"boolean"},"rules_match_policy":{"type":"string"},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/CollectionRule"}}},"required":["id","name","permalink","position","sort_order","meta_title","meta_description","meta_keywords","products_count","description","description_html","image_url","square_image_url","automatic","rules_match_policy","metadata","created_at","updated_at","rules"],"x-typelizer":true},"Country":{"type":"object","properties":{"iso":{"type":"string"},"iso3":{"type":"string"},"name":{"type":"string"},"states_required":{"type":"boolean"},"zipcode_required":{"type":"boolean"},"states":{"type":"array","items":{"$ref":"#/components/schemas/State"}},"market":{"allOf":[{"$ref":"#/components/schemas/Market"}],"nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["iso","iso3","name","states_required","zipcode_required","created_at","updated_at"],"x-typelizer":true},"CouponCode":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"state":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"promotion_id":{"type":"string"},"order_id":{"type":"string","nullable":true}},"required":["id","code","state","created_at","updated_at","promotion_id","order_id"],"x-typelizer":true},"CreditCard":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"last4":{"type":"string"},"month":{"type":"number"},"year":{"type":"number"},"name":{"type":"string","nullable":true},"default":{"type":"boolean"},"gateway_payment_profile_id":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true},"payment_method_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","brand","last4","month","year","name","default","gateway_payment_profile_id","customer_id","payment_method_id","metadata","created_at","updated_at"],"x-typelizer":true},"CustomFieldDefinition":{"type":"object","properties":{"id":{"type":"string"},"namespace":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"field_type":{"type":"string","enum":["short_text","long_text","rich_text","number","boolean","json"]},"resource_type":{"type":"string"},"storefront_visible":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","namespace","key","label","field_type","resource_type","storefront_visible","created_at","updated_at"],"x-typelizer":true},"CustomField":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string","deprecated":true},"field_type":{"type":"string","enum":["short_text","long_text","rich_text","number","boolean","json"]},"key":{"type":"string"},"value":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"storefront_visible":{"type":"boolean"},"custom_field_definition_id":{"type":"string"}},"required":["id","label","type","field_type","key","value","created_at","updated_at","storefront_visible","custom_field_definition_id"],"x-typelizer":true},"CustomerGroup":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"customers_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":["id","name","description","customers_count","created_at","updated_at"],"x-typelizer":true},"Customer":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"accepts_email_marketing":{"type":"boolean"},"full_name":{"type":"string"},"available_store_credit_total":{"type":"string"},"display_available_store_credit_total":{"type":"string"},"addresses":{"type":"array","items":{"$ref":"#/components/schemas/Address"}},"default_billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"default_shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"newsletter_subscriber":{"allOf":[{"$ref":"#/components/schemas/NewsletterSubscriber"}],"nullable":true},"customer_groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"login":{"type":"string","nullable":true},"metadata":{"type":"object"},"last_sign_in_at":{"type":"string","nullable":true},"current_sign_in_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"sign_in_count":{"type":"number"},"failed_attempts":{"type":"number"},"last_sign_in_ip":{"type":"string","nullable":true},"current_sign_in_ip":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"internal_note_html":{"type":"string","nullable":true},"default_billing_address_id":{"type":"string","nullable":true},"default_shipping_address_id":{"type":"string","nullable":true},"orders_count":{"type":"number"},"total_spent":{"type":"string"},"display_total_spent":{"type":"string"},"last_order_completed_at":{"type":"string","nullable":true},"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"store_credits":{"type":"array","items":{"$ref":"#/components/schemas/StoreCredit"}},"customer_group_ids":{"type":"array","items":{"type":"string"}}},"required":["id","email","first_name","last_name","phone","accepts_email_marketing","full_name","available_store_credit_total","display_available_store_credit_total","login","metadata","last_sign_in_at","current_sign_in_at","created_at","updated_at","sign_in_count","failed_attempts","last_sign_in_ip","current_sign_in_ip","tags","internal_note_html","default_billing_address_id","default_shipping_address_id","orders_count","total_spent","display_total_spent","last_order_completed_at","customer_group_ids"],"x-typelizer":true},"DeliveryMethod":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"code":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","code","created_at","updated_at"],"x-typelizer":true},"DeliveryRate":{"type":"object","properties":{"id":{"type":"string"},"delivery_method_id":{"type":"string"},"name":{"type":"string"},"selected":{"type":"boolean"},"cost":{"type":"string"},"total":{"type":"string"},"additional_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"tax_total":{"type":"string"},"display_cost":{"type":"string"},"display_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"display_tax_total":{"type":"string"},"delivery_method":{"$ref":"#/components/schemas/DeliveryMethod"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","delivery_method_id","name","selected","cost","total","additional_tax_total","included_tax_total","tax_total","display_cost","display_total","display_additional_tax_total","display_included_tax_total","display_tax_total","created_at","updated_at"],"x-typelizer":true},"DigitalLink":{"type":"object","properties":{"id":{"type":"string"},"access_counter":{"type":"number"},"filename":{"type":"string"},"content_type":{"type":"string"},"download_url":{"type":"string"},"authorizable":{"type":"boolean"},"expired":{"type":"boolean"},"access_limit_exceeded":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","access_counter","filename","content_type","download_url","authorizable","expired","access_limit_exceeded","created_at","updated_at"],"x-typelizer":true},"Discount":{"type":"object","properties":{"id":{"type":"string"},"promotion_id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"amount":{"type":"string"},"display_amount":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","promotion_id","name","description","code","amount","display_amount","created_at","updated_at"],"x-typelizer":true},"Export":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"format":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string","nullable":true},"user_id":{"type":"string","nullable":true},"done":{"type":"boolean"},"filename":{"type":"string","nullable":true},"byte_size":{"type":"number","nullable":true},"download_url":{"type":"string","nullable":true}},"required":["id","number","format","created_at","updated_at","type","user_id","done","filename","byte_size","download_url"],"x-typelizer":true},"Fulfillment":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"tracking":{"type":"string","nullable":true},"tracking_url":{"type":"string","nullable":true},"cost":{"type":"string"},"display_cost":{"type":"string"},"total":{"type":"string"},"display_total":{"type":"string"},"discount_total":{"type":"string"},"display_discount_total":{"type":"string"},"additional_tax_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"tax_total":{"type":"string"},"display_tax_total":{"type":"string"},"status":{"type":"string"},"fulfillment_type":{"type":"string"},"fulfilled_at":{"type":"string","nullable":true},"items":{"type":"array","items":{"$ref":"#/components/schemas/FulfillmentManifestItem"}},"delivery_method":{"$ref":"#/components/schemas/DeliveryMethod"},"stock_location":{"$ref":"#/components/schemas/StockLocation"},"delivery_rates":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryRate"}},"metadata":{"type":"object"},"adjustment_total":{"type":"string"},"pre_tax_amount":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"order_id":{"type":"string","nullable":true},"stock_location_id":{"type":"string","nullable":true},"order":{"$ref":"#/components/schemas/Order"},"adjustments":{"type":"array","items":{"$ref":"#/components/schemas/Adjustment"}}},"required":["id","number","tracking","tracking_url","cost","display_cost","total","display_total","discount_total","display_discount_total","additional_tax_total","display_additional_tax_total","included_tax_total","display_included_tax_total","tax_total","display_tax_total","status","fulfillment_type","fulfilled_at","items","metadata","adjustment_total","pre_tax_amount","created_at","updated_at","order_id","stock_location_id"],"x-typelizer":true},"GiftCardBatch":{"type":"object","properties":{"id":{"type":"string"},"codes_count":{"type":"number"},"currency":{"type":"string","nullable":true},"prefix":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"amount":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true}},"required":["id","codes_count","currency","prefix","created_at","updated_at","amount","expires_at","created_by_id"],"x-typelizer":true},"GiftCard":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"amount":{"type":"string"},"amount_used":{"type":"string"},"amount_authorized":{"type":"string"},"amount_remaining":{"type":"string"},"display_amount":{"type":"string"},"display_amount_used":{"type":"string"},"display_amount_remaining":{"type":"string"},"expires_at":{"type":"string","nullable":true},"redeemed_at":{"type":"string","nullable":true},"expired":{"type":"boolean"},"active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customer_id":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true},"customer":{"$ref":"#/components/schemas/Customer"},"created_by":{"$ref":"#/components/schemas/AdminUser"},"gift_card_batch":{"$ref":"#/components/schemas/GiftCardBatch"},"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}},"required":["id","code","status","currency","amount","amount_used","amount_authorized","amount_remaining","display_amount","display_amount_used","display_amount_remaining","expires_at","redeemed_at","expired","active","created_at","updated_at","customer_id","created_by_id"],"x-typelizer":true},"ImportMapping":{"type":"object","properties":{"id":{"type":"string"},"schema_field":{"type":"string"},"file_column":{"type":"string","nullable":true},"required":{"type":"boolean"}},"required":["id","schema_field","file_column","required"],"x-typelizer":true},"ImportRow":{"type":"object","properties":{"id":{"type":"string"},"row_number":{"type":"number"},"status":{"type":"string"},"validation_errors":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"import_id":{"type":"string","nullable":true},"item_type":{"type":"string","nullable":true},"item_id":{"type":"string","nullable":true},"data":{"type":"object"}},"required":["id","row_number","status","validation_errors","created_at","updated_at","import_id","item_type","item_id","data"],"x-typelizer":true},"Import":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"rows_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string","nullable":true},"status":{"type":"string"},"owner_type":{"type":"string","nullable":true},"owner_id":{"type":"string","nullable":true},"user_id":{"type":"string","nullable":true},"processing_errors":{"type":"string","nullable":true},"preferred_delimiter":{"type":"string"},"original_filename":{"type":"string","nullable":true},"original_byte_size":{"type":"number","nullable":true},"original_file_url":{"type":"string","nullable":true},"completed_rows_count":{"type":"number"},"failed_rows_count":{"type":"number"},"schema_fields":{"type":"array","items":{"$ref":"#/components/schemas/ImportSchemaField"}},"csv_headers":{"type":"array","items":{"type":"string"}},"sample_row":{"type":"object"},"mappings":{"type":"array","items":{"$ref":"#/components/schemas/ImportMapping"}}},"required":["id","number","rows_count","created_at","updated_at","type","status","owner_type","owner_id","user_id","processing_errors","preferred_delimiter","original_filename","original_byte_size","original_file_url","completed_rows_count","failed_rows_count","schema_fields","csv_headers","sample_row","mappings"],"x-typelizer":true},"Invitation":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"expires_at":{"type":"string"},"role_id":{"type":"string"},"role_name":{"type":"string"},"inviter_email":{"type":"string"},"acceptance_url":{"type":"string"},"invitee_exists":{"type":"boolean"},"store":{"type":"object"}},"required":["id","email","status","created_at","updated_at","expires_at","role_id","role_name","inviter_email","acceptance_url","invitee_exists","store"],"x-typelizer":true},"LineItem":{"type":"object","properties":{"id":{"type":"string"},"variant_id":{"type":"string"},"preorder":{"type":"boolean"},"preorder_ships_at":{"type":"string","nullable":true},"quantity":{"type":"number"},"currency":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"options_text":{"type":"string"},"price":{"type":"string"},"display_price":{"type":"string"},"total":{"type":"string"},"display_total":{"type":"string"},"adjustment_total":{"type":"string"},"display_adjustment_total":{"type":"string"},"additional_tax_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"discount_total":{"type":"string"},"display_discount_total":{"type":"string"},"pre_tax_amount":{"type":"string"},"display_pre_tax_amount":{"type":"string"},"discounted_amount":{"type":"string"},"display_discounted_amount":{"type":"string"},"display_compare_at_amount":{"type":"string","nullable":true},"compare_at_amount":{"type":"string","nullable":true},"thumbnail_url":{"type":"string","nullable":true},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}},"digital_links":{"type":"array","items":{"$ref":"#/components/schemas/DigitalLink"}},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"cost_price":{"type":"string","nullable":true},"tax_category_id":{"type":"string","nullable":true},"variant":{"$ref":"#/components/schemas/Variant"},"tax_category":{"$ref":"#/components/schemas/TaxCategory"},"adjustments":{"type":"array","items":{"$ref":"#/components/schemas/Adjustment"}}},"required":["id","variant_id","preorder","preorder_ships_at","quantity","currency","name","slug","options_text","price","display_price","total","display_total","adjustment_total","display_adjustment_total","additional_tax_total","display_additional_tax_total","included_tax_total","display_included_tax_total","discount_total","display_discount_total","pre_tax_amount","display_pre_tax_amount","discounted_amount","display_discounted_amount","display_compare_at_amount","compare_at_amount","thumbnail_url","option_values","digital_links","metadata","created_at","updated_at","cost_price","tax_category_id"],"x-typelizer":true},"Market":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"default_locale":{"type":"string"},"tax_inclusive":{"type":"boolean"},"default":{"type":"boolean"},"country_isos":{"type":"array","items":{"type":"string"}},"supported_locales":{"type":"array","items":{"type":"string"}},"countries":{"type":"array","items":{"$ref":"#/components/schemas/Country"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","currency","default_locale","tax_inclusive","default","country_isos","supported_locales","created_at","updated_at"],"x-typelizer":true},"Media":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string","nullable":true},"variant_ids":{"type":"array","items":{"type":"string"}},"position":{"type":"number"},"alt":{"type":"string","nullable":true},"media_type":{"type":"string"},"focal_point_x":{"type":"number","nullable":true},"focal_point_y":{"type":"number","nullable":true},"external_video_url":{"type":"string","nullable":true},"original_url":{"type":"string","nullable":true},"mini_url":{"type":"string","nullable":true},"small_url":{"type":"string","nullable":true},"medium_url":{"type":"string","nullable":true},"large_url":{"type":"string","nullable":true},"xlarge_url":{"type":"string","nullable":true},"og_image_url":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"viewable_id":{"type":"string"},"download_url":{"type":"string","nullable":true},"metadata":{"type":"object"},"viewable_type":{"type":"string"}},"required":["id","product_id","variant_ids","position","alt","media_type","focal_point_x","focal_point_y","external_video_url","original_url","mini_url","small_url","medium_url","large_url","xlarge_url","og_image_url","created_at","updated_at","viewable_id","download_url","metadata","viewable_type"],"x-typelizer":true},"NewsletterSubscriber":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"verified":{"type":"boolean"},"verified_at":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true}},"required":["id","email","created_at","updated_at","verified","verified_at","customer_id"],"x-typelizer":true},"OptionType":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"number"},"kind":{"type":"string"},"translations":{"type":"object"},"metadata":{"type":"object"},"filterable":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}}},"required":["id","name","label","position","kind","metadata","filterable","created_at","updated_at"],"x-typelizer":true},"OptionValue":{"type":"object","properties":{"id":{"type":"string"},"option_type_id":{"type":"string"},"name":{"type":"string"},"label":{"type":"string"},"position":{"type":"number"},"color_code":{"type":"string","nullable":true},"option_type_name":{"type":"string"},"option_type_label":{"type":"string"},"image_url":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"option_type":{"$ref":"#/components/schemas/OptionType"}},"required":["id","option_type_id","name","label","position","color_code","option_type_name","option_type_label","image_url","metadata","created_at","updated_at"],"x-typelizer":true},"OrderRoutingRule":{"type":"object","properties":{"id":{"type":"string"},"position":{"type":"number"},"active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"channel_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"object"},"label":{"type":"string"},"description":{"type":"string"}},"required":["id","position","active","created_at","updated_at","type","channel_id","preferences","preference_schema","label","description"],"x-typelizer":true},"Order":{"type":"object","properties":{"id":{"type":"string"},"market_id":{"type":"string","nullable":true},"channel_id":{"type":"string","nullable":true},"number":{"type":"string"},"email":{"type":"string"},"customer_note":{"type":"string","nullable":true},"currency":{"type":"string"},"locale":{"type":"string","nullable":true},"total_quantity":{"type":"number"},"fulfillment_status":{"type":"string","nullable":true},"payment_status":{"type":"string","nullable":true},"completed_at":{"type":"string","nullable":true},"item_total":{"type":"string"},"display_item_total":{"type":"string"},"adjustment_total":{"type":"string"},"display_adjustment_total":{"type":"string"},"discount_total":{"type":"string"},"display_discount_total":{"type":"string"},"tax_total":{"type":"string"},"display_tax_total":{"type":"string"},"included_tax_total":{"type":"string"},"display_included_tax_total":{"type":"string"},"additional_tax_total":{"type":"string"},"display_additional_tax_total":{"type":"string"},"total":{"type":"string"},"display_total":{"type":"string"},"gift_card_total":{"type":"string"},"display_gift_card_total":{"type":"string"},"amount_due":{"type":"string"},"display_amount_due":{"type":"string"},"delivery_total":{"type":"string"},"display_delivery_total":{"type":"string"},"store_credit_total":{"type":"string"},"display_store_credit_total":{"type":"string"},"covered_by_store_credit":{"type":"boolean"},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/LineItem"}},"fulfillments":{"type":"array","items":{"$ref":"#/components/schemas/Fulfillment"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"billing_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"shipping_address":{"allOf":[{"$ref":"#/components/schemas/Address"}],"nullable":true},"gift_card":{"allOf":[{"$ref":"#/components/schemas/GiftCard"}],"nullable":true},"market":{"allOf":[{"$ref":"#/components/schemas/Market"}],"nullable":true},"status":{"type":"string"},"last_ip_address":{"type":"string","nullable":true},"considered_risky":{"type":"boolean"},"confirmation_delivered":{"type":"boolean"},"store_owner_notification_delivered":{"type":"boolean"},"payment_total":{"type":"string"},"display_payment_total":{"type":"string"},"metadata":{"type":"object"},"canceled_at":{"type":"string","nullable":true},"approved_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"preferred_stock_location_id":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"internal_note":{"type":"string","nullable":true},"approver_id":{"type":"string","nullable":true},"canceler_id":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true},"customer_id":{"type":"string","nullable":true},"channel":{"$ref":"#/components/schemas/Channel"},"preferred_stock_location":{"$ref":"#/components/schemas/StockLocation"},"payment_methods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"}},"customer":{"$ref":"#/components/schemas/Customer"},"approver":{"$ref":"#/components/schemas/Customer"},"canceler":{"$ref":"#/components/schemas/Customer"},"created_by":{"$ref":"#/components/schemas/Customer"},"adjustments":{"type":"array","items":{"$ref":"#/components/schemas/Adjustment"}},"return_authorizations":{"type":"array","items":{"$ref":"#/components/schemas/ReturnAuthorization"}},"reimbursements":{"type":"array","items":{"$ref":"#/components/schemas/Reimbursement"}}},"required":["id","market_id","channel_id","number","email","customer_note","currency","locale","total_quantity","fulfillment_status","payment_status","completed_at","item_total","display_item_total","adjustment_total","display_adjustment_total","discount_total","display_discount_total","tax_total","display_tax_total","included_tax_total","display_included_tax_total","additional_tax_total","display_additional_tax_total","total","display_total","gift_card_total","display_gift_card_total","amount_due","display_amount_due","delivery_total","display_delivery_total","store_credit_total","display_store_credit_total","covered_by_store_credit","gift_card","market","status","last_ip_address","considered_risky","confirmation_delivered","store_owner_notification_delivered","payment_total","display_payment_total","metadata","canceled_at","approved_at","created_at","updated_at","preferred_stock_location_id","tags","internal_note","approver_id","canceler_id","created_by_id","customer_id"],"x-typelizer":true},"PaymentMethod":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"type":{"type":"string"},"session_required":{"type":"boolean"},"source_required":{"type":"boolean"},"metadata":{"type":"object"},"active":{"type":"boolean"},"auto_capture":{"type":"boolean","nullable":true},"storefront_visible":{"type":"boolean"},"position":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"object"}},"required":["id","name","description","type","session_required","source_required","metadata","active","auto_capture","storefront_visible","position","created_at","updated_at","preferences","preference_schema"],"x-typelizer":true},"Payment":{"type":"object","properties":{"id":{"type":"string"},"payment_method_id":{"type":"string"},"response_code":{"type":"string","nullable":true},"number":{"type":"string"},"amount":{"type":"string"},"display_amount":{"type":"string"},"status":{"type":"string"},"source_type":{"type":"string","nullable":true,"enum":["credit_card","store_credit","payment_source"]},"source_id":{"type":"string","nullable":true},"source":{"anyOf":[{"$ref":"#/components/schemas/CreditCard"},{"$ref":"#/components/schemas/StoreCredit"},{"$ref":"#/components/schemas/PaymentSource"}],"nullable":true},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"},"metadata":{"type":"object"},"avs_response":{"type":"string","nullable":true},"cvv_response_code":{"type":"string","nullable":true},"cvv_response_message":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"captured_amount":{"type":"string"},"order_id":{"type":"string","nullable":true},"order":{"$ref":"#/components/schemas/Order"},"refunds":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}}},"required":["id","payment_method_id","response_code","number","amount","display_amount","status","source_type","source_id","source","metadata","avs_response","cvv_response_code","cvv_response_message","created_at","updated_at","captured_amount","order_id"],"x-typelizer":true},"PaymentSource":{"type":"object","properties":{"id":{"type":"string"},"gateway_payment_profile_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","gateway_payment_profile_id","metadata","created_at","updated_at"],"x-typelizer":true},"PriceHistory":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"amount_in_cents":{"type":"number"},"currency":{"type":"string"},"display_amount":{"type":"string"},"recorded_at":{"type":"string"},"variant_id":{"type":"string"},"price_id":{"type":"string"},"compare_at_amount":{"type":"string","nullable":true},"created_at":{"type":"string"}},"required":["id","amount","amount_in_cents","currency","display_amount","recorded_at","variant_id","price_id","compare_at_amount","created_at"],"x-typelizer":true},"PriceList":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string"},"position":{"type":"number"},"match_policy":{"type":"string"},"starts_at":{"type":"string","nullable":true},"ends_at":{"type":"string","nullable":true},"deleted_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"currently_active":{"type":"boolean"},"products_count":{"type":"number"},"prices_count":{"type":"number"},"product_ids":{"type":"array","items":{"type":"string"}},"price_rules":{"type":"array","items":{"$ref":"#/components/schemas/PriceRule"}}},"required":["id","name","description","status","position","match_policy","starts_at","ends_at","deleted_at","created_at","updated_at","currently_active","products_count","prices_count","product_ids"],"x-typelizer":true},"PriceRule":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"price_list_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceField"}},"label":{"type":"string"},"description":{"type":"string","nullable":true},"markets":{"type":"array","items":{"$ref":"#/components/schemas/Market"}},"customer_groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}},"required":["id","created_at","updated_at","type","price_list_id","preferences","preference_schema","label","description"],"x-typelizer":true},"Price":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string","nullable":true},"amount_in_cents":{"type":"number","nullable":true},"compare_at_amount":{"type":"string","nullable":true},"compare_at_amount_in_cents":{"type":"number","nullable":true},"currency":{"type":"string","nullable":true},"display_amount":{"type":"string","nullable":true},"display_compare_at_amount":{"type":"string","nullable":true},"price_list_id":{"type":"string","nullable":true},"variant_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"variant":{"$ref":"#/components/schemas/Variant"}},"required":["id","amount","amount_in_cents","compare_at_amount","compare_at_amount_in_cents","currency","display_amount","display_compare_at_amount","price_list_id","variant_id","created_at","updated_at"],"x-typelizer":true},"ProductPublication":{"type":"object","properties":{"id":{"type":"string"},"published_at":{"type":"string","nullable":true},"unpublished_at":{"type":"string","nullable":true},"product_id":{"type":"string"},"channel_id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","published_at","unpublished_at","product_id","channel_id","created_at","updated_at"],"x-typelizer":true},"Product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"meta_title":{"type":"string","nullable":true},"meta_description":{"type":"string","nullable":true},"meta_keywords":{"type":"string","nullable":true},"variant_count":{"type":"number"},"available_on":{"type":"string","nullable":true},"preorder_ships_at":{"type":"string","nullable":true},"purchasable":{"type":"boolean"},"preorder":{"type":"boolean"},"in_stock":{"type":"boolean"},"backorderable":{"type":"boolean"},"available":{"type":"boolean"},"description":{"type":"string","nullable":true},"description_html":{"type":"string","nullable":true},"default_variant_id":{"type":"string"},"thumbnail_url":{"type":"string","nullable":true},"tags":{"type":"array","items":{"type":"string"}},"price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"nullable":true},"original_price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"nullable":true},"primary_media":{"$ref":"#/components/schemas/Media"},"media":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"variants":{"type":"array","items":{"$ref":"#/components/schemas/Variant"}},"default_variant":{"$ref":"#/components/schemas/Variant"},"option_types":{"type":"array","items":{"$ref":"#/components/schemas/OptionType"}},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"prior_price":{"allOf":[{"$ref":"#/components/schemas/PriceHistory"}],"nullable":true},"translations":{"type":"object"},"status":{"type":"string"},"metadata":{"type":"object"},"deleted_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"tax_category_id":{"type":"string","nullable":true},"product_publications":{"type":"array","items":{"$ref":"#/components/schemas/ProductPublication"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}}},"required":["id","name","slug","meta_title","meta_description","meta_keywords","variant_count","available_on","preorder_ships_at","purchasable","preorder","in_stock","backorderable","available","description","description_html","default_variant_id","thumbnail_url","tags","price","original_price","status","metadata","deleted_at","created_at","updated_at","tax_category_id"],"x-typelizer":true},"PromotionAction":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"promotion_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceField"}},"label":{"type":"string"},"calculator":{"allOf":[{"$ref":"#/components/schemas/PromotionActionCalculator"}],"nullable":true},"line_items":{"type":"array","items":{"$ref":"#/components/schemas/PromotionActionLineItem"},"nullable":true}},"required":["id","created_at","updated_at","type","promotion_id","preferences","preference_schema","label","calculator","line_items"],"x-typelizer":true},"PromotionRule":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"type":{"type":"string"},"promotion_id":{"type":"string"},"preferences":{"type":"object"},"preference_schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceField"}},"label":{"type":"string"},"product_ids":{"type":"array","items":{"type":"string"},"nullable":true},"category_ids":{"type":"array","items":{"type":"string"},"nullable":true},"customer_ids":{"type":"array","items":{"type":"string"},"nullable":true},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}},"customers":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"customer_groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"countries":{"type":"array","items":{"$ref":"#/components/schemas/Country"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}},"markets":{"type":"array","items":{"$ref":"#/components/schemas/Market"}}},"required":["id","created_at","updated_at","type","promotion_id","preferences","preference_schema","label","product_ids","category_ids","customer_ids"],"x-typelizer":true},"Promotion":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"code":{"type":"string","nullable":true},"starts_at":{"type":"string","nullable":true},"expires_at":{"type":"string","nullable":true},"usage_limit":{"type":"number","nullable":true},"match_policy":{"type":"string","enum":["all","any"]},"path":{"type":"string","nullable":true},"kind":{"type":"string","enum":["coupon_code","automatic"]},"multi_codes":{"type":"boolean"},"number_of_codes":{"type":"number","nullable":true},"code_prefix":{"type":"string","nullable":true},"promotion_category_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"action_ids":{"type":"array","items":{"type":"string"}},"rule_ids":{"type":"array","items":{"type":"string"}}},"required":["id","name","description","code","starts_at","expires_at","usage_limit","match_policy","path","kind","multi_codes","number_of_codes","code_prefix","promotion_category_id","metadata","created_at","updated_at","action_ids","rule_ids"],"x-typelizer":true},"Refund":{"type":"object","properties":{"id":{"type":"string"},"transaction_id":{"type":"string","nullable":true},"amount":{"type":"string","nullable":true},"payment_id":{"type":"string","nullable":true},"refund_reason_id":{"type":"string","nullable":true},"reimbursement_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"payment":{"$ref":"#/components/schemas/Payment"},"reimbursement":{"$ref":"#/components/schemas/Reimbursement"}},"required":["id","transaction_id","amount","payment_id","refund_reason_id","reimbursement_id","metadata","created_at","updated_at"],"x-typelizer":true},"Reimbursement":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"reimbursement_status":{"type":"string","nullable":true},"total":{"type":"string","nullable":true},"order_id":{"type":"string","nullable":true},"customer_return_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"order":{"$ref":"#/components/schemas/Order"}},"required":["id","number","reimbursement_status","total","order_id","customer_return_id","created_at","updated_at"],"x-typelizer":true},"ReturnAuthorization":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"status":{"type":"string"},"order_id":{"type":"string","nullable":true},"stock_location_id":{"type":"string","nullable":true},"return_authorization_reason_id":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"order":{"$ref":"#/components/schemas/Order"},"stock_location":{"$ref":"#/components/schemas/StockLocation"}},"required":["id","number","status","order_id","stock_location_id","return_authorization_reason_id","created_at","updated_at"],"x-typelizer":true},"Role":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","created_at","updated_at"],"x-typelizer":true},"SetupTask":{"type":"object","properties":{"name":{"type":"string"},"done":{"type":"boolean"}},"required":["name","done"],"x-typelizer":true},"State":{"type":"object","properties":{"abbr":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["abbr","name","created_at","updated_at"],"x-typelizer":true},"StockItem":{"type":"object","properties":{"id":{"type":"string"},"count_on_hand":{"type":"number"},"backorderable":{"type":"boolean"},"stock_location_id":{"type":"string","nullable":true},"variant_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"allocated_count":{"type":"number"},"available_count":{"type":"number"},"stock_location":{"$ref":"#/components/schemas/StockLocation"},"variant":{"$ref":"#/components/schemas/Variant"}},"required":["id","count_on_hand","backorderable","stock_location_id","variant_id","metadata","created_at","updated_at","allocated_count","available_count"],"x-typelizer":true},"StockLocation":{"type":"object","properties":{"id":{"type":"string"},"state_abbr":{"type":"string","nullable":true},"name":{"type":"string"},"address1":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"zipcode":{"type":"string","nullable":true},"country_iso":{"type":"string","nullable":true},"country_name":{"type":"string","nullable":true},"state_text":{"type":"string","nullable":true},"admin_name":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"state_name":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"active":{"type":"boolean"},"default":{"type":"boolean"},"backorderable_default":{"type":"boolean"},"propagate_all_variants":{"type":"boolean"},"kind":{"type":"string"},"pickup_enabled":{"type":"boolean"},"pickup_stock_policy":{"type":"string"},"pickup_ready_in_minutes":{"type":"number","nullable":true},"pickup_instructions":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","state_abbr","name","address1","city","zipcode","country_iso","country_name","state_text","admin_name","address2","state_name","phone","company","active","default","backorderable_default","propagate_all_variants","kind","pickup_enabled","pickup_stock_policy","pickup_ready_in_minutes","pickup_instructions","created_at","updated_at"],"x-typelizer":true},"StockReservation":{"type":"object","properties":{"id":{"type":"string"},"stock_item_id":{"type":"string"},"line_item_id":{"type":"string"},"order_id":{"type":"string"},"variant_id":{"type":"string","nullable":true},"stock_location_id":{"type":"string","nullable":true},"quantity":{"type":"number"},"expires_at":{"type":"string"},"active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","stock_item_id","line_item_id","order_id","variant_id","stock_location_id","quantity","expires_at","active","created_at","updated_at"],"x-typelizer":true},"StockTransfer":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"reference":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"source_location_id":{"type":"string","nullable":true},"destination_location_id":{"type":"string","nullable":true},"source_location":{"$ref":"#/components/schemas/StockLocation"},"destination_location":{"$ref":"#/components/schemas/StockLocation"}},"required":["id","number","reference","metadata","created_at","updated_at","source_location_id","destination_location_id"],"x-typelizer":true},"StoreCreditCategory":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"non_expiring":{"type":"boolean"}},"required":["id","name","created_at","updated_at","non_expiring"],"x-typelizer":true},"StoreCredit":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"string"},"amount_used":{"type":"string"},"amount_remaining":{"type":"string"},"display_amount":{"type":"string"},"display_amount_used":{"type":"string"},"display_amount_remaining":{"type":"string"},"currency":{"type":"string"},"memo":{"type":"string","nullable":true},"metadata":{"type":"object"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"customer_id":{"type":"string","nullable":true},"created_by_id":{"type":"string","nullable":true},"category_id":{"type":"string","nullable":true},"category_name":{"type":"string","nullable":true}},"required":["id","amount","amount_used","amount_remaining","display_amount","display_amount_used","display_amount_remaining","currency","memo","metadata","created_at","updated_at","customer_id","created_by_id","category_id","category_name"],"x-typelizer":true},"Store":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"object"},"name":{"type":"string"},"code":{"type":"string"},"preferred_storefront_url":{"type":"string","nullable":true},"default_currency":{"type":"string"},"default_locale":{"type":"string"},"mail_from_address":{"type":"string","nullable":true},"customer_support_email":{"type":"string","nullable":true},"new_order_notifications_email":{"type":"string","nullable":true},"preferred_send_consumer_transactional_emails":{"type":"boolean"},"preferred_admin_locale":{"type":"string","nullable":true},"preferred_timezone":{"type":"string"},"preferred_weight_unit":{"type":"string"},"preferred_unit_system":{"type":"string"},"preferred_storefront_access":{"type":"string"},"preferred_guest_checkout":{"type":"boolean"},"preferred_order_routing_strategy":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"url":{"type":"string"},"api_url":{"type":"string"},"setup_tasks":{"type":"array","items":{"$ref":"#/components/schemas/SetupTask"}},"supported_currencies":{"type":"array","items":{"type":"string"}},"supported_locales":{"type":"array","items":{"type":"string"}},"available_locales":{"type":"array","items":{"type":"string"}},"logo_url":{"type":"string","nullable":true},"mailer_logo_url":{"type":"string","nullable":true}},"required":["id","metadata","name","code","preferred_storefront_url","default_currency","default_locale","mail_from_address","customer_support_email","new_order_notifications_email","preferred_send_consumer_transactional_emails","preferred_admin_locale","preferred_timezone","preferred_weight_unit","preferred_unit_system","preferred_storefront_access","preferred_guest_checkout","preferred_order_routing_strategy","created_at","updated_at","url","api_url","setup_tasks","supported_currencies","supported_locales","available_locales","logo_url","mailer_logo_url"],"x-typelizer":true},"TaxCategory":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tax_code":{"type":"string","nullable":true},"description":{"type":"string","nullable":true},"is_default":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","name","tax_code","description","is_default","created_at","updated_at"],"x-typelizer":true},"Variant":{"type":"object","properties":{"id":{"type":"string"},"product_id":{"type":"string"},"sku":{"type":"string","nullable":true},"options_text":{"type":"string"},"track_inventory":{"type":"boolean"},"media_count":{"type":"number"},"preorder_ships_at":{"type":"string","nullable":true},"thumbnail_url":{"type":"string","nullable":true},"purchasable":{"type":"boolean"},"in_stock":{"type":"boolean"},"backorderable":{"type":"boolean"},"preorder":{"type":"boolean"},"weight":{"type":"number","nullable":true},"height":{"type":"number","nullable":true},"width":{"type":"number","nullable":true},"depth":{"type":"number","nullable":true},"price":{"$ref":"#/components/schemas/Price"},"original_price":{"allOf":[{"$ref":"#/components/schemas/Price"}],"nullable":true},"primary_media":{"$ref":"#/components/schemas/Media"},"media":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"option_values":{"type":"array","items":{"$ref":"#/components/schemas/OptionValue"}},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"}},"prior_price":{"allOf":[{"$ref":"#/components/schemas/PriceHistory"}],"nullable":true},"metadata":{"type":"object"},"position":{"type":"number"},"cost_price":{"type":"string","nullable":true},"cost_currency":{"type":"string","nullable":true},"barcode":{"type":"string","nullable":true},"weight_unit":{"type":"string","nullable":true},"dimensions_unit":{"type":"string","nullable":true},"backorder_limit":{"type":"number","nullable":true},"deleted_at":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"preorderable":{"type":"boolean"},"tax_category_id":{"type":"string","nullable":true},"available_stock":{"type":"number","nullable":true},"reserved_quantity":{"type":"number"},"total_on_hand":{"type":"number","nullable":true},"product_name":{"type":"string"},"prices":{"type":"array","items":{"$ref":"#/components/schemas/Price"}},"stock_items":{"type":"array","items":{"$ref":"#/components/schemas/StockItem"}}},"required":["id","product_id","sku","options_text","track_inventory","media_count","preorder_ships_at","thumbnail_url","purchasable","in_stock","backorderable","preorder","weight","height","width","depth","price","original_price","option_values","metadata","position","cost_price","cost_currency","barcode","weight_unit","dimensions_unit","backorder_limit","deleted_at","created_at","updated_at","preorderable","tax_category_id","available_stock","reserved_quantity","total_on_hand","product_name"],"x-typelizer":true},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"event_name":{"type":"string"},"event_id":{"type":"string","nullable":true},"response_code":{"type":"number","nullable":true},"execution_time":{"type":"number","nullable":true},"error_type":{"type":"string","nullable":true},"request_errors":{"type":"string","nullable":true},"response_body":{"type":"string","nullable":true},"success":{"type":"boolean","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"delivered_at":{"type":"string","nullable":true},"payload":{"type":"object"},"webhook_endpoint_id":{"type":"string"},"webhook_endpoint_url":{"type":"string"}},"required":["id","event_name","event_id","response_code","execution_time","error_type","request_errors","response_body","success","created_at","updated_at","delivered_at","payload","webhook_endpoint_id","webhook_endpoint_url"],"x-typelizer":true},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"url":{"type":"string"},"active":{"type":"boolean"},"subscriptions":{"type":"array","items":{"type":"string"}},"disabled_reason":{"type":"string","nullable":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"disabled_at":{"type":"string","nullable":true},"secret_key":{"type":"string","nullable":true},"last_delivery_at":{"type":"string","nullable":true},"recent_delivery_count":{"type":"number"},"recent_failure_count":{"type":"number"},"total_delivery_count":{"type":"number"},"successful_delivery_count":{"type":"number"},"failed_delivery_count":{"type":"number"}},"required":["id","name","url","active","subscriptions","disabled_reason","created_at","updated_at","disabled_at","secret_key","last_delivery_at","recent_delivery_count","recent_failure_count","total_delivery_count","successful_delivery_count","failed_delivery_count"],"x-typelizer":true}}}}diff --cc packages/cli/src/generated/resource-paths.jsonindex aae0db1baa,58f12a8237..cc1a6f4439--- a/packages/cli/src/generated/resource-paths.json+++ b/packages/cli/src/generated/resource-paths.json@@@ -1,1 -1,1 +1,1 @@@- ["/admin_users","/allowed_origins","/api_keys","/auth","/categories","/channels","/collections","/custom_field_definitions","/customer_groups","/customers","/exports","/gift_card_batches","/gift_cards","/imports","/invitations","/locales","/markets","/me","/option_types","/orders","/payment_methods","/price_lists","/prices","/products","/promotion_actions","/promotion_rules","/promotions","/roles","/stock_locations","/store","/store_credit_categories","/tags","/translatable_resources","/translations","/webhook_endpoints"]-["/admin_users","/allowed_origins","/api_keys","/auth","/categories","/channels","/custom_field_definitions","/customer_groups","/customers","/exports","/gift_card_batches","/gift_cards","/imports","/invitations","/locales","/markets","/me","/option_types","/order_routing_rules","/orders","/payment_methods","/price_lists","/prices","/products","/promotion_actions","/promotion_rules","/promotions","/roles","/stock_locations","/store","/store_credit_categories","/tags","/translatable_resources","/translations","/webhook_endpoints"]++["/admin_users","/allowed_origins","/api_keys","/auth","/categories","/channels","/collections","/custom_field_definitions","/customer_groups","/customers","/exports","/gift_card_batches","/gift_cards","/imports","/invitations","/locales","/markets","/me","/option_types","/order_routing_rules","/orders","/payment_methods","/price_lists","/prices","/products","/promotion_actions","/promotion_rules","/promotions","/roles","/stock_locations","/store","/store_credit_categories","/tags","/translatable_resources","/translations","/webhook_endpoints"]diff --cc spree/api/spec/serializers/spree/api/v3/asset_serializer_spec.rbindex ef31b65024,cdda7d60d3..73b1a70a34--- a/spree/api/spec/serializers/spree/api/v3/asset_serializer_spec.rb+++ b/spree/api/spec/serializers/spree/api/v3/asset_serializer_spec.rb@@@ -21,10 -28,11 +28,11 @@@ RSpec.describe Spree::Api::V3::AssetSerendit 'returns prefixed viewable_id' do- expect(subject['viewable_id']).to eq(product.master.prefixed_id)+ expect(subject['viewable_id']).to eq(product.default_variant.prefixed_id)end+ # Shorthand, not the polymorphic class name.it 'returns viewable_type' do- expect(subject['viewable_type']).to eq('Spree::Variant')+ expect(subject['viewable_type']).to eq('variant')endenddiff --cc spree/core/app/jobs/spree/imports/create_categories_job.rbindex e9ef943ba6,f6dd34477a..0b70430774--- a/spree/core/app/jobs/spree/imports/create_categories_job.rb+++ b/spree/core/app/jobs/spree/imports/create_categories_job.rb@@@ -9,9 -9,11 +9,11 @@@ module Spredef perform(product_id, store_id, taxon_pretty_names)product = Spree::Product.find(product_id)store = Spree::Store.find(store_id)- categories = taxon_pretty_names.filter_map { |taxon_pretty_name| find_or_create_taxon(store, taxon_pretty_name) }- product.categories = categories+ with_store_content_locale(store) do- taxons = taxon_pretty_names.filter_map { |taxon_pretty_name| find_or_create_taxon(store, taxon_pretty_name) }- product.taxons = taxons++ categories = taxon_pretty_names.filter_map { |taxon_pretty_name| find_or_create_taxon(store, taxon_pretty_name) }++ product.categories = categories+ endendprivate