API referencePlugin contractFunctions
Issue Keys
POST
/functions/issue-keysRequest 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})$variantId*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})$quantity*integer
Range
1 <= value <= 100saleRef*string
Length
1 <= length <= 128issuedForPluginCode*string
Response Body
application/json
application/json
curl -X POST "https://example.com/functions/issue-keys" \ -H "Content-Type: application/json" \ -d '{ "storeId": "string", "variantId": "string", "quantity": 1, "saleRef": "string", "issuedForPluginCode": "string" }'{ "keys": [ "string" ]}