VALIDATION_ERROR possible application/x-www-form-urlencoded issue?

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

Hey @Yes_Captain !

Taking a look at their docs and example payload, it seems like the sent request is configured properly. Would you be able to test using a fixed_amount and see if an error returns using that configuration?

Thanks,
Ayana

Hey Ayana

Thanks for taking a look. Nope. “fixed_discount” gives the same error.

Should a required field go somewhere else? I did try as a URL param and it didn’t work.

Hi @Yes_Captain - Do you mind sending over a link to your Flow to us at help@parabola.io so we can take a closer look at how your API step is set up?

Thanks Emory
I have emailed my flow.
Cheers
~James