Every award activity can be modified using this API. You can change the custom attributes for each activity as well as the predefined attributes.
Let's take the example of made_a_purchase activity:
Mandatory attributes are order_total and order_subtotal.
A sample structure of the transaction_attributes for the made_a_purchase activity is given below:
{
"tags" : ["tag1","tag2"],
"reason" : "purchase",
"coupons" : "$5OFFVYZ",
"order_total" : "1000",
"order_subtotal" : "1000",
"products" : [{
"product_id": "112",
"product_quantity": "1",
"product_category": "tshirt",
"product_price": "15",
"product_title": "Sweatshirt",
"product_image_url": ""
},
{
"product_id": "980",
"product_quantity": "2",
"product_category": "Sales",
"product_price": "10.017",
"product_title": "Pant",
"product_image_url": ""
}]
}
Note: You cannot modify the upload_a_photo, submit_a_receipt and code_submission activities.
We are also accepting product quantities in decimal values.