Skip to Content
GEMMSIM LifecycleRestoreRestore

Restore

POST/subscriber-management/actions/restoreSIM LifecycleOpenAPI

Restores service for one or more SIMs.

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

Uses and Requirements

The Restore API processes requests asynchronously. The immediate response returns a transactionID. After processing begins, Mobility sends one SubscriberService callback for each SIM in the request. Each callback confirms that the SIM was restored or explains why the restore request failed.

You can submit up to 1,000 SIMs in a single request when bulk requests are enabled for your account. Duplicate SIMs are not allowed.

Note

Mobility validates the request format before processing any SIMs. If the request format is invalid, the entire request is rejected with HTTP 400. Each SIM must belong to your account and must be in Suspended status. For a single-SIM request, the API returns HTTP 400 immediately if the SIM is not found, is deactivated, or is already active; a SIM in any other status is accepted and the failure is sent in a callback. If you do not have access to the account in the macnum header, the API returns HTTP 401. HTTP 403 means your credentials are not permitted to use this API, the SIM was submitted by EID and SIM360 Restore is not enabled for your account, or (single-SIM request) the SIM belongs to an account you do not have access to or that is not under the macnum account. For a multi-SIM request, eligibility is checked for each SIM during processing. If one SIM fails validation, Mobility sends a failure callback for that SIM and continues processing the remaining SIMs.

HTTP Status Codes

StatusWhen
200The request was accepted and a transactionID was returned. The result for each SIM is sent later in a callback.
400The request is invalid: the macnum header is missing or is not 8 digits, the body is not valid JSON, sims is empty, more than 1 SIM was sent (more than 1,000 when bulk requests are enabled for your account), a SIM has neither an ICCID nor an EID, an ICCID or EID is in the wrong format, or a SIM is listed twice. For a single-SIM request, also when the SIM is not found, is deactivated, or is already active. No SIM is processed.
401The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header.
403Your credentials are not permitted to use this API, the SIM was submitted by EID and SIM360 Restore is not enabled for your account, or (single-SIM request) the SIM belongs to an account you do not have access to or that is not under the account in the macnum header.
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.

For a complete list of error codes, messages, causes, and resolutions, see Restore - Sync Error Messages and Restore - Async Error Messages.

Available For

  • ATT
  • Granite Wireless - VzW
  • T-Mobile
  • Verizon
  • Granite Multi Carrier SIM
  • Verizon eSIM
  • SIM360
  • SIM360: SIM360 must be submitted by EID, not by profile ICCID, and needs Restore enabled for your account.

Headers

HeaderValue
AuthorizationBearer access-token
Content-Typeapplication/json
macnumMacnum of the top level account for your organization.

Request Body Parameters

ParameterTypeRequiredDescription
simsarray of simInfo objectsYesThe SIMs to restore, specified by simInfo objects. You can submit 1 SIM per request, or up to 1,000 when bulk requests are enabled for your account.
simInfoobjectYesSIM information.
iccidstringYes19-20 digits.

Request Examples

Responses

Immediate Success Response (200 OK)

Response Fields

ParameterTypeDescription
transactionIDstringA unique string that associates the request with the results that Mobility sends in callbacks.
Mobility sends a separate callback for each SIM in the request, indicating whether the operation succeeded for that SIM. All callbacks for the request have the same transactionID.

Callback Success Response

Response Fields

ParameterTypeDescription
requestTypestringName of the requested action. For this API, the value is restore.
transactionIDstringA unique string that associates the request with the results that Mobility sends in callbacks.
Mobility sends a separate callback for each SIM in the request, indicating whether the operation succeeded for that SIM. All callbacks for the request have the same transactionID.
simInfoobjectSIM information.
iccidstring19-20 digits. The 20th character can be F.
msisdnstring10 digits.
imeistring15 digits.
deviceUserstringA user-defined descriptive field, limited to 100 characters.
resultobjectResult of the operation.
statusstringResult status: success or failure.
messagestringResult message.
errorsobjectList of errors. Included when the operation fails.
errorCodestringError code.
errorMessagestringError message.
callbackCountintegerThe number of times this callback has been sent.
maxCallbackThresholdintegerThe maximum number of times Mobility sends this callback if it is not acknowledged.

Failure Responses

Immediate Error Message

HTTP 400 for a single-SIM request when the SIM is already active. Every immediate error uses this format.

Error Response Fields

ParameterTypeDescription
resultobjectResult of the operation.
statusstringResult status: success or failure.
errorsobjectList of errors. Included when the operation fails.
errorCodestringError code.
errorMessagestringError message.

Example Async Error Message

Sent for a SIM that could not be restored.

Error Response Fields

ParameterTypeDescription
requestTypestringName of the requested action. For this API, the value is Restore.
transactionIDstringThe transactionID returned in the immediate response. All callbacks for a request share the same transactionID.
ticketIdstringSupport ticket number for this SIM. Included when a ticket is created for the request.
simInfoobjectInformation that identifies the SIM in this callback.
iccidstringICCID for the SIM.
msisdnstringMSISDN for the SIM, 10 digits.
simCarrierstringCarrier for the SIM.
resultobjectResult of the operation.
statusstringResult status: success or failure.
errorsarray of objectsList of errors. Included when the operation fails.
errorCodestringError code.
errorMessagestringError message.
callbackCountintegerThe number of times this callback has been sent.
maxCallbackThresholdintegerThe maximum number of times Mobility sends this callback if it is not acknowledged.

Code Examples

Last updated on