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.
Restore
Restores service for one or more SIMs.
Auth Scope
urn:grt:gemmContent-Type
application/jsonBase URL
https://gemmapi2.granitenet.com/v2/api/gemm/v1Uses 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
HTTP Status Codes
| Status | When |
|---|---|
200 | The request was accepted and a transactionID was returned. The result for each SIM is sent later in a callback. |
400 | The 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. |
401 | The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header. |
403 | 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 account in the macnum header. |
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. |
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
| Header | Value |
|---|---|
Authorization | Bearer access-token |
Content-Type | application/json |
macnum | Macnum of the top level account for your organization. |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sims | array of simInfo objects | Yes | The 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. |
simInfo | object | Yes | SIM information. |
iccid | string | Yes | 19-20 digits. |
Request Examples
Responses
Immediate Success Response (200 OK)
Response Fields
| Parameter | Type | Description |
|---|---|---|
transactionID | string | A 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
| Parameter | Type | Description |
|---|---|---|
requestType | string | Name of the requested action. For this API, the value is restore. |
transactionID | string | A 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. |
simInfo | object | SIM information. |
iccid | string | 19-20 digits. The 20th character can be F. |
msisdn | string | 10 digits. |
imei | string | 15 digits. |
deviceUser | string | A user-defined descriptive field, limited to 100 characters. |
result | object | Result of the operation. |
status | string | Result status: success or failure. |
message | string | Result message. |
errors | object | List of errors. Included when the operation fails. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
callbackCount | integer | The number of times this callback has been sent. |
maxCallbackThreshold | integer | The 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
| Parameter | Type | Description |
|---|---|---|
result | object | Result of the operation. |
status | string | Result status: success or failure. |
errors | object | List of errors. Included when the operation fails. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
Example Async Error Message
Sent for a SIM that could not be restored.
Error Response Fields
| Parameter | Type | Description |
|---|---|---|
requestType | string | Name of the requested action. For this API, the value is Restore. |
transactionID | string | The transactionID returned in the immediate response. All callbacks for a request share the same transactionID. |
ticketId | string | Support ticket number for this SIM. Included when a ticket is created for the request. |
simInfo | object | Information that identifies the SIM in this callback. |
iccid | string | ICCID for the SIM. |
msisdn | string | MSISDN for the SIM, 10 digits. |
simCarrier | string | Carrier for the SIM. |
result | object | Result of the operation. |
status | string | Result status: success or failure. |
errors | array of objects | List of errors. Included when the operation fails. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
callbackCount | integer | The number of times this callback has been sent. |
maxCallbackThreshold | integer | The maximum number of times Mobility sends this callback if it is not acknowledged. |
Code Examples
Related Links
Last updated on