Reference

Client purchase orders

List, read, record, amend, close and delete client purchase orders through the TimeSubmit API: filters, the budget figures one answers with, and its change history.

The client purchase order object

A client's purchase order: the budget and dates your receivables bill against.

{
  "id": "q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j",
  "number": "FL-PO-2291",
  "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "projectIds": [
    "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t"
  ],
  "currency": "GBP",
  "startDate": "2026-09-01",
  "endDate": "2027-02-26",
  "budget": 60000,
  "closedDate": null,
  "dateStatus": "active",
  "createdAt": "2026-08-28T14:16:03.000Z",
  "updatedAt": "2026-10-12T09:22:48.000Z",
  "status": "active",
  "invoiced": {
    "amount": 15200
  },
  "committed": {
    "amount": 7600,
    "hours": 80,
    "unpricedHours": 0
  },
  "pending": {
    "amount": 3800,
    "hours": 40,
    "unpricedHours": 0
  },
  "remaining": 37200,
  "usedPercent": 38,
  "incomplete": false,
  "invoices": [
    {
      "id": "p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a",
      "invoiceNumber": "INV-0107",
      "amount": 7600
    },
    {
      "id": "t52g8j1m4p7s0u3w6y9b2d5f8h1k4n7q",
      "invoiceNumber": "INV-0098",
      "amount": 7600
    }
  ]
}

A list answers each purchase order without invoiced, committed, pending, remaining, usedPercent, incomplete and invoices, and its status is the date status, never exhausted; reading one answers all of it.

A write by a key without purchase_orders:read answers only { id, status }, and that status is the date status, never exhausted. Reading the purchase order by id answers its full status, which is exhausted when it is in force with nothing left of its budget.

invoiced is money drawn on the budget. For the hours or days behind it, read the invoices' lines with GET /invoices/{id}: each line has a quantity and a unit.

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 client purchase order object
FieldTypeAbout it
id requiredstringThe purchase order's id.
number requiredstringThe client's purchase order number.
clientId requiredstringThe client that issued it.
projectIds requiredstring[]The client's projects it covers, 1 to 50.
currency requiredstringAn ISO 4217 code: the client's invoicing currency when it was recorded. Every figure is in it.
startDate requireddate (YYYY-MM-DD)The first day it covers.
endDate nullabledate (YYYY-MM-DD) or nullThe last day it covers. Null when open-ended.
budget nullablenumber or nullThe most it authorises, before tax. Null when it has none.
closedDate nullabledate (YYYY-MM-DD) or nullThe day it was closed from: time from then on is not covered. Null unless closed.
dateStatus required"not_started" | "active" | "expiring" | "expired" | "closed"What its dates say today: not started, active, expiring (30 days or fewer to its last day), expired or closed.
createdAt nullabletime (ISO 8601) or nullWhen it was recorded.
updatedAt nullabletime (ISO 8601) or nullWhen it last changed.
status required"not_started" | "active" | "expiring" | "expired" | "closed" | "exhausted"The date status, except that one in force with nothing left of its budget is exhausted.
invoiced requiredobjectWhat its receivables ask for before tax, drafts included and discarded ones left out. Invoiced is money drawn on the budget; for the hours or days behind it, read the invoices' lines (GET /invoices/{id}, each line has quantity and unit).
Show the 1 fields of invoiced
Fields of invoiced
FieldTypeAbout it
invoiced.amount requirednumberThe amount invoiced.
committed requiredobjectApproved time it covers that no invoice has claimed yet.
Show the 3 fields of committed
Fields of committed
FieldTypeAbout it
committed.amount requirednumberIts value at the bill rates a receivable would charge, before tax.
committed.hours requirednumberIts hours.
committed.unpricedHours requirednumberHours with no rate to price them, counted here and worth nothing in amount.
pending requiredobjectSubmitted time it covers, not yet approved. It never counts against the budget.
Show the 3 fields of pending
Fields of pending
FieldTypeAbout it
pending.amount requirednumberIts value at the bill rates a receivable would charge, before tax.
pending.hours requirednumberIts hours.
pending.unpricedHours requirednumberHours with no rate to price them, counted here and worth nothing in amount.
remaining nullablenumber or nullThe budget less invoiced and committed. Null when it has no budget.
usedPercent nullableinteger or nullInvoiced plus committed as a whole percentage of the budget, rounded down. Null when it has no budget.
incomplete requiredbooleanTrue when a figure reached a read limit (5,000 time entries, 1,500 timesheets or 1,000 invoices), so it is a floor, not the whole.
invoices[] requiredarray of objectsThe receivables drawn on it, newest first, discarded ones left out.
Show the 3 fields of invoices[]
Fields of invoices[]
FieldTypeAbout it
invoices[].id requiredstringThe invoice's id, for GET /invoices/{id}.
invoices[].invoiceNumber requiredstringThe number printed on it.
invoices[].amount requirednumberWhat it draws from the budget: its total before tax.

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

