Retrieve SIMs Information
Retrieve information about the SIMs in an account.
Auth Scope
urn:grt:gemmContent-Type
application/jsonBase URL
https://gemmapi2.granitenet.com/v2/api/gemm/v1Uses and Requirements
Use this API to retrieve information about a single SIM or about all SIMs that match the filters you send. The API is synchronous and no callback is sent. Because the result can be large, the API returns one page at a time. Use pagingInformation to set the page number and page size.
HTTP Status Codes
| Status | When |
|---|---|
200 | The request succeeded. The SIMs that match the filters are returned one page at a time; if none match, connectionDetail is empty. This API is synchronous and no callback is sent. |
400 | Validation failed: accountNumber is not an 8-digit number; iccid, eid, msisdn or deviceId is not in a valid format; location, user, planName or ruleName is too long; pagingInformation is sent as null; pageNumber is less than 1 or pageSize is outside 10 to 100; the macnum header is missing or not an 8-digit number; or the request body is missing or is not valid JSON. |
401 | The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header. |
403 | You do not have access to accountNumber, accountNumber does not belong to the hierarchy of the macnum header, or your credentials are not enabled for API access. |
429 | Too many requests were sent in a short period. Wait briefly and retry. |
500 | An unexpected server error occurred. |
503 | The system is under scheduled maintenance. Retry after the maintenance window. |
504 | A dependent service did not respond in time. Retry the request. |
Headers
| Header | Value |
|---|---|
Authorization | Bearer access-token |
Content-Type | application/json |
macnum | Top Level Account Number associated with your API credentials. |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
accountNumber | string | Yes | The parent account number whose subscribers you want to retrieve. |
iccid | string | No | 19-20 digits. An F is allowed as the 20th character. |
eid | string | No | 32 digits. Returns the SIM with the active ICCID connection for this EID. |
msisdn | string | No | 10 digits. |
deviceId | string | No | 10 to 30 letters or digits. |
location | string | No | Location name, also called customer name. |
planName | string | No | Plan name. |
user | string | No | Device user. |
status | string | No | Comma-separated status values to filter on. Possible values are
|
pagingInformation | object | No | Paging settings. If you omit it, the API returns the first page of 10 records. |
pageNumber | number | No | The page to retrieve. The first response returns pageCount inside pagingInformation, which tells you how many pages match your filters. Increment pageNumber on each call to fetch the next page. |
pageSize | number | No | The number of records to retrieve in a single API call. Default is 10; allowed range is 10 to 100. |
Request Examples
Responses
Success Response (200 OK)
Response Fields
| Parameter | Type | Description |
|---|---|---|
connectionDetail | array of objects | List of SIM records that match the request. |
iccid | string | 19-20 digits. |
msisdn | string | 10 digits. |
deviceId | string | Up to 30 digits. |
connectionStatus | string | Status of the SIM, for example Activated, Suspended or Deactivated. |
startDate | string | Start date of the SIM connection, in MM/DD/YYYY HH:mm:ss format. |
endDate | string | End date of the SIM connection. |
latestChangeDate | string | Date of the latest change made to the SIM. |
accountNumber | string | Account number the SIM belongs to. |
parentAccountNumber | string | Parent account number of the account. |
product | string | Product of the device the SIM is used in. |
manufacturer | string | Manufacturer of the device. |
description | string | Description of the device. |
modelNumber | string | Model number of the device. |
simLimit | string | Usage limit assigned to the SIM. Returned for every record unless the caller is SIM360-enabled, in which case connectionLimit is returned instead. |
connectionLimit | string | Usage limit assigned to the connection. Returned for every record, instead of simLimit, when the caller is SIM360-enabled. |
planName | string | Plan name. |
planAlias | string | Alias of the plan. |
planLimit | string | Usage limit of the plan. |
planType | string | Plan type, for example Pooled or Individual. |
planCarrier | string | Carrier the plan applies to. |
limitReached | string | Whether the limit has been reached: Yes or No. |
simUsage | string | Usage recorded for the SIM. Returned for every record unless the caller is SIM360-enabled, in which case connectionUsage is returned instead. |
connectionUsage | string | Usage recorded for the connection. Returned for every record, instead of simUsage, when the caller is SIM360-enabled. |
planUsage | string | Usage recorded for the plan. |
currentSimLimit | string | Current usage limit of the SIM. Used in size change. |
currentPlanName | string | Current plan name. Used in size change. |
currentPlanLimit | string | Current usage limit of the plan. Used in size change. |
accessType | string | Access type of the SIM. |
ipType | string | Type of IP assigned to the SIM, for example Dynamic or Static. Prefixed with the network type when one applies. |
ipAddress | string | IP address assigned to the SIM. |
subnetMask | string | Subnet mask of the assigned IP. |
defaultGateway | string | Default gateway of the assigned IP. |
username | string | Device user. |
customField1 | string | Customer-defined field. |
customField2 | string | Customer-defined field. |
generalLedgerNumber | string | General ledger number. |
branchNumber | string | Branch number. |
employer | string | Employer. |
accountName | string | Name of the account the SIM belongs to. |
simAlias | string | Alias of the SIM. |
tags | string | Tags assigned to the SIM. |
ruleName | string | Name of the rule applied to the SIM. |
ruleID | string | Identifier of the rule applied to the SIM. |
pagingInformation | object | Paging details of the result set. |
pageNumber | number | Number of the page returned. |
pageSize | number | Number of records per page. |
pageCount | number | Total number of pages available for the given criteria. |
recordCount | number | Total number of records that match the criteria. |
Failure Responses
Error Message
Error Response Fields
| Parameter | Type | Description |
|---|---|---|
result | object | Result status object. |
status | string | Result status: success or failure. |
errors | object | List of errors. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
Code Examples
Related Links
Last updated on