Skip to Content
GEMMInventory & Account ManagementRetrieve SIM Inventory

Retrieve SIMs Information

POST/subscriber-management/actions/inventory/listInventory & Account ManagementOpenAPI

Retrieve information about the SIMs in an account.

Auth Scope
urn:grt:gemm
Content-Type
application/json
Base URL
https://gemmapi2.granitenet.com/v2/api/gemm/v1

Uses 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

StatusWhen
200The 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.
400Validation 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.
401The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header.
403You 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.
429Too many requests were sent in a short period. Wait briefly and retry.
500An unexpected server error occurred.
503The system is under scheduled maintenance. Retry after the maintenance window.
504A dependent service did not respond in time. Retry the request.

Headers

HeaderValue
AuthorizationBearer access-token
Content-Typeapplication/json
macnumTop Level Account Number associated with your API credentials.

Request Body Parameters

ParameterTypeRequiredDescription
accountNumberstringYesThe parent account number whose subscribers you want to retrieve.
iccidstringNo19-20 digits. An F is allowed as the 20th character.
eidstringNo32 digits. Returns the SIM with the active ICCID connection for this EID.
msisdnstringNo10 digits.
deviceIdstringNo10 to 30 letters or digits.
locationstringNoLocation name, also called customer name.
planNamestringNoPlan name.
userstringNoDevice user.
statusstringNoComma-separated status values to filter on. Possible values are
  • Activated
  • Suspended
  • Deactivated
  • Requested
pagingInformationobjectNoPaging settings. If you omit it, the API returns the first page of 10 records.
pageNumbernumberNoThe 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.
pageSizenumberNoThe 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

ParameterTypeDescription
connectionDetailarray of objectsList of SIM records that match the request.
iccidstring19-20 digits.
msisdnstring10 digits.
deviceIdstringUp to 30 digits.
connectionStatusstringStatus of the SIM, for example Activated, Suspended or Deactivated.
startDatestringStart date of the SIM connection, in MM/DD/YYYY HH:mm:ss format.
endDatestringEnd date of the SIM connection.
latestChangeDatestringDate of the latest change made to the SIM.
accountNumberstringAccount number the SIM belongs to.
parentAccountNumberstringParent account number of the account.
productstringProduct of the device the SIM is used in.
manufacturerstringManufacturer of the device.
descriptionstringDescription of the device.
modelNumberstringModel number of the device.
simLimitstringUsage limit assigned to the SIM. Returned for every record unless the caller is SIM360-enabled, in which case connectionLimit is returned instead.
connectionLimitstringUsage limit assigned to the connection. Returned for every record, instead of simLimit, when the caller is SIM360-enabled.
planNamestringPlan name.
planAliasstringAlias of the plan.
planLimitstringUsage limit of the plan.
planTypestringPlan type, for example Pooled or Individual.
planCarrierstringCarrier the plan applies to.
limitReachedstringWhether the limit has been reached: Yes or No.
simUsagestringUsage recorded for the SIM. Returned for every record unless the caller is SIM360-enabled, in which case connectionUsage is returned instead.
connectionUsagestringUsage recorded for the connection. Returned for every record, instead of simUsage, when the caller is SIM360-enabled.
planUsagestringUsage recorded for the plan.
currentSimLimitstringCurrent usage limit of the SIM. Used in size change.
currentPlanNamestringCurrent plan name. Used in size change.
currentPlanLimitstringCurrent usage limit of the plan. Used in size change.
accessTypestringAccess type of the SIM.
ipTypestringType of IP assigned to the SIM, for example Dynamic or Static. Prefixed with the network type when one applies.
ipAddressstringIP address assigned to the SIM.
subnetMaskstringSubnet mask of the assigned IP.
defaultGatewaystringDefault gateway of the assigned IP.
usernamestringDevice user.
customField1stringCustomer-defined field.
customField2stringCustomer-defined field.
generalLedgerNumberstringGeneral ledger number.
branchNumberstringBranch number.
employerstringEmployer.
accountNamestringName of the account the SIM belongs to.
simAliasstringAlias of the SIM.
tagsstringTags assigned to the SIM.
ruleNamestringName of the rule applied to the SIM.
ruleIDstringIdentifier of the rule applied to the SIM.
pagingInformationobjectPaging details of the result set.
pageNumbernumberNumber of the page returned.
pageSizenumberNumber of records per page.
pageCountnumberTotal number of pages available for the given criteria.
recordCountnumberTotal number of records that match the criteria.

Failure Responses

Error Message

Error Response Fields

ParameterTypeDescription
resultobjectResult status object.
statusstringResult status: success or failure.
errorsobjectList of errors.
errorCodestringError code.
errorMessagestringError message.

Code Examples

Last updated on