@spree/docs 0.1.247 → 0.1.249

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/api-reference/admin-api/authentication.md +34 -14
  2. package/dist/api-reference/admin-api/endpoints.md +366 -14
  3. package/dist/api-reference/admin-api/errors.md +2 -2
  4. package/dist/api-reference/admin-api/introduction.md +3 -3
  5. package/dist/api-reference/admin-api/querying.md +6 -6
  6. package/dist/api-reference/store-api/monetary-amounts.md +5 -5
  7. package/dist/api-reference/webhooks-events.md +330 -335
  8. package/dist/developer/agentic/agent-skills.md +5 -2
  9. package/dist/developer/agentic/llm-docs.md +2 -1
  10. package/dist/developer/cli/admin-api.md +1 -1
  11. package/dist/developer/cli/quickstart.md +2 -2
  12. package/dist/developer/contributing/creating-an-extension.md +292 -146
  13. package/dist/developer/contributing/developing-spree.md +13 -17
  14. package/dist/developer/core-concepts/catalogs.md +2 -2
  15. package/dist/developer/core-concepts/channels.md +3 -3
  16. package/dist/developer/core-concepts/companies.md +2 -1
  17. package/dist/developer/core-concepts/delivery-setup.md +2 -2
  18. package/dist/developer/core-concepts/discounts.md +3 -3
  19. package/dist/developer/core-concepts/events.md +6 -5
  20. package/dist/developer/core-concepts/freight.md +3 -2
  21. package/dist/developer/core-concepts/fulfillments.md +10 -8
  22. package/dist/developer/core-concepts/imports-exports.md +11 -8
  23. package/dist/developer/core-concepts/inventory.md +2 -2
  24. package/dist/developer/core-concepts/media.md +14 -14
  25. package/dist/developer/core-concepts/orders.md +2 -2
  26. package/dist/developer/core-concepts/payments.md +1 -2
  27. package/dist/developer/core-concepts/products.md +6 -6
  28. package/dist/developer/core-concepts/reporting.md +4 -3
  29. package/dist/developer/core-concepts/returns-exchanges-claims.md +7 -7
  30. package/dist/developer/core-concepts/search-filtering.md +3 -3
  31. package/dist/developer/core-concepts/sellers.md +22 -3
  32. package/dist/developer/core-concepts/staff-roles.md +4 -2
  33. package/dist/developer/core-concepts/store-credits-gift-cards.md +1 -1
  34. package/dist/developer/core-concepts/stores.md +2 -2
  35. package/dist/developer/core-concepts/translations.md +12 -8
  36. package/dist/developer/core-concepts/webhooks.md +19 -18
  37. package/dist/developer/create-spree-app/quickstart.md +2 -7
  38. package/dist/developer/customization/api.md +1 -1
  39. package/dist/developer/customization/checkout.md +2 -2
  40. package/dist/developer/customization/dependencies.md +53 -37
  41. package/dist/developer/customization/permissions.md +2 -2
  42. package/dist/developer/dashboard/concepts.md +1 -1
  43. package/dist/developer/dashboard/customization/navigation.md +3 -2
  44. package/dist/developer/dashboard/customization/permissions.md +6 -6
  45. package/dist/developer/dashboard/plugins/publishing.md +4 -4
  46. package/dist/developer/dashboard/plugins/scaffolding.md +1 -1
  47. package/dist/developer/dashboard/public-api.md +1 -1
  48. package/dist/developer/dashboard/recipes/attribute-end-to-end.md +3 -18
  49. package/dist/developer/deployment/aws.md +1 -1
  50. package/dist/developer/deployment/aws_ecs.md +3 -3
  51. package/dist/developer/deployment/background_jobs.md +9 -3
  52. package/dist/developer/deployment/docker.md +1 -2
  53. package/dist/developer/deployment/emails.md +3 -1
  54. package/dist/developer/deployment/environment_variables.md +2 -2
  55. package/dist/developer/deployment/render.md +2 -2
  56. package/dist/developer/how-to/build-a-marketplace.md +2 -2
  57. package/dist/developer/how-to/custom-api-authentication.md +1 -1
  58. package/dist/developer/how-to/custom-delivery-rate-provider.md +11 -3
  59. package/dist/developer/how-to/custom-document-numbers.md +1 -1
  60. package/dist/developer/how-to/custom-order-routing.md +15 -14
  61. package/dist/developer/how-to/custom-payment-method.md +17 -19
  62. package/dist/developer/how-to/custom-promotion.md +4 -4
  63. package/dist/developer/how-to/custom-search-provider.md +12 -5
  64. package/dist/developer/how-to/custom-stock-splitter.md +25 -24
  65. package/dist/developer/how-to/sell-digital-products.md +1 -1
  66. package/dist/developer/multi-tenant/quickstart.md +2 -2
  67. package/dist/developer/providers/payouts.md +6 -2
  68. package/dist/developer/sdk/admin/querying-and-errors.md +1 -1
  69. package/dist/developer/sdk/admin/quickstart.md +4 -4
  70. package/dist/developer/sdk/authentication.md +5 -2
  71. package/dist/developer/sdk/store/cart-checkout.md +4 -4
  72. package/dist/developer/storefront/nextjs/emails.md +4 -2
  73. package/dist/developer/storefront/nextjs/testing.md +1 -1
  74. package/dist/developer/upgrades/5.6-to-6.0.md +51 -20
  75. package/dist/integrations/search/meilisearch.md +4 -4
  76. package/package.json +1 -1
@@ -8,11 +8,11 @@ Every webhook delivery sends a JSON envelope with the event metadata and a `data
8
8
  ```json
9
9
  {
10
10
  "id": "550e8400-e29b-41d4-a716-446655440000",
11
- "name": "order.completed",
11
+ "name": "order.placed",
12
12
  "created_at": "2025-01-15T10:30:00Z",
13
13
  "data": { ... },
14
14
  "metadata": {
15
- "spree_version": "5.4.0"
15
+ "spree_version": "6.0.0"
16
16
  }
17
17
  }
18
18
  ```
@@ -20,73 +20,119 @@ Every webhook delivery sends a JSON envelope with the event metadata and a `data
20
20
  | Field | Type | Description |
21
21
  |-------|------|-------------|
22
22
  | `id` | string | Unique UUID for this event |
23
- | `name` | string | Event name (e.g., `order.completed`) |
23
+ | `name` | string | Event name (e.g., `order.placed`) |
24
24
  | `created_at` | string | ISO 8601 timestamp |
25
25
  | `data` | object | Serialized resource (see payloads below) |
26
- | `metadata` | object | Additional context including Spree version |
26
+ | `metadata` | object | Additional context: always the Spree version, plus event-specific keys such as `notify_customer` (fulfillment events — order events carry it in `data`) or `deprecated_alias_of` |
27
27
 
28
28
  Event payloads use the same [Store API V3 serializers](introduction.md) as the REST API. All `id` fields use [prefixed IDs](introduction.md) (e.g., `or_m3Rp9wXz`, `prod_86Rf07xd4z`). All monetary values are strings. All timestamps are ISO 8601.
29
29
 
30
- For details on creating webhook endpoints and verifying signatures, see [Webhooks](../developer/core-concepts/webhooks.md). For the event system internals and subscriber pattern, see [Events](../developer/core-concepts/events.md).
30
+ For details on creating webhook endpoints and verifying signatures, see [Webhooks](../developer/core-concepts/webhooks.md). For the event system and the subscriber pattern, see [Events](../developer/core-concepts/events.md).
31
31
 
