API post failing

Hi Everyone,

I want to call a POST API with the following data:

Authorization: tokennumber
Host: apiURL
Accept: application/json

    {
        "uuid": "uuidnumber",
        "workitemdata": [
            {"workcategorydata_uuid":"uuidnumber",
            "value":"3"}
        ]
    }

I'm having problems with the second key "Workitemdata'. There's something wrong in my block but I just don't find it. The problem is somewere in the PostText block.

put your JSON string together manually using the join block from the text drawer...
also I'm not sure, if the dictionary blocks can be used as replacement for the list blocks in the header...
and it should be Content-Type application/json rather than Accept application/json

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Hi Taifun,

Thanks for your quick reply.
The header block is correct, for my other API's it's working fine with the same headers.

Try like this:

your blocks were not creating the "list"

(I used external input to reduce the length of the blocks)

You may not need the Build Request Data block either....