@spree/docs 0.1.287 → 0.1.288

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.
@@ -199,7 +199,30 @@ curl -X PATCH 'https://api.mystore.com/api/v3/admin/orders/or_xxx/claims/claim_x
199
199
 
200
200
  A replacement creates a new [fulfillment](fulfillments.md) on the original order, so the customer doesn't have to place a second one.
201
201
 
202
- The replacement is filed under the order line it replaces, but it doesn't count toward that line's quantity. Editing the line later, from a claim or an [exchange](#exchanges), adds or removes only the goods the customer paid for and leaves the replacement where it is.
202
+ The replacement is filed under the order line it replaces, but it doesn't count toward that line's quantity. Editing the line later, from a claim or an [exchange](#exchanges), adds or removes only the goods the customer paid for and leaves the replacement where it is. Adding a fulfillment for that line works the same way: it takes only the goods the customer paid for, and the replacement stays in its own fulfillment.
203
+
204
+ If a replacement's fulfillment is canceled, for example because the courier lost the booking, send the goods again by naming that fulfillment as the source of a new one. The new fulfillment takes everything the canceled one held and reserves its stock again. It is priced like any new fulfillment, so pass `cost: 0` to carry over the canceled fulfillment's delivery cost instead, which keeps a free replacement free.
205
+
206
+
207
+ ```typescript Admin SDK
208
+ await adminClient.orders.fulfillments.create('or_xxx', {
209
+ stock_location_id: 'sloc_xxx',
210
+ source_fulfillment_id: 'ful_xxx', // the canceled replacement fulfillment
211
+ cost: 0,
212
+ })
213
+ ```
214
+
215
+ ```bash cURL
216
+ curl -X POST 'https://api.mystore.com/api/v3/admin/orders/or_xxx/fulfillments' \
217
+ -H 'X-Spree-API-Key: sk_xxx' \
218
+ -H 'Content-Type: application/json' \
219
+ -d '{
220
+ "stock_location_id": "sloc_xxx",
221
+ "source_fulfillment_id": "ful_xxx",
222
+ "cost": 0
223
+ }'
224
+ ```
225
+
203
226
 
204
227
  A claim never refunds more than the customer paid for the claimed items after discounts, tax included. Each claim line reports that ceiling as `paid_amount`, and the `refund_amount` you enter for a line includes its tax. The tax goes back in proportion to the money: refunding half of what a line is worth gives back half its tax, and resolving with a replacement alone gives none back.
205
228
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spree/docs",
3
- "version": "0.1.287",
3
+ "version": "0.1.288",
4
4
  "description": "Spree Commerce developer documentation for AI agents and local reference",
5
5
  "type": "module",
6
6
  "license": "CC-BY-4.0",