32
- > **INFO:** Event payloads include the same top-level attributes and unconditional associations as API responses. Conditional associations (like product variants, media, or custom fields) are not included in event payloads.
32
+ > **INFO:** Event payloads include the same top-level attributes and unconditional associations as API responses. Associations that the API only returns when you ask for them with `expand` (like product variants, media, or custom fields) are not included in event payloads.
33
+
34
+ ## Renamed events
35
+
36
+ Spree 6.0 renamed several events. For one release, Spree sends the old name as well as the new one, so existing endpoints keep receiving deliveries. The old names stop in Spree 6.1 — subscribe to the new names.
37
+
38
+ | Old name (sent until 6.1) | New name |
39
+ |---|---|
40
+ | `order.completed` | `order.placed` |
41
+ | `order.shipped` | `order.fulfilled` |
42
+ | `shipment.shipped` | `fulfillment.fulfilled` |
43
+ | `shipment.canceled` | `fulfillment.canceled` |
44
+ | `stock_item.created` / `.updated` / `.deleted` | `stock_level.created` / `.updated` / `.deleted` |
45
+ | `wished_item.created` / `.updated` / `.deleted` | `wishlist_item.created` / `.updated` / `.deleted` |
46
+ | `digital.created` / `.updated` / `.deleted` | `digital_asset.created` / `.updated` / `.deleted` |
47
+
48
+ An `order.completed` delivery carries `"deprecated_alias_of": "order.placed"` in its `metadata`, so an endpoint subscribed to `order.*` can skip the duplicate.
49
+
50
+ These events were removed in Spree 6.0 and are no longer sent:
51
+
52
+ - `order.resumed` and `fulfillment.resumed` — a canceled order or fulfillment can no longer be resumed.
53
+ - `shipment.created` and `shipment.updated` — use `fulfillment.created` and `fulfillment.updated`.
54
+ - `image.*` — use `media.*`.
55
+ - `report.*` — use `saved_report.*`.
56
+ - `reimbursement.*`, `return_authorization.*`, `return_item.*` and `customer_return.*` — use the `return.*`, `exchange.*` and `claim.*` events.
57
+ - `post.*` and `post_category.*`.
33
58
 
34
59
  ---
35
60
 
36
61
  ## Order Events
37
62
 
38
- Events: `order.created`, `order.updated`, `order.completed`, `order.canceled`, `order.paid`, `order.shipped`
63
+ Events: `order.created`, `order.updated`, `order.deleted`, `order.placed`, `order.approved`, `order.canceled`, `order.paid`, `order.fulfilled`, `order.delivered`, `order.resend_confirmation_email`, `order.resend_digital_links_email`
64
+
65
+ | Event | When it fires |
66
+ |---|---|
67
+ | `order.placed` | A customer completed checkout, or an admin placed a draft order |
68
+ | `order.approved` | An admin approved an order that was flagged as risky |
69
+ | `order.canceled` | The order was canceled |
70
+ | `order.paid` | Payments cover the order total in full |
71
+ | `order.fulfilled` | Every fulfillment on the order was handed over to the customer or carrier |
72
+ | `order.delivered` | Every fulfillment on the order was delivered |
73
+ | `order.resend_confirmation_email` | An admin asked to send the order confirmation again |
74
+ | `order.resend_digital_links_email` | An admin asked to send the download links again |
75
+
76
+ The `order.placed` and `order.canceled` payloads also contain a `notify_customer` boolean. It is `false` when whoever placed or canceled the order asked for the customer not to be emailed.
39
77
 
40
- Order payloads include nested `items`, `fulfillments` (the Store API name for shipments), `payments`, `billing_address`, `shipping_address`, `payment_methods`, and `discounts`.
78
+ Order payloads include nested `items`, `fulfillments`, `payments`, `discounts`, `fees`, `billing_address`, `shipping_address`, `gift_card`, and `market`.
41
79
 
42
80
  ```json
43
81
  {
44
82
  "id": "or_m3Rp9wXz",
83
+ "cart_id": "cart_k5nR8xLq",
45
84
  "number": "R123456789",
46
- "state": "complete",
47
- "token": "abc123def456",
48
85
  "email": "customer@example.com",
49
- "special_instructions": null,
86
+ "customer_note": null,
87
+ "po_number": null,
50
88
  "currency": "USD",
51
- "item_count": 3,
52
- "fulfillment_status": "shipped",
53
- "payment_state": "paid",
89
+ "locale": "en",
90
+ "total_quantity": 3,
91
+ "coupon_code": null,
92
+ "fulfillment_status": "fulfilled",
93
+ "payment_status": "paid",
94
+ "market_id": "mkt_2wMn9xPq",
95
+ "channel_id": "ch_3xLq8nRt",
96
+ "company_id": null,
97
+ "company_name": null,
54
98
  "item_total": "89.99",
55
99
  "display_item_total": "$89.99",
56
100
  "delivery_total": "10.00",
57
101
  "display_delivery_total": "$10.00",
58
102
  "adjustment_total": "0.00",
59
103
  "display_adjustment_total": "$0.00",
60
- "promo_total": "0.00",
61
- "display_promo_total": "$0.00",
104
+ "discount_total": "0.00",
105
+ "display_discount_total": "$0.00",
62
106
  "tax_total": "0.00",
63
107
  "display_tax_total": "$0.00",
64
108
  "included_tax_total": "0.00",
65
109
  "display_included_tax_total": "$0.00",
66
110
  "additional_tax_total": "0.00",
67
111
  "display_additional_tax_total": "$0.00",
112
+ "fee_total": "0.00",
113
+ "display_fee_total": "$0.00",
114
+ "store_credit_total": "0.00",
115
+ "display_store_credit_total": "$0.00",
116
+ "gift_card_total": "0.00",
117
+ "display_gift_card_total": "$0.00",
118
+ "covered_by_store_credit": false,
68
119
  "total": "99.99",
69
120
  "display_total": "$99.99",
121
+ "amount_due": "0.00",
122
+ "display_amount_due": "$0.00",
70
123
  "completed_at": "2025-01-15T10:30:00Z",
71
- "created_at": "2025-01-15T10:00:00Z",
72
- "updated_at": "2025-01-15T10:30:00Z",
73
- "promotions": [],
124
+ "withdrawal_period_ends_at": null,
125
+ "within_withdrawal_period": false,
126
+ "discounts": [],
127
+ "fees": [],
74
128
  "items": [
75
129
  {
76
130
  "id": "li_7xRt4wPq",
77
- "variant_id": "var_k5nR8xLq",
131
+ "variant_id": "variant_k5nR8xLq",
78
132
  "quantity": 2,
79
- "currency": "USD",
80
133
  "name": "Spree Tote Bag",
81
- "slug": "spree-tote-bag",
82
- "options_text": "Size: M, Color: Black",
83
134
  "price": "29.99",
84
- "display_price": "$29.99",
85
135
  "total": "59.98",
86
- "display_total": "$59.98",
87
- "thumbnail_url": "https://cdn.example.com/images/tote-bag.jpg",
88
- "option_values": [],
89
- "digital_links": [],
90
136
  "..."
91
137
  }
92
138
  ],
@@ -94,49 +140,39 @@ Order payloads include nested `items`, `fulfillments` (the Store API name for sh
94
140
  {
95
141
  "id": "ful_9xPq4wMn",
96
142
  "number": "H123456789",
97
- "status": "shipped",
143
+ "status": "fulfilled",
98
144
  "fulfillment_type": "shipping",
99
145
  "tracking": "1Z999AA10123456784",
100
- "tracking_url": "https://tools.usps.com/go/TrackConfirmAction?tLabels=1Z999AA10123456784",
101
- "cost": "10.00",
102
- "display_cost": "$10.00",
103
- "fulfilled_at": "2025-01-16T14:00:00Z",
104
- "delivery_method": { "id": "dm_2wMn7xRt", "..." },
105
- "stock_location": { "id": "sl_2wMn7xRt", "..." },
106
- "delivery_rates": [],
107
146
  "..."
108
147
  }
109
148
  ],
110
149
  "payments": [
111
150
  {
112
- "id": "pay_3wXz7mRp",
113
- "state": "completed",
114
- "number": "P123456",
151
+ "id": "py_3wXz7mRp",
152
+ "status": "completed",
115
153
  "amount": "99.99",
116
- "display_amount": "$99.99",
117
- "response_code": "ch_abc123",
118
- "payment_method_id": "pm_4xLq8nRt",
119
- "source_type": "credit_card",
120
- "source_id": "cc_5wPq9mXz",
121
- "source": { "..." },
122
- "payment_method": { "id": "pm_4xLq8nRt", "..." },
123
154
  "..."
124
155
  }
125
156
  ],
126
- "bill_address": {
127
- "id": "addr_1xPq2wMn",
128
- "..."
129
- },
130
- "ship_address": {
131
- "id": "addr_2wMn3xPq",
132
- "..."
133
- },
134
- "payment_methods": [
135
- { "id": "pm_4xLq8nRt", "..." }
136
- ]
157
+ "billing_address": { "id": "addr_1xPq2wMn", "..." },
158
+ "shipping_address": { "id": "addr_2wMn3xPq", "..." },
159
+ "gift_card": null,
160
+ "market": { "id": "mkt_2wMn9xPq", "..." }
137
161
  }
138
162
  ```
