{"openapi":"3.1.0","info":{"title":"TimeSubmit API","version":"1","description":"Clients, projects, assignments, consultants, invoices, client and consultant purchase orders and events for one organisation, with a consultancy API key."},"servers":[{"url":"https://www.timesubmit.com/api/v1"}],"tags":[{"name":"Clients","description":"The organisations a consultancy bills."},{"name":"Projects","description":"Work for a client, which consultants are assigned to."},{"name":"Consultants","description":"The people who do the work."},{"name":"Assignments","description":"A consultant on a project, with the rate charged to the client and the rate paid to the consultant."},{"name":"Invoices","description":"Receivable invoices to clients and payable invoices from consultants."},{"name":"Client purchase orders","description":"Purchase orders a client issued to the consultancy."},{"name":"Consultant purchase orders","description":"Purchase orders the consultancy issued to a consultant."},{"name":"Events","description":"What happened to timesheets, invoices and purchase orders, kept so an integration can catch up after an outage. The same events are delivered as webhooks."}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A consultancy API key, `tsk_` and 40 characters."}},"schemas":{"Error":{"type":"object","description":"Every error has this shape: a stable code and a readable message.","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable; branch on this. The list can grow within /v1 (ADR 010): treat a code you do not recognise by its status.","enum":["unauthorised","api_not_included","insufficient_scope","read_only","client_limit_reached","project_limit_reached","not_on_plan","not_found","invalid_request","already_exists","idempotency_conflict","rate_limited","unreadable_invoice","gone"]},"message":{"type":"string","description":"Readable; names the field when one is wrong."}},"required":["code","message"]}},"required":["error"]},"Written":{"type":"object","description":"What a write answers to a key without the read scope: the record's id, and for a client or a project its status, for a purchase order its date status, which is never `exhausted`: read it by id for its full status.","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id"]},"Client":{"type":"object","properties":{"id":{"type":"string","description":"The client's id."},"name":{"type":"string","description":"The client's name."},"status":{"type":"string","description":"Active, or archived.","enum":["active","archived","pending_authorization"]},"email":{"type":["string","null"],"description":"A general email address for the client.","format":"email"},"phone":{"type":["string","null"],"description":"A general phone number."},"website":{"type":["string","null"],"description":"The client's website.","format":"uri"},"logoUrl":{"type":["string","null"],"description":"The client's logo.","format":"uri"},"contactName":{"type":["string","null"],"description":"The person to contact."},"contactEmail":{"type":["string","null"],"description":"That person's email address.","format":"email"},"contactPhone":{"type":["string","null"],"description":"That person's phone number."},"currency":{"type":["string","null"],"description":"An ISO 4217 code.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]},"paymentTermDays":{"type":["integer","null"],"description":"Days the client has to pay an invoice. Unset uses the organisation's default.","minimum":0,"maximum":365},"purchaseOrderRequired":{"type":"boolean","description":"Whether invoicing this client needs a purchase order."},"address":{"type":"object","description":"The postal address. Each part is optional.","properties":{"street":{"type":["string","null"],"description":"Street lines."},"city":{"type":["string","null"],"description":"Town or city."},"region":{"type":["string","null"],"description":"County, state or region."},"postalCode":{"type":["string","null"],"description":"Postcode or ZIP."},"country":{"type":["string","null"],"description":"Country."}}},"createdAt":{"type":["string","null"],"description":"When it was created.","format":"date-time"},"updatedAt":{"type":["string","null"],"description":"When it last changed.","format":"date-time"}},"required":["id","name","status","email","phone","website","logoUrl","contactName","contactEmail","contactPhone","currency","paymentTermDays","purchaseOrderRequired","address","createdAt","updatedAt"]},"Project":{"type":"object","properties":{"id":{"type":"string","description":"The project's id."},"clientId":{"type":"string","description":"The client it is for."},"name":{"type":"string","description":"The project's name."},"title":{"type":["string","null"],"description":"A longer title."},"description":{"type":["string","null"],"description":"What the project is."},"comments":{"type":["string","null"],"description":"Internal notes."},"status":{"type":"string","description":"Where the project is. Archived is the only removal.","enum":["planning","active","paused","completed","archived"]},"startDate":{"type":["string","null"],"description":"The day it starts.","format":"date"},"endDate":{"type":["string","null"],"description":"The day it ends. Never before `startDate`; it may be the same day.","format":"date"},"hourlyRate":{"type":["number","null"],"description":"The rate the client is charged an hour, in `currency`, as stored.","minimum":0,"maximum":1000000},"currency":{"type":["string","null"],"description":"An ISO 4217 code.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]},"logoUrl":{"type":["string","null"],"description":"The project's logo.","format":"uri"},"approvalsRequired":{"type":"integer","description":"The number of approvers a project asked for. It has no effect. Deprecated on 1 December 2026. It has never changed approval: a timesheet needs every approver on the project, then final approval. Removed in `/v2`.","minimum":1,"maximum":10,"deprecated":true},"sequentialApproval":{"type":"boolean","description":"Whether approvers approve in order. Margin and Enterprise."},"createdAt":{"type":["string","null"],"description":"When it was created.","format":"date-time"},"updatedAt":{"type":["string","null"],"description":"When it last changed.","format":"date-time"}},"required":["id","clientId","name","title","description","comments","status","startDate","endDate","hourlyRate","currency","logoUrl","approvalsRequired","sequentialApproval","createdAt","updatedAt"]},"Assignment":{"type":"object","properties":{"id":{"type":"string","description":"The assignment's id."},"projectId":{"type":"string","description":"The project."},"consultantId":{"type":"string","description":"The consultant."},"rate":{"type":["number","null"],"description":"The rate charged to the client.","minimum":0,"maximum":1000000},"rateType":{"type":["string","null"],"description":"Whether `rate` is an hourly or a daily rate.","enum":["hourly","daily",null]},"costRate":{"type":["number","null"],"description":"The rate paid to the consultant.","minimum":0,"maximum":1000000},"costRateType":{"type":["string","null"],"description":"Whether `costRate` is hourly or daily.","enum":["hourly","daily",null]},"currency":{"type":["string","null"],"description":"An ISO 4217 code.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]},"startDate":{"type":["string","null"],"description":"The day the consultant starts on the project.","format":"date"},"endDate":{"type":["string","null"],"description":"The day they finish. Not set through the API.","format":"date"},"consultantPurchaseOrderNumber":{"type":["string","null"],"description":"The consultancy's purchase order number to the consultant, quoted on their invoices.","maxLength":60},"createdAt":{"type":["string","null"],"description":"When it was created.","format":"date-time"}},"required":["id","projectId","consultantId","rate","rateType","costRate","costRateType","currency","startDate","endDate","consultantPurchaseOrderNumber","createdAt"]},"Consultant":{"type":"object","properties":{"id":{"type":"string","description":"The consultant's id."},"name":{"type":["string","null"],"description":"Their name, from the user they are linked to; null while unlinked."},"email":{"type":["string","null"],"description":"Their email address, likewise.","format":"email"},"isActive":{"type":"boolean","description":"Whether they are active in the organisation."},"dailyRate":{"type":["number","null"],"description":"Their fallback day rate.","minimum":0,"maximum":1000000},"hourlyRate":{"type":["number","null"],"description":"Their fallback hourly rate.","minimum":0,"maximum":1000000},"preferredCurrency":{"type":["string","null"],"description":"The currency they invoice in."},"companyRegNumber":{"type":["string","null"],"description":"Their company's registration number."},"paymentTerms":{"type":["string","null"],"description":"Their payment terms, as written."},"paymentTermDays":{"type":["integer","null"],"description":"Their payment terms in days."},"createdAt":{"type":["string","null"],"description":"When it was created.","format":"date-time"},"updatedAt":{"type":["string","null"],"description":"When it last changed.","format":"date-time"}},"required":["id","name","email","isActive","dailyRate","hourlyRate","preferredCurrency","companyRegNumber","paymentTerms","paymentTermDays","createdAt","updatedAt"]},"InvoiceSummary":{"type":"object","properties":{"id":{"type":"string","description":"The invoice's id."},"kind":{"type":"string","description":"A receivable is what the organisation bills its client; a payable is what a consultant bills the organisation.","enum":["receivable","payable"]},"invoiceNumber":{"type":"string","description":"The number printed on it."},"status":{"type":"string","description":"Its status as the dashboard reports it: a sent invoice past its due date is overdue.","enum":["draft","sent","paid","overdue","archived","discarded","rejected"]},"isOverdue":{"type":"boolean","description":"Whether it is overdue now."},"daysPastDue":{"type":["integer","null"],"description":"Whole days past its due date, when overdue."},"currency":{"type":"string","description":"An ISO 4217 code."},"total":{"type":"number","description":"The total, tax included, as stored."},"invoiceDate":{"type":["string","null"],"description":"Its date: the issue date, or for a draft the day it was made.","format":"date-time"},"issuedAt":{"type":["string","null"],"description":"When it was sent.","format":"date-time"},"dueDate":{"type":["string","null"],"description":"When it falls due.","format":"date-time"},"paidAt":{"type":["string","null"],"description":"When it was paid.","format":"date-time"},"clientId":{"type":["string","null"],"description":"The client, for a receivable."},"consultantId":{"type":["string","null"],"description":"The consultant, for a payable."},"projectId":{"type":["string","null"],"description":"The project."},"clientPurchaseOrderId":{"type":["string","null"],"description":"The client purchase order it was raised against."},"purchaseOrderNumber":{"type":["string","null"],"description":"The client's purchase order number, frozen at raising."},"consultantPurchaseOrderNumbers":{"type":"array","description":"For a payable, the consultancy's purchase order numbers, frozen at raising.","items":{"type":"string","description":"A number."}},"createdAt":{"type":["string","null"],"description":"When it was created.","format":"date-time"},"updatedAt":{"type":["string","null"],"description":"When it last changed.","format":"date-time"}},"required":["id","kind","invoiceNumber","status","isOverdue","daysPastDue","currency","total","invoiceDate","issuedAt","dueDate","paidAt","clientId","consultantId","projectId","clientPurchaseOrderId","purchaseOrderNumber","consultantPurchaseOrderNumbers","createdAt","updatedAt"]},"Invoice":{"type":"object","properties":{"id":{"type":"string","description":"The invoice's id."},"kind":{"type":"string","description":"A receivable is what the organisation bills its client; a payable is what a consultant bills the organisation.","enum":["receivable","payable"]},"invoiceNumber":{"type":"string","description":"The number printed on it."},"status":{"type":"string","description":"Its status as the dashboard reports it: a sent invoice past its due date is overdue.","enum":["draft","sent","paid","overdue","archived","discarded","rejected"]},"isOverdue":{"type":"boolean","description":"Whether it is overdue now."},"daysPastDue":{"type":["integer","null"],"description":"Whole days past its due date, when overdue."},"currency":{"type":"string","description":"An ISO 4217 code."},"total":{"type":"number","description":"The total, tax included, as stored."},"invoiceDate":{"type":["string","null"],"description":"Its date: the issue date, or for a draft the day it was made.","format":"date-time"},"issuedAt":{"type":["string","null"],"description":"When it was sent.","format":"date-time"},"dueDate":{"type":["string","null"],"description":"When it falls due.","format":"date-time"},"paidAt":{"type":["string","null"],"description":"When it was paid.","format":"date-time"},"clientId":{"type":["string","null"],"description":"The client, for a receivable."},"consultantId":{"type":["string","null"],"description":"The consultant, for a payable."},"projectId":{"type":["string","null"],"description":"The project."},"clientPurchaseOrderId":{"type":["string","null"],"description":"The client purchase order it was raised against."},"purchaseOrderNumber":{"type":["string","null"],"description":"The client's purchase order number, frozen at raising."},"consultantPurchaseOrderNumbers":{"type":"array","description":"For a payable, the consultancy's purchase order numbers, frozen at raising.","items":{"type":"string","description":"A number."}},"createdAt":{"type":["string","null"],"description":"When it was created.","format":"date-time"},"updatedAt":{"type":["string","null"],"description":"When it last changed.","format":"date-time"},"client":{"type":["object","null"],"description":"The client, for a receivable.","properties":{"id":{"type":"string","description":"The client's id."},"name":{"type":"string","description":"Its name."}}},"overBudgetReason":{"type":["string","null"],"description":"Why it was raised past its purchase order's budget, when it was."},"notCoveredReason":{"type":["string","null"],"description":"Why time no purchase order covered was billed, when it was."},"consultantPurchaseOrders":{"type":"array","description":"For a payable, the consultant purchase orders it drew on, and how much of each.","items":{"type":"object","description":"A share.","properties":{"id":{"type":"string","description":"The purchase order's id."},"amount":{"type":"number","description":"The amount drawn."}}}},"subtotal":{"type":"number","description":"The total of the lines, before tax."},"taxLines":{"type":"array","description":"Each tax, as printed.","items":{"type":"object","description":"A tax line.","properties":{"name":{"type":"string","description":"The tax's name."},"rate":{"type":"number","description":"Its rate, as a percentage."},"registrationNumber":{"type":["string","null"],"description":"The registration number printed with it."},"amount":{"type":"number","description":"The tax charged."}}}},"lines":{"type":"array","description":"The lines, as printed. On a payable, one per timesheet period, naming the projects it bills. A period whose time is in more than one currency is on one payable per currency, and each of those lines carries only its own currency's projects.","items":{"type":"object","description":"A line.","properties":{"description":{"type":"string","description":"What it is for."},"quantity":{"type":"number","description":"How many units."},"unit":{"type":"string","description":"What the quantity counts.","enum":["hours","days"]},"unitPrice":{"type":"number","description":"The price of one unit."},"amount":{"type":"number","description":"The line's amount."},"currency":{"type":"string","description":"An ISO 4217 code."},"consultantId":{"type":["string","null"],"description":"The consultant whose work it is."}}}}},"required":["id","kind","invoiceNumber","status","isOverdue","daysPastDue","currency","total","invoiceDate","issuedAt","dueDate","paidAt","clientId","consultantId","projectId","clientPurchaseOrderId","purchaseOrderNumber","consultantPurchaseOrderNumbers","createdAt","updatedAt","client","overBudgetReason","notCoveredReason","consultantPurchaseOrders","subtotal","taxLines","lines"]},"ClientPurchaseOrderSummary":{"type":"object","properties":{"id":{"type":"string","description":"The purchase order's id."},"number":{"type":"string","description":"The client's purchase order number."},"clientId":{"type":"string","description":"The client that issued it."},"projectIds":{"type":"array","description":"The client's projects it covers, 1 to 50.","items":{"type":"string","description":"A project's id."}},"currency":{"type":"string","description":"An ISO 4217 code: the client's invoicing currency when it was recorded. Every figure is in it."},"startDate":{"type":"string","description":"The first day it covers.","format":"date"},"endDate":{"type":["string","null"],"description":"The last day it covers. Null when open-ended.","format":"date"},"budget":{"type":["number","null"],"description":"The most it authorises, before tax. Null when it has none."},"closedDate":{"type":["string","null"],"description":"The day it was closed from: time from then on is not covered. Null unless closed.","format":"date"},"dateStatus":{"type":"string","description":"What its dates say today: not started, active, expiring (30 days or fewer to its last day), expired or closed.","enum":["not_started","active","expiring","expired","closed"]},"createdAt":{"type":["string","null"],"description":"When it was recorded.","format":"date-time"},"updatedAt":{"type":["string","null"],"description":"When it last changed.","format":"date-time"}},"required":["id","number","clientId","projectIds","currency","startDate","endDate","budget","closedDate","dateStatus","createdAt","updatedAt"]},"ClientPurchaseOrder":{"type":"object","properties":{"id":{"type":"string","description":"The purchase order's id."},"number":{"type":"string","description":"The client's purchase order number."},"clientId":{"type":"string","description":"The client that issued it."},"projectIds":{"type":"array","description":"The client's projects it covers, 1 to 50.","items":{"type":"string","description":"A project's id."}},"currency":{"type":"string","description":"An ISO 4217 code: the client's invoicing currency when it was recorded. Every figure is in it."},"startDate":{"type":"string","description":"The first day it covers.","format":"date"},"endDate":{"type":["string","null"],"description":"The last day it covers. Null when open-ended.","format":"date"},"budget":{"type":["number","null"],"description":"The most it authorises, before tax. Null when it has none."},"closedDate":{"type":["string","null"],"description":"The day it was closed from: time from then on is not covered. Null unless closed.","format":"date"},"dateStatus":{"type":"string","description":"What its dates say today: not started, active, expiring (30 days or fewer to its last day), expired or closed.","enum":["not_started","active","expiring","expired","closed"]},"createdAt":{"type":["string","null"],"description":"When it was recorded.","format":"date-time"},"updatedAt":{"type":["string","null"],"description":"When it last changed.","format":"date-time"},"status":{"type":"string","description":"The date status, except that one in force with nothing left of its budget is exhausted.","enum":["not_started","active","expiring","expired","closed","exhausted"]},"invoiced":{"type":"object","description":"What 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`).","properties":{"amount":{"type":"number","description":"The amount invoiced."}}},"committed":{"type":"object","description":"Approved time it covers that no invoice has claimed yet.","properties":{"amount":{"type":"number","description":"Its value at the bill rates a receivable would charge, before tax."},"hours":{"type":"number","description":"Its hours."},"unpricedHours":{"type":"number","description":"Hours with no rate to price them, counted here and worth nothing in `amount`."}}},"pending":{"type":"object","description":"Submitted time it covers, not yet approved. It never counts against the budget.","properties":{"amount":{"type":"number","description":"Its value at the bill rates a receivable would charge, before tax."},"hours":{"type":"number","description":"Its hours."},"unpricedHours":{"type":"number","description":"Hours with no rate to price them, counted here and worth nothing in `amount`."}}},"remaining":{"type":["number","null"],"description":"The budget less invoiced and committed. Null when it has no budget."},"usedPercent":{"type":["integer","null"],"description":"Invoiced plus committed as a whole percentage of the budget, rounded down. Null when it has no budget."},"incomplete":{"type":"boolean","description":"True 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":{"type":"array","description":"The receivables drawn on it, newest first, discarded ones left out.","items":{"type":"object","description":"A receivable.","properties":{"id":{"type":"string","description":"The invoice's id, for `GET /invoices/{id}`."},"invoiceNumber":{"type":"string","description":"The number printed on it."},"amount":{"type":"number","description":"What it draws from the budget: its total before tax."}}}}},"required":["id","number","clientId","projectIds","currency","startDate","endDate","budget","closedDate","dateStatus","createdAt","updatedAt","status","invoiced","committed","pending","remaining","usedPercent","incomplete","invoices"]},"ConsultantPurchaseOrderSummary":{"type":"object","properties":{"id":{"type":"string","description":"The purchase order's id."},"number":{"type":"string","description":"The consultancy's purchase order number to the consultant, which their payables quote."},"consultantId":{"type":"string","description":"The consultant it is issued to."},"assignmentIds":{"type":"array","description":"The consultant's assignments it covers, 1 to 50.","items":{"type":"string","description":"An assignment's id."}},"currency":{"type":"string","description":"An ISO 4217 code, chosen when it was recorded (by default the consultant's preferred currency) and never changed. Every figure is in it."},"startDate":{"type":"string","description":"The first day it covers.","format":"date"},"endDate":{"type":["string","null"],"description":"The last day it covers. Null when open-ended.","format":"date"},"budget":{"type":["number","null"],"description":"The most it authorises, before tax. Null when it has none."},"closedDate":{"type":["string","null"],"description":"The day it was closed from: time from then on is not covered. Null unless closed.","format":"date"},"dateStatus":{"type":"string","description":"What its dates say today: not started, active, expiring (30 days or fewer to its last day), expired or closed.","enum":["not_started","active","expiring","expired","closed"]},"createdAt":{"type":["string","null"],"description":"When it was recorded.","format":"date-time"},"updatedAt":{"type":["string","null"],"description":"When it last changed.","format":"date-time"}},"required":["id","number","consultantId","assignmentIds","currency","startDate","endDate","budget","closedDate","dateStatus","createdAt","updatedAt"]},"ConsultantPurchaseOrder":{"type":"object","properties":{"id":{"type":"string","description":"The purchase order's id."},"number":{"type":"string","description":"The consultancy's purchase order number to the consultant, which their payables quote."},"consultantId":{"type":"string","description":"The consultant it is issued to."},"assignmentIds":{"type":"array","description":"The consultant's assignments it covers, 1 to 50.","items":{"type":"string","description":"An assignment's id."}},"currency":{"type":"string","description":"An ISO 4217 code, chosen when it was recorded (by default the consultant's preferred currency) and never changed. Every figure is in it."},"startDate":{"type":"string","description":"The first day it covers.","format":"date"},"endDate":{"type":["string","null"],"description":"The last day it covers. Null when open-ended.","format":"date"},"budget":{"type":["number","null"],"description":"The most it authorises, before tax. Null when it has none."},"closedDate":{"type":["string","null"],"description":"The day it was closed from: time from then on is not covered. Null unless closed.","format":"date"},"dateStatus":{"type":"string","description":"What its dates say today: not started, active, expiring (30 days or fewer to its last day), expired or closed.","enum":["not_started","active","expiring","expired","closed"]},"createdAt":{"type":["string","null"],"description":"When it was recorded.","format":"date-time"},"updatedAt":{"type":["string","null"],"description":"When it last changed.","format":"date-time"},"status":{"type":"string","description":"The date status, except that one in force with nothing left of its budget is exhausted.","enum":["not_started","active","expiring","expired","closed","exhausted"]},"invoiced":{"type":"object","description":"The shares its payables drew on it, 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`).","properties":{"amount":{"type":"number","description":"The amount invoiced."}}},"committed":{"type":"object","description":"Approved time it covers that no invoice has claimed yet.","properties":{"amount":{"type":"number","description":"Its value at the cost rates a payable would charge, else the bill rates, before tax."},"hours":{"type":"number","description":"Its hours."},"unpricedHours":{"type":"number","description":"Hours with no rate to price them, counted here and worth nothing in `amount`."}}},"pending":{"type":"object","description":"Submitted time it covers, not yet approved. It does not reduce `remaining`. Where the organisation has turned on \"Purchase orders control consultants' time\", it counts when a timesheet is submitted: a timesheet whose time, added to invoiced, committed and pending, would pass the budget is refused.","properties":{"amount":{"type":"number","description":"Its value at the cost rates a payable would charge, else the bill rates, before tax."},"hours":{"type":"number","description":"Its hours."},"unpricedHours":{"type":"number","description":"Hours with no rate to price them, counted here and worth nothing in `amount`."}}},"remaining":{"type":["number","null"],"description":"The budget less invoiced and committed. Null when it has no budget."},"usedPercent":{"type":["integer","null"],"description":"Invoiced plus committed as a whole percentage of the budget, rounded down. Null when it has no budget."},"incomplete":{"type":"boolean","description":"True 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":{"type":"array","description":"The payables drawn on it, newest first, discarded ones left out.","items":{"type":"object","description":"A payable and its share.","properties":{"id":{"type":"string","description":"The invoice's id, for `GET /invoices/{id}`."},"invoiceNumber":{"type":"string","description":"The number printed on it."},"amount":{"type":"number","description":"The payable's own total before tax, all of its weeks, as on the invoice."},"share":{"type":"number","description":"What it drew from this purchase order, before tax, fixed when it was raised. A payable's shares add up to its total before tax where every week it bills is covered."}}}}},"required":["id","number","consultantId","assignmentIds","currency","startDate","endDate","budget","closedDate","dateStatus","createdAt","updatedAt","status","invoiced","committed","pending","remaining","usedPercent","incomplete","invoices"]},"ClientPurchaseOrderChange":{"type":"object","properties":{"field":{"type":"string","description":"The purchase order field that changed. A change of several fields at once is one change per field.","enum":["number","startDate","endDate","budget","projectIds","closedDate"]},"before":{"type":["string","number","array","null"],"description":"The 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.","items":{"type":"string","description":"A project's id."}},"after":{"type":["string","number","array","null"],"description":"The 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.","items":{"type":"string","description":"A project's id."}},"reason":{"type":["string","null"],"description":"Why, as given. A change of the budget or a date, and a close, always has one."},"changedBy":{"type":"string","description":"Who 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":{"type":"string","description":"When it was made.","format":"date-time"}},"required":["field","before","after","reason","changedBy","changedAt"]},"ConsultantPurchaseOrderChange":{"type":"object","properties":{"field":{"type":"string","description":"The purchase order field that changed. A change of several fields at once is one change per field.","enum":["number","startDate","endDate","budget","assignmentIds","closedDate"]},"before":{"type":["string","number","array","null"],"description":"The 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, `assignmentIds` an array of ids. Null when it had none.","items":{"type":"string","description":"An assignment's id."}},"after":{"type":["string","number","array","null"],"description":"The 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, `assignmentIds` an array of ids. Null when it had none.","items":{"type":"string","description":"An assignment's id."}},"reason":{"type":["string","null"],"description":"Why, as given. A change of the budget or a date, and a close, always has one."},"changedBy":{"type":"string","description":"Who 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":{"type":"string","description":"When it was made.","format":"date-time"}},"required":["field","before","after","reason","changedBy","changedAt"]},"Event":{"type":"object","properties":{"id":{"type":"string","description":"The event's id. A webhook delivery's `webhook-id` is the same, so a repeat can be dropped."},"type":{"type":"string","description":"What happened.","enum":["timesheet.submitted","timesheet.approved","timesheet.rejected","invoice.raised","invoice.sent","invoice.paid","invoice.discarded","invoice.rejected","client_purchase_order.created","client_purchase_order.changed","client_purchase_order.closed","client_purchase_order.deleted","client_purchase_order.budget_near","client_purchase_order.budget_used","client_purchase_order.ending","consultant_purchase_order.created","consultant_purchase_order.changed","consultant_purchase_order.closed","consultant_purchase_order.deleted","consultant_purchase_order.budget_near","consultant_purchase_order.budget_used","consultant_purchase_order.ending"]},"occurredAt":{"type":"string","description":"When it happened.","format":"date-time"},"data":{"type":"object","description":"The record it happened to.","properties":{"id":{"type":"string","description":"The timesheet's, the invoice's or the purchase order's id."}}}},"required":["id","type","occurredAt","data"]},"Removed":{"type":"object","properties":{"id":{"type":"string","description":"The id of what was removed."},"removed":{"type":"boolean","description":"Always true."}},"required":["id","removed"]}},"responses":{"RateLimited":{"description":"The key has used its allowance. Wait the seconds in Retry-After, then retry.","headers":{"Retry-After":{"description":"Whole seconds to wait before retrying, at least 1.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/clients":{"get":{"operationId":"listClients","tags":["Clients"],"summary":"List clients","description":"A page of your organisation's clients, in the order they were created.\n\nNeeds the `clients:read` scope.","x-scope":"clients:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Client"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"data":[{"id":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Fernhill Logistics Ltd","status":"active","email":"accounts@fernhill-logistics.example","phone":"+44 20 7946 0321","website":"https://fernhill-logistics.example","logoUrl":null,"contactName":"Priya Natarajan","contactEmail":"priya.natarajan@fernhill-logistics.example","contactPhone":"+44 20 7946 0322","currency":"GBP","paymentTermDays":30,"purchaseOrderRequired":true,"address":{"street":"14 Quayside Walk","city":"Bristol","region":"City of Bristol","postalCode":"BS1 4XE","country":"United Kingdom"},"createdAt":"2026-08-14T10:02:31.000Z","updatedAt":"2026-10-01T15:47:09.000Z"}],"nextCursor":"eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createClient","tags":["Clients"],"summary":"Create a client","description":"Adds a client, within your plan's client limit. Audited under the key's name.\n\nNeeds the `clients:write` scope.","x-scope":"clients:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The client's name. Required, and not blank."},"phone":{"type":["string","null"],"description":"A general phone number."},"email":{"type":["string","null"],"description":"A general email address; it must look like one.","format":"email"},"website":{"type":["string","null"],"description":"A full URL, such as https://example.com.","format":"uri"},"contactName":{"type":["string","null"],"description":"The person to contact."},"contactEmail":{"type":["string","null"],"description":"That person's email address.","format":"email"},"contactPhone":{"type":["string","null"],"description":"That person's phone number."},"currency":{"type":["string","null"],"description":"An ISO 4217 code.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]},"paymentTermDays":{"type":["integer","null"],"description":"Days the client has to pay an invoice. Unset uses the organisation's default.","minimum":0,"maximum":365},"address":{"type":["object","null"],"description":"The postal address. Each part is optional.","properties":{"street":{"type":["string","null"],"description":"Street lines."},"city":{"type":["string","null"],"description":"Town or city."},"region":{"type":["string","null"],"description":"County, state or region."},"postalCode":{"type":["string","null"],"description":"Postcode or ZIP."},"country":{"type":["string","null"],"description":"Country."}}}},"required":["name"]},"example":{"name":"Fernhill Logistics Ltd","email":"accounts@fernhill-logistics.example","phone":"+44 20 7946 0321","website":"https://fernhill-logistics.example","contactName":"Priya Natarajan","contactEmail":"priya.natarajan@fernhill-logistics.example","contactPhone":"+44 20 7946 0322","currency":"GBP","paymentTermDays":30,"address":{"street":"14 Quayside Walk","city":"Bristol","region":"City of Bristol","postalCode":"BS1 4XE","country":"United Kingdom"}}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Client"},{"$ref":"#/components/schemas/Written"}]},"example":{"id":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Fernhill Logistics Ltd","status":"active","email":"accounts@fernhill-logistics.example","phone":"+44 20 7946 0321","website":"https://fernhill-logistics.example","logoUrl":null,"contactName":"Priya Natarajan","contactEmail":"priya.natarajan@fernhill-logistics.example","contactPhone":"+44 20 7946 0322","currency":"GBP","paymentTermDays":30,"purchaseOrderRequired":true,"address":{"street":"14 Quayside Walk","city":"Bristol","region":"City of Bristol","postalCode":"BS1 4XE","country":"United Kingdom"},"createdAt":"2026-08-14T10:02:31.000Z","updatedAt":"2026-10-01T15:47:09.000Z"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clients/{id}":{"get":{"operationId":"getClient","tags":["Clients"],"summary":"Read a client","description":"One client.\n\nNeeds the `clients:read` scope.","x-scope":"clients:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Client"},"example":{"id":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Fernhill Logistics Ltd","status":"active","email":"accounts@fernhill-logistics.example","phone":"+44 20 7946 0321","website":"https://fernhill-logistics.example","logoUrl":null,"contactName":"Priya Natarajan","contactEmail":"priya.natarajan@fernhill-logistics.example","contactPhone":"+44 20 7946 0322","currency":"GBP","paymentTermDays":30,"purchaseOrderRequired":true,"address":{"street":"14 Quayside Walk","city":"Bristol","region":"City of Bristol","postalCode":"BS1 4XE","country":"United Kingdom"},"createdAt":"2026-08-14T10:02:31.000Z","updatedAt":"2026-10-01T15:47:09.000Z"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateClient","tags":["Clients"],"summary":"Update a client","description":"Changes the fields sent and keeps the rest. `null` clears a field. Audited under the key's name.\n\nNeeds the `clients:write` scope.","x-scope":"clients:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The client's name. Required, and not blank."},"phone":{"type":["string","null"],"description":"A general phone number."},"email":{"type":["string","null"],"description":"A general email address; it must look like one.","format":"email"},"website":{"type":["string","null"],"description":"A full URL, such as https://example.com.","format":"uri"},"contactName":{"type":["string","null"],"description":"The person to contact."},"contactEmail":{"type":["string","null"],"description":"That person's email address.","format":"email"},"contactPhone":{"type":["string","null"],"description":"That person's phone number."},"currency":{"type":["string","null"],"description":"An ISO 4217 code.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]},"paymentTermDays":{"type":["integer","null"],"description":"Days the client has to pay an invoice. Unset uses the organisation's default.","minimum":0,"maximum":365},"address":{"type":["object","null"],"description":"The postal address. Each part is optional.","properties":{"street":{"type":["string","null"],"description":"Street lines."},"city":{"type":["string","null"],"description":"Town or city."},"region":{"type":["string","null"],"description":"County, state or region."},"postalCode":{"type":["string","null"],"description":"Postcode or ZIP."},"country":{"type":["string","null"],"description":"Country."}}},"purchaseOrderRequired":{"type":"boolean","description":"Whether invoicing the client needs a purchase order. Turning it on needs purchase orders on your plan."}},"required":[]},"example":{"contactName":"Owen Bradshaw","contactEmail":"owen.bradshaw@fernhill-logistics.example","paymentTermDays":45}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Client"},{"$ref":"#/components/schemas/Written"}]},"example":{"id":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Fernhill Logistics Ltd","status":"active","email":"accounts@fernhill-logistics.example","phone":"+44 20 7946 0321","website":"https://fernhill-logistics.example","logoUrl":null,"contactName":"Owen Bradshaw","contactEmail":"owen.bradshaw@fernhill-logistics.example","contactPhone":"+44 20 7946 0322","currency":"GBP","paymentTermDays":45,"purchaseOrderRequired":true,"address":{"street":"14 Quayside Walk","city":"Bristol","region":"City of Bristol","postalCode":"BS1 4XE","country":"United Kingdom"},"createdAt":"2026-08-14T10:02:31.000Z","updatedAt":"2026-10-01T15:47:09.000Z"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/clients/{id}/archive":{"post":{"operationId":"archiveClient","tags":["Clients"],"summary":"Archive a client","description":"Archives a client. There is no permanent delete. Takes no body.\n\nNeeds the `clients:write` scope.","x-scope":"clients:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Client"},{"$ref":"#/components/schemas/Written"}]},"example":{"id":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Fernhill Logistics Ltd","status":"archived","email":"accounts@fernhill-logistics.example","phone":"+44 20 7946 0321","website":"https://fernhill-logistics.example","logoUrl":null,"contactName":"Priya Natarajan","contactEmail":"priya.natarajan@fernhill-logistics.example","contactPhone":"+44 20 7946 0322","currency":"GBP","paymentTermDays":30,"purchaseOrderRequired":true,"address":{"street":"14 Quayside Walk","city":"Bristol","region":"City of Bristol","postalCode":"BS1 4XE","country":"United Kingdom"},"createdAt":"2026-08-14T10:02:31.000Z","updatedAt":"2026-10-01T15:47:09.000Z"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects":{"get":{"operationId":"listProjects","tags":["Projects"],"summary":"List projects","description":"A page of your organisation's projects, all or one client's.\n\nNeeds the `projects:read` scope.","x-scope":"projects:read","parameters":[{"name":"clientId","in":"query","required":false,"schema":{"type":"string","description":"Only this client's projects."},"description":"Only this client's projects."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"data":[{"id":"k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t","clientId":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Warehouse Platform Migration","title":"Warehouse management platform migration","description":"Moving Fernhill's warehouse system to a cloud platform.","comments":null,"status":"active","startDate":"2026-09-01","endDate":"2027-02-26","hourlyRate":95,"currency":"GBP","logoUrl":null,"approvalsRequired":1,"sequentialApproval":true,"createdAt":"2026-08-20T08:30:00.000Z","updatedAt":"2026-09-01T07:55:12.000Z"}],"nextCursor":"eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createProject","tags":["Projects"],"summary":"Create a project","description":"Adds a project under one of your clients, in planning, within your plan's project limit.\n\nNeeds the `projects:write` scope.","x-scope":"projects:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"clientId":{"type":"string","description":"The client it is for."},"name":{"type":"string","description":"The project's name. Not blank."},"title":{"type":["string","null"],"description":"A longer title."},"description":{"type":["string","null"],"description":"What the project is."},"startDate":{"type":["string","null"],"description":"The day it starts.","format":"date"},"endDate":{"type":["string","null"],"description":"The day it ends. Never before `startDate`; it may be the same day.","format":"date"},"hourlyRate":{"type":["number","null"],"description":"The rate the client is charged an hour, in `currency`, as stored.","minimum":0,"maximum":1000000},"currency":{"type":["string","null"],"description":"An ISO 4217 code.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]},"approvalsRequired":{"type":"integer","description":"The number of approvers a project asked for. It has no effect. Deprecated on 1 December 2026. It has never changed approval: a timesheet needs every approver on the project, then final approval. Removed in `/v2`.","minimum":1,"maximum":10,"deprecated":true},"sequentialApproval":{"type":"boolean","description":"Turn sequential approval on or off. Turning it on needs the Margin or Enterprise plan."}},"required":["clientId","name"]},"example":{"clientId":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Warehouse Platform Migration","title":"Warehouse management platform migration","description":"Moving Fernhill's warehouse system to a cloud platform.","startDate":"2026-09-01","endDate":"2027-02-26","hourlyRate":95,"currency":"GBP","sequentialApproval":true}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Project"},{"$ref":"#/components/schemas/Written"}]},"example":{"id":"k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t","clientId":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Warehouse Platform Migration","title":"Warehouse management platform migration","description":"Moving Fernhill's warehouse system to a cloud platform.","comments":null,"status":"planning","startDate":"2026-09-01","endDate":"2027-02-26","hourlyRate":95,"currency":"GBP","logoUrl":null,"approvalsRequired":1,"sequentialApproval":true,"createdAt":"2026-08-20T08:30:00.000Z","updatedAt":"2026-09-01T07:55:12.000Z"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}":{"get":{"operationId":"getProject","tags":["Projects"],"summary":"Read a project","description":"One project.\n\nNeeds the `projects:read` scope.","x-scope":"projects:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"},"example":{"id":"k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t","clientId":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Warehouse Platform Migration","title":"Warehouse management platform migration","description":"Moving Fernhill's warehouse system to a cloud platform.","comments":null,"status":"active","startDate":"2026-09-01","endDate":"2027-02-26","hourlyRate":95,"currency":"GBP","logoUrl":null,"approvalsRequired":1,"sequentialApproval":true,"createdAt":"2026-08-20T08:30:00.000Z","updatedAt":"2026-09-01T07:55:12.000Z"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProject","tags":["Projects"],"summary":"Update a project","description":"Changes the fields sent, and with `status`, the status. `null` clears a field. A project never moves to another client.\n\nNeeds the `projects:write` scope.","x-scope":"projects:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","description":"The project's name. Not blank."},"title":{"type":["string","null"],"description":"A longer title."},"description":{"type":["string","null"],"description":"What the project is."},"startDate":{"type":["string","null"],"description":"The day it starts.","format":"date"},"endDate":{"type":["string","null"],"description":"The day it ends. Never before `startDate`; it may be the same day.","format":"date"},"hourlyRate":{"type":["number","null"],"description":"The rate the client is charged an hour, in `currency`, as stored.","minimum":0,"maximum":1000000},"currency":{"type":["string","null"],"description":"An ISO 4217 code.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]},"approvalsRequired":{"type":"integer","description":"The number of approvers a project asked for. It has no effect. Deprecated on 1 December 2026. It has never changed approval: a timesheet needs every approver on the project, then final approval. Removed in `/v2`.","minimum":1,"maximum":10,"deprecated":true},"sequentialApproval":{"type":"boolean","description":"Turn sequential approval on or off. Turning it on needs the Margin or Enterprise plan."},"comments":{"type":["string","null"],"description":"Internal notes."},"status":{"type":"string","description":"The status to set. Archiving is a status; there is no delete.","enum":["planning","active","paused","completed","archived"]}},"required":[]},"example":{"status":"active","endDate":"2027-03-31"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Project"},{"$ref":"#/components/schemas/Written"}]},"example":{"id":"k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t","clientId":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Warehouse Platform Migration","title":"Warehouse management platform migration","description":"Moving Fernhill's warehouse system to a cloud platform.","comments":null,"status":"active","startDate":"2026-09-01","endDate":"2027-03-31","hourlyRate":95,"currency":"GBP","logoUrl":null,"approvalsRequired":1,"sequentialApproval":true,"createdAt":"2026-08-20T08:30:00.000Z","updatedAt":"2026-09-01T07:55:12.000Z"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/consultants":{"get":{"operationId":"listConsultants","tags":["Consultants"],"summary":"List consultants","description":"A page of your organisation's consultants, inactive ones included. Never bank or tax details. There is no consultant write.\n\nNeeds the `consultants:read` scope.","x-scope":"consultants:read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Consultant"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"data":[{"id":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v","name":"Tomasz Wierzbicki","email":"tomasz@wierzbicki-consulting.example","isActive":true,"dailyRate":650,"hourlyRate":85,"preferredCurrency":"GBP","companyRegNumber":"09876543","paymentTerms":"30 days from invoice","paymentTermDays":30,"createdAt":"2026-08-22T13:12:45.000Z","updatedAt":"2026-08-22T13:20:03.000Z"}],"nextCursor":"eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/consultants/{id}":{"get":{"operationId":"getConsultant","tags":["Consultants"],"summary":"Read a consultant","description":"One consultant.\n\nNeeds the `consultants:read` scope.","x-scope":"consultants:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Consultant"},"example":{"id":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v","name":"Tomasz Wierzbicki","email":"tomasz@wierzbicki-consulting.example","isActive":true,"dailyRate":650,"hourlyRate":85,"preferredCurrency":"GBP","companyRegNumber":"09876543","paymentTerms":"30 days from invoice","paymentTermDays":30,"createdAt":"2026-08-22T13:12:45.000Z","updatedAt":"2026-08-22T13:20:03.000Z"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assignments":{"get":{"operationId":"listAssignments","tags":["Assignments"],"summary":"List assignments","description":"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.\n\nNeeds the `assignments:read` scope.","x-scope":"assignments:read","parameters":[{"name":"projectId","in":"query","required":false,"schema":{"type":"string","description":"Only this project's assignments."},"description":"Only this project's assignments."},{"name":"consultantId","in":"query","required":false,"schema":{"type":"string","description":"Only this consultant's assignments."},"description":"Only this consultant's assignments."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Assignment"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"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"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createAssignment","tags":["Assignments"],"summary":"Assign a consultant to a project","description":"One assignment per consultant per project: a second is 409 `already_exists`.\n\nNeeds the `assignments:write` scope.","x-scope":"assignments:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"projectId":{"type":"string","description":"The project."},"consultantId":{"type":"string","description":"The consultant."},"rate":{"type":["number","null"],"description":"The rate charged to the client.","minimum":0,"maximum":1000000},"rateType":{"type":["string","null"],"description":"Hourly or daily. Cleared with its rate; hourly when a rate is sent without one.","enum":["hourly","daily",null]},"costRate":{"type":["number","null"],"description":"The rate paid to the consultant. Needs a `rate`.","minimum":0,"maximum":1000000},"costRateType":{"type":["string","null"],"description":"Whether `costRate` is hourly or daily.","enum":["hourly","daily",null]},"currency":{"type":["string","null"],"description":"An ISO 4217 code.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]},"startDate":{"type":["string","null"],"description":"The day the consultant starts on the project.","format":"date"},"consultantPurchaseOrderNumber":{"type":["string","null"],"description":"On one line; trimmed; blank is none; at most 60 characters.","maxLength":60}},"required":["projectId","consultantId"]},"example":{"projectId":"k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t","consultantId":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v","rate":760,"rateType":"daily","costRate":650,"costRateType":"daily","currency":"GBP","startDate":"2026-09-01","consultantPurchaseOrderNumber":"PO-C-0042"}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Assignment"},{"$ref":"#/components/schemas/Written"}]},"example":{"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"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assignments/{id}":{"get":{"operationId":"getAssignment","tags":["Assignments"],"summary":"Read an assignment","description":"One assignment.\n\nNeeds the `assignments:read` scope.","x-scope":"assignments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Assignment"},"example":{"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"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateAssignment","tags":["Assignments"],"summary":"Update an assignment","description":"Changes the fields sent and keeps the rest. A change of purchase order number is audited.\n\nNeeds the `assignments:write` scope.","x-scope":"assignments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"rate":{"type":["number","null"],"description":"The rate charged to the client.","minimum":0,"maximum":1000000},"rateType":{"type":["string","null"],"description":"Hourly or daily. Cleared with its rate; hourly when a rate is sent without one.","enum":["hourly","daily",null]},"costRate":{"type":["number","null"],"description":"The rate paid to the consultant. Needs a `rate`.","minimum":0,"maximum":1000000},"costRateType":{"type":["string","null"],"description":"Whether `costRate` is hourly or daily.","enum":["hourly","daily",null]},"currency":{"type":["string","null"],"description":"An ISO 4217 code.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]},"startDate":{"type":["string","null"],"description":"The day the consultant starts on the project.","format":"date"},"consultantPurchaseOrderNumber":{"type":["string","null"],"description":"On one line; trimmed; blank is none; at most 60 characters.","maxLength":60}},"required":[]},"example":{"rate":800,"costRate":680}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Assignment"},{"$ref":"#/components/schemas/Written"}]},"example":{"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"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"removeAssignment","tags":["Assignments"],"summary":"Remove an assignment","description":"Removes an assignment, as the dashboard does.\n\nNeeds the `assignments:write` scope.","x-scope":"assignments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Removed"},"example":{"id":"n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x","removed":true}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices":{"get":{"operationId":"listInvoices","tags":["Invoices"],"summary":"List invoices","description":"A page of one kind of your organisation's invoices, in the order they were raised. Discarded invoices are left out unless asked for. A filtered page can hold fewer than `limit`, or none, while `nextCursor` leads on.\n\nNeeds the `invoices:read` scope.","x-scope":"invoices:read","parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","description":"Which kind. Required: the two are never listed together.","enum":["receivable","payable"]},"description":"Which kind. Required: the two are never listed together."},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only invoices in this status, as the dashboard reports it.","enum":["draft","sent","paid","overdue","archived","discarded","rejected"]},"description":"Only invoices in this status, as the dashboard reports it."},{"name":"from","in":"query","required":false,"schema":{"type":"string","description":"Only invoices dated on or after this day.","format":"date"},"description":"Only invoices dated on or after this day."},{"name":"to","in":"query","required":false,"schema":{"type":"string","description":"Only invoices dated on or before this day.","format":"date"},"description":"Only invoices dated on or before this day."},{"name":"discarded","in":"query","required":false,"schema":{"type":"boolean","description":"Include discarded invoices."},"description":"Include discarded invoices."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSummary"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"data":[{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a","kind":"receivable","invoiceNumber":"INV-0107","status":"sent","isOverdue":false,"daysPastDue":null,"currency":"GBP","total":9120,"invoiceDate":"2026-11-02T00:00:00.000Z","issuedAt":"2026-11-02T00:00:00.000Z","dueDate":"2026-12-02T00:00:00.000Z","paidAt":null,"clientId":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","consultantId":null,"projectId":"k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t","clientPurchaseOrderId":"q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j","purchaseOrderNumber":"FL-PO-2291","consultantPurchaseOrderNumbers":[],"createdAt":"2026-11-02T09:41:17.000Z","updatedAt":"2026-11-02T10:05:42.000Z"}],"nextCursor":"eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/invoices/{id}":{"get":{"operationId":"getInvoice","tags":["Invoices"],"summary":"Read an invoice","description":"One invoice in full: its lines, totals and tax as printed, its client and purchase orders. There is no invoice write and no PDF.\n\nNeeds the `invoices:read` scope.","x-scope":"invoices:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"},"example":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a","kind":"receivable","invoiceNumber":"INV-0107","status":"sent","isOverdue":false,"daysPastDue":null,"currency":"GBP","total":9120,"invoiceDate":"2026-11-02T00:00:00.000Z","issuedAt":"2026-11-02T00:00:00.000Z","dueDate":"2026-12-02T00:00:00.000Z","paidAt":null,"clientId":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","consultantId":null,"projectId":"k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t","clientPurchaseOrderId":"q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j","purchaseOrderNumber":"FL-PO-2291","consultantPurchaseOrderNumbers":[],"createdAt":"2026-11-02T09:41:17.000Z","updatedAt":"2026-11-02T10:05:42.000Z","client":{"id":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","name":"Fernhill Logistics Ltd"},"overBudgetReason":null,"notCoveredReason":null,"consultantPurchaseOrders":[],"subtotal":7600,"taxLines":[{"name":"VAT","rate":20,"registrationNumber":"GB123456789","amount":1520}],"lines":[{"description":"Warehouse Platform Migration, October: Tomasz Wierzbicki","quantity":10,"unit":"days","unitPrice":760,"amount":7600,"currency":"GBP","consultantId":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v"}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/client-purchase-orders":{"get":{"operationId":"listClientPurchaseOrders","tags":["Client purchase orders"],"summary":"List client purchase orders","description":"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.\n\nNeeds the `purchase_orders:read` scope.","x-scope":"purchase_orders:read","parameters":[{"name":"clientId","in":"query","required":false,"schema":{"type":"string","description":"Only this client's purchase orders."},"description":"Only this client's purchase orders."},{"name":"projectId","in":"query","required":false,"schema":{"type":"string","description":"Only those covering this project."},"description":"Only those covering this project."},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only those with this date status today.","enum":["not_started","active","expiring","expired","closed"]},"description":"Only those with this date status today."},{"name":"covers","in":"query","required":false,"schema":{"type":"string","description":"Only those covering this day. With `projectId`, the one purchase order a timesheet period starting that day bills against, or none.","format":"date"},"description":"Only those covering this day. With `projectId`, the one purchase order a timesheet period starting that day bills against, or none."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClientPurchaseOrderSummary"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"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"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createClientPurchaseOrder","tags":["Client purchase orders"],"summary":"Record a client purchase order","description":"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.\n\nNeeds the `purchase_orders:write` scope.","x-scope":"purchase_orders:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"clientId":{"type":"string","description":"The client that issued it."},"number":{"type":"string","description":"The 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.","maxLength":60},"projectIds":{"type":"array","description":"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.","items":{"type":"string","description":"A project's id."}},"startDate":{"type":"string","description":"The first day it covers.","format":"date"},"endDate":{"type":["string","null"],"description":"The last day it covers. Absent or null for open-ended.","format":"date"},"budget":{"type":["number","null"],"description":"The most it authorises, before tax, in the client's currency. More than zero; absent or null for none.","maximum":100000000}},"required":["number","clientId","projectIds","startDate"]},"example":{"number":"FL-PO-2291","clientId":"j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r","projectIds":["k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t"],"startDate":"2026-09-01","budget":60000}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ClientPurchaseOrder"},{"$ref":"#/components/schemas/Written"}]},"example":{"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":[]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/client-purchase-orders/{id}":{"get":{"operationId":"getClientPurchaseOrder","tags":["Client purchase orders"],"summary":"Read a client purchase order","description":"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.\n\nNeeds the `purchase_orders:read` scope.","x-scope":"purchase_orders:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientPurchaseOrder"},"example":{"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}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateClientPurchaseOrder","tags":["Client purchase orders"],"summary":"Amend a client purchase order","description":"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.\n\nNeeds the `purchase_orders:write` scope.","x-scope":"purchase_orders:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"number":{"type":"string","description":"The 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.","maxLength":60},"projectIds":{"type":"array","description":"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.","items":{"type":"string","description":"A project's id."}},"startDate":{"type":"string","description":"The first day it covers.","format":"date"},"endDate":{"type":["string","null"],"description":"The last day it covers. Absent or null for open-ended.","format":"date"},"budget":{"type":["number","null"],"description":"The most it authorises, before tax, in the client's currency. More than zero; absent or null for none.","maximum":100000000},"reason":{"type":"string","description":"Why, kept in its history. Required when the budget or a date changes.","maxLength":500}},"required":[]},"example":{"budget":72000,"reason":"Phase two scope agreed with procurement."}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ClientPurchaseOrder"},{"$ref":"#/components/schemas/Written"}]},"example":{"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}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteClientPurchaseOrder","tags":["Client purchase orders"],"summary":"Delete a client purchase order","description":"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.\n\nNeeds the `purchase_orders:write` scope.","x-scope":"purchase_orders:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Removed"},"example":{"id":"q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j","removed":true}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/client-purchase-orders/{id}/changes":{"get":{"operationId":"listClientPurchaseOrderChanges","tags":["Client purchase orders"],"summary":"List a client purchase order's changes","description":"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.\n\nNeeds the `purchase_orders:read` scope.","x-scope":"purchase_orders:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClientPurchaseOrderChange"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"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"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/client-purchase-orders/{id}/close":{"post":{"operationId":"closeClientPurchaseOrder","tags":["Client purchase orders"],"summary":"Close a client purchase order","description":"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.\n\nNeeds the `purchase_orders:write` scope.","x-scope":"purchase_orders:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"closedDate":{"type":"string","description":"The first day it no longer covers: on or after its start, and not after its end.","format":"date"},"reason":{"type":"string","description":"Why, kept in its history. Required.","maxLength":500}},"required":["closedDate","reason"]},"example":{"closedDate":"2026-11-30","reason":"Replaced by the purchase order for phase two."}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ClientPurchaseOrder"},{"$ref":"#/components/schemas/Written"}]},"example":{"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}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/consultant-purchase-orders":{"get":{"operationId":"listConsultantPurchaseOrders","tags":["Consultant purchase orders"],"summary":"List consultant purchase orders","description":"A page of your organisation's consultant 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.\n\nNeeds the `purchase_orders:read` scope.","x-scope":"purchase_orders:read","parameters":[{"name":"consultantId","in":"query","required":false,"schema":{"type":"string","description":"Only this consultant's purchase orders."},"description":"Only this consultant's purchase orders."},{"name":"assignmentId","in":"query","required":false,"schema":{"type":"string","description":"Only those covering this assignment."},"description":"Only those covering this assignment."},{"name":"status","in":"query","required":false,"schema":{"type":"string","description":"Only those with this date status today.","enum":["not_started","active","expiring","expired","closed"]},"description":"Only those with this date status today."},{"name":"covers","in":"query","required":false,"schema":{"type":"string","description":"Only those covering this day. With `assignmentId`, the one purchase order a timesheet period starting that day draws on, or none.","format":"date"},"description":"Only those covering this day. With `assignmentId`, the one purchase order a timesheet period starting that day draws on, or none."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConsultantPurchaseOrderSummary"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"data":[{"id":"s29f3h6k9m2p5r8t1v4x7z0c3e6g9j2l","number":"CPO-0031","consultantId":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v","assignmentIds":["n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x"],"currency":"GBP","startDate":"2026-09-01","endDate":"2027-02-26","budget":52000,"closedDate":null,"dateStatus":"active","createdAt":"2026-08-28T14:31:40.000Z","updatedAt":"2026-10-12T09:25:11.000Z"}],"nextCursor":"eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createConsultantPurchaseOrder","tags":["Consultant purchase orders"],"summary":"Record a consultant purchase order","description":"Records your purchase order to a consultant for some of their assignments, in the currency sent, else the consultant's preferred currency, as the dashboard defaults to. A duplicate number is 409 `already_exists`; an assignment that is not your organisation's is 404 `not_found`; any other rule broken, such as an overlap or an assignment of another consultant, is 400 `invalid_request` in the dashboard's words. Needs purchase orders on your plan.\n\nNeeds the `purchase_orders:write` scope.","x-scope":"purchase_orders:write","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"consultantId":{"type":"string","description":"The consultant it is issued to."},"number":{"type":"string","description":"Your purchase order number to the consultant, on one line, trimmed, at most 60 characters. Unique for the consultant: a second is 409 `already_exists`. It cannot change once a payable quotes it.","maxLength":60},"assignmentIds":{"type":"array","description":"The consultant's assignments it covers, 1 to 50, every one that consultant's and none on an archived project when added. An assignment has one purchase order at a time, so the dates cannot overlap another's on the same assignment.","items":{"type":"string","description":"An assignment's id."}},"startDate":{"type":"string","description":"The first day it covers.","format":"date"},"endDate":{"type":["string","null"],"description":"The last day it covers. Absent or null for open-ended.","format":"date"},"budget":{"type":["number","null"],"description":"The most it authorises, before tax, in its currency. More than zero; absent or null for none.","maximum":100000000},"currency":{"type":["string","null"],"description":"An ISO 4217 code: the currency its budget and figures are in. Absent or null for the consultant's preferred currency, else GBP. It cannot be changed once recorded.","enum":["GBP","USD","EUR","AUD","CAD","NZD","ZAR",null]}},"required":["number","consultantId","assignmentIds","startDate"]},"example":{"number":"CPO-0031","consultantId":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v","assignmentIds":["n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x"],"startDate":"2026-09-01","budget":52000}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ConsultantPurchaseOrder"},{"$ref":"#/components/schemas/Written"}]},"example":{"id":"s29f3h6k9m2p5r8t1v4x7z0c3e6g9j2l","number":"CPO-0031","consultantId":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v","assignmentIds":["n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x"],"currency":"GBP","startDate":"2026-09-01","endDate":null,"budget":52000,"closedDate":null,"dateStatus":"active","createdAt":"2026-08-28T14:31:40.000Z","updatedAt":"2026-10-12T09:25:11.000Z","status":"active","invoiced":{"amount":0},"committed":{"amount":0,"hours":0,"unpricedHours":0},"pending":{"amount":0,"hours":0,"unpricedHours":0},"remaining":52000,"usedPercent":0,"incomplete":false,"invoices":[]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/consultant-purchase-orders/{id}":{"get":{"operationId":"getConsultantPurchaseOrder","tags":["Consultant purchase orders"],"summary":"Read a consultant purchase order","description":"One consultant purchase order with the figures its dashboard page shows: invoiced, committed, pending, remaining and the used percentage, its full status, and the payables drawn on it with each one's share. Needs purchase orders on your plan.\n\nNeeds the `purchase_orders:read` scope.","x-scope":"purchase_orders:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsultantPurchaseOrder"},"example":{"id":"s29f3h6k9m2p5r8t1v4x7z0c3e6g9j2l","number":"CPO-0031","consultantId":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v","assignmentIds":["n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x"],"currency":"GBP","startDate":"2026-09-01","endDate":"2027-02-26","budget":52000,"closedDate":null,"dateStatus":"active","createdAt":"2026-08-28T14:31:40.000Z","updatedAt":"2026-10-12T09:25:11.000Z","status":"active","invoiced":{"amount":13000},"committed":{"amount":6500,"hours":80,"unpricedHours":0},"pending":{"amount":3250,"hours":40,"unpricedHours":0},"remaining":32500,"usedPercent":37,"incomplete":false,"invoices":[{"id":"u74h0k3n6q9s2v5x8z1c4e7g0j3m6p9r","invoiceNumber":"TW-2026-10","amount":6500,"share":6500},{"id":"v16j2m5p8r1u4w7y0b3d6f9h2k5n8q1s","invoiceNumber":"TW-2026-09","amount":6500,"share":6500}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateConsultantPurchaseOrder","tags":["Consultant purchase orders"],"summary":"Amend a consultant purchase order","description":"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 its payables have drawn, the dates must still cover every week a payable drew on it, an assignment with time drawn on it cannot be removed, and a closed one cannot be changed. Its currency cannot change: `currency` is refused, so delete one nothing has drawn on and record it again instead. Needs purchase orders on your plan.\n\nNeeds the `purchase_orders:write` scope.","x-scope":"purchase_orders:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"number":{"type":"string","description":"Your purchase order number to the consultant, on one line, trimmed, at most 60 characters. Unique for the consultant: a second is 409 `already_exists`. It cannot change once a payable quotes it.","maxLength":60},"assignmentIds":{"type":"array","description":"The consultant's assignments it covers, 1 to 50, every one that consultant's and none on an archived project when added. An assignment has one purchase order at a time, so the dates cannot overlap another's on the same assignment.","items":{"type":"string","description":"An assignment's id."}},"startDate":{"type":"string","description":"The first day it covers.","format":"date"},"endDate":{"type":["string","null"],"description":"The last day it covers. Absent or null for open-ended.","format":"date"},"budget":{"type":["number","null"],"description":"The most it authorises, before tax, in its currency. More than zero; absent or null for none.","maximum":100000000},"reason":{"type":"string","description":"Why, kept in its history. Required when the budget or a date changes.","maxLength":500}},"required":[]},"example":{"budget":60000,"reason":"Phase two scope agreed with procurement."}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ConsultantPurchaseOrder"},{"$ref":"#/components/schemas/Written"}]},"example":{"id":"s29f3h6k9m2p5r8t1v4x7z0c3e6g9j2l","number":"CPO-0031","consultantId":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v","assignmentIds":["n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x"],"currency":"GBP","startDate":"2026-09-01","endDate":"2027-02-26","budget":60000,"closedDate":null,"dateStatus":"active","createdAt":"2026-08-28T14:31:40.000Z","updatedAt":"2026-10-12T09:25:11.000Z","status":"active","invoiced":{"amount":13000},"committed":{"amount":6500,"hours":80,"unpricedHours":0},"pending":{"amount":3250,"hours":40,"unpricedHours":0},"remaining":40500,"usedPercent":32,"incomplete":false,"invoices":[{"id":"u74h0k3n6q9s2v5x8z1c4e7g0j3m6p9r","invoiceNumber":"TW-2026-10","amount":6500,"share":6500},{"id":"v16j2m5p8r1u4w7y0b3d6f9h2k5n8q1s","invoiceNumber":"TW-2026-09","amount":6500,"share":6500}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteConsultantPurchaseOrder","tags":["Consultant purchase orders"],"summary":"Delete a consultant purchase order","description":"Deletes one nothing has drawn on, with its history: no payable 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.\n\nNeeds the `purchase_orders:write` scope.","x-scope":"purchase_orders:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Removed"},"example":{"id":"s29f3h6k9m2p5r8t1v4x7z0c3e6g9j2l","removed":true}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/consultant-purchase-orders/{id}/changes":{"get":{"operationId":"listConsultantPurchaseOrderChanges","tags":["Consultant purchase orders"],"summary":"List a consultant purchase order's changes","description":"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.\n\nNeeds the `purchase_orders:read` scope.","x-scope":"purchase_orders:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConsultantPurchaseOrderChange"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"data":[{"field":"budget","before":45000,"after":52000,"reason":"Phase two scope agreed with procurement.","changedBy":"Hannah Okafor","changedAt":"2026-10-12T09:22:48.000Z"}],"nextCursor":"eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/consultant-purchase-orders/{id}/close":{"post":{"operationId":"closeConsultantPurchaseOrder","tags":["Consultant purchase orders"],"summary":"Close a consultant purchase order","description":"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 week a payable drew on it uncovered. Needs purchase orders on your plan.\n\nNeeds the `purchase_orders:write` scope.","x-scope":"purchase_orders:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The record's id, as its list and its create answer it. An id from another organisation answers 404, the same as one that does not exist."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send one to make a retry safe: a repeat within a day answers as the first did."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"closedDate":{"type":"string","description":"The first day it no longer covers: on or after its start, and not after its end.","format":"date"},"reason":{"type":"string","description":"Why, kept in its history. Required.","maxLength":500}},"required":["closedDate","reason"]},"example":{"closedDate":"2026-11-30","reason":"Replaced by the purchase order for phase two."}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ConsultantPurchaseOrder"},{"$ref":"#/components/schemas/Written"}]},"example":{"id":"s29f3h6k9m2p5r8t1v4x7z0c3e6g9j2l","number":"CPO-0031","consultantId":"m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v","assignmentIds":["n68s1u4w7y0b3d6f9h2k5m8p1r4t7v0x"],"currency":"GBP","startDate":"2026-09-01","endDate":"2027-02-26","budget":52000,"closedDate":"2026-11-30","dateStatus":"closed","createdAt":"2026-08-28T14:31:40.000Z","updatedAt":"2026-10-12T09:25:11.000Z","status":"closed","invoiced":{"amount":13000},"committed":{"amount":6500,"hours":80,"unpricedHours":0},"pending":{"amount":3250,"hours":40,"unpricedHours":0},"remaining":32500,"usedPercent":37,"incomplete":false,"invoices":[{"id":"u74h0k3n6q9s2v5x8z1c4e7g0j3m6p9r","invoiceNumber":"TW-2026-10","amount":6500,"share":6500},{"id":"v16j2m5p8r1u4w7y0b3d6f9h2k5n8q1s","invoiceNumber":"TW-2026-09","amount":6500,"share":6500}]}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"operationId":"listEvents","tags":["Events"],"summary":"List events","description":"Timesheet, invoice and purchase order events, oldest first, from `since` or the start of the 30 days kept. Use it to catch up after a webhook outage.\n\nNeeds the `events:read` scope.","x-scope":"events:read","parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"string","description":"Only events at or after this time.","format":"date-time"},"description":"Only events at or after this time."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"How many to a page, 1 to 100. 25 when absent.","minimum":1,"maximum":100},"description":"How many to a page, 1 to 100. 25 when absent."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"The `nextCursor` from the page before."},"description":"The `nextCursor` from the page before."}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"nextCursor":{"type":["string","null"],"description":"The cursor for the next page; null on the last."}},"required":["data","nextCursor"]},"example":{"data":[{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"invoice.sent","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}],"nextCursor":"eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"}}}},"429":{"$ref":"#/components/responses/RateLimited"},"default":{"description":"An error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"timesheet.submitted":{"post":{"summary":"timesheet.submitted","description":"A consultant submitted a timesheet for approval.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"timesheet.submitted","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"timesheet.approved":{"post":{"summary":"timesheet.approved","description":"A timesheet was finally approved, once: by a consultancy admin, by its last approver where the consultancy has chosen that, or by an admin override. An approver signing off a step that is not the last is not this event.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"timesheet.approved","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"timesheet.rejected":{"post":{"summary":"timesheet.rejected","description":"A timesheet was rejected, by an admin or by one of its approvers.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"timesheet.rejected","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"invoice.raised":{"post":{"summary":"invoice.raised","description":"An invoice was raised, of either kind. A consultant's time in more than one currency is raised as one payable per currency, each with its own event.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"invoice.raised","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"invoice.sent":{"post":{"summary":"invoice.sent","description":"An invoice was marked as sent.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"invoice.sent","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"invoice.paid":{"post":{"summary":"invoice.paid","description":"An invoice was marked as paid.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"invoice.paid","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"invoice.discarded":{"post":{"summary":"invoice.discarded","description":"An invoice was discarded.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"invoice.discarded","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"invoice.rejected":{"post":{"summary":"invoice.rejected","description":"The consultancy rejected a consultant's invoice it had been sent, with a reason. Its weeks can be invoiced again.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"invoice.rejected","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"client_purchase_order.created":{"post":{"summary":"client_purchase_order.created","description":"A client purchase order was recorded.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"client_purchase_order.created","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"client_purchase_order.changed":{"post":{"summary":"client_purchase_order.changed","description":"A client purchase order's number, dates, budget or projects were changed.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"client_purchase_order.changed","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"client_purchase_order.closed":{"post":{"summary":"client_purchase_order.closed","description":"A client purchase order was closed.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"client_purchase_order.closed","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"client_purchase_order.deleted":{"post":{"summary":"client_purchase_order.deleted","description":"A client purchase order was deleted. Its id no longer reads.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"client_purchase_order.deleted","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"client_purchase_order.budget_near":{"post":{"summary":"client_purchase_order.budget_near","description":"Invoiced plus committed on a client purchase order reached the consultancy's nearly-used percentage of its budget, 85% unless the consultancy changed it. Recorded once by the daily check, and again after its budget is changed, or after the consultancy changes its nearly-used percentage while the purchase order is past the new one.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"client_purchase_order.budget_near","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"client_purchase_order.budget_used":{"post":{"summary":"client_purchase_order.budget_used","description":"A client purchase order reached 100% of its budget, invoiced plus committed. Recorded once by the daily check, and again only after its budget is changed. A change of the nearly-used percentage never repeats it.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"client_purchase_order.budget_used","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"client_purchase_order.ending":{"post":{"summary":"client_purchase_order.ending","description":"A client purchase order is 30 days or fewer from its end date. Recorded once by the daily check, and again only after its end date is changed.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"client_purchase_order.ending","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"consultant_purchase_order.created":{"post":{"summary":"consultant_purchase_order.created","description":"A consultant purchase order was recorded.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"consultant_purchase_order.created","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"consultant_purchase_order.changed":{"post":{"summary":"consultant_purchase_order.changed","description":"A consultant purchase order's number, dates, budget or assignments were changed.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"consultant_purchase_order.changed","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"consultant_purchase_order.closed":{"post":{"summary":"consultant_purchase_order.closed","description":"A consultant purchase order was closed.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"consultant_purchase_order.closed","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"consultant_purchase_order.deleted":{"post":{"summary":"consultant_purchase_order.deleted","description":"A consultant purchase order was deleted. Its id no longer reads.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"consultant_purchase_order.deleted","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"consultant_purchase_order.budget_near":{"post":{"summary":"consultant_purchase_order.budget_near","description":"Invoiced plus committed on a consultant purchase order reached the consultancy's nearly-used percentage of its budget, 85% unless the consultancy changed it. Recorded once by the daily check, and again after its budget is changed, or after the consultancy changes its nearly-used percentage while the purchase order is past the new one.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"consultant_purchase_order.budget_near","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"consultant_purchase_order.budget_used":{"post":{"summary":"consultant_purchase_order.budget_used","description":"A consultant purchase order reached 100% of its budget, invoiced plus committed. Recorded once by the daily check, and again only after its budget is changed. A change of the nearly-used percentage never repeats it.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"consultant_purchase_order.budget_used","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}},"consultant_purchase_order.ending":{"post":{"summary":"consultant_purchase_order.ending","description":"A consultant purchase order is 30 days or fewer from its end date. Recorded once by the daily check, and again only after its end date is changed.\n\nThe body is the event, as `GET /events` lists it: its `data.id` names the record it happened to.","tags":["Events"],"security":[],"parameters":[{"name":"webhook-id","description":"The event's id, the same on every retry, so a repeat can be dropped.","schema":{"type":"string"},"in":"header","required":true},{"name":"webhook-timestamp","description":"When this attempt was signed, in whole seconds since the Unix epoch.","schema":{"type":"string","pattern":"^[0-9]+$"},"in":"header","required":true},{"name":"webhook-signature","description":"The Standard Webhooks signature, one or more `v1,` values. Verify it as https://www.timesubmit.com/developers/webhooks says before trusting the body.","schema":{"type":"string"},"in":"header","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"},"example":{"id":"r83e6g9j2m5p8s1u4w7y0b3d6f9h2k5n","type":"consultant_purchase_order.ending","occurredAt":"2026-11-02T10:05:42.118Z","data":{"id":"p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a"}}}}},"responses":{"2XX":{"description":"Received. Any other answer, or none within 10 seconds, is retried, up to 7 attempts in all."}}}}}}