Hi
Trying to send data from my DB (xano) to the API for Ticket Tailor (an event ticketing platform) to create bulk discount codes.
I keep getting the following error:
{
"error_code": "VALIDATION_ERROR",
"message": "Type of discount must be included in the request",
"status": 400
}
But the required key value of “type”: “percentage” is in my request body.
My body is:
{
"code": "{code}",
"max_redemptions": "{max_redemptions}",
"name": "{Code Name}",
"price_percent": 25,
"ticket_types": [
"tt_3092588",
"tt_3092589",
"tt_3092590",
"tt_3312545"
],
"type": "percentage"
}
The Parabola sent request is:
{
"auth": {
"username": "(my-api-key)"
},
"data": {
"code": "6KUUC12H",
"max_redemptions": "1",
"name": "Jason_PRO_discount",
"price_percent": 25,
"ticket_types": [
"tt_3092588",
"tt_3092589",
"tt_3092590",
"tt_3312545"
],
"type": "percentage"
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/x-www-form-urlencoded"
},
"method": "POST",
"url": "https://api.tickettailor.com/v1/discounts"
}
I believe I have followed their docs to the letter. Their support isn’t proving very helpful.
https://developers.tickettailor.com/#create-a-discount-code
Anyone got any clues to why this isnt working?
Is my request body the correct format for a x-www-form-urlencoded POST request?
Cheers
~James