# Updating timeslip project or task fields causes 404

**URL:** <https://api-discuss.freeagent.com/t/updating-timeslip-project-or-task-fields-causes-404/1051>\
**Category:** Uncategorized\
**Created:** [2 September 2018 13:52 UTC](https://api-discuss.freeagent.com/t/updating-timeslip-project-or-task-fields-causes-404/1051 "2018-09-02T13:52:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![durhamhale](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/durhamhale/32/173_2.png) [@durhamhale](https://api-discuss.freeagent.com/u/durhamhale)\
**Post date:** [2 September 2018 13:52 UTC](https://api-discuss.freeagent.com/t/updating-timeslip-project-or-task-fields-causes-404/1051/1 "2018-09-02T13:52:44Z")

</div>

Hi,

I’m experiencing an issue with the Timeslip PUT API which I am trying to use to update a timeslip. All GET requests are working and if I only include the ‘comment’ and ‘hours’ fields then it will update the comments and hours correctly. The trouble comes when trying to update the ‘project’ and/or ‘task’ fields.

The endpoint I am using is:

```auto
https://api.freeagent.com/v2/timeslips/xxxxx

```

This request body **DOES** work:

```auto
{
    "comment": "comment here",
    "hours": "0.75"
}

```

Both the following **DO NOT** work:

```auto
{
    "project": "https://api.freeagent.com/v2/projects/xxxxx",
    "task": "https://api.freeagent.com/v2/tasks/xxxxx"
}

```

```auto
{
    "project": "https://api.freeagent.com/v2/projects/xxxxx",
    "task": "https://api.freeagent.com/v2/tasks/xxxxx",
    "comment": "comment here",
    "hours": "0.75"
}

```

The response I’m getting is a 404 response code with…

```auto
{
    "errors": {
        "error": {
            "message": "Resource not found"
        }
    }
}

```

I would be very grateful if anyone could point me in the right direction or spot and glaringly obvious mistakes!

Thanks very much for any help!

---

<div class="post-metadata">

**Author:** ![durhamhale](https://api-discuss.freeagent.com/user_avatar/api-discuss.freeagent.com/durhamhale/32/173_2.png) [@durhamhale](https://api-discuss.freeagent.com/u/durhamhale)\
**Post date:** [2 September 2018 14:10 UTC](https://api-discuss.freeagent.com/t/updating-timeslip-project-or-task-fields-causes-404/1051/2 "2018-09-02T14:10:44Z")

</div>

I’ve now managed to find the issue myself. My request needed to be wrapper in a ‘timeslip’ object:

```auto
"timeslip": {
    "project": "https://api.freeagent.com/v2/projects/xxxxx",
    "task": "https://api.freeagent.com/v2/tasks/xxxxx",
    "comment": "comment here",
    "hours": "0.75"
}

```
