x-api-key: ********************
{
"userId": "123e4567-e89b-12d3-a456-426614174000",
"rewardId": "123e4567-e89b-12d3-a456-426614174333",
"collectionId": "123e4567-e89b-12d3-a456-426614174222"
}
curl --location --request POST 'https://testserver.loyi.io/public/api/reward/entry-code' \
--header 'Origin;' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": "123e4567-e89b-12d3-a456-426614174000",
"rewardId": "123e4567-e89b-12d3-a456-426614174333",
"collectionId": "123e4567-e89b-12d3-a456-426614174222"
}'
{
"id": "123e4567-e89b-12d3-a456-426614174111",
"userId": "123e4567-e89b-12d3-a456-426614174000",
"rewardId": "123e4567-e89b-12d3-a456-426614174333",
"contractAddress": "0x1234567890abcdef1234567890abcdef",
"entryCode": "ABC123",
"expiresAt": "2022-01-01T00:00:00.000Z",
"lastScannedAt": null,
"createdAt": "2022-01-01T00:00:00.000Z",
"updatedAt": "2022-01-01T00:00:00.000Z"
}