Prizes

The Prize Object

A Prize is the record you create when you want to award a prize (either an inventory item such as a concert ticket, or a cash prize) to a listener.

Prize Types

There are 3 types of Prize in Audata - Cash, Inventory, and List prizes. This is represented in the prize_type attribute of the Prize object.

  • Cash - a prize with a cash value.
  • Inventory - an inventory item (e.g. concert tickets, a gift card).
  • List - instead of winning a prize, the listener is added to a List (usually used to put listeners into a draw for a bigger prize down the track.
ValueTypeDescription
uuidstringPrize UUID.
prize_numberintegerPrize number.
prize_typestringPrize type.
descriptionstringPrize description.
cash_amountnumberCash amount.
inventory_qtyintegerInventory quantity.
list_qtyintegerList quantity.
valuenumberPrize value.
phone_numberstringPhone number.
confirmed_atstringConfirmed timestamp.
fulfilled_atstringFulfilled timestamp.
collected_atstringCollected timestamp.
statusobjectSerialized PrizeStatus object via PrizeStatusBlueprint when present.
campaignobjectSerialized Campaign object via CampaignBlueprint when present.
listenerobjectSerialized Listener object via ListenerBlueprint when present.
inventory_itemobjectSerialized InventoryItem object via InventoryItemBlueprint when present.
listobjectSerialized List object via ListBlueprint when present.
station_uuidstringStation UUID when station_id is present.
created_atstringRecord creation timestamp.
updated_atstringRecord update timestamp.

Awarding Prizes

Awarding Prizes without a Listener ID

You can award prizes without a Listener record and Audata will trigger the configured notification rules for your instance. Typically, and by default, Audata will send an SMS message to the prize winner with their redemption link and collect their details. Once the Listener has provided their details, the Prize will move to its Confirmed status, and an associated Listener record will be created for the Prize.

The below cURL request shows an example of creating a Prize without a Listener ID...

curl --request POST \
  --url https://promo.audata.io/api/v1/prizes \
  --header 'authorization: Bearer YOUR_API_KEY' \
  --header 'content-type: application/json' \
  --data '{"prize":{"phone_number":"0412123456","prize_type":"cash","cash_amount":"50.00"}}'

In the above example, we are awarding a cash prize of $50.00 (in local currency) to a specified phone number.

Awarding Prizes with a Listener ID

There are times you may not want to rely on the Audata Promo automation features, and instead provide the winner details yourself. For example, you may already have the winners information in some kind of local database, and you want to award them a prize using Audata. To do this, you simply create a Listener record, and then pass the listener_id parameter along with your Prize.

curl --request POST \
  --url https://promo.audata.io/api/v1/prizes \
  --header 'authorization: Bearer YOUR_API_KEY' \
  --header 'content-type: application/json' \
  --data '{"prize":{"listener_id":123,"prize_type":"inventory","inventory_item_id":12345,"inventory_qty":1}}'