Set Variant Stock
/api/product-deliveries/variants/{variantId}/stockSets the stock core sells a variant against, taking ownership of it for the calling plugin when no other delivering plugin owns it. The count is the plugin's absolute count; core subtracts the units still held by open checkouts and by paid orders the plugin has not delivered. A report naming deliveredOrderId releases that order's hold on this variant only; an order of several variants needs one report per variant.
Path Parameters
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= value <= 2147483647^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/product-deliveries/variants/string/stock" \ -H "Content-Type: application/json" \ -d '{ "stockOnHand": 0, "revision": 1 }'Deliver Variant PUT
Records that the calling plugin delivers this variant of the store, and whether it ships it to the buyer's address. Idempotent: the record exists once however often it is called, and holds the latest `ships`. Refused while the seller delivers the variant by webhook, which delivers it alone, and, for a delivery that ships, while a plugin owns the variant's stock.
Stop Delivering Variant DELETE
Removes the calling plugin's delivery records for this variant of the store; other deliveries stay.
