Skip to Content
GEMMMulti-Carrier & eSIM ProfilesPrimary Carrier Selection

Primary Carrier Selection

POST/subscriber-management/actions/primary-carrierMulti-Carrier & eSIM ProfilesOpenAPI

Sets the primary carrier for a single SIM.

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 the SIM in the request when its service is provisioned with the selected primary carrier, or if the primary carrier selection fails.

Note

You can submit one SIM per request.

HTTP Status Codes

StatusWhen
200The request was accepted. The response contains a transactionID. The result is sent later in a SubscriberService callback.
400The request failed validation: sims is empty or has more than one SIM, the ICCID is missing, has the wrong format, is not found or is deactivated, carrier is missing or does not match a plan for the SIM's current data plan, the SIM is not a Granite Multi Carrier SIM or is a Wireless Broadband SIM, the macnum header is missing or malformed, or the body is not valid JSON.
401The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header.
403Your token does not have a role allowed to call this endpoint, the SIM belongs to an account you do not have access to, or the SIM's account 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
  • Granite Multi Carrier SIM: Not for Wireless Broadband SIMs.

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 SIM whose primary carrier you want to set, specified by a simInfo object. You can submit one SIM per request.
simInfoobjectYesSIM information.
iccidstringYes19-20 digits. An F is allowed as the 20th character.
carrierstringYesThe primary carrier, for example TMO. Valid values are:
  • AT&T/International
  • T-MO/International
  • Verizon/International
  • VZ
  • TMO
  • ATT

Request Examples

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 Primary Carrier Selection, the value is SetPrimaryCarrier.
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.
primaryCarrierstringThe selected primary carrier, for example TMO.
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.

Code Examples

Last updated on