Operations

GET /client-purchase-orders

List client purchase orders. A page of your organisation's client purchase orders, in the order they were recorded, with their date status and no figures: read one for those. A filtered page can hold fewer than limit, or none, while nextCursor leads on. Needs purchase orders on your plan. Needs the purchase_orders:read scope. Succeeds with 200, a page of them.

Query parameters of List client purchase orders
Query parameterTypeAbout it
clientId optionalstringOnly this client's purchase orders.
projectId optionalstringOnly those covering this project.
status optional"not_started" | "active" | "expiring" | "expired" | "closed"Only those with this date status today.
covers optionaldate (YYYY-MM-DD)Only those covering this day. With projectId, the one purchase order a timesheet period starting that day bills against, or none.
limit optionalintegerHow many to a page, 1 to 100. 25 when absent. From 1 to 100.
cursor optionalstringThe nextCursor from the page before.

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

Example request. The key is read from TIMESUBMIT_API_KEY:

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

Example response, with status 200:

{
  "data": [
    {
      "id": "q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j",
      "number": "FL-PO-2291",
      "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
      "projectIds": [
        "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t"
      ],
      "currency": "GBP",
      "startDate": "2026-09-01",
      "endDate": "2027-02-26",
      "budget": 60000,
      "closedDate": null,
      "dateStatus": "active",
      "createdAt": "2026-08-28T14:16:03.000Z",
      "updatedAt": "2026-10-12T09:22:48.000Z"
    }
  ],
  "nextCursor": "eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"
}

The error codes it can answer with:

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

GET /client-purchase-orders/{id}

Read a client purchase order. One client purchase order with the figures its dashboard page shows: invoiced, committed, pending, remaining and the used percentage, its full status, and the receivables drawn on it. Needs purchase orders on your plan. Needs the purchase_orders:read scope. Succeeds with 200.

Example request. The key is read from TIMESUBMIT_API_KEY:

curl 'https://www.timesubmit.com/api/v1/client-purchase-orders/q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY"

Example response, with status 200:

{
  "id": "q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j",
  "number": "FL-PO-2291",
  "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "projectIds": [
    "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t"
  ],
  "currency": "GBP",
  "startDate": "2026-09-01",
  "endDate": "2027-02-26",
  "budget": 60000,
  "closedDate": null,
  "dateStatus": "active",
  "createdAt": "2026-08-28T14:16:03.000Z",
  "updatedAt": "2026-10-12T09:22:48.000Z",
  "status": "active",
  "invoiced": {
    "amount": 15200
  },
  "committed": {
    "amount": 7600,
    "hours": 80,
    "unpricedHours": 0
  },
  "pending": {
    "amount": 3800,
    "hours": 40,
    "unpricedHours": 0
  },
  "remaining": 37200,
  "usedPercent": 38,
  "incomplete": false,
  "invoices": [
    {
      "id": "p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a",
      "invoiceNumber": "INV-0107",
      "amount": 7600
    },
    {
      "id": "t52g8j1m4p7s0u3w6y9b2d5f8h1k4n7q",
      "invoiceNumber": "INV-0098",
      "amount": 7600
    }
  ]
}

The error codes it can answer with:

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

GET /client-purchase-orders/{id}/changes

List a client purchase order's changes. A page of the purchase order's history, oldest first: one change per field changed, with what it was, what it became, the reason, when, and who made it, a person by name or an API key by its name. Recording it is not a change. Needs purchase orders on your plan. Needs the purchase_orders:read scope. Succeeds with 200, a page of them.

Query parameters of List a client purchase order's changes
Query parameterTypeAbout it
limit optionalintegerHow many to a page, 1 to 100. 25 when absent. From 1 to 100.
cursor optionalstringThe nextCursor from the page before.

