Mobility validates the request format first. If the request format is invalid, the entire request is rejected with HTTP 400. Mobility then checks every SIM in the request before accepting it. Each SIM must exist, must belong to the account in the macnum header, must be in Activated or Suspended status, must not be a SIM360 profile submitted by ICCID instead of by EID, and must not be on a legacy zone plan. If any SIM fails validation, the entire request is rejected with HTTP 400, and the response lists every SIM that failed. 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, or (single-SIM request) the SIM belongs to an account you do not have access to or that is not under the macnum account. Mobility checks the new plan for each SIM during processing. If the plan is not available for a SIM, or the SIM already has the plan, Mobility sends a failure callback for that SIM and continues processing the remaining SIMs.
Plan Change
Changes the plan for one or more SIMs.
urn:grt:gemmapplication/jsonhttps://gemmapi2.granitenet.com/v2/api/gemm/v1Uses and Requirements
The Plan Change 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 plan was changed or explains why the plan change 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 | Every SIM passed validation, 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, a SIM is listed twice, or planName is missing or not 3-255 characters. Also when any SIM is not found, does not belong to the account in the macnum header, is not in Activated or Suspended status, is a SIM360 profile submitted by ICCID instead of by EID, has no plan options available, or is on a legacy zone plan; every failing SIM is listed. 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, 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 Plan Change - Sync Error Messages and Plan Change - Async Error Messages.
Available For
- ATT
- Granite Wireless - VzW
- T-Mobile
- Verizon
- Granite Multi Carrier SIM
- Verizon eSIM
- SIM360
- T-Mobile: Not for T-Mobile for Business (TFB) SIMs.
- Granite Multi Carrier SIM: Not for SIMs on the legacy Zone 1-4 plans.
- SIM360: SIM360 must be submitted by EID; a SIM360 profile ICCID is rejected.
Headers
| Header | Value |
|---|---|
Authorization | Bearer access-token |
Content-Type | application/json |
macnum | Macnum of the top level account for your organization. |
Request Body Parameters
The request body lists the SIMs and the new plan to apply to them.
| Parameter | Type | Required | Description |
|---|---|---|---|
sims | array of simInfo objects | Yes | The SIMs whose plan you want to change, 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. |
planName | string | Yes | The new plan (limit type) to apply to the specified SIMs, for example 25MB. |
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 SizeChange. |
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. |
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
Other Carriers and SIM360 use the same formats.
Example Failure Response: SIM Not Eligible
HTTP 400. Two SIMs were submitted and one of them is deactivated, so no SIM is processed. Each failing SIM is listed with its own error, and propertyName is the ICCID or EID of that SIM. For these errors, the timestamp and API version are returned in the X-Timestamp and X-Api-Version response headers.
Example Failure Response: Legacy Zone Plan
HTTP 400. The SIM is on a legacy zone plan, and its plan cannot be changed.
Example Failure Response: Missing Plan Name
HTTP 400. planName is missing, so no SIM is processed.
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. |
propertyName | string | ICCID or EID of the SIM that failed. Returned for SIM eligibility errors. For these errors, the timestamp and API version are returned in the X-Timestamp and X-Api-Version response headers instead of in the body. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
Example Async Error Message
Sent for a SIM that already has the requested plan.
Error Response Fields
| Parameter | Type | Description |
|---|---|---|
requestType | string | Name of the requested action. For this API, the value is SizeChange. |
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. |