I am having a hard time getting this API request to initialize:
curl --request POST
–url https://testflight.tremendous.com/api/v2/organizations
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ’
{
“name”: “ACME Inc.”,
“website”: “https://www.example.com/some-org”
}
I get following error prompt:
There was an issue setting up your call.
Raw response for the API
Status code 422
{“errors”:{“message”:“The JSON object contained in the request body was invalid - see Order schema for details and check the “payload” field in this error object for a list of invalid fields in your request”,“payload”:{“payment”:[“is missing”]}}}
Im still very new to API’s so please help understand what bubble is asking for.
close the single quote on your -data
-d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}'
see docs for order schema … ie as per the error, it needs a payment property in the json body that you have as -data
This how my syntax looks:
curl --request POST
–url https://testflight.tremendous.com/api/v2/orders/id
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–data ’
{
“external_id”: “Your-Individual-Identifier-for-This-Order”,
“payment”: { “funding_source_id”: “SOMEIDSOMEID”},
“rewards”: [{
“campaign_id”: “SOMEIDSOMEID”,
“products”: [“SOMEIDSOMEID”],
“value”: {
“denomination”: 50,“currency_code”: “USD”},
“delivery”: {
“method”: “EMAIL”},
“recipient”: {
“name”: “John Doe Jr.”,
“email”: “john.doe@example.com”,
“phone”: “123-456-7890”
}
}
]
}
’