SIMs
Read the SIMs visible to the authenticated API user. All operations require a bearer token from Authentication. Obtain company and account identifiers from Companies and Accounts. SIM serial numbers and telephone numbers must remain strings.
List SIMs
| Operation | Required path parameters | Description |
|---|---|---|
GET /api/sim | None | All accessible SIMs; prefer company or account scope for efficiency |
GET /api/Company/{companyId}/sim | Integer companyId | Accessible SIMs within a company |
GET /api/company/{companyId}/account/{accountId}/sim | Integer companyId and accountId | Accessible SIMs within a company and account |
Lists support AutoQueryable. The default page size is 50 and the maximum is 250. The server adds wrapWith=count by default. Use wrapWith=total-count,count when the total matching count is needed and a stable order when paging. Filtering and projection use response field names, for example serialNumber, serialNumberContains, networkId, status, orderBy, skip, take and select.
The company- and account-scoped operations also accept a boolean export query parameter, default false. With export=true the implementation returns an unwrapped JSON array of all visible SIMs in the scope rather than applying normal list pagination and filtering. Use paged requests for routine integrations.
curl --location 'https://api.cellhire.com/api/sim?orderBy=serialNumber&skip=0&take=50&wrapWith=total-count,count&select=serialNumber,companyId,accountId,networkId,status' \
--header 'Authorization: Bearer <access-token>'curl --location 'https://api.cellhire.com/api/Company/123/sim?orderBy=serialNumber&skip=0&take=50&wrapWith=total-count,count&select=serialNumber,companyId,accountId,networkId,status' \
--header 'Authorization: Bearer <access-token>'curl --location 'https://api.cellhire.com/api/company/123/account/456/sim?orderBy=serialNumber&skip=0&take=50&wrapWith=total-count,count&select=serialNumber,companyId,accountId,networkId,status' \
--header 'Authorization: Bearer <access-token>'The selected-field examples above return this shape:
{
"result": [
{
"serialNumber": "89441000000000000001",
"companyId": 123,
"accountId": 456,
"networkId": 218,
"status": "On Hire"
}
],
"totalCount": 1,
"count": 1
}Get a SIM
GET /api/sim/{simNumber}
simNumber is the required SIM serial number as a string. This is a serial-number lookup, not an MSISDN lookup. The result is a single object without a list wrapper. A missing or inaccessible SIM returns 404 Not Found.
curl --location 'https://api.cellhire.com/api/sim/89441000000000000001' \
--header 'Authorization: Bearer <access-token>'Response fields
Without select, list items use the SIM fields below. Many fields are nullable or depend on the network and the caller's access. The single-SIM response adds eSimUrl and portingInfo. These reads return stored SIM information; they do not submit a network status-report job.
| Field | Type | Description |
|---|---|---|
serialNumber | string or null | SIM serial number |
stockId | integer | Stock record identifier |
companyId, accountId | integer | Owning company and account identifiers |
accountTitle | string or null | Account title |
networkId, commandNetworkId | integer or null | Network and command-network identifiers |
network | string or null | Network name |
tel | string or null | MSISDN |
prefix | string or null | Telephone prefix |
status | string or null | Current SIM state |
simType, iccid | string or null | SIM type and ICCID |
raNumber | integer or null | Rental agreement number |
commencementDate | date-time or null | Commencement date |
tariffNumber | integer or null | Assigned tariff identifier |
tariff | string or null | Tariff name; may be blank for indirect customers |
provisioningOrder | string or null | Provisioning order details |
provisioningOrderNumber | integer or null | Provisioning order identifier |
order, order1, order2, order3, order4, order5 | string or null | Purchase order information and its individual segments |
lastCommand | string or null | Last recorded command |
dataUsageMb, dataBundleMb, dataOverage | number | Recorded usage, bundle allowance and overage in MB |
billing | number or null | Recorded billing value |
billingCurrency | string or null | Currency of the billing value |
privateIp, publicIp | string or null | Assigned IP addresses |
inSession | boolean or null | Recorded session state |
imei | string or null | Recorded device IMEI |
pin, puk | string or null | SIM security codes; handle as sensitive information |
smsCount, voiceMinutes | integer or null | Recorded SMS and voice totals |
alertManagerEnabled | boolean | Whether alert management is enabled |
alertManagerStatus | string or null | Recorded alert manager state |
alerts | array or null | Alert objects with nullable strings alertType, alertStatus, triggerLevelSummary, triggerLevelDetail and nullable date-time triggerDateTime |
tags | array or null | Visible tag objects with UUID id, name and colour |
eSimUrl | string or null | Single-SIM response only; eSIM URL when available |
portingInfo | object or null | Single-SIM response only; dictionary of porting information |
Successful calls return 200 OK. Missing or invalid bearer credentials return 401 Unauthorized. Invalid typed parameters may return 400 Bad Request. List operations restrict results to the caller's access; an empty list does not establish that a SIM does not exist. Treat eSIM URLs, PINs and PUKs as sensitive and avoid logging them.