API referencePlugin contractFunctions
Check Variant Stock
POST
/functions/check-variant-stockRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
storeId*string
Match
^([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})$variants*array<>
Items
1 <= itemsResponse Body
application/json
curl -X POST "https://example.com/functions/check-variant-stock" \ -H "Content-Type: application/json" \ -d '{ "storeId": "string", "variants": [ { "variantId": "string", "quantity": 1 } ] }'[ { "variantId": "string", "requested": 1, "available": 0 }]