Skip to Content
GEMMService & Plan ManagementPlan ChangePlan Change

Plan Change

POST/subscriber-management/actions/change-planService & Plan ManagementOpenAPI

Changes the plan 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 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

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.

HTTP Status Codes

StatusWhen
200Every SIM passed validation, the 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, 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.
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, 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 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

HeaderValue
AuthorizationBearer access-token
Content-Typeapplication/json
macnumMacnum 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.

ParameterTypeRequiredDescription
simsarray of simInfo objectsYesThe 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.
simInfoobjectYesSIM information.
iccidstringYes19-20 digits.
planNamestringYesThe new plan (limit type) to apply to the specified SIMs, for example 25MB.

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 SizeChange.
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.
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

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

ParameterTypeDescription
resultobjectResult of the operation.
statusstringResult status: success or failure.
errorsobjectList of errors. Included when the operation fails.
propertyNamestringICCID 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.
errorCodestringError code.
errorMessagestringError message.

Example Async Error Message

Sent for a SIM that already has the requested plan.

Error Response Fields

ParameterTypeDescription
requestTypestringName of the requested action. For this API, the value is SizeChange.
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