# Availability of an airport

## Get 24 hours of availability information starting from specified date and time.

<mark style="color:blue;">`GET`</mark> `https://api.aviowiki.com/airports/{aid}/availability`

#### Path Parameters

| Name                                  | Type   | Description                |
| ------------------------------------- | ------ | -------------------------- |
| aid<mark style="color:red;">\*</mark> | String | Aviowiki ID of the airport |

#### Query Parameters

| Name     | Type    | Description                                                                                                                                 |
| -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| dateTime | String  | Range start for the availability retrieval. Default value: `now`. Datetime format: `ISO 8601`.                                              |
| local    | Boolean | Whether to use local time or UTC. If `true` the `dateTime` query parameter  shall be provided in local time as well. Default value: `false` |

#### Headers

| Name          | Type   | Description                              |
| ------------- | ------ | ---------------------------------------- |
| Authorization | String | An API Token using Bearer authorization. |

{% tabs %}
{% tab title="200: OK Query was successful" %}
The detailed properties of the returned item can be found in the [Availability ](https://docs.aviowiki.com/data-models/availability)documentation.

```json
{
	"openingIndicator": "SEE_TIMES",
	"arff": [
		{
			"validFrom": "2022-07-26T00:00:00",
			"validTo": "2022-07-26T00:29:59.999999999",
			"status": "FULL",
			"info": {
				"icaoCatAirplane": "IX",
				"faaCatAirplane": null,
				"faa139Certified": null,
				"catHelicopters": null,
				"waterQuantity": null,
				"complementaryQuantity": null,
				"arffVehicles": null,
				"dischargeCapacity": null,
				"extensionAvailable": true,
				"extensionNotice": null,
				"extensionUpToIcao": "X",
				"firestationRemote": null,
				"firestationNotes": ""
			}
		},
		{
			"validFrom": "2022-07-26T00:30:00",
			"validTo": "2022-07-26T05:59:59.999999999",
			"status": "FULL",
			"info": {
				"icaoCatAirplane": "VII",
				"faaCatAirplane": null,
				"faa139Certified": null,
				"catHelicopters": null,
				"waterQuantity": null,
				"complementaryQuantity": null,
				"arffVehicles": null,
				"dischargeCapacity": null,
				"extensionAvailable": true,
				"extensionNotice": null,
				"extensionUpToIcao": "IX",
				"firestationRemote": null,
				"firestationNotes": ""
			}
		},
		{
			"validFrom": "2022-07-26T06:00:00",
			"validTo": "2022-07-26T23:59:59.999999999",
			"status": "FULL",
			"info": {
				"icaoCatAirplane": "IX",
				"faaCatAirplane": null,
				"faa139Certified": null,
				"catHelicopters": null,
				"waterQuantity": null,
				"complementaryQuantity": null,
				"arffVehicles": null,
				"dischargeCapacity": null,
				"extensionAvailable": true,
				"extensionNotice": null,
				"extensionUpToIcao": "X",
				"firestationRemote": null,
				"firestationNotes": ""
			}
		}
	],
	"atc": [
		{
			"validFrom": "2022-07-26T00:00:00",
			"validTo": "2022-07-26T23:59:59.999999999",
			"status": "FULL",
			"info": {
				"enRtfAvailable": true,
				"afisOnly": null
			}
		}
	],
	"ciq": [
		{
			"validFrom": "2022-07-26T00:00:00",
			"validTo": "2022-07-26T23:59:59.999999999",
			"status": "FULL"
		}
	],
	"movement": [
		{
			"validFrom": "2022-07-26T00:00:00",
			"validTo": "2022-07-26T00:29:59.999999999",
			"status": "LIMITED",
			"info": {
				"openFor": [
					{
						"flightTypes": [
							{
								"rules": [],
								"filing": [],
								"airframe": [],
								"status": [],
								"purpose": [
									"CARGO",
									"TRAINING",
									"LEISURE",
									"BUSINESS",
									"AIRLINE",
									"AERIAL_WORK"
								],
								"direction": []
							}
						],
						"priorNoticeRequired": null,
						"costsInvolved": null,
						"other": "Delayed flights only "
					}
				]
			}
		},
		{
			"validFrom": "2022-07-26T00:30:00",
			"validTo": "2022-07-26T04:59:59.999999999",
			"status": "CLOSED",
			"info": {}
		},
		{
			"validFrom": "2022-07-26T05:00:00",
			"validTo": "2022-07-26T05:59:59.999999999",
			"status": "LIMITED",
			"info": {
				"openFor": [
					{
						"flightTypes": [
							{
								"rules": [],
								"filing": [
									"SCHEDULED",
									"NON_SCHEDULED"
								],
								"airframe": [],
								"status": [],
								"purpose": [
									"CARGO",
									"LEISURE",
									"BUSINESS",
									"AIRLINE"
								],
								"direction": [
									"ARRIVAL"
								]
							}
						],
						"priorNoticeRequired": null,
						"costsInvolved": null,
						"other": "Special slot required"
					}
				]
			}
		},
		{
			"validFrom": "2022-07-26T06:00:00",
			"validTo": "2022-07-26T21:59:59.999999999",
			"status": "FULL",
			"info": {}
		},
		{
			"validFrom": "2022-07-26T22:00:00",
			"validTo": "2022-07-26T23:59:59.999999999",
			"status": "LIMITED",
			"info": {
				"openFor": [
					{
						"flightTypes": [
							{
								"rules": [],
								"filing": [
									"SCHEDULED",
									"NON_SCHEDULED"
								],
								"airframe": [],
								"status": [],
								"purpose": [
									"CARGO",
									"LEISURE",
									"BUSINESS",
									"AIRLINE"
								],
								"direction": []
							}
						],
						"priorNoticeRequired": null,
						"costsInvolved": null,
						"other": null
					}
				]
			}
		}
	]
}
```

{% endtab %}

{% tab title="403: Forbidden No API token was provided or it was invalid." %}

{% endtab %}

{% tab title="404: Not Found Airport by the given Aviowiki ID was not found." %}

```json
{
	"error": "The com.aviowiki.dao.Airport identified by the AID {AID} does not exist in the system",
	"timestamp": "2022-07-26T16:23:01.474034802Z",
	"status": 404,
	"message": "The com.aviowiki.dao.Airport identified by the AID {AID} does not exist in the system",
	"path": "/airports/{AID}/availability"
}
```

{% endtab %}
{% endtabs %}
