# Porting

Porting is required when a user wants to keep their phone number when changing their subscription. There are multiple steps involved between the user, their previous carrier, and the new subscriber

## Properties

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `object` | string | Yes | Type of object is always `porting`. |
| `id` | string | Yes | Unique identifier for the porting. |
| `accountNumber` | string,null | Yes | The account number on the donor service provider. |
| `accountPinExists` | boolean | Yes | Whether the account PIN has been provided. |
| `accountType` | null | postpaidMulti | postpaidSingle | prepaidRegistered | prepaidUnregistered | Yes | The type of account on the donor service provider. This field is only used for portings in Ireland and may be `null` otherwise. |
| `address` | object,null | Yes | The address of the account holder on the donor service provider. |
| `behavior` | cancelOnly | portIn | Yes | The behavior of the porting.  A value of `portIn` indicates that this porting will transfer the phone number from the previous provider.  A porting with behavior `cancelOnly` will cancel the previous service without transferring the number. This behavior is currently only available for local plans in the United Kingdom.  |
| `billingPinExists` | boolean | Yes | Whether the billing PIN has been provided. |
| `birthday` | string,null | Yes | The birthday of the account holder on the donor service provider. |
| `canceledAt` | string,null | Yes | Time when the porting was canceled. |
| `completedAt` | string,null | Yes | Time when the porting was completed. |
| `createdAt` | string | Yes | Time when the porting was created. |
| `declinedAttempts` | integer | Yes | The number of declined porting attempts so far. |
| `declinedCode` | string,null | Yes | The code reason for the declined porting. |
| `declinedMessage` | string,null | Yes | The reason description for the declined porting. |
| `donorProvider` | mixed | Yes | The service provider from whom the number is ported. |
| `donorProviderApproval` | boolean,null | Yes | Whether the donor provider has approved or not the porting. |
| `expiredAt` | string,null | Yes | Time when the porting was expired. |
| `failedAt` | string,null | Yes | Time when the porting was failed. |
| `firstName` | string,null | Yes | The first name of the account holder on the donor service provider. |
| `lastDeclinedAt` | string,null | Yes | Time when the porting was last declined. |
| `lastName` | string,null | Yes | The last name of the account holder on the donor service provider. |
| `lastRequestedAt` | string,null | Yes | Time when the porting was last requested. |
| `phoneNumber` | string | Yes | The phone number to port in E.164 string_format. |
| `provider` | string | Yes | The ID of the recipient network provider. |
| `recipientProvider` | object | Yes | The service provider to whom the number is ported. |
| `required` | string[] | Yes | List of fields required for the porting to be processable. The fields depend on the donor and recipient providers. |
| `scheduledOn` | string,null | Yes | Date when the porting is scheduled to take effect.  This returns the provider-confirmed date when available, otherwise the user-requested date.  The ability to schedule portings is only available for local plans in the United Kingdom. Otherwise, this value will be null.  |
| `status` | draft | initiated | pending | informationRequired | requested | declined | completed | canceled | expired | failed | Yes | The current status of the porting. |
| `subscription` | string,null | Yes | Unique identifier for the porting subscription. |
| `user` | string | Yes | Unique identifier for the user this porting is for. |