139
163
 
164
+ ## Cart Events
165
+
166
+ Events: `cart.created`, `cart.updated`, `cart.deleted`
167
+
168
+ Carts publish their own events, separate from orders. Use them to follow carts that were never checked out. The payload is the same cart object the [Store API](store-api/introduction.md) returns. When a cart is checked out, the resulting order carries the cart's ID in its `cart_id` field.
169
+
170
+ ## Order Group Events
171
+
172
+ Events: `order_group.created`, `order_group.updated`, `order_group.deleted`, `order_group.completed`
173
+
174
+ When one checkout creates several orders (for example, one per seller), they belong to an order group. `order_group.completed` fires once every order in the group is placed. The payload includes the group's `number`, `email`, `currency`, `total`, `item_total`, `fulfillment_status`, `payment_status`, `completed_at`, the addresses, and the nested `orders`.
175
+
140
176
  ## Line Item Events
141
177
 
142
178
  Events: `line_item.created`, `line_item.updated`, `line_item.deleted`
@@ -146,12 +182,15 @@ Line item payloads include nested `option_values` and `digital_links`.
146
182
  ```json
147
183
  {
148
184
  "id": "li_7xRt4wPq",
149
- "variant_id": "var_k5nR8xLq",
185
+ "variant_id": "variant_k5nR8xLq",
186
+ "seller_id": null,
150
187
  "quantity": 2,
151
188
  "currency": "USD",
152
189
  "name": "Spree Tote Bag",
153
190
  "slug": "spree-tote-bag",
154
191
  "options_text": "Size: M, Color: Black",
192
+ "preorder": false,
193
+ "preorder_ships_at": null,
155
194
  "price": "29.99",
156
195
  "display_price": "$29.99",
157
196
  "total": "59.98",
@@ -162,8 +201,8 @@ Line item payloads include nested `option_values` and `digital_links`.
162
201
  "display_additional_tax_total": "$2.40",
163
202
  "included_tax_total": "0.00",
164
203
  "display_included_tax_total": "$0.00",
165
- "promo_total": "-5.00",
166
- "display_promo_total": "-$5.00",
204
+ "discount_total": "-5.00",
205
+ "display_discount_total": "-$5.00",
167
206
  "pre_tax_amount": "54.98",
168
207
  "display_pre_tax_amount": "$54.98",
169
208
  "discounted_amount": "54.98",
@@ -171,10 +210,8 @@ Line item payloads include nested `option_values` and `digital_links`.
171
210
  "compare_at_amount": null,
172
211
  "display_compare_at_amount": null,
173
212
  "thumbnail_url": "https://cdn.example.com/images/tote-bag.jpg",
174
- "created_at": "2025-01-15T10:00:00Z",
175
- "updated_at": "2025-01-15T10:00:00Z",
176
213
  "option_values": [
177
- { "id": "ov_2wMn9xPq", "name": "M", "presentation": "Medium" }
214
+ { "id": "optval_2wMn9xPq", "name": "m", "label": "M", "..." }
178
215
  ],
179
216
  "digital_links": []
180
217
  }
@@ -182,41 +219,39 @@ Line item payloads include nested `option_values` and `digital_links`.
182
219
 
183
220
  ## Payment Events
184
221
 
185
- Events: `payment.created`, `payment.updated`, `payment.paid`
222
+ Events: `payment.created`, `payment.updated`, `payment.deleted`, `payment.completed`, `payment.paid`, `payment.captured`, `payment.voided`, `payment.refunded`
186
223
 
187
- Payment payloads include a nested `payment_method` and polymorphic `source` (credit card, store credit, or payment source).
224
+ Payment payloads include a nested `payment_method` and a `source` (a credit card, store credit, or other payment source).
188
225
 
189
226
  ```json
190
227
  {
191
- "id": "pay_3wXz7mRp",
192
- "state": "completed",
228
+ "id": "py_3wXz7mRp",
229
+ "status": "completed",
193
230
  "number": "P123456",
194
231
  "amount": "99.99",
195
232
  "display_amount": "$99.99",
196
233
  "response_code": "ch_abc123",
197
234
  "payment_method_id": "pm_4xLq8nRt",
198
235
  "source_type": "credit_card",
199
- "source_id": "cc_5wPq9mXz",
236
+ "source_id": "card_5wPq9mXz",
200
237
  "source": {
201
- "id": "cc_5wPq9mXz",
238
+ "id": "card_5wPq9mXz",
202
239
  "..."
203
240
  },
204
241
  "payment_method": {
205
242
  "id": "pm_4xLq8nRt",
206
243
  "..."
207
- },
208
- "created_at": "2025-01-15T10:25:00Z",
209
- "updated_at": "2025-01-15T10:25:00Z"
244
+ }
210
245
  }
211
246
  ```
212
247
 
213
- The `source_type` field is normalized to one of: `"credit_card"`, `"store_credit"`, `"payment_source"`, or `null`.
248
+ The `source_type` field is one of: `"credit_card"`, `"store_credit"`, `"payment_source"`, or `null`.
214
249
 
215
250
  ## Payment Session Events
216
251
 
217
- Events: `payment_session.created`, `payment_session.updated`, `payment_session.deleted`
252
+ Events: `payment_session.created`, `payment_session.updated`, `payment_session.deleted`, `payment_session.processing`, `payment_session.completed`, `payment_session.failed`, `payment_session.canceled`, `payment_session.expired`
218
253
 
219
- Payment session payloads include a nested `payment_method` and optionally a nested `payment`.
254
+ Payment session payloads include a nested `payment_method`, and a nested `payment` once one exists.
220
255
 
221
256
  ```json
222
257
  {
@@ -227,21 +262,20 @@ Payment session payloads include a nested `payment_method` and optionally a nest
227
262
  "external_id": "pi_3abc123",
228
263
  "external_data": {},
229
264
  "customer_external_id": null,
230
- "order_id": "or_m3Rp9wXz",
265
+ "order_id": null,
266
+ "cart_id": "cart_k5nR8xLq",
231
267
  "payment_method_id": "pm_4xLq8nRt",
232
268
  "payment_method": {
233
269
  "id": "pm_4xLq8nRt",
234
270
  "..."
235
271
  },
236
- "expires_at": "2025-01-15T11:00:00Z",
237
- "created_at": "2025-01-15T10:25:00Z",
238
- "updated_at": "2025-01-15T10:25:00Z"
272
+ "expires_at": "2025-01-15T11:00:00Z"
239
273
  }
