SIM Management
Advanced Flows
Porting

Porting

API Call Flow

To create a porting request you'll need to call the Get Networks endpoint which returns a list of available Target and Source Networks. You can then select a target network and use that to call Get Provisioning Orders and Get Tariffs, once you have selected a tariff you can call Get BoltOns and Get Services with that Tariff Number. Having gained all the information you can then put together a Create Port request to start porting.

Status Flow

  • Created – Porting / Migration has been requested for the MSISDNs, any matched stock will be put into status ‘Port-In Started’
  • Pac Check Failed – one or more PACs are invalid, Update Port must be called to either change the PAC or cancel the line or call Cancel Port to cancel all lines at once.
  • Cancelled – Porting / Migration cancelled, MSISDNs will not be ported.
  • Submitted – Porting / Migration requested with provider, MSISDNs will port if not cancelled before the port is locked.
  • Locked – Porting locked, MSISDNs will port the next working day.
  • Ported – MSISDN porting has completed, the system will now begin provisioning on the target network.
  • Awaiting Serial – Only valid if doing a 'Migrate In Keep Sim' (available on limited networks), waiting on the network to provide the current serial number the MSISDN is on.
  • Create RA – Port In / Migrate In submission awaiting creation.
  • Awaiting RA – Port In / Migrate In submission queued, waiting for completion.
  • Create Configuration – Bar Service Config submission awaiting creation (only valid if there are services to configure).
  • Awaiting Configuration – Bar Service Config submission queued, waiting for completion.
  • Complete – Porting is complete

Error States

In these states the Cellhire team will be automatically informed, investigate and resolve the issue

  • SubmittedWithErrors – Something went wrong with provider.
  • Error – Something went wrong.

Get Porting Networks

This endpoint returns a list of Porting Types (Port, MigrateIn, MigrateInKeep) and for each type it returns a list of available networks (Target Networks)

NameTypeDescription
portTypeNamestringPorting Type (can be Port, MigrateIn or MigrateInKeep)
portTypeintId of the Porting Type
targetNetworksarray of TargetNetworksList of available networks for this type

Target Networks

NameTypeDescription
idintId of the Target Network
namestringName of the Target Network
maxPortDaysintMaximum days from now before which a Port / Migration can be booked
minPortDaysintMinimum days from now after which a Port / Migration can be booked
allowEsimboolWhether this network allows eSims
networkNumberintCellhire network number (used for subsequent calls e.g. GetTariff and GetProvisioningOrders)
sourceNetworksarray of SourceNetworksList of available networks the MSISDN(s) can come from
upcomingHolidaysarray of DatesList of dates when Port / Migration is unavailable. None working days which fall between the minPortDays and maxPortDays

Source Networks

NameTypeDescription
idintId of the Source Network
namestringName of the Source Network

Request

curl --location 'https://api.cellhire.com/api/porting/{accountId}/networks' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...'

Response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
[
    {
        "portTypeName": "Port",
        "portType": 2,
        "targetNetworks": [
            {
                "id": 1,
                "name": "Vodafone",
                "maxPortDays": 30,
                "minPortDays": 1,
                "allowEsim": true,
                "networkNumber": 200,
                "sourceNetworks": [
                    {
                        "id": 5,
                        "name": "O2"
                    },
                    {
                        "id": 10,
                        "name": "Virgin Media"
                    }
                ],
                "upcomingHolidays": [
                    "2025-05-05T00:00:00",
                    "2025-05-26T00:00:00"
                ]
            }
        ]
    }
]

Tariffs / BoltOns / Provisioning Orders

Additional commands needed for provisioning can be found on on the Provision Extras page.

Services

Command available on Get available Services for Network and Tariff page.

List Ports

This endpoint returns a paged list of all Port / Migration requests for an account.

Request

NameTypeDescription
accountIdintCellhire account number
x-pagenumberintPage number to return
x-pagesizeintNumber of records to return per page (Max 50)
curl --location 'https://api.cellhire.com/api/porting/{accountId}' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'x-pagenumber: 1' \
--header 'x-pagesize: 10' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...'

Response

NameTypeDescription
totalintTotal number of requests
totalPagesintTotal number of pages
dataarray of RequestsList of requests

Requests

