Companies
Read the companies accessible to the authenticated API user. All calls require the bearer token described in Authentication.
List companies
GET /api/company
Returns only companies visible to the current user. Use the returned id as companyId in account and SIM requests. A user with access to no companies receives an empty result.
This endpoint supports AutoQueryable filtering, sorting and pagination. The default page size is 50 and the maximum is 250. The API adds wrapWith=count when no wrapper is requested, so list responses contain result and count. Request wrapWith=total-count,count when the total number of matching records is needed. Use a stable orderBy, skip and take to read subsequent pages.
| Query parameter | Type | Description |
|---|---|---|
id | integer | Filter by company identifier |
nameContains | string | Filter by company name; a numeric value also falls back to an identifier lookup if the name search finds nothing |
orderBy | string | Sort field, for example name or id |
skip | integer | Number of matching records to skip |
take | integer | Page size, up to 250 |
wrapWith | string | Requested wrapper metadata, for example total-count,count |
curl --location 'https://api.cellhire.com/api/company?orderBy=id&skip=0&take=50&wrapWith=total-count,count' \
--header 'Authorization: Bearer <access-token>'{
"result": [
{ "id": 123, "name": "Example Company" }
],
"totalCount": 1,
"count": 1
}Get a company
GET /api/company/{id}
| Path parameter | Type | Description |
|---|---|---|
id | integer | Required company identifier from the company list |
Returns one company object without a list wrapper. A missing or inaccessible company returns 404 Not Found.
curl --location 'https://api.cellhire.com/api/company/123' \
--header 'Authorization: Bearer <access-token>'{ "id": 123, "name": "Example Company" }Response fields
| Field | Type | Description |
|---|---|---|
id | integer | Company identifier |
name | string or null | Company name; may be blank for users whose access hides company names |
List calls return 200 OK; detail calls return 200 OK or 404 Not Found. Missing or invalid bearer credentials return 401 Unauthorized. Invalid typed path or query values may return 400 Bad Request.