240
274
  ```
241
275
 
242
276
  ## Payment Setup Session Events
243
277
 
244
- Events: `payment_setup_session.created`, `payment_setup_session.updated`, `payment_setup_session.deleted`
278
+ Events: `payment_setup_session.created`, `payment_setup_session.updated`, `payment_setup_session.deleted`, `payment_setup_session.processing`, `payment_setup_session.completed`, `payment_setup_session.failed`, `payment_setup_session.canceled`, `payment_setup_session.expired`
245
279
 
246
280
  Payment setup session payloads include a nested `payment_method`.
247
281
 
@@ -253,43 +287,75 @@ Payment setup session payloads include a nested `payment_method`.
253
287
  "external_client_secret": "seti_abc123_secret_xyz",
254
288
  "external_data": {},
255
289
  "payment_method_id": "pm_4xLq8nRt",
256
- "payment_source_id": "cc_5wPq9mXz",
257
- "payment_source_type": "Spree::CreditCard",
258
- "customer_id": "usr_k5nR8xLq",
290
+ "payment_source_id": null,
291
+ "payment_source_type": null,
292
+ "customer_id": "cust_k5nR8xLq",
259
293
  "payment_method": {
260
294
  "id": "pm_4xLq8nRt",
261
295
  "..."
262
- },
263
- "created_at": "2025-01-15T10:25:00Z",
264
- "updated_at": "2025-01-15T10:25:00Z"
296
+ }
297
+ }
298
+ ```
299
+
300
+ ## Refund Events
301
+
302
+ Events: `refund.created`, `refund.updated`, `refund.deleted`
303
+
304
+ ```json
305
+ {
306
+ "id": "re_7xRt4wPq",
307
+ "amount": "29.99",
308
+ "transaction_id": "txn_abc123",
309
+ "payment_id": "py_3wXz7mRp",
310
+ "refund_reason_id": "rr_2wMn9xPq",
311
+ "originator_id": null,
312
+ "originator_type": null
265
313
  }
266
314
  ```
267
315
 
268
- ## Shipment Events
316
+ ## Fulfillment Events
269
317
 
270
- Events: `shipment.created`, `shipment.updated`, `shipment.shipped`, `shipment.canceled`
318
+ Events: `fulfillment.created`, `fulfillment.updated`, `fulfillment.deleted`, `fulfillment.fulfilled`, `fulfillment.delivered`, `fulfillment.canceled`
271
319
 
272
- The Store API/SDK exposes shipments as `fulfillments`, and webhook payloads use the same V3 serializer. Payloads include nested `delivery_method`, `stock_location`, and `delivery_rates`.
320
+ `fulfillment.fulfilled` fires when a fulfillment is handed over — shipped, collected, or made available for download. Its `metadata` contains `notify_customer`, which tells you whether the customer should be emailed about it. `fulfillment.delivered` carries the same key.
321
+
322
+ Fulfillment payloads include nested `deliveries`, `delivery_method`, `stock_location`, and `delivery_rates`.
273
323
 
274
324
  ```json
275
325
  {
276
326
  "id": "ful_9xPq4wMn",
277
327
  "number": "H123456789",
278
- "status": "shipped",
328
+ "status": "fulfilled",
279
329
  "fulfillment_type": "shipping",
280
330
  "tracking": "1Z999AA10123456784",
281
- "tracking_url": "https://tools.usps.com/go/TrackConfirmAction?tLabels=1Z999AA10123456784",
331
+ "tracking_url": "https://www.ups.com/track?tracknum=1Z999AA10123456784",
332
+ "pickup_point_data": null,
333
+ "selected_delivery_rate_id": "dr_5wPq9mXz",
334
+ "unpriced": false,
282
335
  "cost": "10.00",
283
336
  "display_cost": "$10.00",
337
+ "total": "10.00",
338
+ "display_total": "$10.00",
339
+ "discount_total": "0.00",
340
+ "display_discount_total": "$0.00",
341
+ "additional_tax_total": "0.00",
342
+ "display_additional_tax_total": "$0.00",
343
+ "included_tax_total": "0.00",
344
+ "display_included_tax_total": "$0.00",
345
+ "tax_total": "0.00",
346
+ "display_tax_total": "$0.00",
284
347
  "fulfilled_at": "2025-01-16T14:00:00Z",
285
- "created_at": "2025-01-15T10:30:00Z",
286
- "updated_at": "2025-01-16T14:00:00Z",
348
+ "delivered_at": null,
349
+ "items": [
350
+ { "item_id": "li_7xRt4wPq", "variant_id": "variant_k5nR8xLq", "quantity": 2 }
351
+ ],
352
+ "deliveries": [],
287
353
  "delivery_method": {
288
354
  "id": "dm_2wMn7xRt",
289
355
  "..."
290
356
  },
291
357
  "stock_location": {
292
- "id": "sl_2wMn7xRt",
358
+ "id": "sloc_2wMn7xRt",
293
359
  "..."
294
360
  },
295
361
  "delivery_rates": []
@@ -298,9 +364,9 @@ The Store API/SDK exposes shipments as `fulfillments`, and webhook payloads use
298
364
 
299
365
  ## Product Events
300
366
 
301
- Events: `product.created`, `product.updated`, `product.deleted`, `product.activate`, `product.archive`, `product.out_of_stock`, `product.back_in_stock`
367
+ Events: `product.created`, `product.updated`, `product.deleted`, `product.drafted`, `product.proposed`, `product.approved`, `product.rejected`, `product.activated`, `product.archived`, `product.out_of_stock`, `product.back_in_stock`
302
368
 
303
- Product event payloads include pricing, stock status, and availability flags. Conditional associations (variants, media, option types, categories, custom fields) are not included in event payloads.
369
+ Product event payloads include pricing, stock status, and availability flags. Variants, media, option types, categories, and custom fields are not included.
304
370
 
305
371
  ```json
306
372
  {
@@ -308,18 +374,24 @@ Product event payloads include pricing, stock status, and availability flags. Co
308
374
  "name": "Spree Tote Bag",
309
375
  "slug": "spree-tote-bag",
310
376
  "description": "A beautiful tote bag",
377
+ "description_html": "<p>A beautiful tote bag</p>",
378
+ "meta_title": null,
311
379
  "meta_description": null,
312
380
  "meta_keywords": null,
313
381
  "variant_count": 3,
314
- "default_variant_id": "var_k5nR8xLq",
382
+ "default_variant_id": "variant_k5nR8xLq",
383
+ "buy_box_variant_id": null,
384
+ "seller_id": null,
315
385
  "thumbnail_url": "https://cdn.example.com/images/tote-bag.jpg",
316
386
  "purchasable": true,
317
387
  "in_stock": true,
318
388
  "backorderable": false,
319
389
  "available": true,
390
+ "preorder": false,
391
+ "preorder_ships_at": null,
320
392
  "tags": ["summer", "accessories"],
321
393
  "price": {
322
- "id": "pri_4wPq9mXz",
394
+ "id": "price_4wPq9mXz",
323
395
  "amount": "29.99",
324
396
  "amount_in_cents": 2999,
325
397
  "display_amount": "$29.99",
@@ -330,9 +402,7 @@ Product event payloads include pricing, stock status, and availability flags. Co
330
402
  "price_list_id": null
331
403
  },
332
404
  "original_price": null,
333
- "available_on": "2025-01-01T00:00:00Z",
334
- "created_at": "2025-01-01T00:00:00Z",
335
- "updated_at": "2025-01-15T10:00:00Z"
405
+ "available_on": "2025-01-01T00:00:00Z"
336
406
  }
337
407
  ```
338
408
 
@@ -340,42 +410,43 @@ Product event payloads include pricing, stock status, and availability flags. Co
340
410
 
341
411
  Events: `variant.created`, `variant.updated`, `variant.deleted`
342
412
 
343
- Variant event payloads include pricing, stock status, and always-included `option_values`. Conditional associations (media, custom fields) are not included in event payloads.
413
+ Variant event payloads include pricing, stock status, and `option_values`. Media and custom fields are not included.
344
414
 
345
415
  ```json