NameTypeDescription
idguidRequest Id
namestringName of Port / Migration
connectionDatedateDate of Port / Migration
portTypeintId of the Port Type (see Porting Networks)
portTypeNamestringName of Port Type
rowCountintNumber of rows on this Port / Migration
statusintId of the Port Status
statusNamestringName of Port Status (see Status Flow)
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
    "total": 10,
    "totalPages": 1,
    "data": [
        {
            "id": "bb8c7f95-a406-41bd-140e-08dca4c4f4e2",
            "name": "Sample Port",
            "connectionDate": "2024-07-18T00:00:00",
            "portType": 2,
            "portTypeName": "PortIn",
            "rowCount": 1,
            "status": 16,
            "statusName": "Complete"
        }
    ]
}

Get Port Details

Get extra details of a specific port.

Request

NameTypeDescription
accountIdintCellhire account number
portIdguidId of the Port / Migration
curl --location 'https://api.cellhire.com/api/porting/{accountId}/port/{portId}' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...'

Response

NameTypeDescription
idguidRequest Id
statusintId of the Port Status
statusNamestringName of Port Status (see Status Flow)
namestringName of Port / Migration
targetNetworkIdintId of the Target Network (see Porting Networks)
targetNetworkNamestringName of Target Network
sourceNetworkIdintId of the Source Network (see Porting Networks)
sourceNetworkNamestringName of Source Network
connectionDatedateDate of Port / Migration
portTypeintId of the Port Type (see Porting Networks)
portTypeNamestringName of Port Type
rowCountintNumber of rows on this Port / Migration
rowsarray of PortRowsList of rows on this Port / Migration

Port Rows

NameTypeDescription
idguidId of the Port Row
msisdnstringMobile number
serialNostringSIM serial number
pacstringSee Terminology
statusintId of the Port Row Status
statusNamestringName of the Port Row Status
messagestring or nullMessage associated with this row (if any)
groupNamestringName of the group this row belongs to
boltOnsarray of intList of bolt-on IDs applied to this SIM
tariffIdintId for the tariff (see Tariffs / BoltOns / Provisioning Orders)
tariffNamestringName of the tariff
esimboolWhether the SIM is an eSIM
provisioningOrderNamestring or nullName of the provisioning order (when creating a new one)
provisioningOrderint or nullID of the provisioning order (when using an existing one)
servicesarray of Services or nullList of services to configure (see Services)
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
    "id": "93949676-932c-4c43-140f-08dca4c4f4e2",
    "status": 11,
    "statusName": "Complete",
    "name": "Example Port",
    "targetNetworkId": 4,
    "targetNetworkName": "Orange (France) LMVNO",
    "sourceNetworkId": 34,
    "sourceNetworkName": "Bouygues",
    "connectionDate": "2024-07-18T00:00:00",
    "portType": 2,
    "portTypeName": "PortIn",
    "rowCount": 1,
    "rows": [
        {
            "id": "8f16f79a-cd5a-40a5-0938-08dca4c4f4ff",
            "msisdn": "070000000000",
            "serialNo": "2358880040200",
            "pac": "84E046866KO2",
            "status": 15,
            "statusName": "Complete",
            "message": null,
            "groupName": "Group1",
            "boltOns": [
                502102
            ],
            "tariffId": 102295,
            "tariffName": "Bundle V+D Silver",
            "esim": false,
            "provisioningOrderName": null,
            "provisioningOrder": 9569,
            "services": [
                {
                    "name": "admin",
                    "value": "true"
                }
            ]
        }
    ]
}

Create Port

This method is used to create the initial Port / Migration request.

Request

NameTypeDescription
accountIdintCellhire account number
namestring (255)Name of the Port / Migration
targetNetworkIdintId of the Target Network (see Porting Networks)
sourceNetworkIdintId of the Source Network (see Porting Networks)
connectionDatedateDate of the Port / Migration
portTypestringType of Port (see Porting Networks)
rowsarray of CreatePortRowList of rows in this Port / Migration

Create Port Row

NameTypeDescription
groupNamestring (255)Name of the group this row belongs to, should be unique per Tariff + BoltOn + Services configuration
esimboolWhether the SIM is an eSIM
msisdnstringMobile number
serialNostringSIM serial number
provisioningOrder 1int or nullId of the provisioning order (if using an existing one) (see Tariffs / BoltOns / Provisioning Orders)
provisioningOrderName 1string (255) or nullName of the provisioning order (if creating new one)
pacstringPorting Authorization Code
tariffIdintId of the tariff
boltOnsarray of intList of bolt-on Ids (see Tariffs / BoltOns / Provisioning Orders)
servicesarray of Services or nullList of services (see Services)

