Accounts
Read accounts visible to the authenticated API user. Obtain the bearer token as described in Authentication, and obtain company identifiers from Companies.
List accounts
| Operation | Description |
|---|---|
GET /api/account | List all accounts accessible to the current user |
GET /api/Company/{companyId}/account | List accessible accounts within the specified company |
companyId is a required integer path parameter for the company-scoped operation. An inaccessible company returns 404 Not Found. The unscoped list returns only accessible accounts and may be empty.
Both lists support AutoQueryable, including id, companyId, nameContains, orderBy, skip, take and wrapWith. The default page size is 50 and the maximum is 250. Responses are wrapped with result and count by default. Request wrapWith=total-count,count to include the total matching count. Continue paging using a stable sort order.
curl --location 'https://api.cellhire.com/api/account?orderBy=id&skip=0&take=50&wrapWith=total-count,count' \
--header 'Authorization: Bearer <access-token>'curl --location 'https://api.cellhire.com/api/Company/123/account?orderBy=id&skip=0&take=50&wrapWith=total-count,count' \
--header 'Authorization: Bearer <access-token>'Both examples return a list wrapper with account records:
{
"result": [
{
"id": 456,
"companyId": 123,
"name": "Example Account",
"companyName": null
}
],
"totalCount": 1,
"count": 1
}| Account field | Type | Description |
|---|---|---|
id | integer | Account identifier, used as accountId in other calls |
companyId | integer | Company identifier for a listed account |
name | string or null | Account name |
companyName | string or null | Company name when populated; may be null |
Get an account
| Operation | Description |
|---|---|
GET /api/account/{accountId} | Read an accessible account by identifier |
GET /api/Company/{companyId}/account/{accountId} | Read an account using company and account identifiers |
| Path parameter | Type | Description |
|---|---|---|
accountId | integer | Required account identifier from the account list |
companyId | integer | Required company identifier for the company-scoped route |
curl --location 'https://api.cellhire.com/api/account/456' \
--header 'Authorization: Bearer <access-token>'curl --location 'https://api.cellhire.com/api/Company/123/account/456' \
--header 'Authorization: Bearer <access-token>'These calls return a single account detail object without a list wrapper. In addition to account fields, the detail schema includes:
| Detail field | Type | Description |
|---|---|---|
isAtlasAccount | boolean | Whether the account was found in Atlas |
portalCapable | boolean | Whether a portal group is available for this user and account |
The detail implementation does not populate companyId or companyName, although the published schema includes them. Obtain the account's company from the list response instead of treating a detail response's default identifier or null name as authoritative. Account names may be blank for users whose access hides them.
Successful calls return 200 OK. Missing or inaccessible account details return 404 Not Found. Missing or invalid bearer credentials return 401 Unauthorized; invalid integer path values return 400 Bad Request.