346
416
  {
347
- "id": "var_k5nR8xLq",
417
+ "id": "variant_k5nR8xLq",
348
418
  "product_id": "prod_86Rf07xd4z",
419
+ "seller_id": null,
349
420
  "sku": "SPR-TOTE-BLK",
350
- "is_master": false,
351
421
  "options_text": "Size: M, Color: Black",
352
422
  "track_inventory": true,
353
423
  "media_count": 2,
354
- "thumbnail": "https://cdn.example.com/images/tote-bag-black.jpg",
424
+ "thumbnail_url": "https://cdn.example.com/images/tote-bag-black.jpg",
355
425
  "purchasable": true,
356
426
  "in_stock": true,
357
427
  "backorderable": false,
428
+ "preorder": false,
429
+ "preorder_ships_at": null,
358
430
  "weight": 0.5,
359
431
  "height": 40.0,
360
432
  "width": 35.0,
361
433
  "depth": 10.0,
434
+ "weight_unit": "kg",
435
+ "dimensions_unit": "cm",
436
+ "minimum_order_quantity": 1,
437
+ "order_multiple": 1,
438
+ "purchase_unit": "unit",
439
+ "units_per_carton": null,
362
440
  "price": {
363
- "id": "pri_4wPq9mXz",
441
+ "id": "price_4wPq9mXz",
364
442
  "amount": "29.99",
365
- "amount_in_cents": 2999,
366
- "display_amount": "$29.99",
367
- "compare_at_amount": null,
368
- "compare_at_amount_in_cents": null,
369
- "display_compare_at_amount": null,
370
443
  "currency": "USD",
371
- "price_list_id": null
444
+ "..."
372
445
  },
373
446
  "original_price": null,
374
- "created_at": "2025-01-01T00:00:00Z",
375
- "updated_at": "2025-01-15T10:00:00Z",
376
447
  "option_values": [
377
- { "id": "ov_2wMn9xPq", "name": "M", "presentation": "Medium" },
378
- { "id": "ov_3xLq8nRt", "name": "Black", "presentation": "Black" }
448
+ { "id": "optval_2wMn9xPq", "name": "m", "label": "M", "..." },
449
+ { "id": "optval_3xLq8nRt", "name": "black", "label": "Black", "..." }
379
450
  ]
380
451
  }
381
452
  ```
@@ -386,7 +457,7 @@ Events: `price.created`, `price.updated`, `price.deleted`
386
457
 
387
458
  ```json
388
459
  {
389
- "id": "pri_4wPq9mXz",
460
+ "id": "price_4wPq9mXz",
390
461
  "amount": "29.99",
391
462
  "amount_in_cents": 2999,
392
463
  "display_amount": "$29.99",
@@ -398,45 +469,38 @@ Events: `price.created`, `price.updated`, `price.deleted`
398
469
  }
399
470
  ```
400
471
 
401
- ## Image Events
472
+ ## Media Events
402
473
 
403
- Events: `image.created`, `image.updated`, `image.deleted`
474
+ Events: `media.created`, `media.updated`, `media.deleted`
404
475
 
405
- Image payloads include URLs for all configured image variants (mini, small, medium, large, xlarge).
476
+ Media events carry a short payload. Fetch the product or variant from the API when you need the image URLs.
406
477
 
407
478
  ```json
408
479
  {
409
- "id": "img_5mXz3wPq",
410
- "type": "Spree::Image",
411
- "viewable_type": "Spree::Variant",
412
- "viewable_id": "var_k5nR8xLq",
480
+ "id": "media_5mXz3wPq",
481
+ "media_type": "image",
482
+ "viewable_type": "product",
483
+ "viewable_id": "prod_86Rf07xd4z",
413
484
  "position": 1,
414
485
  "alt": "Black tote bag front view",
415
- "original_url": "https://cdn.example.com/images/original.jpg",
416
- "mini_url": "https://cdn.example.com/images/mini.jpg",
417
- "small_url": "https://cdn.example.com/images/small.jpg",
418
- "medium_url": "https://cdn.example.com/images/medium.jpg",
419
- "large_url": "https://cdn.example.com/images/large.jpg",
420
- "xlarge_url": "https://cdn.example.com/images/xlarge.jpg",
421
- "og_image_url": "https://cdn.example.com/images/og.jpg",
422
486
  "created_at": "2025-01-01T00:00:00Z",
423
487
  "updated_at": "2025-01-01T00:00:00Z"
424
488
  }
425
489
  ```
426
490
 
427
- ## Stock Item Events
491
+ ## Stock Level Events
428
492
 
429
- Events: `stock_item.created`, `stock_item.updated`, `stock_item.deleted`
493
+ Events: `stock_level.created`, `stock_level.updated`, `stock_level.deleted`
494
+
495
+ A stock level is the quantity of one variant at one stock location.
430
496
 
431
497
  ```json
432
498
  {
433
- "id": "si_6nRt2xLq",
499
+ "id": "sl_6nRt2xLq",
434
500
  "count_on_hand": 25,
435
501
  "backorderable": false,
436
- "stock_location_id": "sl_2wMn7xRt",
437
- "variant_id": "var_k5nR8xLq",
438
- "created_at": "2025-01-01T00:00:00Z",
439
- "updated_at": "2025-01-15T10:00:00Z"
502
+ "stock_location_id": "sloc_2wMn7xRt",
503
+ "variant_id": "variant_k5nR8xLq"
440
504
  }
441
505
  ```
442
506
 
@@ -448,10 +512,9 @@ Events: `stock_movement.created`, `stock_movement.updated`, `stock_movement.dele
448
512
  {
449
513
  "id": "sm_7xRt4wPq",
450
514
  "quantity": -1,
451
- "action": "sold",
452
- "originator_type": "Spree::Shipment",
453
- "originator_id": "ful_9xPq4wMn",
454
- "stock_item_id": "si_6nRt2xLq",
515
+ "kind": "shipped",
516
+ "reason": null,
517
+ "stock_level_id": "sl_6nRt2xLq",
455
518
  "created_at": "2025-01-15T10:30:00Z",
456
519
  "updated_at": "2025-01-15T10:30:00Z"
457
520
  }
@@ -459,16 +522,15 @@ Events: `stock_movement.created`, `stock_movement.updated`, `stock_movement.dele
459
522
 
460
523
  ## Stock Transfer Events
461
524
 
462
- Events: `stock_transfer.created`, `stock_transfer.updated`, `stock_transfer.deleted`
525
+ Events: `stock_transfer.created`, `stock_transfer.updated`, `stock_transfer.deleted`, `stock_transfer.draft`, `stock_transfer.ready_to_ship`, `stock_transfer.shipped`, `stock_transfer.partially_received`, `stock_transfer.received`, `stock_transfer.over_received`, `stock_transfer.canceled`
463
526
 
464
527
  ```json
465
528
  {
466
529
  "id": "st_8mXz3wPq",
467
530
  "number": "T123456789",
468
- "type": "Spree::StockTransfer",
469
531
  "reference": "Warehouse rebalance",
470
- "source_location_id": "sl_2wMn7xRt",
471
- "destination_location_id": "sl_9xPq4wMn",
532
+ "source_location_id": "sloc_2wMn7xRt",
533
+ "destination_location_id": "sloc_9xPq4wMn",
472
534
  "created_at": "2025-01-15T10:00:00Z",
473
535
  "updated_at": "2025-01-15T10:00:00Z"
474
536
  }
@@ -476,21 +538,27 @@ Events: `stock_transfer.created`, `stock_transfer.updated`, `stock_transfer.dele
476
538
 
477
539
  ## Customer Events
478
540
 
479
- Events: `customer.created`, `customer.updated`, `customer.deleted`
541
+ Events: `user.created`, `user.updated`, `user.deleted`, `customer.anonymized`, `customer.password_reset_requested`, `customer.password_reset`
480
542
 
481
- Customer payloads include nested `addresses`, `default_billing_address`, and `default_shipping_address`.
543
+ Customer lifecycle events use the `user` prefix. Customer payloads include nested `addresses`, `default_billing_address`, `default_shipping_address`, `newsletter_subscriber`, and `customer_groups`.
482
544
 
483
545
  ```json
