Reference

Assignments

List, read, create, update and remove assignments of consultants to projects through the TimeSubmit API, with charge and cost rates.

The assignment object

A consultant on a project, with the rate charged and the rate paid.

{
  "id": "n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x",
  "projectId": "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t",
  "consultantId": "m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v",
  "rate": 760,
  "rateType": "daily",
  "costRate": 650,
  "costRateType": "daily",
  "currency": "GBP",
  "startDate": "2026-09-01",
  "endDate": null,
  "consultantPurchaseOrderNumber": "PO-C-0042",
  "createdAt": "2026-08-25T11:04:56.000Z"
}

Every field below is in every answer. A required field always has a value; a nullable one is null when it has none. More fields may be added within /v1, so have your code ignore any it doesn't recognise.

Fields of the assignment object
FieldTypeAbout it
id requiredstringThe assignment's id.
projectId requiredstringThe project.
consultantId requiredstringThe consultant.
rate nullablenumber or nullThe rate charged to the client. From 0 to 1000000.
rateType nullable"hourly" | "daily" or nullWhether rate is an hourly or a daily rate.
costRate nullablenumber or nullThe rate paid to the consultant. From 0 to 1000000.
costRateType nullable"hourly" | "daily" or nullWhether costRate is hourly or daily.
currency nullablestring or nullAn ISO 4217 code. One of 7 values.
Show values

GBP, USD, EUR, AUD, CAD, NZD, ZAR

startDate nullabledate (YYYY-MM-DD) or nullThe day the consultant starts on the project.
endDate nullabledate (YYYY-MM-DD) or nullThe day they finish. Not set through the API.
consultantPurchaseOrderNumber nullablestring or nullThe consultancy's purchase order number to the consultant, quoted on their invoices. At most 60 characters.
createdAt nullabletime (ISO 8601) or nullWhen it was created.

This list can grow within /v1, so ignore any you don't recognise rather than failing on it. See versioning.

Operations

GET /assignments

List assignments. A page of one project's or one consultant's assignments, or the one pair's when both are given. One of the two is required. Needs the assignments:read scope. Succeeds with 200, a page of them.

Query parameters of List assignments
Query parameterTypeAbout it
projectId optionalstringOnly this project's assignments.
consultantId optionalstringOnly this consultant's assignments.
limit optionalintegerHow many to a page, 1 to 100. 25 when absent. From 1 to 100.
cursor optionalstringThe nextCursor from the page before.

Example request. The key is read from TIMESUBMIT_API_KEY:

curl 'https://www.timesubmit.com/api/v1/assignments' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY"

Example response, with status 200:

{
  "data": [
    {
      "id": "n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x",
      "projectId": "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t",
      "consultantId": "m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v",
      "rate": 760,
      "rateType": "daily",
      "costRate": 650,
      "costRateType": "daily",
      "currency": "GBP",
      "startDate": "2026-09-01",
      "endDate": null,
      "consultantPurchaseOrderNumber": "PO-C-0042",
      "createdAt": "2026-08-25T11:04:56.000Z"
    }
  ],
  "nextCursor": "eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"
}

The error codes it can answer with:

  • unauthorised (401)
  • api_not_included (403)
  • insufficient_scope (403)
  • not_found (404)
  • invalid_request (400)
  • rate_limited (429)

GET /assignments/{id}

Read an assignment. One assignment. Needs the assignments:read scope. Succeeds with 200.

Example request. The key is read from TIMESUBMIT_API_KEY:

curl 'https://www.timesubmit.com/api/v1/assignments/n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY"

Example response, with status 200:

{
  "id": "n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x",
  "projectId": "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t",
  "consultantId": "m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v",
  "rate": 760,
  "rateType": "daily",
  "costRate": 650,
  "costRateType": "daily",
  "currency": "GBP",
  "startDate": "2026-09-01",
  "endDate": null,
  "consultantPurchaseOrderNumber": "PO-C-0042",
  "createdAt": "2026-08-25T11:04:56.000Z"
}

The error codes it can answer with:

  • unauthorised (401)
  • api_not_included (403)
  • insufficient_scope (403)
  • not_found (404)
  • rate_limited (429)

POST /assignments

Assign a consultant to a project. One assignment per consultant per project: a second is 409 already_exists. Needs the assignments:write scope. Accepts an Idempotency-Key. Succeeds with 201.

The body is a JSON object. Any other field is refused with its name.

Body fields of Assign a consultant to a project
FieldTypeAbout it
projectId requiredstringThe project.
consultantId requiredstringThe consultant.
rate optional nullablenumber or nullThe rate charged to the client. From 0 to 1000000.
rateType optional nullable"hourly" | "daily" or nullHourly or daily. Cleared with its rate; hourly when a rate is sent without one.
costRate optional nullablenumber or nullThe rate paid to the consultant. Needs a rate. From 0 to 1000000.
costRateType optional nullable"hourly" | "daily" or nullWhether costRate is hourly or daily.
currency optional nullablestring or nullAn ISO 4217 code. One of 7 values.
Show values

