Available FOC Dates
Choosing a requestedFocDate for a port-in means satisfying several rules at once: the earliest estimate, business days, holidays, the activation time for the port type, and how far in the future the date may be. Instead of guessing and handling validation errors, ask Bandwidth which dates the port-in will accept with GET /accounts/{accountId}/portins/{orderId}/availableFocDates.
The response is a list of windows. Any requestedFocDate from start to end in a window, inclusive, is a date Bandwidth will consider for the order at the time you ask. For most port types it passes validation. For automated wireless and triggered automated off-net port-ins, validation can be stricter than the window. If you get an error, use 11:30 AM Eastern.
Eligibility
- The port-in must be a port-in, either a stand-alone port-in or a child of a bulk port-in.
- The request must use the
/api/v2base path. Otherwise the response is400with code7746. - The port-in must not be in a terminal status (
COMPLETEorCANCELLED). Otherwise the response is409with code7915.
The API works for draft and submitted port-ins, so you can use it both when you create an order and when you want to change its date later.
Request
GET https://api.bandwidth.com/api/v2/accounts/{accountId}/portins/{orderId}/availableFocDates
Accept: application/json
There is no request body or query parameter. The available dates depend on the order itself: its port type, country, losing carrier, and whether it is triggered.
Response
{
"data": {
"focDates": [
{
"start": "2026-10-23T15:30:00Z",
"end": "2026-10-23T15:30:00Z"
},
{
"start": "2026-10-26T15:30:00Z",
"end": "2026-10-26T15:30:00Z"
},
{
"start": "2026-10-27T15:30:00Z",
"end": "2026-10-27T15:30:00Z"
}
],
"unavailableFocDates": [
{
"date": "2026-10-24",
"reason": "WEEKEND"
},
{
"date": "2026-10-25",
"reason": "WEEKEND"
}
]
},
"errors": [],
"links": [
{
"href": "https://api.bandwidth.com/api/v2/accounts/9900000/portins/f0856d2c-1943-4eef-9c6d-d5f8393238af/availableFocDates",
"rel": "self",
"method": "GET"
}
]
}
| Field | Description |
|---|---|
data.focDates | Available windows in date order, one per eligible day. Empty when no date is currently available. |
data.focDates[].start | The earliest accepted date and time on that day, in UTC (ISO 8601, to the second). |
data.focDates[].end | The latest accepted date and time on that day, in UTC. Equal to start when only one time is allowed. |
data.unavailableFocDates | Dates that fall between the first and last window but cannot be chosen, so you do not have to work out the gaps yourself. Always present on a 200 response, and empty when there are no gaps. Days before the first window (lead time, same-day cutoff) are not listed. |
data.unavailableFocDates[].date | The date, as YYYY-MM-DD. For international port-ins this is the date in the country, not the UTC date. |
data.unavailableFocDates[].reason | WEEKEND or HOLIDAY. HOLIDAY wins when a date is both. |
data.unavailableFocDates[].description | The holiday name from Bandwidth's holiday calendar, such as THANKSGIVING_DAY. Left out when reason is WEEKEND. |
errors | Empty on success. See Errors. |
links | A self link to this request. |
How the Windows Are Built
The windows come from the rules that apply to the port-in, so they differ by port type, country, and carrier. Pick any date inside a window.
- Range of days. Windows start on the order's earliest estimated port date and run for about 30 days. International port-ins count the 30 days from the earliest estimate, since international lead times can be long.
- Business days. Weekends and holidays are normally skipped. The ones inside the range are listed in
unavailableFocDates. - Time of day. Some port-ins accept one fixed time each day, and others accept a range of times. When
startandendare equal, that is the only time you can request. - First day. If the earliest estimate falls partway through the first day, that window's
startis moved up to the earliest estimate.
Times are returned in UTC, so the same local time shows up differently when daylight saving time changes. For example, 11:30 AM Eastern is 15:30Z in October and 16:30Z in November.
Unavailable Dates
unavailableFocDates lists the weekends and holidays that fall inside the range of focDates, which is handy for showing why a date can't be picked.
{
"date": "2026-11-26",
"reason": "HOLIDAY",
"description": "THANKSGIVING_DAY"
}
- Only dates strictly between the first and last window are listed. Nothing before the first window or after the last one is.
- A date that is both a weekend and a holiday is reported as
HOLIDAY. - US/Canada port-ins use the US/Canada holiday calendar. International port-ins use the holiday calendar of the order's country.
- Wireless ports with an automated wireless (e-bonded) interface can be ported on weekends and holidays, so their list is always empty.
- The list is empty when there are no gaps.
Using the Dates
Stand-alone port-ins
- Create the port-in as a draft. See Stand-Alone Port-Ins.
- Call
availableFocDatesfor the order. - Set
requestedFocDateto a value inside one of the windows, such as itsstart, when you submit or update the port-in withPUT /portins/{orderId}. - To explain a skipped day to your users, look it up in
unavailableFocDates.
Bulk port-ins
Each child port-in of a bulk port-in has its own windows, because children differ in country, carrier, and port type.
- After the TN list is validated, get the child IDs from
GET /bulkPortins/{orderId}/portinList. - Call
availableFocDatesfor each child. - Choose a target date that falls in as many children's windows as possible (a date in a child's
unavailableFocDatesis not available to that child), then set it on all children at once withPATCH /bulkPortins/{orderId}andrequestedFocDate. The bulk port-in keeps each child's activation time (for example 11:30 AM Eastern for US/Canada children, midnight for international children).
Available dates are calculated when you ask. They move as time passes and as the order changes (for example when it becomes triggered), so check them again shortly before you submit or update an order.
Errors
Errors use the same envelope, with data set to null:
{
"data": null,
"errors": [
{
"type": "resource-not-found",
"description": "The resource specified cannot be found.",
"code": 7913
}
],
"links": []
}
| HTTP status | Code | Type | Description |
|---|---|---|---|
400 | 7746 | bad-request | This API version does not support the operation. Use the /api/v2 base path. |
400 | 7914 | bad-request | The request could not be understood or was missing required parameters. |
404 | 7913 | resource-not-found | The port-in was not found on this account. |
409 | 7915 | order-not-eligible-for-foc-date-selection | The order is in a terminal status and its FOC date can no longer be selected. |