SIM Management
API Reference
Accounts

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

OperationDescription
GET /api/accountList all accounts accessible to the current user
GET /api/Company/{companyId}/accountList 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 fieldTypeDescription
idintegerAccount identifier, used as accountId in other calls
companyIdintegerCompany identifier for a listed account
namestring or nullAccount name
companyNamestring or nullCompany name when populated; may be null

Get an account

OperationDescription
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 parameterTypeDescription
accountIdintegerRequired account identifier from the account list
companyIdintegerRequired 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 fieldTypeDescription
isAtlasAccountbooleanWhether the account was found in Atlas
portalCapablebooleanWhether 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.