Remove requeriment for "payload" on the JSON request

Most http online tools allow to setup headers and body, but not to alter the whole request to add the word “payload” in front of it.
With XML this is not a requeriment, so we are trying to use that, but json is much easier for our needs.
I consider this a bug as I have not seen this type of requirement on any other API.

Thanks

Hi @expertoswp

Having a “payload” wrapper on our JSON API is a requirement for the API itself. Unfortunately, this isn’t something we’re going to remove.

However, if you’re having difficulties with any particular functions or endpoints, please don’t hesitate to post and I’m sure the community can help.

What coding language are you using?

Could you show me an example on requestbin.com or any other API tool that is using json?
I tried:
requestbin.com and pipedream.com, ansible, curl, integromat/make.com
None of them work, because you define body and header on separate places.
If you can provide an example with curl will help too.
Your api does not request that “payload” word on the XML and if you check that is what all examples are using, but I am happy to see an example working on any external tool.

Thanks

I don’t have access to examples, other than the ones in our API documentation and sandbox, but I’ll put a cURL example together for you later today, if that would help.

What coding language are you using? Is there anything in particular you’re having issues with when you’re using the API (e.g. any errors, formatting issues)? You’re welcome to share some code (with private data redacted) and we can try and help get this working for you

You do have some examples:

The problem I am having is that when you put all the pieces together, and you use any external tool, they ask you for the headers, the body, the URL and such.
They do not ask you for the whole payload.
On XML, we made that work (so we know the headers and auth are working), and the app and everything.
On XML; we ignore the headers of the request and put everything into the body, and that works.


I just tried the same with JSON, not sure why I did not try it before, and it works too.

Adding the whole thing into the body and not using the proper headers or the request works.

To me this is a poor implementation, headers are not real headers of the request but something you called headers on your body, you may call them “tokens” and it will work the same. Calling them headers makes everything more confusing and difficult to use.

At least I know understand and we can work with it but you should create a 2.0 and fix those things.

1 Like

Hi. I’m not a coder by a long shot but I found this link which may help. It shows a header and body together on the json part which I think means they go together. Sorry if thats not much help but hope it does help. Client_Create API Schema

Thank you for your help. :slight_smile:
We were aware of all those links and docs.
As I wrote on my last post, we were able to make it work at last, but imho, the design is poor and generates confusion, I hope this post help others not to spend weeks trying to figure it out like me. :slight_smile:

1 Like