It answers with:

What List a client purchase order's changes answers with
FieldTypeAbout it
field required"number" | "startDate" | "endDate" | "budget" | "projectIds" | "closedDate"The purchase order field that changed. A change of several fields at once is one change per field.
before nullablestring or number or string[] or nullThe field's value before the change, in the type the purchase order answers it with: number a string, a date YYYY-MM-DD, budget a number, projectIds an array of ids. Null when it had none.
after nullablestring or number or string[] or nullThe field's value after it, in the type the purchase order answers it with: number a string, a date YYYY-MM-DD, budget a number, projectIds an array of ids. Null when it had none.
reason nullablestring or nullWhy, as given. A change of the budget or a date, and a close, always has one.
changedBy requiredstringWho made it: a person's name, or an API key's name followed by "(API key)". Never an email address. A platform admin's name is masked, as it is everywhere in the dashboard, a person with no name on record reads as "Unknown", and one since removed as "Former user".
changedAt requiredtime (ISO 8601)When it was made.

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

Example request. The key is read from TIMESUBMIT_API_KEY:

curl 'https://www.timesubmit.com/api/v1/client-purchase-orders/q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j/changes' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY"

Example response, with status 200:

{
  "data": [
    {
      "field": "budget",
      "before": 48000,
      "after": 60000,
      "reason": "Phase two scope agreed with procurement.",
      "changedBy": "Hannah Okafor",
      "changedAt": "2026-10-12T09:22:48.000Z"
    }
  ],
  "nextCursor": "eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"
}

The error codes it can answer with:

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

POST /client-purchase-orders

Record a client purchase order. Records a client's purchase order for some of its projects. Its currency is the client's invoicing currency, as the dashboard sets it, and is not accepted. A duplicate number is 409 already_exists; a project that is not your organisation's is 404 not_found; any other rule broken, such as an overlap or a project of another client, is 400 invalid_request in the dashboard's words. Needs purchase orders on your plan. Needs the purchase_orders: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 Record a client purchase order
FieldTypeAbout it
clientId requiredstringThe client that issued it.
number requiredstringThe client's purchase order number, on one line, trimmed, at most 60 characters. Unique for the client: a second is 409 already_exists. It cannot change once an invoice quotes it. At most 60 characters.
projectIds requiredstring[]The client's projects it covers, 1 to 50, none archived when added. A project has one purchase order at a time, so the dates cannot overlap another's on the same project.
startDate requireddate (YYYY-MM-DD)The first day it covers.
endDate optional nullabledate (YYYY-MM-DD) or nullThe last day it covers. Absent or null for open-ended.
budget optional nullablenumber or nullThe most it authorises, before tax, in the client's currency. More than zero; absent or null for none.

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/client-purchase-orders' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "number": "FL-PO-2291",
  "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "projectIds": [
    "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t"
  ],
  "startDate": "2026-09-01",
  "budget": 60000
}'

Example response, with status 201:

{
  "id": "q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j",
  "number": "FL-PO-2291",
  "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "projectIds": [
    "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t"
  ],
  "currency": "GBP",
  "startDate": "2026-09-01",
  "endDate": null,
  "budget": 60000,
  "closedDate": null,
  "dateStatus": "active",
  "createdAt": "2026-08-28T14:16:03.000Z",
  "updatedAt": "2026-10-12T09:22:48.000Z",
  "status": "active",
  "invoiced": {
    "amount": 0
  },
  "committed": {
    "amount": 0,
    "hours": 0,
    "unpricedHours": 0
  },
  "pending": {
    "amount": 0,
    "hours": 0,
    "unpricedHours": 0
  },
  "remaining": 60000,
  "usedPercent": 0,
  "incomplete": false,
  "invoices": []
}

The error codes it can answer with:

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

PATCH /client-purchase-orders/{id}