GBP, USD, EUR, AUD, CAD, NZD, ZAR

startDate optional nullabledate (YYYY-MM-DD) or nullThe day the consultant starts on the project.
consultantPurchaseOrderNumber optional nullablestring or nullOn one line; trimmed; blank is none; at most 60 characters. At most 60 characters.

This list can grow within /v1, so ignore any you don't recognise rather than failing on it. See versioning.

Example request, with a fresh Idempotency-Key each time it runs. The key is read from TIMESUBMIT_API_KEY:

curl -X POST 'https://www.timesubmit.com/api/v1/assignments' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "projectId": "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t",
  "consultantId": "m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v",
  "rate": 760,
  "rateType": "daily",
  "costRate": 650,
  "costRateType": "daily",
  "currency": "GBP",
  "startDate": "2026-09-01",
  "consultantPurchaseOrderNumber": "PO-C-0042"
}'

Example response, with status 201:

{
  "id": "n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x",
  "projectId": "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t",
  "consultantId": "m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v",
  "rate": 760,
  "rateType": "daily",
  "costRate": 650,
  "costRateType": "daily",
  "currency": "GBP",
  "startDate": "2026-09-01",
  "endDate": null,
  "consultantPurchaseOrderNumber": "PO-C-0042",
  "createdAt": "2026-08-25T11:04:56.000Z"
}

The error codes it can answer with:

  • unauthorised (401)
  • api_not_included (403)
  • insufficient_scope (403)
  • read_only (403)
  • not_found (404)
  • invalid_request (400)
  • already_exists (409)
  • idempotency_conflict (409)
  • rate_limited (429)

PATCH /assignments/{id}

Update an assignment. Changes the fields sent and keeps the rest. A change of purchase order number is audited. Needs the assignments:write scope. Accepts an Idempotency-Key. Succeeds with 200.

The body is a JSON object. Send only the fields to change. Any other field is refused with its name.

Body fields of Update an assignment
FieldTypeAbout it
rate optional nullablenumber or nullThe rate charged to the client. From 0 to 1000000.
rateType optional nullable"hourly" | "daily" or nullHourly or daily. Cleared with its rate; hourly when a rate is sent without one.
costRate optional nullablenumber or nullThe rate paid to the consultant. Needs a rate. From 0 to 1000000.
costRateType optional nullable"hourly" | "daily" or nullWhether costRate is hourly or daily.
currency optional nullablestring or nullAn ISO 4217 code. One of 7 values.
Show values

GBP, USD, EUR, AUD, CAD, NZD, ZAR

startDate optional nullabledate (YYYY-MM-DD) or nullThe day the consultant starts on the project.
consultantPurchaseOrderNumber optional nullablestring or nullOn one line; trimmed; blank is none; at most 60 characters. At most 60 characters.

This list can grow within /v1, so ignore any you don't recognise rather than failing on it. See versioning.

Example request, with a fresh Idempotency-Key each time it runs. The key is read from TIMESUBMIT_API_KEY:

curl -X PATCH 'https://www.timesubmit.com/api/v1/assignments/n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "rate": 800,
  "costRate": 680
}'

Example response, with status 200:

{
  "id": "n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x",
  "projectId": "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t",
  "consultantId": "m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v",
  "rate": 800,
  "rateType": "daily",
  "costRate": 680,
  "costRateType": "daily",
  "currency": "GBP",
  "startDate": "2026-09-01",
  "endDate": null,
  "consultantPurchaseOrderNumber": "PO-C-0042",
  "createdAt": "2026-08-25T11:04:56.000Z"
}

The error codes it can answer with:

  • unauthorised (401)
  • api_not_included (403)
  • insufficient_scope (403)
  • read_only (403)
  • not_found (404)
  • invalid_request (400)
  • idempotency_conflict (409)
  • rate_limited (429)

DELETE /assignments/{id}

Remove an assignment. Removes an assignment, as the dashboard does. Needs the assignments:write scope. Accepts an Idempotency-Key. Succeeds with 200.

It answers with:

What Remove an assignment answers with
FieldTypeAbout it
id requiredstringThe id of what was removed.
removed requiredbooleanAlways true.

Example request, with a fresh Idempotency-Key each time it runs. The key is read from TIMESUBMIT_API_KEY:

curl -X DELETE 'https://www.timesubmit.com/api/v1/assignments/n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Example response, with status 200:

{
  "id": "n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x",
  "removed": true
}

The error codes it can answer with:

  • unauthorised (401)
  • api_not_included (403)
  • insufficient_scope (403)
  • read_only (403)
  • not_found (404)
  • invalid_request (400)
  • idempotency_conflict (409)
  • rate_limited (429)