Task API not generating new id

Hi there,

I am having some trouble creating a Task via the api, the route /api/v1/tasks/create gives back a empty json with only a user_id and the rest empty even the id.

in the headers i send
X-Api-Token : my-token-
X-Requested-With : XmlHtppRequest

thnx in advanced.

Hi,

Have you been able to create other entity types?

Hi,

I just tried the clients and credits, this results in the same behavior.
I get a an empty json object with only the user_id

any idea ?

Can you share a sample curl request?

Here it is, nothing fancy

curl -XGET -H ‘X-Api-Token: MYTOKEN’ -H ‘X-Requested-With: XMLHttpRequest’ ‘https://invoice.iftcontrol.com/api/v1/tasks/create
( have taken out the real API token)

You would need to send a POST request to create a new record

Thank you for the fast response.
But…
as the documentation states Build, Collaborate & Integrate APIs | SwaggerHub

it’s a GET .

With a POST i receive a 404.

I did some digging and saw that the UI is using a POST to create a new record but this is done by giving a negative number like “-606”.

Tried to replicate this but without success.

I believe you want to send a POST request to /tasks

And what about the id?

if we use a POST on the /tasks endpoint then we have to provide a json with an valid id
is there another way to get a new id ?

The id is automatically set by the app, it will be included in the response