# Remove requeriment for "payload" on the JSON request

**URL:** <https://community.quickfile.co.uk/t/remove-requeriment-for-payload-on-the-json-request/47969>\
**Category:** Extensibility\
**Created:** [26 August 2022 20:33 UTC](https://community.quickfile.co.uk/t/remove-requeriment-for-payload-on-the-json-request/47969 "2022-08-26T20:33:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![expertoswp](https://qfcommunity.b-cdn.net/letter_avatar_proxy/v4/letter/e/b19c9b/32.png) [@expertoswp](https://community.quickfile.co.uk/u/expertoswp)\
**Post date:** [26 August 2022 20:33 UTC](https://community.quickfile.co.uk/t/remove-requeriment-for-payload-on-the-json-request/47969/1 "2022-08-26T20:33:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![QFMathew](https://qfcommunity.b-cdn.net/user_avatar/community.quickfile.co.uk/qfmathew/32/12493_2.png) [@QFMathew](https://community.quickfile.co.uk/u/QFMathew)\
**Post date:** [27 August 2022 09:34 UTC](https://community.quickfile.co.uk/t/remove-requeriment-for-payload-on-the-json-request/47969/2 "2022-08-27T09:34:25Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![expertoswp](https://qfcommunity.b-cdn.net/letter_avatar_proxy/v4/letter/e/b19c9b/32.png) [@expertoswp](https://community.quickfile.co.uk/u/expertoswp)\
**Post date:** [27 August 2022 10:17 UTC](https://community.quickfile.co.uk/t/remove-requeriment-for-payload-on-the-json-request/47969/3 "2022-08-27T10:17:42Z")

</div>

Could you show me an example on [requestbin.com](http://requestbin.com) or any other API tool that is using json?  
I tried:  
[requestbin.com](http://requestbin.com) and [pipedream.com](http://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

---

<div class="post-metadata">

**Author:** ![QFMathew](https://qfcommunity.b-cdn.net/user_avatar/community.quickfile.co.uk/qfmathew/32/12493_2.png) [@QFMathew](https://community.quickfile.co.uk/u/QFMathew)\
**Post date:** [27 August 2022 10:23 UTC](https://community.quickfile.co.uk/t/remove-requeriment-for-payload-on-the-json-request/47969/4 "2022-08-27T10:23:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![expertoswp](https://qfcommunity.b-cdn.net/letter_avatar_proxy/v4/letter/e/b19c9b/32.png) [@expertoswp](https://community.quickfile.co.uk/u/expertoswp)\
**Post date:** [27 August 2022 10:36 UTC](https://community.quickfile.co.uk/t/remove-requeriment-for-payload-on-the-json-request/47969/5 "2022-08-27T10:36:34Z")

</div>

You do have some examples:

> [@New endpoint for the API - No more SOAP!](https://community.quickfile.co.uk/t/new-endpoint-for-the-api-no-more-soap/524):
>
> Based on the feedback we’ve received from developers working with the [API](http://support.quickfile.co.uk/api_documentation.htm), the [SOAP protocol](http://en.wikipedia.org/wiki/SOAP) (Simple Object Access Protocol) did prove to add a great deal of friction when trying to programmatically post a simple request to the API. Every post needed to be wrapped in a SOAP Envelope, not only did this add extra payload to the request and response stream it was also very unforgiving if the envelope did not precisely confirm to the spec. Simple, cleaner API communication Today we have added a new…

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.

---

<div class="post-metadata">

**Author:** ![daithespark](https://qfcommunity.b-cdn.net/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@daithespark](https://community.quickfile.co.uk/u/daithespark)\
**Post date:** [27 August 2022 15:28 UTC](https://community.quickfile.co.uk/t/remove-requeriment-for-payload-on-the-json-request/47969/6 "2022-08-27T15:28:15Z")

</div>

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](https://api.quickfile.co.uk/d/v1_2/Client_Create)

---

<div class="post-metadata">

**Author:** ![expertoswp](https://qfcommunity.b-cdn.net/letter_avatar_proxy/v4/letter/e/b19c9b/32.png) [@expertoswp](https://community.quickfile.co.uk/u/expertoswp)\
**Post date:** [27 August 2022 15:46 UTC](https://community.quickfile.co.uk/t/remove-requeriment-for-payload-on-the-json-request/47969/7 "2022-08-27T15:46:27Z")

</div>

Thank you for your help. 🙂  
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. 🙂