484
546
  {
485
- "id": "usr_k5nR8xLq",
547
+ "id": "cust_k5nR8xLq",
486
548
  "email": "customer@example.com",
487
549
  "first_name": "John",
488
550
  "last_name": "Doe",
489
- "created_at": "2025-01-01T00:00:00Z",
490
- "updated_at": "2025-01-15T10:00:00Z",
551
+ "full_name": "John Doe",
552
+ "phone": null,
553
+ "accepts_email_marketing": true,
554
+ "email_marketing_consent_updated_at": "2025-01-01T00:00:00Z",
555
+ "available_store_credit_total": "0.0",
556
+ "display_available_store_credit_total": "$0.00",
491
557
  "addresses": [],
492
558
  "default_billing_address": null,
493
- "default_shipping_address": null
559
+ "default_shipping_address": null,
560
+ "newsletter_subscriber": null,
561
+ "customer_groups": []
494
562
  }
495
563
  ```
496
564
 
@@ -503,52 +571,34 @@ Events: `promotion.created`, `promotion.updated`, `promotion.deleted`
503
571
  "id": "promo_2wMn9xPq",
504
572
  "name": "Summer Sale 20% Off",
505
573
  "description": "20% off all summer items",
506
- "code": "SUMMER20",
507
- "type": "Spree::Promotion",
508
- "kind": "coupon",
509
- "path": null,
510
- "match_policy": "all",
511
- "usage_limit": 1000,
512
- "advertise": true,
513
- "multi_codes": false,
514
- "code_prefix": null,
515
- "number_of_codes": null,
516
- "starts_at": "2025-06-01T00:00:00Z",
517
- "expires_at": "2025-08-31T23:59:59Z",
518
- "promotion_category_id": "pcat_3xLq8nRt",
519
- "created_at": "2025-05-15T10:00:00Z",
520
- "updated_at": "2025-05-15T10:00:00Z"
574
+ "code": "SUMMER20"
521
575
  }
522
576
  ```
523
577
 
524
578
  ## Gift Card Events
525
579
 
526
- Events: `gift_card.created`, `gift_card.updated`, `gift_card.deleted`
580
+ Events: `gift_card.created`, `gift_card.updated`, `gift_card.deleted`, `gift_card.partially_redeemed`, `gift_card.redeemed`, `gift_card.canceled`
527
581
 
528
582
  ```json
529
583
  {
530
584
  "id": "gc_4xLq8nRt",
531
- "code": "****-1234",
532
- "state": "active",
533
- "amount": 50.0,
534
- "amount_used": 15.0,
535
- "amount_authorized": 0.0,
536
- "amount_remaining": 35.0,
585
+ "code": "HOLIDAY-8F3K2M",
586
+ "status": "partially_redeemed",
587
+ "amount": "50.0",
588
+ "amount_used": "15.0",
589
+ "amount_authorized": "0.0",
590
+ "amount_remaining": "35.0",
537
591
  "display_amount": "$50.00",
538
592
  "display_amount_used": "$15.00",
539
593
  "display_amount_remaining": "$35.00",
540
594
  "currency": "USD",
541
595
  "expired": false,
542
596
  "active": true,
543
- "expires_at": "2026-01-01T00:00:00Z",
544
- "redeemed_at": "2025-02-01T10:00:00Z",
545
- "created_at": "2025-01-01T00:00:00Z",
546
- "updated_at": "2025-02-01T10:00:00Z"
597
+ "expires_at": "2026-01-01",
598
+ "redeemed_at": null
547
599
  }
548
600
  ```
549
601
 
550
- > **INFO:** The gift card `code` is displayed as a masked value (e.g., `****-1234`) for security.
551
-
552
602
  ## Gift Card Batch Events
553
603
 
554
604
  Events: `gift_card_batch.created`, `gift_card_batch.updated`, `gift_card_batch.deleted`
@@ -557,10 +607,10 @@ Events: `gift_card_batch.created`, `gift_card_batch.updated`, `gift_card_batch.d
557
607
  {
558
608
  "id": "gcb_5wPq9mXz",
559
609
  "codes_count": 100,
560
- "amount": "25.00",
610
+ "amount": "25.0",
561
611
  "currency": "USD",
562
612
  "prefix": "HOLIDAY",
563
- "expires_at": "2026-12-31T00:00:00Z",
613
+ "expires_at": "2026-12-31",
564
614
  "created_by_id": "adm_8mXz3wPq",
565
615
  "created_at": "2025-01-01T00:00:00Z",
566
616
  "updated_at": "2025-01-01T00:00:00Z"
@@ -573,10 +623,10 @@ Events: `store_credit.created`, `store_credit.updated`, `store_credit.deleted`
573
623
 
574
624
  ```json
575
625
  {
576
- "id": "sc_6nRt2xLq",
577
- "amount": "100.00",
578
- "amount_used": "25.00",
579
- "amount_remaining": "75.00",
626
+ "id": "credit_6nRt2xLq",
627
+ "amount": "100.0",
628
+ "amount_used": "25.0",
629
+ "amount_remaining": "75.0",
580
630
  "display_amount": "$100.00",
581
631
  "display_amount_used": "$25.00",
582
632
  "display_amount_remaining": "$75.00",
@@ -584,90 +634,68 @@ Events: `store_credit.created`, `store_credit.updated`, `store_credit.deleted`
584
634
  }
585
635
  ```
586
636
 
587
- ## Refund Events
588
-
589
- Events: `refund.created`, `refund.updated`, `refund.deleted`
590
-
591
- ```json
592
- {
593
- "id": "ref_7xRt4wPq",
594
- "amount": "29.99",
595
- "transaction_id": "txn_abc123",
596
- "payment_id": "pay_3wXz7mRp",
597
- "refund_reason_id": "rr_2wMn9xPq",
598
- "reimbursement_id": "rei_3xLq8nRt",
599
- "created_at": "2025-01-20T10:00:00Z",
600
- "updated_at": "2025-01-20T10:00:00Z"
601
- }
602
- ```
637
+ ## Return Events
603
638
 
604
- ## Reimbursement Events
639
+ Events: `return.created`, `return.updated`, `return.deleted`, `return.requested`, `return.approved`, `return.received`, `return.refunded`, `return.canceled`
605
640
 
606
- Events: `reimbursement.created`, `reimbursement.updated`, `reimbursement.deleted`
641
+ The returned items are not included. Fetch the return from the API with `expand=return_line_items` when you need them.
607
642
 
608
643
  ```json
609
644
  {
610
- "id": "rei_3xLq8nRt",
611
- "number": "RI123456789",
612
- "reimbursement_status": "reimbursed",
613
- "total": "29.99",
645
+ "id": "ret_8mXz3wPq",
646
+ "number": "RET123456789",
647
+ "status": "received",
614
648
  "order_id": "or_m3Rp9wXz",
615
- "customer_return_id": "cr_4xLq8nRt",
616
- "created_at": "2025-01-20T10:00:00Z",
617
- "updated_at": "2025-01-20T10:00:00Z"
649
+ "reason_id": "rar_9xPq4wMn",
650
+ "refund_total": "0.0",
651
+ "display_refund_total": "$0.00",
652
+ "approved_at": "2025-01-18T10:00:00Z",
653
+ "received_at": "2025-01-20T10:00:00Z",
654
+ "refunded_at": null,
655
+ "canceled_at": null
618
656
  }
