I’m trying to Create an Appointment Using Post. I have tried the ‘Try’ feature on that page with every conceivable input permutation. It always returns ‘0’ no response from server. From my app I get ‘400’ Bad Request.
From my app I have tried putting the access token in the query string ‘?access_token=’ as well as in the ‘Authorization’ header. I can GET and PUT without issue.
{“contact_id”:17,“description”:“Cutout stuff on the laser.”,“end_date”:“2020-02-07T17:00:00.000Z”,“location”:“Shop”,“remind_time”:0,“start_date”:“2020-02-07T20:00:00.000Z”,“title”:“Laser Shenanigans”,“user”:1}
.Status.Code=400
.Status.Text=BadRequest
.ErrorString=WEX: ProtocolError The remote server returned an error: (400) Bad Request.
I’m not sure without digging down through the format conversions, but could you try an offset format of “2020-02-07T17:00:00.000-00:00” for the dates instead of “2020-02-07T17:00:00.000Z”?
{“contact_id”:17,“description”:“Cutout stuff on the laser.”,“end_date”:“2020-02-07T17:00:00.000-00:00”,“location”:“Shop”,“remind_time”:0,“start_date”:“2020-02-07T20:00:00.000-00:00”,“title”:“Laser Shenanigans”,“user”:1}
.Status.Code=400
.Status.Text=BadRequest
.ErrorString=WEX: ProtocolError The remote server returned an error: (400) Bad Request.
I would verify that Contact #17 exists in your application, that the Headers are correct (both are required), and that you aren’t receiving any additional error description with that status code; we generally provide a message should validation on a request fail.
Welp this is a head scratcher. I copied and pasted your json and it worked. I’ll go over mine to see where I’ve got the typo. Thanks for the assist. I’ll update this post when I find the specific cause.