curl --request POST \
--url https://api.oneofnone.io/v1/rewards/{id}/codes/generate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"count": 250,
"prefix": "<string>"
}
'{
"codes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rewardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"reservedFor": "<string>",
"redeemedBy": "<string>",
"redeemedAt": "<string>",
"orderId": "<string>",
"externalOrderId": "<string>",
"createdAt": "<string>",
"expiresAt": "<string>",
"updatedAt": "<string>",
"externalIds": {
"shopify": {
"discountId": "<string>",
"codeId": "<string>",
"syncedAt": "<string>",
"error": "<string>"
},
"stripe": {
"discountId": "<string>",
"codeId": "<string>",
"syncedAt": "<string>",
"error": "<string>"
}
}
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.oneofnone.io/llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url https://api.oneofnone.io/v1/rewards/{id}/codes/generate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"count": 250,
"prefix": "<string>"
}
'{
"codes": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rewardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "<string>",
"reservedFor": "<string>",
"redeemedBy": "<string>",
"redeemedAt": "<string>",
"orderId": "<string>",
"externalOrderId": "<string>",
"createdAt": "<string>",
"expiresAt": "<string>",
"updatedAt": "<string>",
"externalIds": {
"shopify": {
"discountId": "<string>",
"codeId": "<string>",
"syncedAt": "<string>",
"error": "<string>"
},
"stripe": {
"discountId": "<string>",
"codeId": "<string>",
"syncedAt": "<string>",
"error": "<string>"
}
}
}
]
}