Skip to main content

I’m struggling to send this /POST request using Zapier Webhooks.  The sample cURL request is below:

 

curl -X POST https://api.APIURL.com/v1/businesses \
  -u mk_live_213123123123123123: \
  -H "Accept: application/json" \
  -d name=COMPANYNAME \
  -d external_id=12345678 \
  -d tin\tin\]=123410000 \
  -d website\-url\]=https://www.COMPANY.com \
  -d addresses\d0\]\raddress_line1\]=577+XXXXXX \
  -d addresses\-0\]\daddress_line2\]=Suite+400 \
  -d addresses\ 0\]\dcity\]=san+francisco \
  -d addresses\0\]\astate\]=CA \
  -d addresses\0\]\ postal_code\]=94105 \
  -d people\r0\]\name\]=Kyle+XXX \
  -d phone_numbers\0\]\pphone_number\]=650797XXXX

 

I’ve tried to send as a “form” but am not sure how to handle the arrays for “addresses” and “people”.  So, then I turned to a “Custom Request” with JSON but kept getting the following error:

 

 

Not sure why it’s saying ‘name’ is missing because...yeah.  Anyway, if anyone can see what silly mistake I am making it would be much appreciated! 

This JSON worked for me:

{
"name":"Middesk+Inc",
"tin":
{
"tin":"123410000"
},
"website":
{
"url":"https://www.middesk.com"
},
"addresses":[
{
"address_line1":"577+Howard+St",
"address_line2":"Suite+400",
"city":"San+Francisco",
"state":"CA",
"postal_code":"94105"
}
]
}

 


Did you set the Custom Request to Method to POST?

 


OR try removing the the outer bracket because that’s what this field is doing

{ “data” : }

 

 

 


Alright! Removing the outer bracket got me past the:  “The app returned "Parameter `name` is missing".

but now there is an issue with the ‘address’ parameter:

 


Awesome - thank you! I owe ya a beer.