Skip to Content

Change IP

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

Changes the IP type of the 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

Mobility sends an asynchronous SubscriberService callback for each SIM in the request when the IP type change is applied, or if the change fails.

Note

You can submit 1 SIM per request, or up to 1,000 when bulk Change IP is enabled for your account.

HTTP Status Codes

StatusWhen
200The request was accepted and a transactionID was returned. The IP change is applied asynchronously and the result for each SIM is sent later in a callback.
400Validation failed (for example, an ICCID that is not 19-20 digits, duplicate ICCIDs, more SIMs than allowed (1, or up to 1,000 when bulk Change IP is enabled for your account), or a networkApn or carrierSubnet that is too long or has invalid characters), or a SIM is not eligible: it was not found, is not under the macnum account, is not Activated or Suspended, is not a Granite Multi Carrier SIM, or the SIMs are on different carriers. Also returned when the networkApn or carrierSubnet does not exist for your account, or, for a single SIM, when the SIM already has the requested dynamic IP or APN. 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.
403Change IP is not enabled for your account, your token's role does not allow this action, or 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.

Available For

  • Granite Multi Carrier SIM

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 whose IP type you want to change, specified by simInfo objects. You can submit 1 SIM per request, or up to 1,000 when bulk Change IP is enabled for your account.
simInfoobjectYesSIM information.
iccidstringYes19-20 digits. An F is allowed as the 20th character.
networkApnstringConditionalThe name of the APN to apply to the SIMs, for example Test APN.
carrierSubnetstringNoThe IP range for the specified networkApn, for example 10.2.3.1/12. The IP range must already exist in the system for that APN.

Request Examples

Request to change the IP to Private Static:

Request to change the IP to Public Static:

Request to change the IP to Public Dynamic (Removing APN):

Responses

Immediate Success Response (200 OK)

Response Fields

ParameterTypeDescription
transactionIDstringA unique string that associates the request with the results sent in callbacks.
Mobility sends a separate callback for each SIM that matched the request, showing whether the operation succeeded for that SIM and containing any requested information. All callbacks for the request have the same transactionID.

Callback Success Response

Callback Response Fields

ParameterTypeDescription
requestTypestringName of the requested action. For Change IP, the value is ChangeIP.
transactionIDstringA unique string that associates the request with the results sent in callbacks. Mobility sends a separate callback for each SIM that matched the request, showing whether the operation succeeded for that SIM and containing any requested information. All callbacks for the request have the same transactionID.
simInfoobjectSIM information.
iccidstring19-20 digits.
msisdnstring10 digits.
ipAddressstringThe IP address returned by the carrier for a static IP.
resultobjectAn object containing the result status.
statusstringResult status: success or failure.
messagestringResult message.
errorsobjectA list of error objects, if any.
errorCodestringError code.
errorMessagestringError message.
callbackCountintegerThe number of times this callback message has been sent.
maxCallbackThresholdintegerThe maximum number of times this callback message will be sent if it is not correctly acknowledged.

Failure Responses

Immediate Error Message

Error Response Fields

ParameterTypeDescription
resultobjectAn object containing the result status.
statusstringResult status: success or failure.
errorsobjectA list of error objects, if any.
errorCodestringError code.
errorMessagestringError message.

SIM Eligibility Error (HTTP 400)

When a SIM is not eligible (for example, it was not found, is not Activated or Suspended, is not a Granite Multi Carrier SIM, or the SIMs are on different carriers), the response is HTTP 400 with a per-SIM validation body instead of the format above. validationErrorInfo gives the overall message, and data.simCardDetails lists each SIM with its error in status.

Example Async Error Message

Error Response Fields

ParameterTypeDescription
requestTypestringName of the requested action. For Change IP, the value is ChangeIP.
simInfoobjectSIM information.
iccidstring19-20 digits.
msisdnstring10 digits.
callbackCountintegerThe number of times this callback message has been sent.
maxCallbackThresholdintegerThe maximum number of times this callback message will be sent if it is not correctly acknowledged.
transactionIDstringA unique string that associates the request with the results sent in callbacks.
resultobjectAn object containing the result status.
statusstringResult status: success or failure.
errorsobjectA list of error objects, if any.
errorCodestringError code.
errorMessagestringError message.

Code Examples

Last updated on