Amend a client purchase order. Changes the fields sent and keeps the rest, each change kept in its history. null clears an end date or a budget. The budget cannot go below what is invoiced, the dates must still cover every period invoiced against it, a project with time drawn on it cannot be removed, and a closed one cannot be changed. Needs purchase orders on your plan. Needs the purchase_orders: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 Amend a client purchase order
FieldTypeAbout it
number optionalstringThe client's purchase order number, on one line, trimmed, at most 60 characters. Unique for the client: a second is 409 already_exists. It cannot change once an invoice quotes it. At most 60 characters.
projectIds optionalstring[]The client's projects it covers, 1 to 50, none archived when added. A project has one purchase order at a time, so the dates cannot overlap another's on the same project.
startDate optionaldate (YYYY-MM-DD)The first day it covers.
endDate optional nullabledate (YYYY-MM-DD) or nullThe last day it covers. Absent or null for open-ended.
budget optional nullablenumber or nullThe most it authorises, before tax, in the client's currency. More than zero; absent or null for none.
reason optionalstringWhy, kept in its history. Required when the budget or a date changes. At most 500 characters.

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/client-purchase-orders/q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "budget": 72000,
  "reason": "Phase two scope agreed with procurement."
}'

Example response, with status 200:

{
  "id": "q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j",
  "number": "FL-PO-2291",
  "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "projectIds": [
    "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t"
  ],
  "currency": "GBP",
  "startDate": "2026-09-01",
  "endDate": "2027-02-26",
  "budget": 72000,
  "closedDate": null,
  "dateStatus": "active",
  "createdAt": "2026-08-28T14:16:03.000Z",
  "updatedAt": "2026-10-12T09:22:48.000Z",
  "status": "active",
  "invoiced": {
    "amount": 15200
  },
  "committed": {
    "amount": 7600,
    "hours": 80,
    "unpricedHours": 0
  },
  "pending": {
    "amount": 3800,
    "hours": 40,
    "unpricedHours": 0
  },
  "remaining": 49200,
  "usedPercent": 31,
  "incomplete": false,
  "invoices": [
    {
      "id": "p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a",
      "invoiceNumber": "INV-0107",
      "amount": 7600
    },
    {
      "id": "t52g8j1m4p7s0u3w6y9b2d5f8h1k4n7q",
      "invoiceNumber": "INV-0098",
      "amount": 7600
    }
  ]
}

The error codes it can answer with:

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

POST /client-purchase-orders/{id}/close

Close a client purchase order. Closes it from a day: time from then on is not covered, and a replacement may start that day. It cannot be undone, and cannot leave a period invoiced against it uncovered. Needs purchase orders on your plan. Needs the purchase_orders:write scope. Accepts an Idempotency-Key. Succeeds with 200.

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

Body fields of Close a client purchase order
FieldTypeAbout it
closedDate requireddate (YYYY-MM-DD)The first day it no longer covers: on or after its start, and not after its end.
reason requiredstringWhy, kept in its history. Required. At most 500 characters.

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/client-purchase-orders/q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j/close' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "closedDate": "2026-11-30",
  "reason": "Replaced by the purchase order for phase two."
}'

Example response, with status 200:

{
  "id": "q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j",
  "number": "FL-PO-2291",
  "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "projectIds": [
    "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t"
  ],
  "currency": "GBP",
  "startDate": "2026-09-01",
  "endDate": "2027-02-26",
  "budget": 60000,
  "closedDate": "2026-11-30",
  "dateStatus": "closed",
  "createdAt": "2026-08-28T14:16:03.000Z",
  "updatedAt": "2026-10-12T09:22:48.000Z",
  "status": "closed",
  "invoiced": {
    "amount": 15200
  },
  "committed": {
    "amount": 7600,
    "hours": 80,
    "unpricedHours": 0
  },
  "pending": {
    "amount": 3800,
    "hours": 40,
    "unpricedHours": 0
  },
  "remaining": 37200,
  "usedPercent": 38,
  "incomplete": false,
  "invoices": [
    {
      "id": "p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a",
      "invoiceNumber": "INV-0107",
      "amount": 7600
    },
    {
      "id": "t52g8j1m4p7s0u3w6y9b2d5f8h1k4n7q",
      "invoiceNumber": "INV-0098",
      "amount": 7600
    }
  ]
}

The error codes it can answer with:

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

DELETE /client-purchase-orders/{id}

Delete a client purchase order. Deletes one nothing has drawn on, with its history: no invoice raised against it, discarded ones included, and no approved time it covers. Close one that has been drawn on instead. Needs purchase orders on your plan. Needs the purchase_orders:write scope. Accepts an Idempotency-Key. Succeeds with 200.

It answers with:

What Delete a client purchase order 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/client-purchase-orders/q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

Example response, with status 200:

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

The error codes it can answer with:

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