You can submit one SIM per request.
Primary Carrier Selection
Sets the primary carrier for a single SIM.
Auth Scope
urn:grt:gemmContent-Type
application/jsonBase URL
https://gemmapi2.granitenet.com/v2/api/gemm/v1Uses 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
HTTP Status Codes
| Status | When |
|---|---|
200 | The request was accepted. The response contains a transactionID. The result is sent later in a SubscriberService callback. |
400 | The 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. |
401 | The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header. |
403 | Your 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. |
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. |
Available For
- Granite Multi Carrier SIM
- Granite Multi Carrier SIM: Not for Wireless Broadband SIMs.
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 SIM whose primary carrier you want to set, specified by a simInfo object. You can submit one SIM per request. |
simInfo | object | Yes | SIM information. |
iccid | string | Yes | 19-20 digits. An F is allowed as the 20th character. |
carrier | string | Yes | The primary carrier, for example TMO. Valid values are:
|
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 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
| Parameter | Type | Description |
|---|---|---|
requestType | string | Name of the requested action. For Primary Carrier Selection, the value is SetPrimaryCarrier. |
transactionID | string | A 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. |
simInfo | object | SIM information. |
iccid | string | 19-20 digits. |
msisdn | string | 10 digits. |
primaryCarrier | string | The selected primary carrier, for example TMO. |
result | object | An object containing the result status. |
status | string | Result status: success or failure. |
message | string | Result message. |
errors | object | A list of error objects, if any. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
callbackCount | integer | The number of times this callback message has been sent. |
maxCallbackThreshold | integer | The maximum number of times this callback message will be sent if it is not correctly acknowledged. |
Failure Responses
Immediate Error Message
Error Response Fields
| Parameter | Type | Description |
|---|---|---|
result | object | An object containing the result status. |
status | string | Result status: success or failure. |
errors | object | A list of error objects, if any. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
Code Examples
Related Links
Last updated on