Get a client company's services
curl --request GET \ --url https://example.com/api/v1/clients/example/services \ --header 'Authorization: Bearer <token>'Returns the services of the company: billed, the services its sent invoices bill (never drafts or cancelled invoices), each with its invoice count, the issue dates of its first and last invoice and status, latest first; liveOrders, the open orders inside the caller’s order reach that are not invoiced yet or that billed does not cover, sent only to a caller with orders.view while the Orders module is on; linesWithoutService, how many charged lines of sent invoices name no service; and manual, the services the team provides without invoicing, added by hand with POST /clients/{id}/services, oldest first. A service is ACTIVE while an open order (active or out of hours) or a billed subscription not cancelled names it, while an open order naming no service is tied to one of its invoice lines, or while the period invoiced on a line with no order or subscription of its own has not ended in the workspace timezone, unless the invoice’s order has closed and was the one providing the service; otherwise it is PAST. Without orders.view or with the Orders module off, status stays and activeSource, subscriptionStatus and activeUntil report only an invoiced period. Requires the clients.view and invoices.view permissions, a client company inside the caller’s assignments (or clients.view_all) and, for the billed part, inside the caller’s invoice reach (or invoices.view_all); anything else out of reach answers 404.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Resource identifier (CUID2).
Resource identifier (CUID2).
Responses
Section titled “Responses”The company’s billed and hand-added services.
object
The services of a company: those it is invoiced for and those added by hand.
object
Services the company was invoiced for, latest invoice first.
A service a company was invoiced for, read from its sent invoices.
object
When what keeps the service active ends: the last instant of the period its subscription cancels at, or the last invoiced day. Null when nothing says it ends; a caller who cannot read the order behind it gets only the last invoiced day. Absent on a server older than the field.
Issue date of the first invoice.
Sent invoices, never drafts or cancelled ones, that bill the service.
Issue date of the latest invoice.
ACTIVE while an open order or a billed subscription not cancelled names the service, while an open order naming no service is tied to a line of it, or while the period invoiced on a line with no order or subscription of its own has not ended, unless the invoice’s order has closed and was the one providing the service; PAST otherwise. Absent on a server older than the field.
Charged lines of sent invoices, discounts left out, that name no service directly or through their order, so no entry of billed counts them. Absent on a server older than the field.
Open orders the caller reaches that billed does not cover, newest first. Absent without the orders.view permission, with the Orders module off, and on a server older than the field.
An open order, with its live subscription if any, that billed does not cover: it has no sent invoice yet, one of its services was never invoiced to the company, or it names no service.
object
Sent invoices tied to the order or its subscription; 0 when not invoiced yet.
Whether the order runs on a behavior that is never invoiced.
The order’s name.
The services it provides, in the order of serviceIds; empty when it names none.
Services added by hand, oldest first.
A service the team provides a company without invoicing it, added by hand.
object
Example
{ "data": { "billed": [ { "activeSource": "SUBSCRIPTION", "status": "ACTIVE", "subscriptionStatus": "ACTIVE" } ], "liveOrders": [ { "subscriptionStatus": "ACTIVE" } ] }}Unauthorized.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Forbidden.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Not found.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Rate limit exceeded. Wait for Retry-After before retrying.
Standard error envelope.
object
object
Stable machine-readable error code.
Human-readable error message.
HTTP status code, mirrored in the body.
Example
{ "error": { "code": "UNAUTHORIZED" }}Headers
Section titled “Headers”Maximum requests in the current quota window.
Quota policy in requests and window seconds, for example 60;w=60.
Requests left in this quota window (zero when blocked).
Seconds until the current quota window resets, when available from the rate-limit store.
Seconds until another request may be attempted.
Chelsea is operated by Arepa Labs LLC