1 - At least one field must be provided.

curl --location 'https://api.cellhire.com/api/porting/{accountId}' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...' \
--data '{
	"name": "Example Port",
	"targetNetworkId": 2,
	"sourceNetworkId": 23,
	"connectionDate": "2025-05-02T00:00:00.000Z",
	"portType": "PortIn",
	"rows": [{
		"groupName": "Group1",        
        "esim": false,
		"msisdn": "07000000000",
		"serialNo": "1234567890",
		"provisioningOrder": 3630,
		"provisioningOrderName": null,
		"pac": "12345",
		"tariffId": 102344,
		"boltOns": [502248],
		"services": [{
			"name": "voice",
			"value": "true"
		}, {
			"name": "voiceRoaming",
			"value": "true"
		}]
	}]
}'

Response

NameTypeDescription
portIdguidId of the Port / Migration that has been created
HTTP/1.1 201 Created
Content-Type: application/json
"550e8400-e29b-41d4-a716-446655440000"

Update Port

This method can be used to both update the PAC of a row in the status of PacInvalid or PacInvalidDate and also cancel any lines in the status of PacInvalid, PacInvalidDate or Submitted.
If you wish to cancel all lines please use Cancel Port.

Request

NameTypeDescription
accountIdintCellhire account number
portIdguidId of the Port / Migration
Rowsarray of UpdatePortRowList of rows to modify

Update Port Row

NameTypeDescription
MsisdnstringMobile number being updated or cancelled
Pacstring or nullUpdated PAC (if updating)
PortRowStatusstringNew status for the port row (Amended or CancellationRequested)
curl --request PATCH 'https://api.cellhire.com/api/porting/{accountId}/port/{portId}' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...' \
--data '{
    "Rows": [
      {
        "Msisdn": "07000000000",
        "Pac": "PAC12345",
        "PortRowStatus": "Amended"
      },
      {
        "Msisdn": "070000000123",
        "PortRowStatus": "CancellationRequested"
      }
    ]
  }'

Response

HTTP/1.1 202 Accepted

Cancel Port

This method is used to cancel the entire Port / Migration. This can only be done before the port is Locked.
If the Port / Migration is in status PacCheckFailed this cancellation will happen immediately.
If the Port / Migration is in the status of Submitted this will take some time.
Once cancellation has completed the Port / Migration status will become Cancelled.

Request

NameTypeDescription
accountIdintCellhire account number
portIdguidId of the Port / Migration
curl --request DELETE 'https://api.cellhire.com/api/porting/{accountId}/port/{portId}' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...'

Response

HTTP/1.1 202 Accepted

Terminology

  • PAC - "Porting Authorisation Code", also known as RIO or "Relevé d'Identité Opérateur" in France, the unique code that allows porting between mobile networks.
  • Working Days - Monday to Friday.

FAQ

Why has the Port / Migration has gone from Submitted, to Cancelled without a request to process a cancellation?
In some circumstances, a source network provider may reject the request, which can then no longer be processed and will be automatically cancelled. This reason can be seen in the Message field on the PortRow response of Get Port Details request.

Why do I recieve "The following MSISDN's already exists on our stock records" when calling CreatePort?
When an MSISDN has previously been with Cellhire (and has Ported or Migrated away), our system may need updating to allow the MSISDN to Port / Migrate back in. Please contact your Account Manager to resolve this.

I previously booked a Port / Migration with an invalid PAC. Why can't I book a new Port with the correct PAC?
You will need to cancel the original port before a new Port / Migration can be created for that MSISDN.

I need to change the tariff details, how can I do this?
Either cancel the requested Port / Migration and rebook it - which will need to allow for the minPortDays. Or, wait until the Port / Migration has completed, and then submit a Change Provision submission.

How long does it take for the Port / Migration to complete on the port date?
Please allow up to 24 hours for all actions to be completed, which will include some loss of connectivity.

How do I add additional rows to an existing Port / Migration?
This is not possible, please create a new Port / Migration for the additional rows.

Why haven't the PacValid lines on my Port / Migration been submitted to the Network?
Only when all lines on a Port / Migration are in the status of PacValid or Cancelled can the request progress. Leaving some lines in any other status will prevent any lines being submitted.