Hi,
I am trying to connect to an API using API connector.
This is my API end point requirement:
I can’t figure out how to create the JSON for this with or without dynamic data. The problem is the nested object “customer”. Whenever I add it with or without dynamic data, I am getting error from API.
Var 1:
{
"amount":"<amount>",
"type":"<type>",
"description":"<description>",
"customer":{
"name":"<customer_name>",
"email":"<customer_email>",
"contact":"<customer_contact>"
},
"callback_url":"<callback_url>",
"callback_method":"<callback_method>"
}
Var 2:
{
"customer":[{
"name":"bbb",
"email":"bbb@beegle.app",
"contact":"9880728522"
}],
"amount":"<amount>",
"type":"<type>",
"description":"<description>",
"callback_url":"<callback_url>",
"callback_method":"<callback_method>"
}
Var 3:
{
"amount":"<amount>",
"type":"<type>",
"description":"<description>",
"name":"<customer_name>",
"email":"<customer_email>",
"contact":"<customer_contact>",
"callback_url":"<callback_url>"
}
Var 4:
{
"amount":"<amount>",
"type":"<type>",
"description":"<description>",
"customer":[
"name":"<customer_name>",
"email":"<customer_email>",
"contact":"<customer_contact>"
],
"callback_url":"<callback_url>",
"callback_method":"<callback_method>"
}
Var 5:
{
"amount":"<amount>",
"type":"<type>",
"description":"<description>",
"customer": {
"name": "Jay",
"email": "jay@beegle.app",
"contact": "9880728771"
},
"callback_url":"<callback_url>"
}
What am I doing wrong and what is the right syntax?
Please note that API is hitting fine if i remove “customer” section as it is optional. So, I have got all other things like content-type etc set correctly. It is just this nested element that I am not getting right.
Please also note that I have had a look at several threads including following, but couldn’t get right answer:
Thanks,
Mukesh