api:porting:list
Table of Contents
API : Porting List
Introduction
This request will return the list of porting for a given customer, or for all of a resellers customers or for all customers (only if ADMIN).
Request
| URL | https://api.telecomx.dk/porting | ||
|---|---|---|---|
| Method | GET | ||
| Access level | VIEWER, MANAGER or OWNER if user belongs to the customer. RESELLER if customer belongs to the reseller or a sub reseller. ADMIN. |
||
| Query | customer | [optional] Id of the customer the portings belongs to. If the user is VIEWER, MANAGER or OWNER, customer will be auto-set to the users customer id. |
|
| reseller | [optional] Id of the reseller whose customers the portings belongs to (RESELLER_ADMIN and ADMIN only). |
||
| stage | [optional] Limit the returned portings to only show porting at the given stage. See list of stages below. If stage is set, status will be ignored if set. |
||
| status | [optional] Instead of stage, status can be used to limit return the portings which are in a category of stages: |
||
| OPEN | Portings that are ongoing (not confirmed, completed, cancelled or rejected). | ||
| CLOSED | Portings that has ended their run (not active). | ||
| ATTENTION | Portings that needs attention (Nothing has happened for too long). | ||
| WAITING | Portings where we are waiting for the customer. | ||
| READY | Portings that are ready to order. | ||
| ORDERED | Portings that has been ordered (only type IN). | ||
| CONFIRMED | Portings that has been confirmed. | ||
| REJECTED | Portings that has been rejected. | ||
| PORT_TODAY | Porting that are performed today. | ||
| PORT_TOMORROW | Portings that are performed tomorrow. | ||
| PORT_NEXT5DAYS | Portings that are performed within the next 5 days. | ||
| offset | [optional] Index of the first porting to return, default 0. |
||
| limit | [optional] The number of porting to return, default 100, min 1, max 500. |
||
| filter | [optional] A phone number of part of, that must be included in the porting, or part of the notes if RESELLER_ADMIN or ADMIN. |
||
| full | [optional] If true, complete porting objects will be returned instead of the condensed versions. |
||
| type | [optional] Type of porting: IN or OUT. |
||
| sort | [optional] What to sort the result by: |
||
| CREATED | the date the porting was created (default) | ||
| PORTING | the date the porting is performed | ||
| STATUS | the date of the latest status update | ||
| REQUESTED | the requested porting date | ||
| ORDERED | the date the porting was ordered | ||
| NUMBER | the phone number to port (only the first) | ||
| sortOrder | [optional] Sort order, whether it will sort the oldest portings first, or newest portings first. Allowed values are ASC (oldest first) and DESC (newest first). Defaults to ASC. |
||
| Stage code | Description | Requires attention |
|---|---|---|
| IN_CREATED | Porting has been created. | |
| IN_AWAITING_POA_FROM_CUSTOMER | Power Of Attorney document(s) has been sent to the customer and we now wait for the customer to sign and return them. | After 3 days. |
| IN_POA_RECEIVED_FROM_CUSTOMER | Power Of Attorney document(s) has been received from the customer and we now wait for an ADMIN to approve them, so that the POA can be forwarded to the donor operator and the porting can be ordered. | Immediately. |
| IN_READY | Reseller requests that the porting shall be orderes. | Immediately. |
| IN_POA_SENT | POA document(s) has been sent to the donor operator. | After 2 days. |
| IN_ORDERED | Porting of the number(s) has been ordered, we now wait for the donor operator to reply. | After 3 days. |
| IN_CONFIRMED | Porting has been confirmed/approved by the donor operator and we are now waiting for the porting date to come, where the porting will be carried out and the porting will be completed. | |
| IN_REJECTED | Donor operator has rejected the porting request. An ADMIN will investigate the matter. | Immediately. |
| IN_DONOR_CONTACTED | The donor operator has been contacted due to some issue with the porting. | After 3 days. |
| IN_COMPLETED | The porting has been completed and the numbers has been transferred. [End of run] | |
| IN_CANCELLED | The porting has been cancelled, either by customer, reseller or ADMIN or by ADMIN due to a rejection. [End of run] | |
| IN_ERROR | The porting is in error state - something went wrong according to OCH. | Immediately. |
| OUT_RECEIVED | A request for out porting to another operator has been received. Now waiting for an ADMIN to confirm or reject. | Immediately. |
| OUT_RECEIVER_CONTACTED | The receiving operator has been contacted due to some issue with the porting. | After 3 days. |
| OUT_CONFIRMED | The out porting has been confirmed to take place on the set date. Now waiting for the porting to be completed. | |
| OUT_COMPLETED | The out porting has been completed and the numbers has been transferred out. [End of run] | |
| OUT_CANCELLED | The receiving operator has cancelled the porting. [End of run] | |
| OUT_REJECTED | We have rejected the out porting due to an error in the request. [End of run] | |
| OUT_ERROR | The porting is in error state - something went wrong according to OCH. | Immediately. |
Query examples
https://api.telecomx.dk/porting https://api.telecomx.dk/porting?customer=1234567890ABCDEF12345678 https://api.telecomx.dk/porting?customer=1234567890ABCDEF12345678&status=OPEN&offset=0&limit=10&filter=+4570305050&full=true
Response
| JSON object | |
|---|---|
| offset | Index of the first porting returned. |
| limit | Number of portings to return. Note that the actual number of porting returned may be lower. |
| total | Number of portings that can be returned when offset and limit is not considered. This is to be used for paging through the data. |
| portings | Array of portings, see definition below. |
| Porting object (JSON) | ||
|---|---|---|
| _id | Id | Id of the porting. |
| number | String | The phone number in E.164 format |
| additionalNumbers | Array | If porting a series (at least 10 numbers) this is an array of the additional numbers in E.164 format. |
| numberType | String | Type of numbers: SIP or MVNO. |
| portingType | String | Type of porting: IN or OUT. |
| status.date | Date | The date and time the porting entered the current stage. |
| status.stage | String | The current stage of the porting, see list of porting stages above. |
| status.message | String | Optional message about the current stage for some stages. |
| status.employee | Id | Id of the employee who caused the porting to move to the current stage, null if done by system. |
| operator | String | CPS code of the donor or receiving operator. |
| operatorName | String | Name of the donor or receiving operator. |
| createdDate | Date | The date the porting was created. |
| requestedDate | Date | The requested date for the porting to be carried out. |
| orderedDate | Date | The date the porting was ordered. Null if not yet ordered. |
| portingDate | Date | The actual date the porting will be carried out. Null if not yet determined. |
| notify | Array | Array of e-mail address of the people who wish to be notified when a porting progresses. |
| customer | Id | Id of customer. Only included if user is RESELLER or ADMIN and no customer has been set. |
| customerName | String | Name of customer. Only included if user is RESELLER or ADMIN and no customer has been set. |
| reseller | Id | Id of reseller customer belongs to. |
| resellerName | String | Name of reseller. Only included if user is RESELLER_ADMIN or ADMIN. |
| network | String | Name of network we are porting to (only for portingType IN). |
| Porting object if full=true (JSON) | ||
|---|---|---|
| _id | Id | Id of the porting. |
| ichId | String | ICH id. |
| ochFlowId | String | OCH flow id. |
| number | String | The phone number in E.164 format |
| additionalNumbers | Array | If porting a series (at least 10 numbers) this is an array of the additional numbers in E.164 format. |
| numberType | String | Type of numbers: SIP or MVNO. |
| portingType | String | Type of porting: IN or OUT. |
| donorSimNumber | String | ICC/Sim card number from current SIM at donor operator. Only valid for MVNO portings. |
| donorCustomerId | String | Id number of customer at donor operator, if known. |
| customer | Id | Id of customer the porting belongs to. |
| customerName | String | Name of customer. Only included if user is RESELLER, RESELLER_ADMIN or ADMIN and no customer has been set. |
| reseller | Id | I of reseller the customer belongs to. |
| resellerName | string | Name of reseller. Only included if user is RESELLER_ADMIN or ADMIN and no reseller has been set. |
| voiceAccount | Id | Id of voice account (SIP or MVNO account) the porting belongs to. |
| status.date | Date | The date and time the porting entered the current stage. |
| status.stage | String | The current stage of the porting, see list of porting stages above. |
| status.message | String | If stage is OUT_REJECTED then: AUTH_MISSING (No POA or valid ICC received in time ), WRONG_NUMBER (POA customer or signer is not the owner of the number), SIM_MISMATCH (SIM/ICC is not correct for the number) or NOT_IN_USE (Number is not in use). If stage is IN_CONFIRMED or OUT_CONFIRMED then: the porting date chosen. If stage is IN_DONOR_CONTACTED, OUT_RECEIVER_CONTACTED or IN_CANCELLED then: this is an optional message. |
| status.employee | Id | Id of the employee who caused the porting to move to the current stage, null if done by system. |
| statusHistory | Array | Array of Status object (4 rows above), for the previous stages the porting has been at. |
| operator | String | CPS code of the donor or receiving operator. |
| operatorName | String | Name of the donor or receiving operator. |
| createdDate | Date | The date the porting was created. |
| requestedDate | Date | The requested date for the porting to be carried out. |
| orderedDate | Date | The date the porting was ordered. Null if not yet ordered. |
| portingDate | Date | The actual date the porting will be carried out. Null if not yet determined. |
| documents | Array | Array of Ids of the Power Of Attorney documents received/uploaded from the customer, that are be to be used for this porting. |
| notify | Array | Array of e-mail address of the people who wish to be notified when a porting progresses. |
| customSeries | Boolean | True if number series has custom formatting. |
| customSeriesData | Array | List of custom series data, one series pr. line, <e.164-number>-<e.164 number> |
| customSeriesPrimary | String | Custom series primary number. |
| notes | String | notes, RESELLER_ADMIN and ADMIN only. |
Note that properties holding no value may be omitted from the object.
Example - normal
{ offset: 10, limit: 25, total: 243, portings: [ { _id: '1234567890ABCDEF12345678', number: '+4570305050', additionalNumbers: ['+4570305051','+4570305052','+4570305053','+4570305054','+4570305055','+4570305056','+4570305057','+4570305058','+4570305059'], numberType: 'SIP', portingType: 'IN', status: 'IN_CONFIRMED', operator: '01015', operatorName: 'Telenor', createdDate: '2014-01-01T12:34:56.789Z', requestedDate: '2014-01-01T12:34:56.789Z', orderedDate: '2014-01-01T12:34:56.789Z', portingDate: '2014-01-01T12:34:56.789Z', notify: ['donald@disney.com','goofy@disney.com'] }, { ... } ] }
Example - full=true
{ offset: 10, limit: 10, total: 23, customers: [ { _id: '1234567890ABCDEF12345678', ichId: '565254645', ochFlowId: '567356575663673', number: '+4570305050', additionalNumbers: ['+4570305051','+4570305052','+4570305053','+4570305054','+4570305055','+4570305056','+4570305057','+4570305058','+4570305059'], numberType: 'SIP', portingType: 'IN', status: { date: '2014-01-01T12:34:56.789Z', stage: 'IN_CONFIRMED', message: '2014-02-01T12:34:%6.789Z', employee: '1234567890ABCDEF12345678' }, statusHistory: [ { ... }, { ... }, { ... } ], operator: '01015', operatorName: 'Telenor', createdDate: '2014-01-01T12:34:56.789Z', requestedDate: '2014-01-01T12:34:56.789Z', orderedDate: '2014-01-01T12:34:56.789Z', portingDate: '2014-01-01T12:34:56.789Z', documents: ['1234567890ABCDEF12345678','1234567890ABCDEF12345678','1234567890ABCDEF12345678'], notify: ['donald@disney.com','goofy@disney.com'], customSeries: false }, { ... } ] }
Errors
| Error code | Message | Description |
|---|---|---|
| 403 | access_denied | Insufficient access level - no access to the customer. |
| 500 | internal_error | <Unspecified> |
api/porting/list.txt · Last modified: 2023/09/20 08:19 by Per Møller