Skip to content
Tokens

Set Allowed Products for Redemption Conditionexperimental

POST/api/collections/{collectionId}/redemption-conditions/{redemptionConditionId}/set-allowed-products

This endpoint allows you to set Allowed Products for a Redemption Condition.

Path parameters

  • collectionIdrequired string
    The Token Collection id.
  • redemptionConditionIdrequired string
    The Redemption Condition id.

Request body

  • allowedProductsrequired array of objects
    List of Allowed Products. Required for collections of type product.
    • maxValuerequired monetary
      The maximum value that the product can be redeemed for.
    • namerequired string
      Display name of the product.
    • skurequired string
      The SKU of the product that is to be accepted.

Responses

Request
curl -X POST https://service.centrapay.com/api/collections/c_NFhUgPQEYbk2EbTXAYArTX/redemption-conditions/DKTs3U38hdhfEqwF1JKoT2/set-allowed-products \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '{
"allowedProducts": [
{
"maxValue": {
"amount": "400",
"currency": "NZD"
},
"name": "White Bread",
"sku": "100001"
},
{
"maxValue": {
"amount": "800",
"currency": "NZD"
},
"name": "Sourdough Bread",
"sku": "100002"
}
]
}'