# 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. |
| `failureReason` | null | consentCodeAttemptsExceeded | consentNotGiven | consentRequestCanceled | Yes | The reason for the porting failure. Only recorded when the porting failed because user consent could not be obtained. |
| `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. |
| `requestBehavior` | automatic | manual | Yes | Controls when the porting is submitted to the recipient network provider.  When `automatic`, the porting is requested automatically as soon as all required information is present.  When `manual`, that automatic submission is withheld until the porting is requested explicitly via the [request a porting](https://developers.gigs.com/core/portings#request-a-porting) endpoint. A `manual` porting that has all required information waits in the `informationRequired` status, or in `declined` if it was declined, until it is requested.   <!-- theme: info --> > #### Preview > > This property is currently in preview and might change in the future. > > We’re excited to hear your feedback and ideas. Please send an email > to [support@gigs.com](mailto:support@gigs.com) to share your thoughts.  |
| `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.  For most providers this returns the provider-confirmed date when available, otherwise the user-requested date. For Concierge scheduled porting (p18), this returns the user-facing expected completion date and does not reflect the internal batch run date.  Scheduling a port-in is only supported in France, Ireland, Sweden and the United Kingdom. For other regions this reflects the provider-confirmed date when available or `null` otherwise.  |
| `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. |
