[POST]/code-tracking/transaction
POST https://sb-api.studentbeans.com/code-tracking/transaction
This endpoint allows you to record the use of a Student Beans voucher code from a transaction.
Body Params
| Field | Type | Description |
|---|---|---|
| brandUid [required] | string | A unique ID attached to your brand issued by Pion. The brandUid is unique per country. |
| code [required] | string | The code supplied by your brand and issued from a Student Beans platform that is then applied at checkout. |
| transactionValue [required] | float | The value of the transaction up to two decimal places as a float. For example, if the transaction value is £10.00, you would enter 10.0 or 10.00 and not "£10", 10 or "10.0". |
| qualifyingAmount [required] | float | The value of the transactionValue that is eligible to be discounted, up to two decimal places as a float. For example, if the qualifying amount is £1.50, you would enter 1.5 or 1.50 and not "£1.50", or "1.5". |
| currency [required] | string | The ISO 4217 currency code for the locale of the transaction. |
| timestamp [required] | integer | The timestamp of the transaction between the customer and your brand, in UTC, as Unix Epoch time in seconds. |
| newUser | boolean | Boolean value that determines whether the transaction is a new user. |
| productsOrderedSku | array of strings | An array of string SKU’s for the products purchased as part of the transaction. |
| productsOrderedName | array of strings | An array of string product names purchased as part of the transaction. |
| userAgent | string | The user agent the transaction has been completed from. |
Headers
| Content-Type | application-json |
| User-Agent | <product>/<product_version> <comment> |
| api-key | <generated-by-student-beans> |