Search ports and migrations
POST /api/porting/{accountId}/search
Searches existing port and migration requests for an account. Although it uses POST, this operation reads data and does not create a port or a submission. Authenticate with an API bearer token. For port creation and status handling, see Porting.
Parameters
accountId is the required integer account number in the path. Search criteria and pagination belong in the JSON body, rather than the pagination headers used by List ports.
| Field | Type | Description |
|---|---|---|
name | string or null | Filter by port/migration name |
pac | string or null | Filter by a port row's PAC |
msisdn | string or null | Filter by a port row's mobile number; numeric string, 5 to 20 characters when supplied |
serialNumber | string or null | Filter by a port row's SIM serial number; numeric string, 5 to 40 characters when supplied |
pageNumber | integer | One-based page number; values below 1 become 1 |
pageSize | integer | Records per page, 1 to 50; omitted, zero or out-of-range values become 50 |
Supply pagination explicitly. With no search body the backing service uses page 1 and page size 50. Omit filters you do not need. Search results remain limited to the caller's authorised account visibility.
Supplied filters use substring matching and combine to narrow the results. A matching PAC, MSISDN or serial number can appear on any row of the returned port. Results are ordered by connection date descending.
Request
curl --request POST 'https://api.cellhire.com/api/porting/<account-id>/search' \
--header 'Authorization: Bearer <access-token>' \
--header 'Content-Type: application/json' \
--data '{
"msisdn": "07000000000",
"pageNumber": 1,
"pageSize": 10
}'Response
200 OK returns total, totalPages and data. data contains the same port summaries documented under List ports, including id, name, connectionDate, portType, portTypeName, rowCount, status and statusName. Each id can be used with Get port details. Increment pageNumber until all totalPages have been read.
{
"total": 0,
"totalPages": 0,
"data": []
}Errors
400 can indicate malformed JSON or path/body values that cannot be bound. 401 indicates missing/invalid authentication and 403 indicates the caller cannot search the account. Upstream search failures can return 500; an invalid search term may surface as an upstream failure rather than a field-level validation response. Correct the request before repeating it.