SIM Management
API Reference
SIMs

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

OperationRequired path parametersDescription
GET /api/simNoneAll accessible SIMs; prefer company or account scope for efficiency
GET /api/Company/{companyId}/simInteger companyIdAccessible SIMs within a company
GET /api/company/{companyId}/account/{accountId}/simInteger companyId and accountIdAccessible 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.

FieldTypeDescription
serialNumberstring or nullSIM serial number
stockIdintegerStock record identifier
companyId, accountIdintegerOwning company and account identifiers
accountTitlestring or nullAccount title
networkId, commandNetworkIdinteger or nullNetwork and command-network identifiers
networkstring or nullNetwork name
telstring or nullMSISDN
prefixstring or nullTelephone prefix
statusstring or nullCurrent SIM state
simType, iccidstring or nullSIM type and ICCID
raNumberinteger or nullRental agreement number
commencementDatedate-time or nullCommencement date
tariffNumberinteger or nullAssigned tariff identifier
tariffstring or nullTariff name; may be blank for indirect customers
provisioningOrderstring or nullProvisioning order details
provisioningOrderNumberinteger or nullProvisioning order identifier
order, order1, order2, order3, order4, order5string or nullPurchase order information and its individual segments
lastCommandstring or nullLast recorded command
dataUsageMb, dataBundleMb, dataOveragenumberRecorded usage, bundle allowance and overage in MB
billingnumber or nullRecorded billing value
billingCurrencystring or nullCurrency of the billing value
privateIp, publicIpstring or nullAssigned IP addresses
inSessionboolean or nullRecorded session state
imeistring or nullRecorded device IMEI
pin, pukstring or nullSIM security codes; handle as sensitive information
smsCount, voiceMinutesinteger or nullRecorded SMS and voice totals
alertManagerEnabledbooleanWhether alert management is enabled
alertManagerStatusstring or nullRecorded alert manager state
alertsarray or nullAlert objects with nullable strings alertType, alertStatus, triggerLevelSummary, triggerLevelDetail and nullable date-time triggerDateTime
tagsarray or nullVisible tag objects with UUID id, name and colour
eSimUrlstring or nullSingle-SIM response only; eSIM URL when available
portingInfoobject or nullSingle-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.