sTN Partner APIsTN Partner API
Home
Getting Started
Guide
Home
Getting Started
Guide
  • Guide

    • Introduction
    • Supported Features
    • Authentication
    • Base URLs
    • Advanced Query Parameters
    • Error Handling
  • Getting Started

    • Introduction
    • Quick Start Guide
  • API Endpoints

    • QuerySimcard
    • QueryActivation
    • QuerySubscription
    • NewSubscription
    • CancelNewSubscription
    • SuspendSubscription
    • ResumeSubscription
    • SimSwapSubscription
    • SetServicesSubscription
    • MoveEnvironmentSubscription
    • InPortSubscription
    • ChangeInPortSubscription
    • CancelInPortSubscription
    • PortingOutSubscription
    • CancelPortingOutSubscription
    • TerminateSubscription
    • CancelTerminateSubscription
    • QueryInvoice
    • QueryCdrMonth
    • QueryCdr
    • QueryUsageSubscription

PortingOutSubscription

Overview

  • Method: POST
  • Endpoint: /api/PortingOutSubscription
  • Description: Handles a porting-out request for an existing subscription. This endpoint transfers a phone number to another provider while keeping subscription details updated.
POST /api/PortingOutSubscription
Content-Type: application/json
{
  "subscriptionId": "###3Vp17###7Xg79e",
  "phoneNumber": "06#####678",
  "referenceNumber": "REF54321"
}

Request Body Parameters

The request body should be a JSON object with the following structure:

  • subscriptionId (string, required if phoneNumber is not provided): Identifier for the subscription to be ported out.
  • phoneNumber (string, required if subscriptionId is not provided): The phone number associated with the subscription.
  • wishDate (string, optional): Desired date and time for the port-out operation (ISO 8601 format).
  • referenceNumber (string, optional, max 15 characters): A reference number for tracking the porting-out request.

Info

At least one of subscriptionId or phoneNumber must be provided to identify the subscription to be ported out.


Response Structure

The response will include details about the porting-out request:

{
    "id": "###XM3x9###2F5L2S",
    "createdAt": "2025-02-03T12:13:29.2502379+01:00",
    "modifiedAt": "2025-02-03T12:13:29.2502379+01:00",
    "status": "INIT",
    "activationType": "OUTPORT",
    "providerEnvironment": "SP16001",
    "referenceNumber": "",
    "subscriptionId": "###3Vp17###7Xg79e",
    "phoneNumber": "06-#####969",
    "info": {
        "wishDate": "2025-03-01T12:00:00+01:00"
    }
}

Field Descriptions

  • id: A unique identifier for the activation request.
  • createdAt: The timestamp when the request was created.
  • modifiedAt: The timestamp of the last modification.
  • status: The current status of the porting-out request:
    • BUSY: The request is being processed.
    • DONE: The porting-out request has been successfully completed.
    • ERROR: The request has failed.
  • activationType: The type of activation, always OUTPORT for this request.
  • providerEnvironment: The Envirionment where the sim is registered at the provider.
  • subscriptionId: The ID of the subscription being ported out.
  • phoneNumber: The phone number being transferred.
  • referenceNumber: The tracking reference number (if provided).
  • activatedDate: The timestamp when the porting-out process was completed (if applicable).
  • info: Additional metadata about the request.

Info

Optional fields will only be included in the response if they were provided in the request.


Usage Notes

  • Provide wishDate to schedule the port-out; otherwise, it will be processed immediately.
  • Use referenceNumber for tracking the porting-out request.
  • The response includes a unique id for tracking.

Querying Porting-Out Status

To track the status of the porting-out request, use the QueryActivation API until the status field is set to DONE or ERROR.

GET /api/QueryActivation?id=###XM3x9###2F5L2S

Example Response:

{
    "id": "###XM3x9###2F5L2S",
    "createdAt": "2025-02-03T12:13:29.25+01:00",
    "modifiedAt": "2025-02-03T12:26:30.5030348+01:00",
    "status": "BUSY",
    "activationType": "OUTPORT",
    "providerEnvironment": "SP16001",
    "referenceNumber": "",
    "providerOrderNumber": "03####0/2##5",
    "subscriptionId": "###3Vp17###7Xg79e",
    "phoneNumber": "06-#####969",
    "info": {
        "wishDate": "2025-03-01T12:00:00+01:00"
    }
}

After the port-out has been completed, request QueryActivation again to confirm:

GET /api/QueryActivation?id=###XM3x9###2F5L2S

Updated Response:

{
    "id": "###XM3x9###2F5L2S",
    "createdAt": "2025-02-03T12:13:29.25+01:00",
    "modifiedAt": "2025-03-05T13:26:41.56+01:00",
    "status": "DONE",
    "activationType": "OUTPORT",
    "providerEnvironment": "SP16001",
    "referenceNumber": "",
    "providerOrderNumber": "03####0/2##5",
    "subscriptionId": "###3Vp17###7Xg79e",
    "phoneNumber": "06-#####969",
    "activatedDate": "2025-03-05T13:26:41+01:00",
    "info": {
        "wishDate": "2025-03-01T12:00:00+01:00",
        "portingStatus": "OUTPORTED"
    }
}

Summary

The /api/PortingOutSubscription endpoint allows for the porting out of a phone number from an active subscription.

  • Requires either subscriptionId or phoneNumber to identify the subscription.
  • Allows scheduling via wishDate.
  • Provides a tracking id to monitor porting status via QueryActivation.

Use this API to efficiently transfer phone numbers to other providers.

Last Updated:
Contributors: UP2media-AR, Jos Harink
Prev
CancelInPortSubscription
Next
CancelPortingOutSubscription