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
Add tags bulk operations to Customers in Admin API/SDK/SPA
Damian Legawieccacab5a2ff48
diff --git a/docs/api-reference/admin.yaml b/docs/api-reference/admin.yamlindex 7dc7eb88be..86ddc636e4 100644--- a/docs/api-reference/admin.yaml+++ b/docs/api-reference/admin.yaml@@ -82,12 +82,12 @@ paths:example:data:- id: admin_UkLWZg9DAJ- email: [email protected]- first_name: Naomi- last_name: Hand- full_name: Naomi Hand- created_at: '2026-05-24T16:06:59.324Z'- updated_at: '2026-05-24T16:06:59.324Z'+ email: [email protected]+ first_name: Jamal+ last_name: Doyle+ full_name: Jamal Doyle+ created_at: '2026-05-24T17:36:33.885Z'+ updated_at: '2026-05-24T17:36:33.885Z'roles:- id: role_UkLWZg9DAJname: admin@@ -145,12 +145,12 @@ paths:application/json:example:id: admin_UkLWZg9DAJ- email: [email protected]- first_name: Lizzie- last_name: Mraz- full_name: Lizzie Mraz- created_at: '2026-05-24T16:06:59.676Z'- updated_at: '2026-05-24T16:06:59.676Z'+ email: [email protected]+ first_name: Mercedez+ last_name: Bailey+ full_name: Mercedez Bailey+ created_at: '2026-05-24T17:36:34.235Z'+ updated_at: '2026-05-24T17:36:34.235Z'roles:- id: role_UkLWZg9DAJname: admin@@ -203,12 +203,12 @@ paths:application/json:example:id: admin_UkLWZg9DAJ- email: [email protected]+ email: [email protected]first_name: Renamed- last_name: Jakubowski- full_name: Renamed Jakubowski- created_at: '2026-05-24T16:06:59.975Z'- updated_at: '2026-05-24T16:07:00.014Z'+ last_name: Lindgren+ full_name: Renamed Lindgren+ created_at: '2026-05-24T17:36:34.526Z'+ updated_at: '2026-05-24T17:36:34.545Z'roles:- id: role_UkLWZg9DAJname: admin@@ -317,32 +317,32 @@ paths:key_type: publishabletoken_prefix:scopes: []- created_at: '2026-05-24T16:07:00.307Z'- updated_at: '2026-05-24T16:07:00.307Z'+ created_at: '2026-05-24T17:36:34.854Z'+ updated_at: '2026-05-24T17:36:34.854Z'revoked_at:last_used_at:- plaintext_token: pk_EGki2qBcCbDiLWqHc2ojJhQZ+ plaintext_token: pk_wqTPmhFDQiJbhbgokeP9tPzKcreated_by_email:- id: key_gbHJdmfrXBname: Backend integrationkey_type: secret- token_prefix: sk_i9UP3kJVU+ token_prefix: sk_GAnG4mX7Lscopes:- write_all- created_at: '2026-05-24T16:07:00.308Z'- updated_at: '2026-05-24T16:07:00.308Z'+ created_at: '2026-05-24T17:36:34.855Z'+ updated_at: '2026-05-24T17:36:34.855Z'revoked_at:last_used_at:plaintext_token:created_by_email:- id: key_EfhxLZ9ck8- name: aspernatur+ name: occaecatikey_type: secret- token_prefix: sk_7WBMLjEz7+ token_prefix: sk_Zf75n9zm3scopes:- write_all- created_at: '2026-05-24T16:07:00.308Z'- updated_at: '2026-05-24T16:07:00.308Z'+ created_at: '2026-05-24T17:36:34.857Z'+ updated_at: '2026-05-24T17:36:34.857Z'revoked_at:last_used_at:plaintext_token:@@ -405,15 +405,15 @@ paths:id: key_VqXmZF31wYname: CI keykey_type: secret- token_prefix: sk_DCwDatNSU+ token_prefix: sk_ryCceerppscopes:- read_orders- created_at: '2026-05-24T16:07:00.888Z'- updated_at: '2026-05-24T16:07:00.888Z'+ created_at: '2026-05-24T17:36:35.441Z'+ updated_at: '2026-05-24T17:36:35.441Z'revoked_at:last_used_at:- plaintext_token: sk_DCwDatNSUhFo54twCeGTAViZ- created_by_email: [email protected]+ plaintext_token: sk_ryCceerpp5vqodztxueeWXmc+ created_by_email: [email protected]'422':description: validation errorcontent:@@ -499,11 +499,11 @@ paths:key_type: publishabletoken_prefix:scopes: []- created_at: '2026-05-24T16:07:01.243Z'- updated_at: '2026-05-24T16:07:01.243Z'+ created_at: '2026-05-24T17:36:35.723Z'+ updated_at: '2026-05-24T17:36:35.723Z'revoked_at:last_used_at:- plaintext_token: pk_z37d3ct5uyUrpq3LiH2hS7Qv+ plaintext_token: pk_yXJtU7SvnfLbkPvuuiUnKaEocreated_by_email:delete:summary: Delete an API key@@ -593,12 +593,12 @@ paths:id: key_gbHJdmfrXBname: Backend integrationkey_type: secret- token_prefix: sk_NAFkow191+ token_prefix: sk_q6euaWxodscopes:- write_all- created_at: '2026-05-24T16:07:01.813Z'- updated_at: '2026-05-24T16:07:02.088Z'- revoked_at: '2026-05-24T16:07:02.087Z'+ created_at: '2026-05-24T17:36:36.279Z'+ updated_at: '2026-05-24T17:36:36.554Z'+ revoked_at: '2026-05-24T17:36:36.553Z'last_used_at:plaintext_token:created_by_email:@@ -653,15 +653,15 @@ paths:- id: coupon_UkLWZg9DAJcode: AAA111state: unused- created_at: '2026-05-24T16:07:02.107Z'- updated_at: '2026-05-24T16:07:02.107Z'+ created_at: '2026-05-24T17:36:36.570Z'+ updated_at: '2026-05-24T17:36:36.570Z'promotion_id: promo_UkLWZg9DAJorder_id:- id: coupon_gbHJdmfrXBcode: BBB222state: unused- created_at: '2026-05-24T16:07:02.108Z'- updated_at: '2026-05-24T16:07:02.108Z'+ created_at: '2026-05-24T17:36:36.571Z'+ updated_at: '2026-05-24T17:36:36.571Z'promotion_id: promo_UkLWZg9DAJorder_id:meta:@@ -739,8 +739,8 @@ paths:field_type: short_textresource_type: Spree::Productstorefront_visible: true- created_at: '2026-05-24T16:07:02.420Z'- updated_at: '2026-05-24T16:07:02.420Z'+ created_at: '2026-05-24T17:36:36.857Z'+ updated_at: '2026-05-24T17:36:36.857Z'- id: cfdef_gbHJdmfrXBnamespace: customkey: order_notes@@ -748,8 +748,8 @@ paths:field_type: short_textresource_type: Spree::Orderstorefront_visible: true- created_at: '2026-05-24T16:07:02.421Z'- updated_at: '2026-05-24T16:07:02.421Z'+ created_at: '2026-05-24T17:36:36.857Z'+ updated_at: '2026-05-24T17:36:36.857Z'meta:page: 1limit: 25@@ -812,8 +812,8 @@ paths:field_type: short_textresource_type: Spree::Productstorefront_visible: true- created_at: '2026-05-24T16:07:03.030Z'- updated_at: '2026-05-24T16:07:03.030Z'+ created_at: '2026-05-24T17:36:37.407Z'+ updated_at: '2026-05-24T17:36:37.407Z'requestBody:content:application/json:@@ -896,8 +896,8 @@ paths:field_type: short_textresource_type: Spree::Productstorefront_visible: true- created_at: '2026-05-24T16:07:03.033Z'- updated_at: '2026-05-24T16:07:03.033Z'+ created_at: '2026-05-24T17:36:37.410Z'+ updated_at: '2026-05-24T17:36:37.410Z'patch:summary: Update a custom field definitiontags:@@ -936,8 +936,8 @@ paths:field_type: short_textresource_type: Spree::Productstorefront_visible: false- created_at: '2026-05-24T16:07:03.315Z'- updated_at: '2026-05-24T16:07:03.597Z'+ created_at: '2026-05-24T17:36:37.685Z'+ updated_at: '2026-05-24T17:36:37.959Z'requestBody:content:application/json:@@ -1061,14 +1061,14 @@ paths:name: VIPsdescription: Top spenderscustomers_count: 0- created_at: '2026-05-24T16:07:03.892Z'- updated_at: '2026-05-24T16:07:03.892Z'+ created_at: '2026-05-24T17:36:38.239Z'+ updated_at: '2026-05-24T17:36:38.239Z'- id: cg_gbHJdmfrXBname: Wholesaledescription:customers_count: 0- created_at: '2026-05-24T16:07:03.893Z'- updated_at: '2026-05-24T16:07:03.893Z'+ created_at: '2026-05-24T17:36:38.240Z'+ updated_at: '2026-05-24T17:36:38.240Z'meta:page: 1limit: 25@@ -1153,8 +1153,8 @@ paths:name: Wholesale 2description: B2B accountscustomers_count: 1- created_at: '2026-05-24T16:07:04.903Z'- updated_at: '2026-05-24T16:07:04.903Z'+ created_at: '2026-05-24T17:36:39.101Z'+ updated_at: '2026-05-24T17:36:39.101Z'schema:"$ref": "#/components/schemas/CustomerGroup"'422':@@ -1260,24 +1260,24 @@ paths:name: VIPsdescription: Top spenderscustomers_count: 1- created_at: '2026-05-24T16:07:05.506Z'- updated_at: '2026-05-24T16:07:05.506Z'+ created_at: '2026-05-24T17:36:39.681Z'+ updated_at: '2026-05-24T17:36:39.681Z'customers:- id: cus_UkLWZg9DAJ- email: [email protected]- first_name: Damien- last_name: Turcotte+ email: [email protected]+ first_name: Janett+ last_name: Marvinphone:accepts_email_marketing: false- full_name: Damien Turcotte+ full_name: Janett Marvinavailable_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-05-24T16:07:05.771Z'- updated_at: '2026-05-24T16:07:05.771Z'+ created_at: '2026-05-24T17:36:39.940Z'+ updated_at: '2026-05-24T17:36:39.940Z'sign_in_count: 0failed_attempts: 0last_sign_in_ip:@@ -1355,8 +1355,8 @@ paths:name: VIP customers (Q1)description: Top spenderscustomers_count: 0- created_at: '2026-05-24T16:07:06.350Z'- updated_at: '2026-05-24T16:07:06.632Z'+ created_at: '2026-05-24T17:36:40.533Z'+ updated_at: '2026-05-24T17:36:40.811Z'schema:"$ref": "#/components/schemas/CustomerGroup"'422':@@ -1509,8 +1509,8 @@ paths:state_name: New Yorklabel:metadata: {}- created_at: '2026-05-24T16:07:07.463Z'- updated_at: '2026-05-24T16:07:07.463Z'+ created_at: '2026-05-24T17:36:41.658Z'+ updated_at: '2026-05-24T17:36:41.658Z'customer_id: cus_UkLWZg9DAJmeta:page: 1@@ -1598,8 +1598,8 @@ paths:state_name: New Yorklabel: Officemetadata: {}- created_at: '2026-05-24T16:07:08.935Z'- updated_at: '2026-05-24T16:07:08.935Z'+ created_at: '2026-05-24T17:36:43.149Z'+ updated_at: '2026-05-24T17:36:43.149Z'customer_id: cus_UkLWZg9DAJrequestBody:content:@@ -1710,8 +1710,8 @@ paths:state_name: New Yorklabel:metadata: {}- created_at: '2026-05-24T16:07:09.213Z'- updated_at: '2026-05-24T16:07:09.773Z'+ created_at: '2026-05-24T17:36:43.466Z'+ updated_at: '2026-05-24T17:36:44.249Z'customer_id: cus_UkLWZg9DAJrequestBody:content:@@ -1844,8 +1844,8 @@ paths:customer_id: cus_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJmetadata: {}- created_at: '2026-05-24T16:07:11.148Z'- updated_at: '2026-05-24T16:07:11.148Z'+ created_at: '2026-05-24T17:36:45.523Z'+ updated_at: '2026-05-24T17:36:45.523Z'meta:page: 1limit: 25@@ -1932,8 +1932,8 @@ paths:customer_id: cus_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJmetadata: {}- created_at: '2026-05-24T16:07:11.700Z'- updated_at: '2026-05-24T16:07:11.700Z'+ created_at: '2026-05-24T17:36:46.077Z'+ updated_at: '2026-05-24T17:36:46.077Z'delete:summary: Delete a customer credit cardtags:@@ -2052,8 +2052,8 @@ paths:currency: USDmemo:metadata: {}- created_at: '2026-05-24T16:07:13.070Z'- updated_at: '2026-05-24T16:07:13.070Z'+ created_at: '2026-05-24T17:36:47.452Z'+ updated_at: '2026-05-24T17:36:47.452Z'customer_id: cus_UkLWZg9DAJcreated_by_id: admin_UkLWZg9DAJcategory_id: sccat_UkLWZg9DAJ@@ -2128,8 +2128,8 @@ paths:currency: USDmemo: Goodwillmetadata: {}- created_at: '2026-05-24T16:07:14.186Z'- updated_at: '2026-05-24T16:07:14.186Z'+ created_at: '2026-05-24T17:36:48.578Z'+ updated_at: '2026-05-24T17:36:48.578Z'customer_id: cus_UkLWZg9DAJcreated_by_id: admin_gbHJdmfrXBcategory_id: sccat_UkLWZg9DAJ@@ -2220,8 +2220,8 @@ paths:currency: USDmemo: Updatedmetadata: {}- created_at: '2026-05-24T16:07:14.750Z'- updated_at: '2026-05-24T16:07:15.069Z'+ created_at: '2026-05-24T17:36:49.119Z'+ updated_at: '2026-05-24T17:36:49.399Z'customer_id: cus_UkLWZg9DAJcreated_by_id: admin_UkLWZg9DAJcategory_id: sccat_UkLWZg9DAJ@@ -2375,8 +2375,8 @@ paths:metadata: {}last_sign_in_at:current_sign_in_at:- created_at: '2026-05-24T16:07:16.176Z'- updated_at: '2026-05-24T16:07:16.176Z'+ created_at: '2026-05-24T17:36:50.510Z'+ updated_at: '2026-05-24T17:36:50.510Z'sign_in_count: 0failed_attempts: 0last_sign_in_ip:@@ -2459,8 +2459,8 @@ paths:metadata: {}last_sign_in_at:current_sign_in_at:- created_at: '2026-05-24T16:07:17.003Z'- updated_at: '2026-05-24T16:07:17.003Z'+ created_at: '2026-05-24T17:36:51.382Z'+ updated_at: '2026-05-24T17:36:51.382Z'sign_in_count: 0failed_attempts: 0last_sign_in_ip:@@ -2576,8 +2576,8 @@ paths:metadata: {}last_sign_in_at:current_sign_in_at:- created_at: '2026-05-24T16:07:17.280Z'- updated_at: '2026-05-24T16:07:17.280Z'+ created_at: '2026-05-24T17:36:51.654Z'+ updated_at: '2026-05-24T17:36:51.654Z'sign_in_count: 0failed_attempts: 0last_sign_in_ip:@@ -2651,8 +2651,8 @@ paths:metadata: {}last_sign_in_at:current_sign_in_at:- created_at: '2026-05-24T16:07:17.823Z'- updated_at: '2026-05-24T16:07:18.154Z'+ created_at: '2026-05-24T17:36:52.193Z'+ updated_at: '2026-05-24T17:36:52.471Z'sign_in_count: 0failed_attempts: 0last_sign_in_ip:@@ -2886,6 +2886,159 @@ paths:type: stringexample:- cg_UkLWZg9DAJ+ "/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+ upserted by name; re-adding an existing tag is a no-op.+++ **Required scope:** `write_customers` (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.customers.bulkAddTags({+ ids: ['cus_UkLWZg9DAJ', 'cus_QrLWXg9CAJ'],+ tags: ['vip', 'newsletter'],+ })+ 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:+ 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":+ 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+ for customers that don't carry the tag.+++ **Required scope:** `write_customers` (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.customers.bulkRemoveTags({+ ids: ['cus_UkLWZg9DAJ'],+ tags: ['vip'],+ })+ 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:+ customer_count: 1+ tag_count: 1+ 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"/api/v3/admin/exports":get:summary: List exports@@ -2929,11 +3082,11 @@ paths:example:data:- id: exp_UkLWZg9DAJ- number: EF233476418+ number: EF797270070type: Spree::Exports::Productsformat: csv- created_at: '2026-05-24T16:07:20.612Z'- updated_at: '2026-05-24T16:07:20.612Z'+ created_at: '2026-05-24T17:36:56.574Z'+ updated_at: '2026-05-24T17:36:56.574Z'user_id: admin_UkLWZg9DAJdone: falsefilename:@@ -3000,11 +3153,11 @@ paths:application/json:example:id: exp_gbHJdmfrXB- number: EF370959206+ number: EF700540072type: Spree::Exports::Productsformat: csv- created_at: '2026-05-24T16:07:20.906Z'- updated_at: '2026-05-24T16:07:20.906Z'+ created_at: '2026-05-24T17:36:56.866Z'+ updated_at: '2026-05-24T17:36:56.866Z'user_id: admin_UkLWZg9DAJdone: falsefilename:@@ -3091,11 +3244,11 @@ paths:application/json:example:id: exp_UkLWZg9DAJ- number: EF216650102+ number: EF052905723type: Spree::Exports::Productsformat: csv- created_at: '2026-05-24T16:07:21.176Z'- updated_at: '2026-05-24T16:07:21.176Z'+ created_at: '2026-05-24T17:36:57.139Z'+ updated_at: '2026-05-24T17:36:57.139Z'user_id: admin_UkLWZg9DAJdone: falsefilename:@@ -3278,8 +3431,8 @@ paths:codes_count: 2currency: USDprefix: WELCOME- created_at: '2026-05-24T16:07:21.771Z'- updated_at: '2026-05-24T16:07:21.771Z'+ created_at: '2026-05-24T17:36:57.736Z'+ updated_at: '2026-05-24T17:36:57.736Z'amount: '50.0'expires_at:created_by_id:@@ -3360,8 +3513,8 @@ paths:codes_count: 5currency: USDprefix: NEWCAMP- created_at: '2026-05-24T16:07:22.330Z'- updated_at: '2026-05-24T16:07:22.330Z'+ created_at: '2026-05-24T17:36:58.306Z'+ updated_at: '2026-05-24T17:36:58.306Z'amount: '25.0'expires_at: '2030-12-31'created_by_id: admin_UkLWZg9DAJ@@ -3462,8 +3615,8 @@ paths:codes_count: 2currency: USDprefix: WELCOME- created_at: '2026-05-24T16:07:22.613Z'- updated_at: '2026-05-24T16:07:22.613Z'+ created_at: '2026-05-24T17:36:58.593Z'+ updated_at: '2026-05-24T17:36:58.593Z'amount: '50.0'expires_at:created_by_id:@@ -3566,7 +3719,7 @@ paths:example:data:- id: gc_UkLWZg9DAJ- code: 36A3AB445CD03FD3+ code: CC7B2B4D3AB3008Cstatus: activecurrency: USDamount: '50.0'@@ -3580,12 +3733,12 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-05-24T16:07:23.175Z'- updated_at: '2026-05-24T16:07:23.175Z'+ created_at: '2026-05-24T17:36:59.157Z'+ updated_at: '2026-05-24T17:36:59.157Z'customer_id:created_by_id:- id: gc_gbHJdmfrXB- code: 4B6931971190EBEC+ code: DDB3EA9E5861FC28status: activecurrency: USDamount: '25.0'@@ -3599,8 +3752,8 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-05-24T16:07:23.176Z'- updated_at: '2026-05-24T16:07:23.176Z'+ created_at: '2026-05-24T17:36:59.158Z'+ updated_at: '2026-05-24T17:36:59.158Z'customer_id:created_by_id:meta:@@ -3685,7 +3838,7 @@ paths:application/json:example:id: gc_EfhxLZ9ck8- code: 2F07C05FFF93AF20+ code: A45E3AF0F74D82E8status: activecurrency: USDamount: '25.0'@@ -3699,8 +3852,8 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-05-24T16:07:23.742Z'- updated_at: '2026-05-24T16:07:23.742Z'+ created_at: '2026-05-24T17:36:59.731Z'+ updated_at: '2026-05-24T17:36:59.731Z'customer_id:created_by_id: admin_UkLWZg9DAJschema:@@ -3806,7 +3959,7 @@ paths:application/json:example:id: gc_UkLWZg9DAJ- code: 7168AAC2F84B7AA1+ code: 62E9760F39DB00B8status: activecurrency: USDamount: '50.0'@@ -3820,8 +3973,8 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-05-24T16:07:24.025Z'- updated_at: '2026-05-24T16:07:24.025Z'+ created_at: '2026-05-24T17:37:00.039Z'+ updated_at: '2026-05-24T17:37:00.039Z'customer_id:created_by_id:schema:@@ -3881,7 +4034,7 @@ paths:application/json:example:id: gc_UkLWZg9DAJ- code: D0D09ACDE8C8E02F+ code: 80360376B43E9B35status: activecurrency: USDamount: '75.0'@@ -3895,8 +4048,8 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-05-24T16:07:24.579Z'- updated_at: '2026-05-24T16:07:24.858Z'+ created_at: '2026-05-24T17:37:00.647Z'+ updated_at: '2026-05-24T17:37:00.941Z'customer_id:created_by_id:schema:@@ -4008,15 +4161,15 @@ paths:example:data:- id: inv_UkLWZg9DAJ- email: [email protected]+ email: [email protected]status: pending- created_at: '2026-05-24T16:07:25.707Z'- updated_at: '2026-05-24T16:07:25.707Z'- expires_at: '2026-06-07T16:07:25.705Z'+ created_at: '2026-05-24T17:37:01.802Z'+ updated_at: '2026-05-24T17:37:01.802Z'+ expires_at: '2026-06-07T17:37:01.798Z'role_id: role_UkLWZg9DAJrole_name: admin- inviter_email: [email protected]- acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=E8YpGtYZWDtA9iU3YTpJRMpf"+ inviter_email: [email protected]+ acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=zySacMBFavnzmtA9ZV4NQdhg"invitee_exists: falsestore:id: store_UkLWZg9DAJ@@ -4077,13 +4230,13 @@ paths:id: inv_gbHJdmfrXBemail: [email protected]status: pending- created_at: '2026-05-24T16:07:26.003Z'- updated_at: '2026-05-24T16:07:26.003Z'- expires_at: '2026-06-07T16:07:26.001Z'+ created_at: '2026-05-24T17:37:02.111Z'+ updated_at: '2026-05-24T17:37:02.111Z'+ expires_at: '2026-06-07T17:37:02.108Z'role_id: role_UkLWZg9DAJrole_name: admin- inviter_email: [email protected]- acceptance_url: "/accept-invitation/inv_gbHJdmfrXB?token=FjFn64HfboErT1Tvyfuq8krZ"+ inviter_email: [email protected]+ acceptance_url: "/accept-invitation/inv_gbHJdmfrXB?token=EzFbcPeHADJwGwapUkFjCjut"invitee_exists: falsestore:id: store_UkLWZg9DAJ@@ -4190,15 +4343,15 @@ paths:application/json:example:id: inv_UkLWZg9DAJ- email: [email protected]+ email: [email protected]status: pending- created_at: '2026-05-24T16:07:26.548Z'- updated_at: '2026-05-24T16:07:26.548Z'- expires_at: '2026-06-07T16:07:26.546Z'+ created_at: '2026-05-24T17:37:02.736Z'+ updated_at: '2026-05-24T17:37:02.736Z'+ expires_at: '2026-06-07T17:37:02.733Z'role_id: role_UkLWZg9DAJrole_name: admin- inviter_email: [email protected]- acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=xB4SfDNKgsviBVABPoWaf2AM"+ inviter_email: [email protected]+ acceptance_url: "/accept-invitation/inv_UkLWZg9DAJ?token=KRTKCjz8LLoWUjxZrWFrAzKU"invitee_exists: falsestore:id: store_UkLWZg9DAJ@@ -4248,12 +4401,12 @@ paths:example:user:id: admin_UkLWZg9DAJ- email: [email protected]- first_name: Glenn- last_name: Pagac- full_name: Glenn Pagac- created_at: '2026-05-24T16:07:26.822Z'- updated_at: '2026-05-24T16:07:26.822Z'+ email: [email protected]+ first_name: Venessa+ last_name: Bechtelar+ full_name: Venessa Bechtelar+ created_at: '2026-05-24T17:37:03.068Z'+ updated_at: '2026-05-24T17:37:03.068Z'roles:- id: role_UkLWZg9DAJname: admin@@ -4403,8 +4556,8 @@ paths:kind: dropdownmetadata: {}filterable: true- created_at: '2026-05-24T16:07:26.862Z'- updated_at: '2026-05-24T16:07:26.862Z'+ created_at: '2026-05-24T17:37:03.133Z'+ updated_at: '2026-05-24T17:37:03.133Z'meta:page: 1limit: 25@@ -4495,8 +4648,8 @@ paths:kind: dropdownmetadata: {}filterable: true- created_at: '2026-05-24T16:07:27.427Z'- updated_at: '2026-05-24T16:07:27.427Z'+ created_at: '2026-05-24T17:37:03.722Z'+ updated_at: '2026-05-24T17:37:03.722Z'schema:"$ref": "#/components/schemas/OptionType"'422':@@ -4617,8 +4770,8 @@ paths:kind: dropdownmetadata: {}filterable: true- created_at: '2026-05-24T16:07:27.708Z'- updated_at: '2026-05-24T16:07:27.708Z'+ created_at: '2026-05-24T17:37:04.014Z'+ updated_at: '2026-05-24T17:37:04.014Z'schema:"$ref": "#/components/schemas/OptionType"'404':@@ -4690,8 +4843,8 @@ paths:kind: dropdownmetadata: {}filterable: true- created_at: '2026-05-24T16:07:28.273Z'- updated_at: '2026-05-24T16:07:28.551Z'+ created_at: '2026-05-24T17:37:04.617Z'+ updated_at: '2026-05-24T17:37:04.942Z'schema:"$ref": "#/components/schemas/OptionType"'422':@@ -4850,7 +5003,7 @@ paths:example:data:- id: ful_UkLWZg9DAJ- number: H29439624496+ number: H88303288332tracking: U10000tracking_url:cost: '10.0'@@ -4875,8 +5028,8 @@ paths:metadata: {}adjustment_total: '0.0'pre_tax_amount: '0.0'- created_at: '2026-05-24T16:07:29.470Z'- updated_at: '2026-05-24T16:07:29.566Z'+ created_at: '2026-05-24T17:37:06.032Z'+ updated_at: '2026-05-24T17:37:06.286Z'order_id: or_UkLWZg9DAJstock_location_id: sloc_UkLWZg9DAJmeta:@@ -4959,7 +5112,7 @@ paths:application/json:example:id: ful_UkLWZg9DAJ- number: H83838959712+ number: H51674325797tracking: U10000tracking_url:cost: '10.0'@@ -4984,8 +5137,8 @@ paths:metadata: {}adjustment_total: '0.0'pre_tax_amount: '0.0'- created_at: '2026-05-24T16:07:30.167Z'- updated_at: '2026-05-24T16:07:30.223Z'+ created_at: '2026-05-24T17:37:07.105Z'+ updated_at: '2026-05-24T17:37:07.185Z'order_id: or_UkLWZg9DAJstock_location_id: sloc_UkLWZg9DAJpatch:@@ -5044,7 +5197,7 @@ paths:application/json:example:id: ful_UkLWZg9DAJ- number: H69901305325+ number: H16091268662tracking: 1Z999AA10123456784tracking_url: https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=1Z999AA10123456784cost: '10.0'@@ -5069,8 +5222,8 @@ paths:metadata: {}adjustment_total: '0.0'pre_tax_amount: '0.0'- created_at: '2026-05-24T16:07:30.804Z'- updated_at: '2026-05-24T16:07:31.130Z'+ created_at: '2026-05-24T17:37:07.854Z'+ updated_at: '2026-05-24T17:37:08.221Z'order_id: or_UkLWZg9DAJstock_location_id: sloc_UkLWZg9DAJrequestBody:@@ -5139,7 +5292,7 @@ paths:application/json:example:id: ful_UkLWZg9DAJ- number: H80385763066+ number: H47615606663tracking: U10000tracking_url:cost: '10.0'@@ -5156,7 +5309,7 @@ paths:display_tax_total: "$0.00"status: shippedfulfillment_type: shipping- fulfilled_at: '2026-05-24T16:07:31Z'+ fulfilled_at: '2026-05-24T17:37:08Z'items:- item_id: li_UkLWZg9DAJvariant_id: variant_UkLWZg9DAJ@@ -5164,8 +5317,8 @@ paths:metadata: {}adjustment_total: '0.0'pre_tax_amount: '0.0'- created_at: '2026-05-24T16:07:31.456Z'- updated_at: '2026-05-24T16:07:31.788Z'+ created_at: '2026-05-24T17:37:08.572Z'+ updated_at: '2026-05-24T17:37:08.932Z'order_id: or_UkLWZg9DAJstock_location_id: sloc_UkLWZg9DAJ"/api/v3/admin/orders/{order_id}/fulfillments/{id}/cancel":@@ -5223,7 +5376,7 @@ paths:application/json:example:id: ful_UkLWZg9DAJ- number: H37676325549+ number: H68010739823tracking: U10000tracking_url:cost: '10.0'@@ -5248,8 +5401,8 @@ paths:metadata: {}adjustment_total: '0.0'pre_tax_amount: '0.0'- created_at: '2026-05-24T16:07:32.098Z'- updated_at: '2026-05-24T16:07:32.428Z'+ created_at: '2026-05-24T17:37:09.263Z'+ updated_at: '2026-05-24T17:37:09.602Z'order_id: or_UkLWZg9DAJstock_location_id: sloc_UkLWZg9DAJ"/api/v3/admin/orders/{order_id}/fulfillments/{id}/resume":@@ -5307,7 +5460,7 @@ paths:application/json:example:id: ful_UkLWZg9DAJ- number: H81294732686+ number: H15965565794tracking: U10000tracking_url:cost: '10.0'@@ -5332,8 +5485,8 @@ paths:metadata: {}adjustment_total: '0.0'pre_tax_amount: '0.0'- created_at: '2026-05-24T16:07:32.742Z'- updated_at: '2026-05-24T16:07:33.097Z'+ created_at: '2026-05-24T17:37:09.918Z'+ updated_at: '2026-05-24T17:37:10.280Z'order_id: or_UkLWZg9DAJstock_location_id: sloc_UkLWZg9DAJ"/api/v3/admin/orders/{order_id}/fulfillments/{id}/split":@@ -5394,7 +5547,7 @@ paths:example:data:- id: ful_gbHJdmfrXB- number: H19611242098+ number: H74934116654tracking:tracking_url:cost: '10.0'@@ -5419,8 +5572,8 @@ paths:metadata: {}adjustment_total: '0.0'pre_tax_amount: '0.0'- created_at: '2026-05-24T16:07:33.749Z'- updated_at: '2026-05-24T16:07:33.787Z'+ created_at: '2026-05-24T17:37:10.976Z'+ updated_at: '2026-05-24T17:37:11.028Z'order_id: or_UkLWZg9DAJstock_location_id: sloc_gbHJdmfrXBrequestBody:@@ -5492,7 +5645,7 @@ paths:application/json:example:id: gc_UkLWZg9DAJ- code: E193350025664BCA+ code: 0F0327B1613F79BDstatus: activecurrency: USDamount: '10.0'@@ -5506,8 +5659,8 @@ paths:redeemed_at:expired: falseactive: true- created_at: '2026-05-24T16:07:34.126Z'- updated_at: '2026-05-24T16:07:34.416Z'+ created_at: '2026-05-24T17:37:11.389Z'+ updated_at: '2026-05-24T17:37:11.722Z'customer_id:created_by_id:requestBody:@@ -5640,8 +5793,8 @@ paths:variant_id: variant_gbHJdmfrXBquantity: 2currency: USD- name: Product 104290- slug: product-104290+ name: Product 106366+ slug: product-106366options_text: 'Size: S'price: '10.0'display_price: "$10.00"@@ -5673,12 +5826,12 @@ paths:option_type_label: Sizeimage_url:metadata: {}- created_at: '2026-05-24T16:07:35.074Z'- updated_at: '2026-05-24T16:07:35.074Z'+ created_at: '2026-05-24T17:37:12.441Z'+ updated_at: '2026-05-24T17:37:12.441Z'digital_links: []metadata: {}- created_at: '2026-05-24T16:07:35.355Z'- updated_at: '2026-05-24T16:07:35.355Z'+ created_at: '2026-05-24T17:37:12.736Z'+ updated_at: '2026-05-24T17:37:12.736Z'cost_price: '17.0'tax_category_id: taxcat_UkLWZg9DAJmeta:@@ -5745,8 +5898,8 @@ paths:variant_id: variant_VqXmZF31wYquantity: 3currency: USD- name: Product 124792- slug: product-124792+ name: Product 12521+ slug: product-12521options_text: 'Size: S'price: '19.99'display_price: "$19.99"@@ -5778,12 +5931,12 @@ paths:option_type_label: Sizeimage_url:metadata: {}- created_at: '2026-05-24T16:07:36.297Z'- updated_at: '2026-05-24T16:07:36.297Z'+ created_at: '2026-05-24T17:37:13.688Z'+ updated_at: '2026-05-24T17:37:13.688Z'digital_links: []metadata: {}- created_at: '2026-05-24T16:07:36.327Z'- updated_at: '2026-05-24T16:07:36.327Z'+ created_at: '2026-05-24T17:37:13.721Z'+ updated_at: '2026-05-24T17:37:13.721Z'cost_price: '17.0'tax_category_id: taxcat_UkLWZg9DAJrequestBody:@@ -5872,8 +6025,8 @@ paths:variant_id: variant_gbHJdmfrXBquantity: 2currency: USD- name: Product 131664- slug: product-131664+ name: Product 131812+ slug: product-131812options_text: 'Size: S'price: '10.0'display_price: "$10.00"@@ -5905,12 +6058,12 @@ paths:option_type_label: Sizeimage_url:metadata: {}- created_at: '2026-05-24T16:07:36.395Z'- updated_at: '2026-05-24T16:07:36.395Z'+ created_at: '2026-05-24T17:37:13.789Z'+ updated_at: '2026-05-24T17:37:13.789Z'digital_links: []metadata: {}- created_at: '2026-05-24T16:07:36.675Z'- updated_at: '2026-05-24T16:07:36.675Z'+ created_at: '2026-05-24T17:37:14.071Z'+ updated_at: '2026-05-24T17:37:14.071Z'cost_price: '17.0'tax_category_id: taxcat_UkLWZg9DAJpatch:@@ -5972,8 +6125,8 @@ paths:variant_id: variant_gbHJdmfrXBquantity: 5currency: USD- name: Product 14689- slug: product-14689+ name: Product 143486+ slug: product-143486options_text: 'Size: S'price: '19.99'display_price: "$19.99"@@ -6005,12 +6158,12 @@ paths:option_type_label: Sizeimage_url:metadata: {}- created_at: '2026-05-24T16:07:36.995Z'- updated_at: '2026-05-24T16:07:36.995Z'+ created_at: '2026-05-24T17:37:14.389Z'+ updated_at: '2026-05-24T17:37:14.389Z'digital_links: []metadata: {}- created_at: '2026-05-24T16:07:37.277Z'- updated_at: '2026-05-24T16:07:37.567Z'+ created_at: '2026-05-24T17:37:14.684Z'+ updated_at: '2026-05-24T17:37:15.018Z'cost_price: '17.0'tax_category_id: taxcat_UkLWZg9DAJrequestBody:@@ -6136,8 +6289,8 @@ paths:data:- id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: BGS-173440ebae32- number: PZG9SQC1+ response_code: BGS-ab886544a797+ number: PFOT94SEamount: '110.0'display_amount: "$110.00"status: completed@@ -6155,14 +6308,14 @@ paths:customer_id:payment_method_id: pm_gbHJdmfrXBmetadata: {}- created_at: '2026-05-24T16:07:38.611Z'- updated_at: '2026-05-24T16:07:38.613Z'+ created_at: '2026-05-24T17:37:16.011Z'+ updated_at: '2026-05-24T17:37:16.014Z'metadata: {}avs_response:cvv_response_code:cvv_response_message:- created_at: '2026-05-24T16:07:38.612Z'- updated_at: '2026-05-24T16:07:38.612Z'+ created_at: '2026-05-24T17:37:16.013Z'+ updated_at: '2026-05-24T17:37:16.013Z'captured_amount: '0.0'order_id: or_UkLWZg9DAJmeta:@@ -6229,7 +6382,7 @@ paths:id: py_gbHJdmfrXBpayment_method_id: pm_EfhxLZ9ck8response_code:- number: P2JL7J69+ number: PY1TKFJ5amount: '110.0'display_amount: "$110.00"status: checkout@@ -6240,8 +6393,8 @@ paths:avs_response:cvv_response_code:cvv_response_message:- created_at: '2026-05-24T16:07:39.874Z'- updated_at: '2026-05-24T16:07:39.874Z'+ created_at: '2026-05-24T17:37:17.285Z'+ updated_at: '2026-05-24T17:37:17.285Z'captured_amount: '0.0'order_id: or_gbHJdmfrXBrequestBody:@@ -6331,8 +6484,8 @@ paths:example:id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: BGS-55266ffc343e- number: P2OSLWV1+ response_code: BGS-ecd6e3a829e6+ number: P6DLMTINamount: '110.0'display_amount: "$110.00"status: completed@@ -6350,14 +6503,14 @@ paths:customer_id:payment_method_id: pm_gbHJdmfrXBmetadata: {}- created_at: '2026-05-24T16:07:40.239Z'- updated_at: '2026-05-24T16:07:40.242Z'+ created_at: '2026-05-24T17:37:17.639Z'+ updated_at: '2026-05-24T17:37:17.642Z'metadata: {}avs_response:cvv_response_code:cvv_response_message:- created_at: '2026-05-24T16:07:40.241Z'- updated_at: '2026-05-24T16:07:40.241Z'+ created_at: '2026-05-24T17:37:17.641Z'+ updated_at: '2026-05-24T17:37:17.641Z'captured_amount: '0.0'order_id: or_UkLWZg9DAJ"/api/v3/admin/orders/{order_id}/payments/{id}/capture":@@ -6416,8 +6569,8 @@ paths:example:id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: BGS-3397499ee932- number: PSUF4BE3+ response_code: BGS-6e39b35672d4+ number: PJJ3CQHYamount: '110.0'display_amount: "$110.00"status: completed@@ -6435,14 +6588,14 @@ paths:customer_id:payment_method_id: pm_gbHJdmfrXBmetadata: {}- created_at: '2026-05-24T16:07:40.888Z'- updated_at: '2026-05-24T16:07:40.891Z'+ created_at: '2026-05-24T17:37:18.265Z'+ updated_at: '2026-05-24T17:37:18.268Z'metadata: {}avs_response:cvv_response_code:cvv_response_message:- created_at: '2026-05-24T16:07:40.890Z'- updated_at: '2026-05-24T16:07:41.213Z'+ created_at: '2026-05-24T17:37:18.267Z'+ updated_at: '2026-05-24T17:37:18.596Z'captured_amount: '110.0'order_id: or_UkLWZg9DAJ'422':@@ -6511,8 +6664,8 @@ paths:example:id: py_UkLWZg9DAJpayment_method_id: pm_UkLWZg9DAJ- response_code: void-BGS-50bc9389ca6e- number: PLOX73YH+ response_code: void-BGS-f655707373af+ number: PYU6OBOSamount: '110.0'display_amount: "$110.00"status: void@@ -6530,14 +6683,14 @@ paths:customer_id:payment_method_id: pm_gbHJdmfrXBmetadata: {}- created_at: '2026-05-24T16:07:42.245Z'- updated_at: '2026-05-24T16:07:42.248Z'+ created_at: '2026-05-24T17:37:19.623Z'+ updated_at: '2026-05-24T17:37:19.625Z'metadata: {}avs_response:cvv_response_code:cvv_response_message:- created_at: '2026-05-24T16:07:42.247Z'- updated_at: '2026-05-24T16:07:42.543Z'+ created_at: '2026-05-24T17:37:19.624Z'+ updated_at: '2026-05-24T17:37:19.923Z'captured_amount: '0.0'order_id: or_UkLWZg9DAJ"/api/v3/admin/orders/{order_id}/refunds":@@ -6665,14 +6818,14 @@ paths:application/json:example:id: re_UkLWZg9DAJ- transaction_id: BGS-186e46022de7+ transaction_id: BGS-71407c2949ffamount: '5.0'payment_id: py_UkLWZg9DAJrefund_reason_id: rr_UkLWZg9DAJreimbursement_id:metadata: {}- created_at: '2026-05-24T16:07:43.838Z'- updated_at: '2026-05-24T16:07:43.838Z'+ created_at: '2026-05-24T17:37:21.214Z'+ updated_at: '2026-05-24T17:37:21.214Z'requestBody:content:application/json:@@ -6744,8 +6897,8 @@ paths:id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R442690853- email: [email protected]+ number: R479485011+ email: [email protected]customer_note:currency: USDlocale: en@@ -6788,8 +6941,8 @@ paths:metadata: {}canceled_at:approved_at:- created_at: '2026-05-24T16:07:44.132Z'- updated_at: '2026-05-24T16:07:44.180Z'+ created_at: '2026-05-24T17:37:21.511Z'+ updated_at: '2026-05-24T17:37:21.557Z'preferred_stock_location_id:tags: []internal_note:@@ -6960,8 +7113,8 @@ paths:- id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R637716082- email: [email protected]+ number: R977527427+ email: [email protected]customer_note:currency: USDlocale: en@@ -7004,8 +7157,8 @@ paths:metadata: {}canceled_at:approved_at:- created_at: '2026-05-24T16:07:45.897Z'- updated_at: '2026-05-24T16:07:45.897Z'+ created_at: '2026-05-24T17:37:23.272Z'+ updated_at: '2026-05-24T17:37:23.272Z'preferred_stock_location_id:tags: []internal_note:@@ -7148,7 +7301,7 @@ paths:id: or_gbHJdmfrXBmarket_id:channel_id: ch_UkLWZg9DAJ- number: R305907575+ number: R518772568email: [email protected]customer_note:currency: USD@@ -7192,8 +7345,8 @@ paths:metadata: {}canceled_at:approved_at:- created_at: '2026-05-24T16:07:47.635Z'- updated_at: '2026-05-24T16:07:47.638Z'+ created_at: '2026-05-24T17:37:24.939Z'+ updated_at: '2026-05-24T17:37:24.942Z'preferred_stock_location_id: sloc_UkLWZg9DAJtags: []internal_note:@@ -7377,8 +7530,8 @@ paths:id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R724692708- email: [email protected]+ number: R351185598+ email: [email protected]customer_note:currency: USDlocale: en@@ -7421,8 +7574,8 @@ paths:metadata: {}canceled_at:approved_at:- created_at: '2026-05-24T16:07:47.911Z'- updated_at: '2026-05-24T16:07:47.911Z'+ created_at: '2026-05-24T17:37:25.214Z'+ updated_at: '2026-05-24T17:37:25.214Z'preferred_stock_location_id:tags: []internal_note:@@ -7493,7 +7646,7 @@ paths:id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R220970132+ number: R963129287email: [email protected]customer_note:currency: USD@@ -7537,8 +7690,8 @@ paths:metadata: {}canceled_at:approved_at:- created_at: '2026-05-24T16:07:49.005Z'- updated_at: '2026-05-24T16:07:49.287Z'+ created_at: '2026-05-24T17:37:26.302Z'+ updated_at: '2026-05-24T17:37:26.584Z'preferred_stock_location_id:tags: []internal_note:@@ -7719,8 +7872,8 @@ paths:id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R814249271- email: [email protected]+ number: R325816233+ email: [email protected]customer_note:currency: USDlocale: en@@ -7747,7 +7900,7 @@ paths:display_delivery_total: "$100.00"fulfillment_status: readypayment_status: paid- completed_at: '2026-05-24T16:07:50.180Z'+ completed_at: '2026-05-24T17:37:27.485Z'store_credit_total: '0.0'display_store_credit_total: "$0.00"covered_by_store_credit: false@@ -7763,8 +7916,8 @@ paths:metadata: {}canceled_at:approved_at:- created_at: '2026-05-24T16:07:50.131Z'- updated_at: '2026-05-24T16:07:50.202Z'+ created_at: '2026-05-24T17:37:27.437Z'+ updated_at: '2026-05-24T17:37:27.507Z'preferred_stock_location_id:tags: []internal_note:@@ -7845,8 +7998,8 @@ paths:id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R681583939- email: [email protected]+ number: R715045671+ email: [email protected]customer_note:currency: USDlocale: en@@ -7873,7 +8026,7 @@ paths:display_delivery_total: "$10.00"fulfillment_status: canceledpayment_status: void- completed_at: '2026-05-24T16:07:51.403Z'+ completed_at: '2026-05-24T17:37:28.733Z'store_credit_total: '0.0'display_store_credit_total: "$0.00"covered_by_store_credit: false@@ -7887,10 +8040,10 @@ paths:payment_total: '0.0'display_payment_total: "$0.00"metadata: {}- canceled_at: '2026-05-24T16:07:51.702Z'+ canceled_at: '2026-05-24T17:37:29.026Z'approved_at:- created_at: '2026-05-24T16:07:51.358Z'- updated_at: '2026-05-24T16:07:51.751Z'+ created_at: '2026-05-24T17:37:28.686Z'+ updated_at: '2026-05-24T17:37:29.069Z'preferred_stock_location_id:tags: []internal_note:@@ -7949,8 +8102,8 @@ paths:id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R320278252- email: [email protected]+ number: R801788034+ email: [email protected]customer_note:currency: USDlocale: en@@ -7977,7 +8130,7 @@ paths:display_delivery_total: "$100.00"fulfillment_status:payment_status:- completed_at: '2026-05-24T16:07:52.103Z'+ completed_at: '2026-05-24T17:37:29.425Z'store_credit_total: '0.0'display_store_credit_total: "$0.00"covered_by_store_credit: false@@ -7992,9 +8145,9 @@ paths:display_payment_total: "$0.00"metadata: {}canceled_at:- approved_at: '2026-05-24T16:07:52.391Z'- created_at: '2026-05-24T16:07:52.048Z'- updated_at: '2026-05-24T16:07:52.103Z'+ approved_at: '2026-05-24T17:37:29.716Z'+ created_at: '2026-05-24T17:37:29.365Z'+ updated_at: '2026-05-24T17:37:29.425Z'preferred_stock_location_id:tags: []internal_note:@@ -8053,8 +8206,8 @@ paths:id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R243394763- email: [email protected]+ number: R074770237+ email: [email protected]customer_note:currency: USDlocale: en@@ -8081,7 +8234,7 @@ paths:display_delivery_total: "$10.00"fulfillment_status: canceledpayment_status: void- completed_at: '2026-05-24T16:07:52.721Z'+ completed_at: '2026-05-24T17:37:30.041Z'store_credit_total: '0.0'display_store_credit_total: "$0.00"covered_by_store_credit: false@@ -8095,10 +8248,10 @@ paths:payment_total: '0.0'display_payment_total: "$0.00"metadata: {}- canceled_at: '2026-05-24T16:07:52.997Z'+ canceled_at: '2026-05-24T17:37:30.319Z'approved_at:- created_at: '2026-05-24T16:07:52.671Z'- updated_at: '2026-05-24T16:07:53.085Z'+ created_at: '2026-05-24T17:37:29.994Z'+ updated_at: '2026-05-24T17:37:30.411Z'preferred_stock_location_id:tags: []internal_note:@@ -8157,8 +8310,8 @@ paths:id: or_UkLWZg9DAJmarket_id:channel_id: ch_UkLWZg9DAJ- number: R376624055- email: [email protected]+ number: R726922313+ email: [email protected]customer_note:currency: USDlocale: en@@ -8185,7 +8338,7 @@ paths:display_delivery_total: "$100.00"fulfillment_status:payment_status:- completed_at: '2026-05-24T16:07:53.413Z'+ completed_at: '2026-05-24T17:37:30.745Z'store_credit_total: '0.0'display_store_credit_total: "$0.00"covered_by_store_credit: false@@ -8201,8 +8354,8 @@ paths:metadata: {}canceled_at:approved_at:- created_at: '2026-05-24T16:07:53.362Z'- updated_at: '2026-05-24T16:07:53.413Z'+ created_at: '2026-05-24T17:37:30.693Z'+ updated_at: '2026-05-24T17:37:30.745Z'preferred_stock_location_id:tags: []internal_note:@@ -8277,8 +8430,8 @@ paths:auto_capture:storefront_visible: trueposition: 1- created_at: '2026-05-24T16:07:53.714Z'- updated_at: '2026-05-24T16:07:53.716Z'+ created_at: '2026-05-24T17:37:31.151Z'+ updated_at: '2026-05-24T17:37:31.153Z'preferences: {}preference_schema: []meta:@@ -8418,8 +8571,8 @@ paths:auto_capture:storefront_visible: trueposition: 1- created_at: '2026-05-24T16:07:54.288Z'- updated_at: '2026-05-24T16:07:54.289Z'+ created_at: '2026-05-24T17:37:31.752Z'+ updated_at: '2026-05-24T17:37:31.754Z'preferences: {}preference_schema: []"/api/v3/admin/products/{product_id}/custom_fields":@@ -8489,8 +8642,8 @@ paths:field_type: short_textkey: custom.titlevalue: wool- created_at: '2026-05-24T16:07:54.604Z'- updated_at: '2026-05-24T16:07:54.604Z'+ created_at: '2026-05-24T17:37:32.172Z'+ updated_at: '2026-05-24T17:37:32.172Z'storefront_visible: truecustom_field_definition_id: cfdef_UkLWZg9DAJmeta:@@ -8557,8 +8710,8 @@ paths:field_type: long_textkey: custom.descriptionvalue: A longer description- created_at: '2026-05-24T16:07:55.272Z'- updated_at: '2026-05-24T16:07:55.272Z'+ created_at: '2026-05-24T17:37:32.769Z'+ updated_at: '2026-05-24T17:37:32.769Z'storefront_visible: truecustom_field_definition_id: cfdef_gbHJdmfrXB'422':@@ -8642,8 +8795,8 @@ paths:field_type: short_textkey: custom.titlevalue: wool- created_at: '2026-05-24T16:07:55.622Z'- updated_at: '2026-05-24T16:07:55.622Z'+ created_at: '2026-05-24T17:37:33.120Z'+ updated_at: '2026-05-24T17:37:33.120Z'storefront_visible: truecustom_field_definition_id: cfdef_UkLWZg9DAJpatch:@@ -8690,8 +8843,8 @@ paths:field_type: short_textkey: custom.titlevalue: cotton- created_at: '2026-05-24T16:07:55.932Z'- updated_at: '2026-05-24T16:07:56.209Z'+ created_at: '2026-05-24T17:37:33.439Z'+ updated_at: '2026-05-24T17:37:33.726Z'storefront_visible: truecustom_field_definition_id: cfdef_UkLWZg9DAJrequestBody:@@ -8829,34 +8982,32 @@ paths:example:data:- id: prod_UkLWZg9DAJ- name: Product 398433- slug: product-398433+ name: Product 396394+ slug: product-396394meta_title:meta_description:meta_keywords:variant_count: 0- available_on: '2025-05-24T16:07:56.533Z'+ available_on: '2025-05-24T17:37:34.067Z'purchasable: truein_stock: falsebackorderable: trueavailable: true- description: Alias rerum error aspernatur accusamus ipsum repellendus- excepturi illo. Accusantium totam cum consequuntur vitae provident.- Itaque quis nihil quia laborum tempora perspiciatis voluptatum.- Id quod error deleniti quae sunt ullam laudantium facere. In autem- facere aliquid eum minus dolores numquam. Quod deleniti nam fugiat- et praesentium. Voluptate labore distinctio dolore reprehenderit.- Pariatur porro veritatis eius provident. Ipsa aliquid porro cumque- quisquam. Veniam minus rerum eos voluptatem. Iste ex cumque perferendis- nam. Placeat fugit sequi ipsum sint aperiam. Quam beatae voluptas- soluta rem. Rerum quam magnam aperiam sit. Dicta aspernatur veritatis- deserunt veniam distinctio. Quo cupiditate voluptatum nam optio- animi consequatur. Nostrum iure odio ipsa amet asperiores laborum.+ description: Eaque soluta sit officiis sequi. Deleniti perspiciatis+ repudiandae ratione quod illum enim. Tenetur tempora similique+ soluta corporis magni ea itaque dolore. Harum aliquid tempore+ facilis amet deleniti facere. Nisi ducimus nihil a optio veniam+ totam. Libero aut deleniti laudantium aliquam reprehenderit. Nam+ neque assumenda a nisi iusto aliquid perferendis. Quas tenetur+ non consequatur assumenda. Quos explicabo error culpa aspernatur+ quod earum cupiditate omnis. Eaque id iste saepe ratione repellendus.+ Porro cum ducimus eaque occaecati natus cupiditate itaque. Quisquam+ esse dolore distinctio labore. Minima excepturi fugiat quibusdam+ voluptatem.description_html: |-- Alias rerum error aspernatur accusamus ipsum repellendus excepturi illo. Accusantium totam cum consequuntur vitae provident. Itaque quis nihil quia laborum tempora perspiciatis voluptatum. Id quod error deleniti quae sunt ullam laudantium facere.- In autem facere aliquid eum minus dolores numquam. Quod deleniti nam fugiat et praesentium. Voluptate labore distinctio dolore reprehenderit. Pariatur porro veritatis eius provident. Ipsa aliquid porro cumque quisquam.- Veniam minus rerum eos voluptatem. Iste ex cumque perferendis nam. Placeat fugit sequi ipsum sint aperiam.- Quam beatae voluptas soluta rem. Rerum quam magnam aperiam sit. Dicta aspernatur veritatis deserunt veniam distinctio. Quo cupiditate voluptatum nam optio animi consequatur. Nostrum iure odio ipsa amet asperiores laborum.+ Eaque soluta sit officiis sequi. Deleniti perspiciatis repudiandae ratione quod illum enim. Tenetur tempora similique soluta corporis magni ea itaque dolore. Harum aliquid tempore facilis amet deleniti facere.+ Nisi ducimus nihil a optio veniam totam. Libero aut deleniti laudantium aliquam reprehenderit. Nam neque assumenda a nisi iusto aliquid perferendis. Quas tenetur non consequatur assumenda. Quos explicabo error culpa aspernatur quod earum cupiditate omnis.+ Eaque id iste saepe ratione repellendus. Porro cum ducimus eaque occaecati natus cupiditate itaque. Quisquam esse dolore distinctio labore. Minima excepturi fugiat quibusdam voluptatem.default_variant_id: variant_UkLWZg9DAJthumbnail_url:tags: []@@ -8871,16 +9022,16 @@ paths:display_compare_at_amount:price_list_id:variant_id: variant_UkLWZg9DAJ- created_at: '2026-05-24T16:07:56.560Z'- updated_at: '2026-05-24T16:07:56.560Z'+ created_at: '2026-05-24T17:37:34.092Z'+ updated_at: '2026-05-24T17:37:34.092Z'original_price:status: active- make_active_at: '2025-05-24T16:07:56.533Z'+ make_active_at: '2025-05-24T17:37:34.067Z'discontinue_on:metadata: {}deleted_at:- created_at: '2026-05-24T16:07:56.547Z'- updated_at: '2026-05-24T16:07:56.561Z'+ created_at: '2026-05-24T17:37:34.079Z'+ updated_at: '2026-05-24T17:37:34.093Z'tax_category_id: taxcat_UkLWZg9DAJmeta:page: 1@@ -9014,8 +9165,8 @@ paths:discontinue_on:metadata: {}deleted_at:- created_at: '2026-05-24T16:07:57.247Z'- updated_at: '2026-05-24T16:07:57.249Z'+ created_at: '2026-05-24T17:37:34.756Z'+ updated_at: '2026-05-24T17:37:34.758Z'tax_category_id:schema:"$ref": "#/components/schemas/Product"@@ -9195,35 +9346,26 @@ paths:application/json:example:id: prod_UkLWZg9DAJ- name: Product 431773- slug: product-431773+ name: Product 431256+ slug: product-431256meta_title:meta_description:meta_keywords:variant_count: 0- available_on: '2025-05-24T16:07:57.613Z'+ available_on: '2025-05-24T17:37:35.110Z'purchasable: truein_stock: falsebackorderable: trueavailable: true- description: Natus consequuntur quas delectus autem beatae cumque- itaque officia. Nisi ducimus laudantium illum velit repellat animi.- Eum numquam a aut non. Dicta repudiandae occaecati eligendi nostrum- iure numquam ratione excepturi. Itaque saepe consequuntur pariatur- sint ex aspernatur consectetur. Quaerat sed maxime quasi veniam- vitae culpa architecto. Optio deleniti nihil quia corrupti ratione- ipsam. Quam voluptatem tempora animi eligendi saepe voluptatum repudiandae- molestias. Ducimus ut praesentium blanditiis unde deserunt facilis- perspiciatis architecto. Vitae deserunt consequuntur libero quisquam- eos sit. Officiis pariatur error velit a minus. Odit voluptatum- repellendus qui fugiat. Earum tenetur hic iste ipsum. Facilis tempore- distinctio dicta id vitae voluptates at. Dolorum magni error nisi- rem expedita accusamus.+ description: Nemo quam et hic libero natus qui. Saepe repudiandae+ eaque autem provident omnis at quia. Porro fugiat voluptatibus vero+ dolore beatae minus id. Molestias est illo unde quis. Velit quis+ at voluptatem ut quam mollitia saepe nam. Eligendi laudantium quis+ aspernatur ea incidunt culpa. Cupiditate sequi reiciendis aspernatur+ maiores. Tempore blanditiis sint libero odit veniam.description_html: |-- Natus consequuntur quas delectus autem beatae cumque itaque officia. Nisi ducimus laudantium illum velit repellat animi. Eum numquam a aut non.- Dicta repudiandae occaecati eligendi nostrum iure numquam ratione excepturi. Itaque saepe consequuntur pariatur sint ex aspernatur consectetur. Quaerat sed maxime quasi veniam vitae culpa architecto. Optio deleniti nihil quia corrupti ratione ipsam.- Quam voluptatem tempora animi eligendi saepe voluptatum repudiandae molestias. Ducimus ut praesentium blanditiis unde deserunt facilis perspiciatis architecto. Vitae deserunt consequuntur libero quisquam eos sit.- Officiis pariatur error velit a minus. Odit voluptatum repellendus qui fugiat. Earum tenetur hic iste ipsum. Facilis tempore distinctio dicta id vitae voluptates at. Dolorum magni error nisi rem expedita accusamus.+ Nemo quam et hic libero natus qui. Saepe repudiandae eaque autem provident omnis at quia. Porro fugiat voluptatibus vero dolore beatae minus id. Molestias est illo unde quis.+ Velit quis at voluptatem ut quam mollitia saepe nam. Eligendi laudantium quis aspernatur ea incidunt culpa. Cupiditate sequi reiciendis aspernatur maiores. Tempore blanditiis sint libero odit veniam.default_variant_id: variant_UkLWZg9DAJthumbnail_url:tags: []@@ -9238,16 +9380,16 @@ paths:display_compare_at_amount:price_list_id:variant_id: variant_UkLWZg9DAJ- created_at: '2026-05-24T16:07:57.637Z'- updated_at: '2026-05-24T16:07:57.637Z'+ created_at: '2026-05-24T17:37:35.137Z'+ updated_at: '2026-05-24T17:37:35.137Z'original_price:status: active- make_active_at: '2025-05-24T16:07:57.613Z'+ make_active_at: '2025-05-24T17:37:35.110Z'discontinue_on:metadata: {}deleted_at:- created_at: '2026-05-24T16:07:57.626Z'- updated_at: '2026-05-24T16:07:57.638Z'+ created_at: '2026-05-24T17:37:35.121Z'+ updated_at: '2026-05-24T17:37:35.138Z'tax_category_id: taxcat_UkLWZg9DAJschema:"$ref": "#/components/schemas/Product"@@ -9314,22 +9456,29 @@ paths:example:id: prod_UkLWZg9DAJname: Updated Name- slug: product-457387+ slug: product-458011meta_title:meta_description:meta_keywords:variant_count: 0- available_on: '2025-05-24T16:07:58.260Z'+ available_on: '2025-05-24T17:37:35.789Z'purchasable: truein_stock: falsebackorderable: trueavailable: true- description: Ducimus asperiores sint voluptatum aliquam vel. Repellendus- sapiente dicta magni quisquam aspernatur. Totam at iure alias repudiandae- voluptate incidunt doloribus.- description_html: Ducimus asperiores sint voluptatum aliquam vel.- Repellendus sapiente dicta magni quisquam aspernatur. Totam at iure- alias repudiandae voluptate incidunt doloribus.+ description: Non occaecati aut quidem tempore aliquid nisi reprehenderit.+ Amet culpa hic ullam molestiae cupiditate provident. Nostrum magni+ soluta velit eius. Itaque sequi iste repudiandae qui esse. Sapiente+ tenetur doloremque ipsum nesciunt delectus rerum voluptas. Odit+ voluptatem deleniti sunt veniam. Quidem molestiae possimus illo+ debitis alias earum quas accusantium. Possimus ea est unde culpa.+ Alias atque autem ullam voluptatibus iste. Consectetur exercitationem+ autem natus odit eveniet. Quibusdam similique delectus culpa cumque+ iure.+ description_html: |-+ Non occaecati aut quidem tempore aliquid nisi reprehenderit. Amet culpa hic ullam molestiae cupiditate provident. Nostrum magni soluta velit eius. Itaque sequi iste repudiandae qui esse.+ Sapiente tenetur doloremque ipsum nesciunt delectus rerum voluptas. Odit voluptatem deleniti sunt veniam. Quidem molestiae possimus illo debitis alias earum quas accusantium.+ Possimus ea est unde culpa. Alias atque autem ullam voluptatibus iste. Consectetur exercitationem autem natus odit eveniet. Quibusdam similique delectus culpa cumque iure.default_variant_id: variant_UkLWZg9DAJthumbnail_url:tags: []@@ -9344,16 +9493,16 @@ paths:display_compare_at_amount:price_list_id:variant_id: variant_UkLWZg9DAJ- created_at: '2026-05-24T16:07:58.286Z'- updated_at: '2026-05-24T16:07:58.286Z'+ created_at: '2026-05-24T17:37:35.810Z'+ updated_at: '2026-05-24T17:37:35.810Z'original_price:status: active- make_active_at: '2025-05-24T16:07:58.260Z'+ make_active_at: '2025-05-24T17:37:35.789Z'discontinue_on:metadata: {}deleted_at:- created_at: '2026-05-24T16:07:58.273Z'- updated_at: '2026-05-24T16:07:58.571Z'+ created_at: '2026-05-24T17:37:35.799Z'+ updated_at: '2026-05-24T17:37:36.106Z'tax_category_id: taxcat_UkLWZg9DAJschema:"$ref": "#/components/schemas/Product"@@ -9886,8 +10035,8 @@ paths:example:data:- id: pact_UkLWZg9DAJ- created_at: '2026-05-24T16:08:02.008Z'- updated_at: '2026-05-24T16:08:02.008Z'+ created_at: '2026-05-24T17:37:39.416Z'+ updated_at: '2026-05-24T17:37:39.416Z'type: free_shippingpromotion_id: promo_UkLWZg9DAJpreferences: {}@@ -9948,8 +10097,8 @@ paths:application/json:example:id: pact_UkLWZg9DAJ- created_at: '2026-05-24T16:08:02.573Z'- updated_at: '2026-05-24T16:08:02.573Z'+ created_at: '2026-05-24T17:37:39.979Z'+ updated_at: '2026-05-24T17:37:39.979Z'type: free_shippingpromotion_id: promo_UkLWZg9DAJpreferences: {}@@ -10059,8 +10208,8 @@ paths:example:data:- id: prorule_UkLWZg9DAJ- created_at: '2026-05-24T16:08:03.141Z'- updated_at: '2026-05-24T16:08:03.141Z'+ created_at: '2026-05-24T17:37:40.551Z'+ updated_at: '2026-05-24T17:37:40.551Z'type: currencypromotion_id: promo_UkLWZg9DAJpreferences:@@ -10127,8 +10276,8 @@ paths:application/json:example:id: prorule_UkLWZg9DAJ- created_at: '2026-05-24T16:08:03.697Z'- updated_at: '2026-05-24T16:08:03.697Z'+ created_at: '2026-05-24T17:37:41.133Z'+ updated_at: '2026-05-24T17:37:41.133Z'type: currencypromotion_id: promo_UkLWZg9DAJpreferences:@@ -10201,8 +10350,8 @@ paths:application/json:example:id: prorule_UkLWZg9DAJ- created_at: '2026-05-24T16:08:03.981Z'- updated_at: '2026-05-24T16:08:04.256Z'+ created_at: '2026-05-24T17:37:41.423Z'+ updated_at: '2026-05-24T17:37:41.701Z'type: currencypromotion_id: promo_UkLWZg9DAJpreferences:@@ -10292,7 +10441,7 @@ paths:name: Summer Saledescription:code: summer- starts_at: '2026-05-24T16:08:04.540Z'+ starts_at: '2026-05-24T17:37:41.992Z'expires_at:usage_limit:match_policy: all@@ -10303,8 +10452,8 @@ paths:code_prefix:promotion_category_id:metadata: {}- created_at: '2026-05-24T16:08:04.541Z'- updated_at: '2026-05-24T16:08:04.542Z'+ created_at: '2026-05-24T17:37:41.993Z'+ updated_at: '2026-05-24T17:37:41.994Z'store_ids:- store_UkLWZg9DAJaction_ids: []@@ -10410,7 +10559,7 @@ paths:name: Black Fridaydescription:code: blackfriday-os- starts_at: '2026-05-24T16:08:05.472Z'+ starts_at: '2026-05-24T17:37:42.886Z'expires_at:usage_limit:match_policy: all@@ -10421,8 +10570,8 @@ paths:code_prefix:promotion_category_id:metadata: {}- created_at: '2026-05-24T16:08:05.473Z'- updated_at: '2026-05-24T16:08:05.494Z'+ created_at: '2026-05-24T17:37:42.887Z'+ updated_at: '2026-05-24T17:37:42.905Z'store_ids:- store_UkLWZg9DAJaction_ids:@@ -10575,7 +10724,7 @@ paths:name: Summer Saledescription:code: summer- starts_at: '2026-05-24T16:08:05.801Z'+ starts_at: '2026-05-24T17:37:43.209Z'expires_at:usage_limit:match_policy: all@@ -10586,8 +10735,8 @@ paths:code_prefix:promotion_category_id:metadata: {}- created_at: '2026-05-24T16:08:05.802Z'- updated_at: '2026-05-24T16:08:05.803Z'+ created_at: '2026-05-24T17:37:43.209Z'+ updated_at: '2026-05-24T17:37:43.211Z'store_ids:- store_UkLWZg9DAJaction_ids: []@@ -10683,7 +10832,7 @@ paths:name: Summer Saledescription:code: summer- starts_at: '2026-05-24T16:08:06.703Z'+ starts_at: '2026-05-24T17:37:44.083Z'expires_at:usage_limit:match_policy: all@@ -10694,8 +10843,8 @@ paths:code_prefix:promotion_category_id:metadata: {}- created_at: '2026-05-24T16:08:06.704Z'- updated_at: '2026-05-24T16:08:07.002Z'+ created_at: '2026-05-24T17:37:44.084Z'+ updated_at: '2026-05-24T17:37:44.366Z'store_ids:- store_UkLWZg9DAJaction_ids: []@@ -11047,8 +11196,8 @@ paths:data:- id: role_UkLWZg9DAJname: admin- created_at: '2026-05-24T16:08:07.983Z'- updated_at: '2026-05-24T16:08:07.983Z'+ created_at: '2026-05-24T17:37:45.227Z'+ updated_at: '2026-05-24T17:37:45.227Z'meta:page: 1limit: 25@@ -11183,8 +11332,8 @@ paths:pickup_stock_policy: localpickup_ready_in_minutes:pickup_instructions:- created_at: '2026-05-24T16:08:08.271Z'- updated_at: '2026-05-24T16:08:08.271Z'+ created_at: '2026-05-24T17:37:45.507Z'+ updated_at: '2026-05-24T17:37:45.507Z'meta:page: 1limit: 25@@ -11295,8 +11444,8 @@ paths:pickup_stock_policy: localpickup_ready_in_minutes: 30pickup_instructions:- created_at: '2026-05-24T16:08:08.894Z'- updated_at: '2026-05-24T16:08:08.894Z'+ created_at: '2026-05-24T17:37:46.092Z'+ updated_at: '2026-05-24T17:37:46.092Z'schema:"$ref": "#/components/schemas/StockLocation"'422':@@ -11470,8 +11619,8 @@ paths:pickup_stock_policy: localpickup_ready_in_minutes:pickup_instructions:- created_at: '2026-05-24T16:08:09.182Z'- updated_at: '2026-05-24T16:08:09.182Z'+ created_at: '2026-05-24T17:37:46.381Z'+ updated_at: '2026-05-24T17:37:46.381Z'schema:"$ref": "#/components/schemas/StockLocation"'404':@@ -11556,8 +11705,8 @@ paths:pickup_stock_policy: localpickup_ready_in_minutes: 45pickup_instructions:- created_at: '2026-05-24T16:08:09.740Z'- updated_at: '2026-05-24T16:08:10.079Z'+ created_at: '2026-05-24T17:37:46.959Z'+ updated_at: '2026-05-24T17:37:47.265Z'schema:"$ref": "#/components/schemas/StockLocation"'422':@@ -11760,8 +11909,8 @@ paths:data:- id: sccat_UkLWZg9DAJname: Goodwill- created_at: '2026-05-24T16:08:10.647Z'- updated_at: '2026-05-24T16:08:10.647Z'+ created_at: '2026-05-24T17:37:47.897Z'+ updated_at: '2026-05-24T17:37:47.897Z'non_expiring: falsemeta:page: 1@@ -11852,8 +12001,8 @@ paths:example:id: sccat_UkLWZg9DAJname: Goodwill- created_at: '2026-05-24T16:08:10.941Z'- updated_at: '2026-05-24T16:08:10.941Z'+ created_at: '2026-05-24T17:37:48.191Z'+ updated_at: '2026-05-24T17:37:48.191Z'non_expiring: falseschema:"$ref": "#/components/schemas/StoreCreditCategory"@@ -11918,8 +12067,8 @@ paths:preferred_timezone: UTCpreferred_weight_unit: lbpreferred_unit_system: imperial- created_at: '2026-05-24T16:06:58.976Z'- updated_at: '2026-05-24T16:08:11.519Z'+ created_at: '2026-05-24T17:36:33.540Z'+ updated_at: '2026-05-24T17:37:48.768Z'url: http://www.example.com:3000supported_currencies:- USD@@ -11990,8 +12139,8 @@ paths:preferred_timezone: UTCpreferred_weight_unit: lbpreferred_unit_system: imperial- created_at: '2026-05-24T16:06:58.976Z'- updated_at: '2026-05-24T16:08:12.130Z'+ created_at: '2026-05-24T17:36:33.540Z'+ updated_at: '2026-05-24T17:37:49.372Z'url: http://www.example.com:3000supported_currencies:- USD@@ -12211,13 +12360,13 @@ paths:weight_unit: lbdimensions_unit:deleted_at:- created_at: '2026-05-24T16:08:13.648Z'- updated_at: '2026-05-24T16:08:13.674Z'+ created_at: '2026-05-24T17:37:50.786Z'+ updated_at: '2026-05-24T17:37:50.796Z'tax_category_id: taxcat_UkLWZg9DAJavailable_stock: 0reserved_quantity: 0total_on_hand: 0- product_name: Product 593078+ product_name: Product 596609- id: variant_gbHJdmfrXBproduct_id: prod_UkLWZg9DAJsku: SKU-66@@ -12228,10 +12377,10 @@ paths:purchasable: truein_stock: falsebackorderable: true- weight: 188.11- height: 73.5- width: 155.82- depth: 70.36+ weight: 79.4+ height: 180.38+ width: 28.4+ depth: 47.4price:id: price_gbHJdmfrXBamount: '19.99'@@ -12254,8 +12403,8 @@ paths:option_type_label: Sizeimage_url:metadata: {}- created_at: '2026-05-24T16:08:13.700Z'- updated_at: '2026-05-24T16:08:13.700Z'+ created_at: '2026-05-24T17:37:50.805Z'+ updated_at: '2026-05-24T17:37:50.805Z'metadata: {}position: 2cost_price: '17.0'@@ -12264,13 +12413,13 @@ paths:weight_unit: lbdimensions_unit:deleted_at:- created_at: '2026-05-24T16:08:13.694Z'- updated_at: '2026-05-24T16:08:13.731Z'+ created_at: '2026-05-24T17:37:50.803Z'+ updated_at: '2026-05-24T17:37:50.816Z'tax_category_id: taxcat_UkLWZg9DAJavailable_stock: 0reserved_quantity: 0total_on_hand: 0- product_name: Product 593078+ product_name: Product 596609meta:page: 1limit: 25@@ -12381,8 +12530,8 @@ paths:option_type_label: Sizeimage_url:metadata: {}- created_at: '2026-05-24T16:08:14.430Z'- updated_at: '2026-05-24T16:08:14.430Z'+ created_at: '2026-05-24T17:37:51.471Z'+ updated_at: '2026-05-24T17:37:51.471Z'metadata: {}position: 3cost_price:@@ -12391,13 +12540,13 @@ paths:weight_unit: lbdimensions_unit:deleted_at:- created_at: '2026-05-24T16:08:14.433Z'- updated_at: '2026-05-24T16:08:14.435Z'+ created_at: '2026-05-24T17:37:51.475Z'+ updated_at: '2026-05-24T17:37:51.477Z'tax_category_id: taxcat_UkLWZg9DAJavailable_stock: 0reserved_quantity: 0total_on_hand: 0- product_name: Product 609367+ product_name: Product 606004'422':description: validation errorcontent:@@ -12584,10 +12733,10 @@ paths:purchasable: truein_stock: falsebackorderable: true- weight: 166.11- height: 57.26- width: 145.78- depth: 147.83+ weight: 181.11+ height: 171.7+ width: 181.35+ depth: 135.86price:id: price_gbHJdmfrXBamount: '19.99'@@ -12610,8 +12759,8 @@ paths:option_type_label: Sizeimage_url:metadata: {}- created_at: '2026-05-24T16:08:14.821Z'- updated_at: '2026-05-24T16:08:14.821Z'+ created_at: '2026-05-24T17:37:51.868Z'+ updated_at: '2026-05-24T17:37:51.868Z'metadata: {}position: 2cost_price: '17.0'@@ -12620,13 +12769,13 @@ paths:weight_unit: lbdimensions_unit:deleted_at:- created_at: '2026-05-24T16:08:14.819Z'- updated_at: '2026-05-24T16:08:14.830Z'+ created_at: '2026-05-24T17:37:51.866Z'+ updated_at: '2026-05-24T17:37:51.881Z'tax_category_id: taxcat_UkLWZg9DAJavailable_stock: 0reserved_quantity: 0total_on_hand: 0- product_name: Product 628998+ product_name: Product 624851'404':description: variant not foundcontent:@@ -12705,10 +12854,10 @@ paths:purchasable: truein_stock: falsebackorderable: true- weight: 36.36- height: 15.7- width: 106.81- depth: 170.69+ weight: 58.48+ height: 8.7+ width: 169.3+ depth: 28.62price:id: price_gbHJdmfrXBamount: '19.99'@@ -12731,8 +12880,8 @@ paths:option_type_label: Sizeimage_url:metadata: {}- created_at: '2026-05-24T16:08:15.500Z'- updated_at: '2026-05-24T16:08:15.500Z'+ created_at: '2026-05-24T17:37:52.555Z'+ updated_at: '2026-05-24T17:37:52.555Z'metadata: {}position: 2cost_price: '17.0'@@ -12741,13 +12890,13 @@ paths:weight_unit: lbdimensions_unit:deleted_at:- created_at: '2026-05-24T16:08:15.498Z'- updated_at: '2026-05-24T16:08:15.789Z'+ created_at: '2026-05-24T17:37:52.553Z'+ updated_at: '2026-05-24T17:37:52.843Z'tax_category_id: taxcat_UkLWZg9DAJavailable_stock: 0reserved_quantity: 0total_on_hand: 0- product_name: Product 6429+ product_name: Product 641234requestBody:content:application/json:diff --git a/packages/admin-sdk/examples/customers/bulk-add-tags.ts b/packages/admin-sdk/examples/customers/bulk-add-tags.tsnew file mode 100644index 0000000000..0bfb2e257d--- /dev/null+++ b/packages/admin-sdk/examples/customers/bulk-add-tags.ts@@ -0,0 +1,15 @@+import { createAdminClient } from '@spree/admin-sdk'++const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+})++// region:example+const result = await client.customers.bulkAddTags({+ ids: ['cus_UkLWZg9DAJ', 'cus_QrLWXg9CAJ'],+ tags: ['vip', 'newsletter'],+})+// endregion:example++export { result }diff --git a/packages/admin-sdk/examples/customers/bulk-remove-tags.ts b/packages/admin-sdk/examples/customers/bulk-remove-tags.tsnew file mode 100644index 0000000000..97870dd821--- /dev/null+++ b/packages/admin-sdk/examples/customers/bulk-remove-tags.ts@@ -0,0 +1,15 @@+import { createAdminClient } from '@spree/admin-sdk'++const client = createAdminClient({+ baseUrl: 'https://your-store.com',+ secretKey: 'sk_xxx',+})++// region:example+const result = await client.customers.bulkRemoveTags({+ ids: ['cus_UkLWZg9DAJ'],+ tags: ['vip'],+})+// endregion:example++export { result }diff --git a/packages/admin/e2e/customers.spec.ts b/packages/admin/e2e/customers.spec.tsindex 827a8411a7..e374af2d29 100644--- a/packages/admin/e2e/customers.spec.ts+++ b/packages/admin/e2e/customers.spec.ts@@ -160,6 +160,46 @@ test.describe('customers', () => {.toBeGreaterThanOrEqual(2)})+ test('bulk-adds tags to selected customers', async ({ page }) => {+ const creds = await login(page)+ await gotoIndex(page, CUSTOMERS_PATH(creds.store_id), CTA)++ const suffix = Date.now()+ const emailA = `e2e-bulk-tag-a-${suffix}@example.com`+ const emailB = `e2e-bulk-tag-b-${suffix}@example.com`+ // Unique tag per run so the "already tagged" path doesn't surface on+ // a local re-run of the suite.+ const tagName = `e2e-bulk-${suffix}`++ await createCustomer(page, emailA)+ await gotoIndex(page, CUSTOMERS_PATH(creds.store_id), CTA)+ await createCustomer(page, emailB)+ await gotoIndex(page, CUSTOMERS_PATH(creds.store_id), CTA)++ for (const email of [emailA, emailB]) {+ await page+ .locator('tr')+ .filter({ hasText: email })+ .getByRole('checkbox', { name: /select row/i })+ .check()+ }++ await expect(page.getByText(/2 selected/i)).toBeVisible()+ await page.getByRole('button', { name: /^add tags…$/i }).click()+ await expect(page.getByRole('heading', { name: /^add tags$/i })).toBeVisible()++ // TagCombobox: type and press Enter to confirm the new tag as a chip,+ // then submit the dialog.+ const tagInput = page.getByRole('dialog').getByPlaceholder(/type to add tags/i)+ await tagInput.fill(tagName)+ await tagInput.press('Enter')+ await expect(page.getByRole('dialog').getByText(tagName)).toBeVisible()++ await page.getByRole('dialog').getByRole('button', { name: /^add$/i }).click()++ await expect(page.getByText(/added tags to 2 customers/i)).toBeVisible({ timeout: 15_000 })+ })+test('deletes a customer', async ({ page }) => {const creds = await login(page)await gotoIndex(page, CUSTOMERS_PATH(creds.store_id), CTA)diff --git a/packages/admin/src/hooks/use-customers.ts b/packages/admin/src/hooks/use-customers.tsindex e612d98792..e49a64940e 100644--- a/packages/admin/src/hooks/use-customers.ts+++ b/packages/admin/src/hooks/use-customers.ts@@ -131,3 +131,21 @@ export function useBulkRemoveCustomersFromGroups() {errorMessage: false,})}++type BulkCustomerTagsParams = Parameters<typeof adminClient.customers.bulkAddTags>[0]++export function useBulkAddCustomerTags() {+ return useResourceMutation({+ mutationFn: (params: BulkCustomerTagsParams) => adminClient.customers.bulkAddTags(params),+ successMessage: false,+ errorMessage: false,+ })+}++export function useBulkRemoveCustomerTags() {+ return useResourceMutation({+ mutationFn: (params: BulkCustomerTagsParams) => adminClient.customers.bulkRemoveTags(params),+ successMessage: false,+ errorMessage: false,+ })+}diff --git a/packages/admin/src/routes/_authenticated/$storeId/customers/index.tsx b/packages/admin/src/routes/_authenticated/$storeId/customers/index.tsxindex 7cfd485f36..a040ca5922 100644--- a/packages/admin/src/routes/_authenticated/$storeId/customers/index.tsx+++ b/packages/admin/src/routes/_authenticated/$storeId/customers/index.tsx@@ -1,13 +1,14 @@import { zodResolver } from '@hookform/resolvers/zod'import { useMutation } from '@tanstack/react-query'import { createFileRoute, useNavigate } from '@tanstack/react-router'-import { PlusIcon, UserMinusIcon, UserPlusIcon } from 'lucide-react'+import { PlusIcon, TagsIcon, UserMinusIcon, UserPlusIcon } from 'lucide-react'import { useState } from 'react'import { Controller, useForm } from 'react-hook-form'import { useTranslation } from 'react-i18next'import { z } from 'zod/v4'import { adminClient } from '@/client'import type { BulkAction, BulkActionFormProps } from '@/components/spree/bulk-action-bar'+import { BulkDialog } from '@/components/spree/bulk-dialog'import { ExportButton } from '@/components/spree/export-button'import { ResourceMultiAutocomplete } from '@/components/spree/resource-multi-autocomplete'import { ResourceTable, resourceSearchSchema } from '@/components/spree/resource-table'@@ -28,7 +29,9 @@ import { Textarea } from '@/components/ui/textarea'import { customerGroupAutocompleteProps } from '@/hooks/use-customer-groups'import {useBulkAddCustomersToGroups,+ useBulkAddCustomerTags,useBulkRemoveCustomersFromGroups,+ useBulkRemoveCustomerTags,} from '@/hooks/use-customers'import { mapSpreeErrorsToForm } from '@/lib/form-errors'import { Subject } from '@/lib/permissions'@@ -51,6 +54,7 @@ export const Route = createFileRoute('/_authenticated/$storeId/customers/')({})type GroupFormValues = { customer_group_ids: string[] }+type TagsFormValues = { tags: string[] }// Bulk-mutating customers shifts `customers_count` on every affected group, so// drop the groups cache to force a refetch when the user navigates back.@@ -62,21 +66,30 @@ function CustomersPage() {const navigate = useNavigate()const bulkAddToGroups = useBulkAddCustomersToGroups()const bulkRemoveFromGroups = useBulkRemoveCustomersFromGroups()+ const bulkAddTags = useBulkAddCustomerTags()+ const bulkRemoveTags = useBulkRemoveCustomerTags()// BulkActionBar's `successMessage` runs through a `{n}` interpolation in the// bar itself; we pass i18next `{{count}}` as the literal `{n}` token so the// bar can substitute the real count at runtime.- const bulkActions: BulkAction<GroupFormValues>[] = [+ const bulkActions: BulkAction<GroupFormValues | TagsFormValues>[] = [{key: 'add-to-groups',label: t('admin.customers.groups.bulk_add_action'),icon: <UserPlusIcon className="size-4" />,subject: Subject.Customer,- form: (props) => <GroupPickerSheet {...props} mode="add" />,+ form: (props) => (+ <GroupPickerDialog+ {...(props as BulkActionFormProps<GroupFormValues>)}+ title={t('admin.customers.groups.picker.add_title')}+ description={t('admin.customers.groups.picker.add_description')}+ submitLabel={t('admin.actions.add')}+ />+ ),run: ({ ids, formValues }) =>bulkAddToGroups.mutateAsync({ids,- customer_group_ids: formValues?.customer_group_ids ?? [],+ customer_group_ids: (formValues as GroupFormValues).customer_group_ids ?? [],}),invalidate: GROUP_INVALIDATIONS,successMessage: t('admin.customers.groups.bulk_added', { count: '{n}' as unknown as number }),@@ -87,11 +100,18 @@ function CustomersPage() {label: t('admin.customers.groups.bulk_remove_action'),icon: <UserMinusIcon className="size-4" />,subject: Subject.Customer,- form: (props) => <GroupPickerSheet {...props} mode="remove" />,+ form: (props) => (+ <GroupPickerDialog+ {...(props as BulkActionFormProps<GroupFormValues>)}+ title={t('admin.customers.groups.picker.remove_title')}+ description={t('admin.customers.groups.picker.remove_description')}+ submitLabel={t('admin.actions.remove')}+ />+ ),run: ({ ids, formValues }) =>bulkRemoveFromGroups.mutateAsync({ids,- customer_group_ids: formValues?.customer_group_ids ?? [],+ customer_group_ids: (formValues as GroupFormValues).customer_group_ids ?? [],}),invalidate: GROUP_INVALIDATIONS,successMessage: t('admin.customers.groups.bulk_removed', {@@ -99,6 +119,42 @@ function CustomersPage() {}),errorMessage: t('admin.customers.groups.bulk_remove_failed'),},+ {+ key: 'add-tags',+ label: t('admin.customers.tags.bulk_add_action'),+ icon: <TagsIcon className="size-4" />,+ subject: Subject.Customer,+ form: (props) => (+ <TagPickerDialog+ {...(props as BulkActionFormProps<TagsFormValues>)}+ title={t('admin.customers.tags.picker.add_title')}+ description={t('admin.customers.tags.picker.add_description')}+ submitLabel={t('admin.actions.add')}+ />+ ),+ run: ({ ids, formValues }) =>+ bulkAddTags.mutateAsync({ ids, tags: (formValues as TagsFormValues).tags ?? [] }),+ successMessage: t('admin.customers.tags.bulk_added'),+ errorMessage: t('admin.customers.tags.bulk_add_failed'),+ },+ {+ key: 'remove-tags',+ label: t('admin.customers.tags.bulk_remove_action'),+ icon: <TagsIcon className="size-4" />,+ subject: Subject.Customer,+ form: (props) => (+ <TagPickerDialog+ {...(props as BulkActionFormProps<TagsFormValues>)}+ title={t('admin.customers.tags.picker.remove_title')}+ description={t('admin.customers.tags.picker.remove_description')}+ submitLabel={t('admin.actions.remove')}+ />+ ),+ run: ({ ids, formValues }) =>+ bulkRemoveTags.mutateAsync({ ids, tags: (formValues as TagsFormValues).tags ?? [] }),+ successMessage: t('admin.customers.tags.bulk_removed'),+ errorMessage: t('admin.customers.tags.bulk_remove_failed'),+ },]const isCreating = !!search.new@@ -142,58 +198,76 @@ function CustomersPage() {/*** Multi-select group picker used by the bulk add/remove actions. Resolves- * with `{ customer_group_ids }` so the same component drives both verbs.+ * with `{ customer_group_ids }` so the same component drives both verbs;+ * the caller supplies the title/description/submit-label copy.*/-function GroupPickerSheet({+function GroupPickerDialog({onSubmit,onCancel,- mode,-}: BulkActionFormProps<GroupFormValues> & { mode: 'add' | 'remove' }) {+ title,+ description,+ submitLabel,+}: BulkActionFormProps<GroupFormValues> & {+ title: string+ description: string+ submitLabel: string+}) {const { t } = useTranslation()const [groupIds, setGroupIds] = useState<string[]>([])return (- <Sheet open onOpenChange={(o) => !o && onCancel()}>- <SheetContent>- <SheetHeader>- <SheetTitle>- {mode === 'add'- ? t('admin.customers.groups.picker.add_title')- : t('admin.customers.groups.picker.remove_title')}- </SheetTitle>- <SheetDescription>- {mode === 'add'- ? t('admin.customers.groups.picker.add_description')- : t('admin.customers.groups.picker.remove_description')}- </SheetDescription>- </SheetHeader>- <div className="flex flex-1 flex-col gap-4 overflow-y-auto p-4">- <FieldGroup>- <Field>- <FieldLabel>{t('admin.pages.customers.groups_cta')}</FieldLabel>- <ResourceMultiAutocomplete- {...customerGroupAutocompleteProps('customer-groups-picker')}- value={groupIds}- onChange={setGroupIds}- />- </Field>- </FieldGroup>- </div>- <SheetFooter>- <Button type="button" variant="outline" size="sm" onClick={onCancel}>- {t('admin.actions.cancel')}- </Button>- <Button- type="button"- size="sm"- disabled={groupIds.length === 0}- onClick={() => onSubmit({ customer_group_ids: groupIds })}- >- {mode === 'add' ? t('admin.actions.add') : t('admin.actions.remove')}- </Button>- </SheetFooter>- </SheetContent>- </Sheet>+ <BulkDialog+ title={title}+ description={description}+ submitLabel={submitLabel}+ submitDisabled={groupIds.length === 0}+ onCancel={onCancel}+ onSubmit={() => onSubmit({ customer_group_ids: groupIds })}+ >+ <Field>+ <FieldLabel>{t('admin.pages.customers.groups_cta')}</FieldLabel>+ <ResourceMultiAutocomplete+ {...customerGroupAutocompleteProps('customer-groups-picker')}+ value={groupIds}+ onChange={setGroupIds}+ />+ </Field>+ </BulkDialog>+ )+}++/**+ * Multi-select tag picker used by the bulk add/remove tag actions. Resolves+ * with `{ tags }` (raw tag names) so the same component drives both verbs.+ */+function TagPickerDialog({+ onSubmit,+ onCancel,+ title,+ description,+ submitLabel,+}: BulkActionFormProps<TagsFormValues> & {+ title: string+ description: string+ submitLabel: string+}) {+ const { t } = useTranslation()+ const [tags, setTags] = useState<string[]>([])++ return (+ <BulkDialog+ title={title}+ description={description}+ submitLabel={submitLabel}+ submitDisabled={tags.length === 0}+ onCancel={onCancel}+ onSubmit={() => onSubmit({ tags })}+ >+ <Field>+ <FieldLabel>{t('admin.fields.customer.tags.label')}</FieldLabel>+ <TagCombobox taggableType="Spree::User" value={tags} onChange={setTags} />+ </Field>+ </BulkDialog>)}diff --git a/spree/api/app/controllers/spree/api/v3/admin/customers_controller.rb b/spree/api/app/controllers/spree/api/v3/admin/customers_controller.rbindex b498411e8b..cc302676ce 100644--- a/spree/api/app/controllers/spree/api/v3/admin/customers_controller.rb+++ b/spree/api/app/controllers/spree/api/v3/admin/customers_controller.rb@@ -3,6 +3,8 @@ module Spreemodule V3module Adminclass CustomersController < ResourceController+ include Spree::Api::V3::BulkOperations+scoped_resource :customersdef create@@ -76,6 +78,13 @@ module Spreeprivate+ # Mirrors the products controller's resource-named key so SPA toasts+ # can substitute `{customer_count}` instead of the generic+ # `{record_count}` shipped by `Spree::Api::V3::BulkOperations`.+ def bulk_record_count_key+ :customer_count+ end+def permitted_paramsparams.permit(:email, :first_name, :last_name, :phone,@@ -91,8 +100,8 @@ module Spreedef apply_groups(method)authorize! :update, model_class- user_ids = decode_ids(params[:ids], model_class)- group_ids = decode_ids(params[:customer_group_ids], Spree::CustomerGroup)+ user_ids = decode_ids(params[:ids])+ group_ids = decode_ids(params[:customer_group_ids])scoped_user_ids = scope.where(id: user_ids).pluck(:id)scoped_groups = Spree::CustomerGroup.for_store(current_store).where(id: group_ids)@@ -101,12 +110,6 @@ module Spreerender json: { customer_count: scoped_user_ids.size, customer_group_count: scoped_groups.size }end-- def decode_ids(ids, klass)- Array(ids).map do |id|- Spree::PrefixedId.prefixed_id?(id) ? klass.find_by_param!(id).id : id- end- endendendenddiff --git a/spree/api/config/routes.rb b/spree/api/config/routes.rbindex 161f958445..0b6f7d231b 100644--- a/spree/api/config/routes.rb+++ b/spree/api/config/routes.rb@@ -238,6 +238,8 @@ Spree::Core::Engine.add_routes docollection dopost :bulk_add_to_groupspost :bulk_remove_from_groups+ post :bulk_add_tags+ post :bulk_remove_tagsendenddiff --git a/spree/api/spec/controllers/spree/api/v3/admin/customers_controller_spec.rb b/spree/api/spec/controllers/spree/api/v3/admin/customers_controller_spec.rbindex d9c2ded545..515f15e6fd 100644--- a/spree/api/spec/controllers/spree/api/v3/admin/customers_controller_spec.rb+++ b/spree/api/spec/controllers/spree/api/v3/admin/customers_controller_spec.rb@@ -240,4 +240,89 @@ RSpec.describe Spree::Api::V3::Admin::CustomersController, type: :controller doexpect(vip.reload.customers).to match_array([alice, bob])endend++ describe 'POST #bulk_add_tags' do+ let!(:alice) { create(:user, email: '[email protected]').tap { |u| store.add_user(u) } }+ let!(:bob) { create(:user, email: '[email protected]').tap { |u| store.add_user(u) } }++ it 'adds the listed tags to every listed customer' do+ post :bulk_add_tags, params: {+ ids: [alice.prefixed_id, bob.prefixed_id],+ tags: %w[vip newsletter]+ }, as: :json++ expect(response).to have_http_status(:ok)+ expect(json_response).to eq('customer_count' => 2, 'tag_count' => 2)+ expect(alice.reload.tag_list).to include('vip', 'newsletter')+ expect(bob.reload.tag_list).to include('vip', 'newsletter')+ end++ it 'is idempotent — re-adding the same tag does not duplicate it' do+ alice.tag_list.add('vip')+ alice.save!++ post :bulk_add_tags, params: {+ ids: [alice.prefixed_id], tags: ['vip']+ }, as: :json++ expect(response).to have_http_status(:ok)+ expect(alice.reload.tag_list.count { |t| t == 'vip' }).to eq(1)+ end++ # Users aren't store-scoped (`Spree.user_class.for_store` is a no-op by+ # design — admins are users too), so cross-store filtering happens at+ # the ability layer, not the relation. Bulk endpoints follow suit and+ # apply tags to any user the admin can update.+ it 'silently drops unreachable IDs' do+ post :bulk_add_tags, params: {+ ids: ['cus_nonexistent'], tags: ['vip']+ }, as: :json++ expect(response).to have_http_status(:ok)+ expect(json_response['customer_count']).to eq(0)+ end++ it 'is a no-op when tags is empty' do+ post :bulk_add_tags, params: {+ ids: [alice.prefixed_id], tags: []+ }, as: :json++ expect(response).to have_http_status(:ok)+ expect(json_response).to eq('customer_count' => 1, 'tag_count' => 0)+ expect(alice.reload.tag_list).to be_empty+ end+ end++ describe 'POST #bulk_remove_tags' do+ let!(:alice) do+ create(:user, email: '[email protected]', tag_list: ['vip', 'newsletter']).tap { |u| store.add_user(u) }+ end+ let!(:bob) do+ create(:user, email: '[email protected]', tag_list: ['vip']).tap { |u| store.add_user(u) }+ end++ it 'removes the listed tags from every listed customer' do+ post :bulk_remove_tags, params: {+ ids: [alice.prefixed_id, bob.prefixed_id],+ tags: ['vip']+ }, as: :json++ expect(response).to have_http_status(:ok)+ expect(json_response).to eq('customer_count' => 2, 'tag_count' => 1)+ expect(alice.reload.tag_list).not_to include('vip')+ expect(alice.reload.tag_list).to include('newsletter')+ expect(bob.reload.tag_list).not_to include('vip')+ end++ it 'is a no-op for customers without the tag' do+ stranger = create(:user).tap { |u| store.add_user(u) }++ post :bulk_remove_tags, params: {+ ids: [stranger.prefixed_id], tags: ['vip']+ }, as: :json++ expect(response).to have_http_status(:ok)+ expect(stranger.reload.tag_list).to be_empty+ end+ endenddiff --git a/spree/api/spec/integration/spree/api/v3/admin/customers_spec.rb b/spree/api/spec/integration/spree/api/v3/admin/customers_spec.rbindex 23d9087737..f0decb2978 100644--- a/spree/api/spec/integration/spree/api/v3/admin/customers_spec.rb+++ b/spree/api/spec/integration/spree/api/v3/admin/customers_spec.rb@@ -260,4 +260,93 @@ RSpec.describe 'Admin Customers API', type: :request, swagger_doc: 'api-referencendendend++ path '/api/v3/admin/customers/bulk_add_tags' do+ post 'Bulk-add tags to customers' do+ tags 'Customers'+ consumes 'application/json'+ produces 'application/json'+ security [api_key: [], bearer_auth: []]+ description <<~DESC+ Adds each tag name in `tags` to every customer in `ids`. Tags are+ upserted by name; re-adding an existing tag is a no-op.+ DESC+ admin_scope :write, :customers++ admin_sdk_example 'customers/bulk-add-tags'++ parameter name: 'x-spree-api-key', in: :header, type: :string, required: true+ parameter name: :Authorization, in: :header, type: :string, required: true+ parameter name: :body, in: :body, schema: {+ type: :object,+ required: %w[ids tags],+ properties: {+ ids: { type: :array, items: { type: :string }, example: ['cus_UkLWZg9DAJ'] },+ tags: { type: :array, items: { type: :string }, example: %w[vip newsletter] }+ }+ }++ response '200', 'tags added' do+ let(:'x-spree-api-key') { secret_api_key.plaintext_token }+ let(:alice) { create(:user) }+ let(:body) { { ids: [alice.prefixed_id], tags: %w[vip newsletter] } }++ schema type: :object, properties: {+ customer_count: { type: :integer },+ tag_count: { type: :integer }+ }++ run_test! do |response|+ data = JSON.parse(response.body)+ expect(data).to eq('customer_count' => 1, 'tag_count' => 2)+ expect(alice.reload.tag_list).to include('vip', 'newsletter')+ end+ end+ end+ end++ path '/api/v3/admin/customers/bulk_remove_tags' do+ post 'Bulk-remove tags from customers' do+ tags 'Customers'+ consumes 'application/json'+ produces 'application/json'+ security [api_key: [], bearer_auth: []]+ description <<~DESC+ Removes each tag name in `tags` from every customer in `ids`. No-op+ for customers that don't carry the tag.+ DESC+ admin_scope :write, :customers++ admin_sdk_example 'customers/bulk-remove-tags'++ parameter name: 'x-spree-api-key', in: :header, type: :string, required: true+ parameter name: :Authorization, in: :header, type: :string, required: true+ parameter name: :body, in: :body, schema: {+ type: :object,+ required: %w[ids tags],+ properties: {+ ids: { type: :array, items: { type: :string }, example: ['cus_UkLWZg9DAJ'] },+ tags: { type: :array, items: { type: :string }, example: ['vip'] }+ }+ }++ response '200', 'tags removed' do+ let(:'x-spree-api-key') { secret_api_key.plaintext_token }+ let(:alice) { create(:user, tag_list: %w[vip newsletter]) }+ let(:body) { { ids: [alice.prefixed_id], tags: ['vip'] } }++ schema type: :object, properties: {+ customer_count: { type: :integer },+ tag_count: { type: :integer }+ }++ run_test! do |response|+ data = JSON.parse(response.body)+ expect(data).to eq('customer_count' => 1, 'tag_count' => 1)+ expect(alice.reload.tag_list).not_to include('vip')+ expect(alice.reload.tag_list).to include('newsletter')+ end+ end+ end+ endend