Skip to main content
POST
/
v1
/
rewards
/
{id}
/
codes
/
{codeId}
/
redeem
Redeem reward code
curl --request POST \
  --url https://api.oneofnone.io/v1/rewards/{id}/codes/{codeId}/redeem \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "redeemedBy": "<string>",
  "orderId": "<string>",
  "externalOrderId": "<string>"
}
'
{
  "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.

Authorizations

x-api-key
string
header
required

Path Parameters

id
string<uuid>
required
codeId
string<uuid>
required

Body

application/json
redeemedBy
string | null
Required string length: 1 - 500
orderId
string | null
Required string length: 1 - 500
externalOrderId
string | null
Required string length: 1 - 500

Response

object | null

Successful response

id
string<uuid>
required
rewardId
string<uuid>
required
code
string
required
status
enum<string>
required
Available options:
available,
reserved,
redeemed,
expired,
revoked
reservedFor
string | null
required
redeemedBy
string | null
required
redeemedAt
string | null
required
orderId
string | null
required
externalOrderId
string | null
required
createdAt
string
required
expiresAt
string | null
required
updatedAt
string | null
required
externalIds
object
required