619
657
  ```
620
658
 
621
- ## Return Authorization Events
659
+ ## Exchange Events
622
660
 
623
- Events: `return_authorization.created`, `return_authorization.updated`, `return_authorization.deleted`
661
+ Events: `exchange.created`, `exchange.updated`, `exchange.deleted`, `exchange.requested`, `exchange.approved`, `exchange.received`, `exchange.fulfilled`, `exchange.canceled`
624
662
 
625
663
  ```json
626
664
  {
627
- "id": "ra_8mXz3wPq",
628
- "number": "RA123456789",
629
- "state": "authorized",
665
+ "id": "exch_4xLq8nRt",
666
+ "number": "EX123456789",
667
+ "status": "approved",
630
668
  "order_id": "or_m3Rp9wXz",
631
- "stock_location_id": "sl_2wMn7xRt",
632
- "return_authorization_reason_id": "rar_9xPq4wMn",
633
- "created_at": "2025-01-18T10:00:00Z",
634
- "updated_at": "2025-01-18T10:00:00Z"
669
+ "reason_id": "rar_9xPq4wMn",
670
+ "price_difference": "0.0",
671
+ "display_price_difference": "$0.00",
672
+ "approved_at": "2025-01-18T10:00:00Z",
673
+ "received_at": null,
674
+ "fulfilled_at": null,
675
+ "canceled_at": null
635
676
  }
636
677
  ```
637
678
 
638
- ## Return Item Events
679
+ ## Claim Events
639
680
 
640
- Events: `return_item.created`, `return_item.updated`, `return_item.deleted`
681
+ Events: `claim.created`, `claim.updated`, `claim.deleted`, `claim.opened`, `claim.approved`, `claim.resolved`, `claim.denied`, `claim.canceled`
641
682
 
642
- ```json
643
- {
644
- "id": "ri_9xPq4wMn",
645
- "reception_status": "received",
646
- "acceptance_status": "accepted",
647
- "pre_tax_amount": "29.99",
648
- "included_tax_total": "0.00",
649
- "additional_tax_total": "2.40",
650
- "inventory_unit_id": "iu_2wMn7xRt",
651
- "return_authorization_id": "ra_8mXz3wPq",
652
- "customer_return_id": "cr_4xLq8nRt",
653
- "reimbursement_id": "rei_3xLq8nRt",
654
- "exchange_variant_id": null,
655
- "created_at": "2025-01-19T10:00:00Z",
656
- "updated_at": "2025-01-19T10:00:00Z"
657
- }
658
- ```
659
-
660
- ## Customer Return Events
661
-
662
- Events: `customer_return.created`, `customer_return.updated`, `customer_return.deleted`
683
+ The `resolution` field is `refund`, `replacement`, `refund_and_replacement`, or `null` until the claim is resolved.
663
684
 
664
685
  ```json
665
686
  {
666
- "id": "cr_4xLq8nRt",
667
- "number": "CR123456789",
668
- "stock_location_id": "sl_2wMn7xRt",
669
- "created_at": "2025-01-19T10:00:00Z",
670
- "updated_at": "2025-01-19T10:00:00Z"
687
+ "id": "claim_2wMn9xPq",
688
+ "number": "CLM123456789",
689
+ "status": "resolved",
690
+ "resolution": "refund",
691
+ "order_id": "or_m3Rp9wXz",
692
+ "reason_id": "clr_3xLq8nRt",
693
+ "refund_total": "29.99",
694
+ "display_refund_total": "$29.99",
695
+ "approved_at": "2025-01-18T10:00:00Z",
696
+ "resolved_at": "2025-01-19T10:00:00Z",
697
+ "denied_at": null,
698
+ "canceled_at": null
671
699
  }
672
700
  ```
673
701
 
@@ -675,7 +703,7 @@ Events: `customer_return.created`, `customer_return.updated`, `customer_return.d
675
703
 
676
704
  Events: `wishlist.created`, `wishlist.updated`, `wishlist.deleted`
677
705
 
678
- Wishlist items are a conditional association and are not included in event payloads.
706
+ Wishlist items are not included in wishlist event payloads.
679
707
 
680
708
  ```json
681
709
  {
@@ -683,77 +711,41 @@ Wishlist items are a conditional association and are not included in event paylo
683
711
  "name": "My Wishlist",
684
712
  "token": "abc123def456",
685
713
  "is_default": true,
686
- "is_private": true,
687
- "created_at": "2025-01-01T00:00:00Z",
688
- "updated_at": "2025-01-15T10:00:00Z"
714
+ "is_private": true
689
715
  }
690
716
  ```
691
717
 
692
- ## Wished Item Events
718
+ ## Wishlist Item Events
693
719
 
694
- Events: `wished_item.created`, `wished_item.updated`, `wished_item.deleted`
720
+ Events: `wishlist_item.created`, `wishlist_item.updated`, `wishlist_item.deleted`
695
721
 
696
- Wished item payloads include a nested `variant`.
722
+ Wishlist item payloads include a nested `variant`.
697
723
 
698
724
  ```json
699
725
  {
700
726
  "id": "wi_6nRt2xLq",
701
- "variant_id": "var_k5nR8xLq",
727
+ "variant_id": "variant_k5nR8xLq",
728
+ "product_id": "prod_86Rf07xd4z",
702
729
  "wishlist_id": "wl_5wPq9mXz",
703
730
  "quantity": 1,
704
- "created_at": "2025-01-15T10:00:00Z",
705
- "updated_at": "2025-01-15T10:00:00Z",
706
731
  "variant": {
707
- "id": "var_k5nR8xLq",
732
+ "id": "variant_k5nR8xLq",
708
733
  "..."
709
734
  }
710
735
  }
711
736
  ```
712
737
 
713
- ## Post Events
714
-
715
- Events: `post.created`, `post.updated`, `post.deleted`
716
-
717
- ```json
718
- {
719
- "id": "post_7xRt4wPq",
720
- "title": "Summer Collection 2025",
721
- "slug": "summer-collection-2025",
722
- "meta_title": "Summer Collection | My Store",
723
- "meta_description": "Discover our new summer collection",
724
- "published_at": "2025-06-01T00:00:00Z",
725
- "author_id": "adm_8mXz3wPq",
726
- "post_category_id": "pcat_9xPq4wMn",
727
- "created_at": "2025-05-15T10:00:00Z",
728
- "updated_at": "2025-05-15T10:00:00Z"
729
- }
730
- ```
731
-
732
- ## Post Category Events
733
-
734
- Events: `post_category.created`, `post_category.updated`, `post_category.deleted`
735
-
736
- ```json
737
- {
738
- "id": "pcat_9xPq4wMn",
739
- "title": "News",
740
- "slug": "news",
741
- "created_at": "2025-01-01T00:00:00Z",
742
- "updated_at": "2025-01-01T00:00:00Z"
743
- }
744
- ```
745
-
746
738
  ## Newsletter Subscriber Events
747
739
 
748
- Events: `newsletter_subscriber.created`, `newsletter_subscriber.updated`, `newsletter_subscriber.deleted`
740
+ Events: `newsletter_subscriber.created`, `newsletter_subscriber.updated`, `newsletter_subscriber.deleted`, `newsletter_subscriber.subscription_requested`, `newsletter_subscriber.verified`, `newsletter_subscriber.unsubscribe_requested`
749
741
 
750
742
  ```json
751
743
  {
752
- "id": "ns_2wMn9xPq",
744
+ "id": "sub_2wMn9xPq",
753
745
  "email": "subscriber@example.com",
754
746
  "verified": true,
755
747
  "verified_at": "2025-01-02T10:00:00Z",
756
- "user_id": "usr_k5nR8xLq",
748
+ "customer_id": "cust_k5nR8xLq",
757
749
  "created_at": "2025-01-01T00:00:00Z",
758
750
  "updated_at": "2025-01-02T10:00:00Z"
759
751
  }
@@ -763,14 +755,10 @@ Events: `newsletter_subscriber.created`, `newsletter_subscriber.updated`, `newsl
763
755
 
