The Port In API allows up to 100 Port In SIMs per request, each with one associated secondary SIM.
Port In with Secondary SIM
/subscriber-management/actions/port-inSIM LifecyclePorts a number in on an eSIM and activates a secondary eSIM on another carrier in the same request.
urn:grt:gemmapplication/jsonhttps://gemmapi2.granitenet.com/v2/api/gemm/v1Uses and Requirements
The Port In API can activate a secondary eSIM along with each ported number. The ported number is the primary SIM. Add the secondary SIM in secondarySims on the Port In SIM. Everything else in the request follows the Port In rules, including the account options and the old carrier details.
- The Port In SIM must be an eSIM. Secondary SIMs are not allowed on Physical Port In SIMs.
- Each Port In SIM can have one secondary SIM, and the secondary SIM must also be an eSIM.
- The secondary SIM must be on a different carrier from the Port In plan, and all secondary SIMs in a request must use the same carrier.
- The secondary SIM is activated in the same child account as its Port In SIM, with a plan that matches the Port In plan’s device type.
After accepting and validating the request, the system sends separate callbacks for the Port In and the secondary SIM activation. If validation fails for either SIM after the request is accepted, neither is processed and a single Port In callback reports the failure. If the port itself fails at the carrier, the secondary SIM activation is cancelled and its callback says so.
Info
Available For
The Port In plan and the secondary SIM must be on two different carriers from this list.
- ATT
- Granite Wireless - VzW
- T-Mobile
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 uses every Port In parameter. The table lists the fields that matter for a secondary SIM.
| Parameter | Type | Required | Description |
|---|---|---|---|
activateOption | string | Yes | ExistingAccount or NewAccount. The secondary SIM is activated in the same child account as its Port In SIM. |
planName | string | Yes | The Port In plan. The secondary SIM must be on a different carrier from this plan. |
sims | array of simInfo objects | Yes | Up to 100 Port In SIMs. |
simInfo | object | Yes | The Port In (primary) SIM. |
simType | string | Yes | Must be eSIM when the SIM has a secondary SIM. Virtual is the earlier name for eSIM and is still accepted. |
imei | string | Yes | 15 numeric digits. The IMEI of the device for the ported number. |
msisdn | string | Yes | 10 digits. The number (MDN) to port in. |
oldServiceProviderDetail | object | Yes | The account that holds the number at the old carrier. See Old Carrier Details. |
secondarySims | array of objects | No | The secondary SIM to activate with this Port In SIM. One entry at most. |
simType | string | Yes | Always eSIM. Only eSIM secondary SIMs are supported. Virtual is the earlier name for eSIM and is still accepted. |
imei | string | Yes | 15 numeric digits. The IMEI on which the secondary eSIM is activated, usually the device's second IMEI (IMEI2). It must differ from every other IMEI in the request. |
carrier | string | Yes | The carrier for the secondary SIM. Supported values are ATT, Granite Wireless - VzW and T-Mobile. It must be different from the Port In plan's carrier, and the same for every secondary SIM in the request. |
Request Examples
Port In a number on an ATT plan, with a secondary SIM on Granite Wireless - VzW, using an existing account.
Port In a number on T-Mobile for Business, with a secondary SIM on ATT.
Port In two numbers into one new child account, each with a secondary SIM on Granite Wireless - VzW.
Responses
Immediate Success Response (200 OK)
Response Fields
| Parameter | Type | Description |
|---|---|---|
transactionID | string | A unique string that associates the request with the results that are sent via a callback service. The Port In and secondary SIM callbacks have the same transactionID. |
Callback Success Response
Example Success SubscriberService Callback Response for the Port In
Example Success SubscriberService Callback Response for the Secondary SIM Activation
Response Fields
| Parameter | Type | Description |
|---|---|---|
requestType | string | Name of the requested action: PortIn for the ported number and Activate for the secondary SIM. |
transactionID | string | A unique string that associates the request with the results that are sent via a callback service. |
simInfo | object | SIM information. |
iccid | string | 19-20 digits. |
msisdn | string | 10 digits. For the secondary SIM, this is its new number. |
imei | string | 15 digits. |
ticketId | string | Order ID for requests. |
result | object | Result status object. |
status | string | Success or Failed. |
message | string | Result message. |
errors | object | List of errors. |
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
For a complete list of errors, see Port In - Sync Error Messages and Port In - Async Error Messages.
Immediate Error Message
Error Response Fields
| Parameter | Type | Description |
|---|---|---|
result | object | Result status object. |
status | string | Success or Failed. |
errors | object | List of errors. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
Example Async Error Message
Example Async Error Message: (If the secondary SIM fails validation after the request is accepted)
A single Port In callback is sent, and neither SIM is processed.
Example Async Error Messages: (If the port fails at the carrier)
The Port In callback reports the carrier failure, and the secondary SIM callback reports that its activation was cancelled.
Error Response Fields
| Parameter | Type | Description |
|---|---|---|
requestType | string | Name of the requested action: PortIn for the ported number and Activate for the secondary SIM. |
simInfo | object | SIM information, as sent in the request. |
msisdn | string | 10 digits. |
imei | string | 15 digits. |
simType | string | The type of SIM. Values are Physical or Virtual. |
deviceUser | string | A user-defined descriptive field, limited to 100 characters. |
oldServiceProviderDetail | object | The old carrier details sent in the request. |
secondarySims | array | The secondary SIM sent in the request. |
carrier | string | The carrier for the secondary SIM. |
simType | string | Always Virtual. |
imei | string | 15 digits. |
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. |
ticketId | string | Order ID for requests. |
transactionID | string | A unique string that associates the request with the results that are sent via a callback service. |
result | object | Result status object. |
status | string | Success or Failed. |
errors | object | List of errors. |
errorCode | string | Error code. |
errorMessage | string | Error message. |