Update a timesheet

PATCH /timesheets/{timesheetId}

Manage timesheets.

Path parameters

  • timesheetId string Required

    The timesheet unique document ID, i.e. timesheet._id.

Query parameters

  • notify string

    If set to 0 or false, then all notifications associated with this operation will be disabled. This includes push notifications, emails and asynchronous UI updates. Useful for bulk operations.

application/json

Body Required

  • status string

    The current status of the timesheet. Defaults to draft.

    Values are draft, submitted, approved, or rejected.

  • customId string

    A custom identifier for internal reference by your system (not used by missionX).

  • entries array

    For available properties see entries on creating a timesheet.

Responses

  • 200 application/json

    Successful response

    One of:
  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • message string

      An error message.

    • code string

      An error code to handle specific error responses.

    • data object

      Optionally, additional data to help handle the error.

      Additional properties are allowed.

  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • message string

      An error message.

    • code string

      An error code to handle specific error responses.

    • data object

      Optionally, additional data to help handle the error.

      Additional properties are allowed.

PATCH /timesheets/{timesheetId}
curl \
 --request PATCH 'https://open.api.missionx.ai/v2/timesheets/{timesheetId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"status":"draft","customId":"string","entries":[]}'
Request examples
{
  "status": "draft",
  "customId": "string",
  "entries": []
}
Response examples (200)
{
  "_id": "string",
  "createdBy": "string",
  "createdAt": "2025-05-04T09:42:00Z",
  "updatedAt": "2025-05-04T09:42:00Z",
  "type": "company",
  "status": "draft",
  "customId": "string",
  "weekOfDate": "string",
  "weekStart": "string",
  "weekEnd": "string",
  "person": "string",
  "entries": [
    {
      "description": "string",
      "hours": [
        {
          "day": "MON",
          "value": 42.0
        }
      ],
      "codeId": "string"
    }
  ]
}
{
  "_id": "string",
  "createdBy": "string",
  "createdAt": "2025-05-04T09:42:00Z",
  "updatedAt": "2025-05-04T09:42:00Z",
  "type": "company",
  "status": "draft",
  "customId": "string",
  "weekOfDate": "string",
  "weekStart": "string",
  "weekEnd": "string",
  "planItem": "string",
  "project": "string",
  "entries": [
    {
      "description": "string",
      "hours": [
        {
          "day": "MON",
          "value": 42.0
        }
      ],
      "codeId": "string",
      "taskId": "string"
    }
  ]
}
Response examples (400)
{
  "message": "string",
  "code": "string",
  "data": {}
}
Response examples (500)
{
  "message": "string",
  "code": "string",
  "data": {}
}