764
756
  Events: `digital_asset.created`, `digital_asset.updated`, `digital_asset.deleted`
765
757
 
766
- The legacy `digital.created` / `digital.updated` / `digital.deleted` names are
767
- still emitted alongside these, but will stop being sent in a future release —
768
- subscribe to the `digital_asset.*` names.
769
-
770
758
  ```json
771
759
  {
772
760
  "id": "dig_3xLq8nRt",
773
- "variant_id": "var_k5nR8xLq",
761
+ "variant_id": "variant_k5nR8xLq",
774
762
  "filename": "ebook.pdf",
775
763
  "content_type": "application/pdf"
776
764
  }
@@ -793,24 +781,24 @@ file, after the access counter has been incremented.
793
781
  "expires_at": "2025-01-22T10:30:00Z",
794
782
  "authorizable": true,
795
783
  "expired": false,
796
- "access_limit_exceeded": false,
797
- "created_at": "2025-01-15T10:30:00Z",
798
- "updated_at": "2025-01-15T12:00:00Z"
784
+ "access_limit_exceeded": false
799
785
  }
800
786
  ```
801
787
 
802
788
  ## Import Events
803
789
 
804
- Events: `import.created`, `import.updated`, `import.deleted`
790
+ Events: `import.created`, `import.updated`, `import.deleted`, `import.progress`, `import.completed`
805
791
 
806
792
  ```json
807
793
  {
808
794
  "id": "imp_5wPq9mXz",
809
- "number": "I123456789",
810
- "type": "Spree::Imports::Products",
795
+ "number": "IM123456789",
796
+ "type": "products",
811
797
  "status": "completed",
812
- "owner_type": "Spree::Store",
813
- "owner_id": "str_9xPq2wMn",
798
+ "store_id": "store_9xPq2wMn",
799
+ "seller_id": null,
800
+ "owner_type": "store",
801
+ "owner_id": "store_9xPq2wMn",
814
802
  "user_id": "adm_8mXz3wPq",
815
803
  "rows_count": 150,
816
804
  "created_at": "2025-01-15T10:00:00Z",
@@ -820,16 +808,16 @@ Events: `import.created`, `import.updated`, `import.deleted`
820
808
 
821
809
  ## Import Row Events
822
810
 
823
- Events: `import_row.created`, `import_row.updated`, `import_row.deleted`
811
+ Events: `import_row.completed`, `import_row.failed`
824
812
 
825
813
  ```json
826
814
  {
827
- "id": "ir_6nRt2xLq",
815
+ "id": "imrow_6nRt2xLq",
828
816
  "import_id": "imp_5wPq9mXz",
829
817
  "row_number": 42,
830
- "status": "success",
818
+ "status": "completed",
831
819
  "validation_errors": [],
832
- "item_type": "Spree::Product",
820
+ "item_type": "product",
833
821
  "item_id": "prod_86Rf07xd4z",
834
822
  "created_at": "2025-01-15T10:01:00Z",
835
823
  "updated_at": "2025-01-15T10:01:00Z"
@@ -843,8 +831,8 @@ Events: `export.created`, `export.updated`, `export.deleted`
843
831
  ```json
844
832
  {
845
833
  "id": "exp_7xRt4wPq",
846
- "number": "E123456789",
847
- "type": "Spree::Exports::Products",
834
+ "number": "EF123456789",
835
+ "type": "products",
848
836
  "format": "csv",
849
837
  "user_id": "adm_8mXz3wPq",
850
838
  "created_at": "2025-01-15T10:00:00Z",
@@ -852,35 +840,18 @@ Events: `export.created`, `export.updated`, `export.deleted`
852
840
  }
853
841
  ```
854
842
 
855
- ## Report Events
856
-
857
- Events: `report.created`, `report.updated`, `report.deleted`
858
-
859
- ```json
860
- {
861
- "id": "rep_8mXz3wPq",
862
- "type": "Spree::Reports::SalesByProduct",
863
- "user_id": "adm_8mXz3wPq",
864
- "currency": "USD",
865
- "date_from": "2025-01-01T00:00:00Z",
866
- "date_to": "2025-01-31T23:59:59Z",
867
- "created_at": "2025-02-01T10:00:00Z",
868
- "updated_at": "2025-02-01T10:00:00Z"
869
- }
870
- ```
871
-
872
843
  ## Invitation Events
873
844
 
874
- Events: `invitation.created`, `invitation.updated`, `invitation.deleted`
845
+ Events: `invitation.created`, `invitation.resent`, `invitation.accepted`
875
846
 
876
847
  ```json
877
848
  {
878
849
  "id": "inv_9xPq4wMn",
879
850
  "email": "newadmin@example.com",
880
851
  "status": "pending",
881
- "resource_type": "Spree::Store",
882
- "resource_id": "str_9xPq2wMn",
883
- "inviter_type": "Spree::AdminUser",
852
+ "resource_type": "store",
853
+ "resource_id": "store_9xPq2wMn",
854
+ "inviter_type": "admin_user",
884
855
  "inviter_id": "adm_8mXz3wPq",
885
856
  "invitee_type": null,
886
857
  "invitee_id": null,
@@ -891,3 +862,27 @@ Events: `invitation.created`, `invitation.updated`, `invitation.deleted`
891
862
  "updated_at": "2025-01-15T10:00:00Z"
892
863
  }
893
864
  ```
865
+
866
+ ## Other Events
867
+
868
+ These resources publish events too. Their payloads use the same serializers as the matching API responses.
869
+
870
+ | Resource | Events |
871
+ |---|---|
872
+ | Delivery (a tracked parcel within a fulfillment) | `delivery.created`, `delivery.updated`, `delivery.deleted` |
873
+ | Shipping label | `shipping_label.created`, `shipping_label.updated`, `shipping_label.deleted`, `shipping_label.purchased`, `shipping_label.refunded` |
874
+ | Stock reservation | `stock_reservation.created`, `stock_reservation.updated`, `stock_reservation.deleted` |
875
+ | Purchase order | `purchase_order.created`, `purchase_order.updated`, `purchase_order.deleted`, `purchase_order.draft`, `purchase_order.ordered`, `purchase_order.partially_received`, `purchase_order.received`, `purchase_order.over_received`, `purchase_order.canceled` |
876
+ | Stock receipt | `stock_receipt.created`, `stock_receipt.updated`, `stock_receipt.deleted` |
877
+ | Supplier | `supplier.created`, `supplier.updated`, `supplier.deleted` |
878
+ | Catalog | `catalog.created`, `catalog.updated`, `catalog.deleted` |
879
+ | Saved report | `saved_report.created`, `saved_report.updated`, `saved_report.deleted` |
880
+ | Data request (customer data export or erasure) | `data_request.created`, `data_request.updated`, `data_request.deleted`, `data_request.completed` |
881
+ | Company | `company.created`, `company.updated`, `company.deleted` |
882
+ | Company invitation | `company_invitation.created`, `company_invitation.updated`, `company_invitation.deleted`, `company_invitation.accepted`, `company_invitation.revoked` |
883
+ | Tax identifier | `tax_identifier.number_changed` |
884
+ | Tax exemption certificate | `tax_exemption_certificate.verified` |
885
+ | Seller | `seller.created`, `seller.updated`, `seller.deleted`, `seller.invited`, `seller.onboarding_started`, `seller.submitted_for_review`, `seller.approved`, `seller.rejected`, `seller.suspended`, `seller.onboarding_reopened` |
886
+ | Seller requirement submission | `seller_requirement_submission.created`, `seller_requirement_submission.updated`, `seller_requirement_submission.deleted`, `seller_requirement_submission.accepted`, `seller_requirement_submission.rejected`, `seller_requirement_submission.waived` |
887
+ | Seller payout | `seller_payout.completed` |
888
+ | Product submission | `product_submission.created`, `product_submission.updated`, `product_submission.deleted` |