Webhooks

Last modified by Marcus Calverley on 2024/03/06 15:26

Webhooks are a way for integrations developed by airports or third parties to be notified of updates in Better Airport. Webhooks are URL registrations in Better Airport for different event types. Each URL will be sent an HTTP POST request containing a JSON payload with details whenever an event of the registered type happens within Better Airport. The payload will typically refer to one or more URLs on the Better Airport API that will provide the actual data.

Registration Process

Webhooks are currently registered manually by communicating with your Copenhagen Optimization contact. In the future, we want to provide an interface in Better Airport to administer registrations and provide other features to work with webhooks.
To register a webhook, provide the following information:

  • Type of event to receive.
  • URL to receive the JSON payload when the event is triggered.
  • Credentials or other headers that must be sent in the request.

Source Addresses

Webhooks will be sent from one of the following IP addresses:

EU region:

  • 34.77.254.44
  • 34.76.104.16
  • 35.195.136.235

US region:

  • 34.145.57.117
  • 34.82.72.191
  • 34.105.72.61

CA region:

  • 34.152.51.111
  • 34.118.161.97
  • 34.118.181.2

Legacy infrastructure:

  • 35.195.31.165
  • 35.205.103.107
  • 104.155.101.99

Error Handling

If the webhook endpoint called does not return a success HTTP code (e.g. 200), then the system will try again indefinitely with an exponential back-off of up to 5 minutes between each call. All pending events will be blocked until the failing POST request no longer fails. This ensures that all events will always be received in the correct order, but could mean that many events will be received in quick succession when the webhook endpoint becomes operational again.

Event Types

Each event type available via webhooks has a different payload. If using the same endpoint to handle multiple types of events, the "type" field can be used to differentiate between event types before reading other fields of the webhook.

Better Baggage

Counter Allocation Plan Published

When a baggage counter allocation plan has been published, an event with the following type will be sent:

{
 "counterAllocation": {
   "url": string,
   "period": {
     "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
     "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
    }
  },
 "type": "bbg.counterAllocation",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
Field NameDescriptionExample
idUnique identifier of the event"1018a935-a60e-43a6-a13b-59022852fe07"
typeEvent type identifier, will always be bbg.counterAllocation"bbg.counterAllocation"
timestampDate and time of the event"2024-02-27T15:41:17.116942+00:00"
counterAllocation.urlURL on the Better Airport API where the counter allocation plan can be fetched"https://betterairport.ca/demo/api/o/5e9bd5bcd087/Baggage/Terminals/5fb42dbf-9ee4-47ca-b1eb-27c48fcd68a1/AllocationPlans/2024-02-28"
counterAllocation.periodTime period the counter allocation plan covers{"fromTime": "2024-02-28T00:00:00-05:00", "toTime": "2024-02-28T23:59:59.9999999-05:00"}

Example:

{
 "counterAllocation": {
   "url": "https://betterairport.ca/demo/api/o/5e9bd5bcd087/Baggage/Terminals/5fb42dbf-9ee4-47ca-b1eb-27c48fcd68a1/AllocationPlans/2024-02-28",
   "period": {
     "fromTime": "2024-02-28T00:00:00-05:00",
     "toTime": "2024-02-28T23:59:59.9999999-05:00"
    }
  },
 "type": "bbg.counterAllocation",
 "id": "c630b63f-5e77-40ce-871c-a5f5374c5fd1",
 "timestamp": "2024-02-27T15:41:17.116942+00:00"
}

Better Check-In

Counter Allocation Plan Published

When a check-in counter allocation plan has been published, an event with the following type will be sent:

{
 "counterAllocation": {
   "url": string,
   "period": {
     "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
     "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
    }
  },
 "type": "bci.counterAllocation",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
Field NameDescriptionExample
idUnique identifier of the event"1018a935-a60e-43a6-a13b-59022852fe07"
typeEvent type identifier, will always be bci.counterAllocation"bci.counterAllocation"
timestampDate and time of the event"2024-02-27T15:58:53.0762883+00:00"
counterAllocation.urlURL on the Better Airport API where the counter allocation plan can be fetched"https://betterairport.ca/demo/api/o/7c5f78dd7619/CheckIn/Terminals/357bdfe0-a206-413f-9b27-50f94809e9a2/AllocationPlans/2024-02-27"
counterAllocation.periodTime period the counter allocation plan covers{"fromTime": "2024-02-27T00:00:00-05:00", "toTime": "2024-02-27T23:59:59.9999999-05:00"}

Example:

{
 "counterAllocation": {
   "url": "https://betterairport.ca/demo/api/o/7c5f78dd7619/CheckIn/Terminals/357bdfe0-a206-413f-9b27-50f94809e9a2/AllocationPlans/2024-02-27",
   "period": {
     "fromTime": "2024-02-27T00:00:00-05:00",
     "toTime": "2024-02-27T23:59:59.9999999-05:00"
    }
  },
 "type": "bci.counterAllocation",
 "id": "09377172-e955-4816-8c7a-91e3eec2662b",
 "timestamp": "2024-02-27T15:58:53.0762883+00:00"
}

Better Forecast

Flight Load Factor Forecast Published

When a flight load factor forecast is published, an event with the following type will be sent:

{
 "publishId": string,
 "forecastUrl": string,
 "period": {
   "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
   "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
  },
 "type": "bf.loadFactorForecastPublished",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
Field NameDescriptionExample
idUnique identifier of the event"9aa617c7-3fe4-4f77-a16f-a55f1dd5f0c4"
typeEvent type identifier, will always be bf.loadFactorForecastPublished"bf.loadFactorForecastPublished"
timestampDate and time of the event"2024-02-27T15:14:40.4719166+00:00"
forecastUrlArray of URLs on the Better Airport API where the load factor forecast can be fetched, one for each day"https://betterairport.ca/demo/api/o/7c5f78dd7619/Forecast/LoadFactor/Published/2024-02-27"
periodTime period that was published in Better Forecast{"fromTime": "2024-02-27T00:00:00-05:00", "toTime": "2024-02-27T23:59:59.9999999-05:00"}

Example:

{
 "publishId": "d3cf40f6-a315-47be-9a5e-c407aa447319",
 "forecastUrl": "https://betterairport.ca/demo/api/o/7c5f78dd7619/Forecast/LoadFactor/Published/2024-02-27",
 "period": {
   "fromTime": "2024-02-27T00:00:00-05:00",
   "toTime": "2024-02-27T23:59:59.9999999-05:00"
  },
 "type": "bf.loadFactorForecastPublished",
 "id": "e0b9fe5e-226e-49d0-bae8-f8781c1ae565",
 "timestamp": "2024-02-27T15:14:40.4719166+00:00"
}

Passenger Show Up Forecast Published

When a passenger show up forecast is published, an event with the following type will be sent:

{
 "publishId": string,
 "forecastUrl": string,
 "period": {
   "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
   "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
  },
 "type": "bf.showUpForecastPublished",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}

Note: A separate event will be sent for each day a show up forecast is published.

Field NameDescriptionExample
idUnique identifier of the event"64c116df-7985-4ee9-9e90-277dcb07e98d"
typeEvent type identifier, will always be bf.showUpForecastPublished"bf.showUpForecastPublished"
timestampDate and time of the event"2024-02-27T14:31:49.5557417+00:00"
forecastUrl

URL on the Better Airport API where the show up forecast can be fetched

"https://betterairport.ca/demo/api/o/7c5f78dd7619/Forecast/ShowUp/Published/2024-02-27"
periodTime period that was published in Better Forecast{"fromTime": "2024-02-27T00:00:00-05:00", "toTime": "2024-02 27T23:59:59.9999999-05:00"}

Example:

{
 "publishId": "34ae0fa8-aa90-43c3-a5ce-1ff4239fc051",
 "forecastUrl": "https://betterairport.ca/demo/api/o/7c5f78dd7619/Forecast/ShowUp/Published/2024-02-27",
 "period": {
   "fromTime": "2024-02-27T00:00:00-05:00",
   "toTime": "2024-02-27T23:59:59.9999999-05:00"
  },
 "type": "bf.showUpForecastPublished",
 "id": "257cdad6-22da-4017-ba20-5f061b49b4f1",
 "timestamp": "2024-02-27T14:31:49.5557417+00:00"
}

Better Security

Lane Plan Published

When a lane plan has been published, an event with the following type will be sent:

{
 "lanePlan": {
   "url": string,
   "period": {
     "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
     "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
    }
  },
 "type": "bs.lanePlan",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
Field NameDescriptionExample
idUnique identifier of the event"1018a935-a60e-43a6-a13b-59022852fe07"
typeEvent type identifier, will always be bs.lanePlan"bs.lanePlan"
timestampDate and time of the event"2024-03-01T11:25:29.1017705+00:00"
lanePlan.urlURL on the Better Airport API where the lane plan can be fetched"https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/security/checkpoints/654b94074c3abbf7dfbe3fc0/2023-11-29"
lanePlan.periodTime period the lane plan covers{"fromTime": "2023-11-29T00:00:00+01:00", "toTime": "2023-11-29T23:59:59.9999999+01:00"}

Example:

{
 "lanePlan": {
   "url": "https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/security/checkpoints/654b94074c3abbf7dfbe3fc0/2023-11-29",
   "period": {
     "fromTime": "2023-11-29T00:00:00+01:00",
     "toTime": "2023-11-29T23:59:59.9999999+01:00"
    }
  },
 "type": "bs.lanePlan",
 "id": "d1bc6a77-f8ff-454f-9511-037120a27c7f",
 "timestamp": "2024-03-01T11:25:29.1017705+00:00"
}

Staff Plan Published

When a staff plan has been published, an event with the following type will be sent:

{
 "staffPlan": {
   "url": string,
   "period": {
     "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
     "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
    }
  },
 "type": "bs.staffPlan",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
Field NameDescriptionExample
idUnique identifier of the event"d2458e4f-c44b-419b-ab26-6921581f0a6e"
typeEvent type identifier, will always be bs.staffPlan"bs.staffPlan"
timestampDate and time of the event"2024-03-01T11:29:59.7871733+00:00"
staffPlan.urlURL on the Better Airport API where the staff plan can be fetched"https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/security/StaffPlans/2023-11-29"
staffPlan.periodTime period the staff plan covers{"fromTime": "2023-11-29T00:00:00+01:00", "toTime": "2023-11-29T23:59:59.9999999+01:00"}

Example:

{
 "staffPlan": {
   "url": "https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/security/StaffPlans/2023-11-29",
   "period": {
     "fromTime": "2023-11-29T00:00:00+01:00",
     "toTime": "2023-11-29T23:59:59.9999999+01:00"
    }
  },
 "type": "bs.staffPlan",
 "id": "018bb9be-d249-409a-8060-5fa73c15d805",
 "timestamp": "2024-03-01T11:29:59.7871733+00:00"
}

Better Demand

Lane Plan Published

When a lane plan has been published, an event with the following type will be sent:

{
 "lanePlan": {
   "url": string,
   "period": {
     "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
     "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
    }
  },
 "type": "bd.lanePlan",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
Field NameDescriptionExample
idUnique identifier of the event"1018a935-a60e-43a6-a13b-59022852fe07"
typeEvent type identifier, will always be bd.lanePlan"bd.lanePlan"
timestampDate and time of the event"2024-03-01T11:25:29.1017705+00:00"
lanePlan.urlURL on the Better Airport API where the lane plan can be fetched"https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/demand/checkpoints/654b94074c3abbf7dfbe3fc0/2023-11-29"
lanePlan.periodTime period the lane plan covers{"fromTime": "2023-11-29T00:00:00+01:00", "toTime": "2023-11-29T23:59:59.9999999+01:00"}

Example:

{
 "lanePlan": {
   "url": "https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/demand/checkpoints/654b94074c3abbf7dfbe3fc0/2023-11-29",
   "period": {
     "fromTime": "2023-11-29T00:00:00+01:00",
     "toTime": "2023-11-29T23:59:59.9999999+01:00"
    }
  },
 "type": "bd.lanePlan",
 "id": "d1bc6a77-f8ff-454f-9511-037120a27c7f",
 "timestamp": "2024-03-01T11:25:29.1017705+00:00"
}

Staff Plan Published

When a staff plan has been published, an event with the following type will be sent:

{
 "staffPlan": {
   "url": string,
   "period": {
     "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
     "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
    }
  },
 "type": "bd.staffPlan",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
Field NameDescriptionExample
idUnique identifier of the event"d2458e4f-c44b-419b-ab26-6921581f0a6e"
typeEvent type identifier, will always be bd.staffPlan"bd.staffPlan"
timestampDate and time of the event"2024-03-01T11:29:59.7871733+00:00"
staffPlan.urlURL on the Better Airport API where the staff plan can be fetched"https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/demand/StaffPlans/2023-11-29"
staffPlan.periodTime period the staff plan covers{"fromTime": "2023-11-29T00:00:00+01:00", "toTime": "2023-11-29T23:59:59.9999999+01:00"}

Example:

{
 "staffPlan": {
   "url": "https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/demand/StaffPlans/2023-11-29",
   "period": {
     "fromTime": "2023-11-29T00:00:00+01:00",
     "toTime": "2023-11-29T23:59:59.9999999+01:00"
    }
  },
 "type": "bd.staffPlan",
 "id": "018bb9be-d249-409a-8060-5fa73c15d805",
 "timestamp": "2024-03-01T11:29:59.7871733+00:00"
}

Better Border

Lane Plan Published

When a lane plan has been published, an event with the following type will be sent:

{
 "lanePlan": {
   "url": string,
   "period": {
     "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
     "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
    }
  },
 "type": "bb.lanePlan",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
Field NameDescriptionExample
idUnique identifier of the event"1018a935-a60e-43a6-a13b-59022852fe07"
typeEvent type identifier, will always be bb.lanePlan"bb.lanePlan"
timestampDate and time of the event"2024-03-01T11:25:29.1017705+00:00"
lanePlan.urlURL on the Better Airport API where the lane plan can be fetched"https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/border/checkpoints/654b94074c3abbf7dfbe3fc0/2023-11-29"
lanePlan.periodTime period the lane plan covers{"fromTime": "2023-11-29T00:00:00+01:00", "toTime": "2023-11-29T23:59:59.9999999+01:00"}

Example:

{
 "lanePlan": {
   "url": "https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/border/checkpoints/654b94074c3abbf7dfbe3fc0/2023-11-29",
   "period": {
     "fromTime": "2023-11-29T00:00:00+01:00",
     "toTime": "2023-11-29T23:59:59.9999999+01:00"
    }
  },
 "type": "bb.lanePlan",
 "id": "d1bc6a77-f8ff-454f-9511-037120a27c7f",
 "timestamp": "2024-03-01T11:25:29.1017705+00:00"
}

Staff Plan Published

When a staff plan has been published, an event with the following type will be sent:

{
 "staffPlan": {
   "url": string,
   "period": {
     "fromTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz",
     "toTime": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
    }
  },
 "type": "bb.staffPlan",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
DescriptionExample
idUnique identifier of the event"d2458e4f-c44b-419b-ab26-6921581f0a6e"
typeEvent type identifier, will always be bb.staffPlan"bb.staffPlan"
timestampDate and time of the event"2024-03-01T11:29:59.7871733+00:00"
staffPlan.urlURL on the Better Airport API where the staff plan can be fetched"https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/border/StaffPlans/2023-11-29"
staffPlan.periodTime period the staff plan covers{"fromTime": "2023-11-29T00:00:00+01:00", "toTime": "2023-11-29T23:59:59.9999999+01:00"}

Example:

{
 "staffPlan": {
   "url": "https://betterairport.eu/demo/api/o/79d9659e8d36/ResourceDemand/border/StaffPlans/2023-11-29",
   "period": {
     "fromTime": "2023-11-29T00:00:00+01:00",
     "toTime": "2023-11-29T23:59:59.9999999+01:00"
    }
  },
 "type": "bb.staffPlan",
 "id": "018bb9be-d249-409a-8060-5fa73c15d805",
 "timestamp": "2024-03-01T11:29:59.7871733+00:00"
}

Better VQ

Flight Schedule Updated or Queue configuration Update or Eligibility Rule Updated

When the Flight Schedule has been updated in Better forecast or a Queue Configuration or Eligibility Rules that affects eligible flights has been updated. NOTE: A separate event will be sent for each day a Flight Schedule, Queue configuration or Eligibility Rules has been updated.

{
 "url": string,
 "type": "bf.virtualQueue.flightScheduleUpdated",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
DescriptionExample
idUnique identifier of the event"d2458e4f-c44b-419b-ab26-6921581f0a6e"
typeEvent type identifier, will always be bf.virtualQueue.flightScheduleUpdated"bf.virtualQueue.flightScheduleUpdated"
timestampDate and time of the event"2024-03-01T12:59:39.0862725+00:00"
urlURL on the Better Airport API where the flight schedule can be fetched"https://betterairport.eu/demo/api/o/04f332b5663f/Forecast/QueueReservations/flights/2024-03-01"

Example:

{
 "url": "https://betterairport.eu/demo/api/o/04f332b5663f/Forecast/QueueReservations/flights/2024-03-01",
 "type": "bf.virtualQueue.flightScheduleUpdated",
 "id": "6dea0273-0cd2-4070-8670-10822c5d3b28",
 "timestamp": "2024-03-01T12:59:39.0862725+00:00"
}

Slot Plans Update or Queue Configuration Update

When the Slot Plan is updated or a Queue Configuration that affects the slot plan is updated.

{
 "url": string,
 "type": "bf.virtualQueue.slotPlansUpdated",
 "id": string,
 "timestamp": "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
}
DescriptionExample
idUnique identifier of the event"d2458e4f-c44b-419b-ab26-6921581f0a6e"
typeEvent type identifier, will always be bf.virtualQueue.slotPlansUpdated"bf.virtualQueue.slotPlansUpdated"
timestampDate and time of the event"2024-03-01T12:59:39.0862725+00:00"
urlURL on the Better Airport API where the slot plan can be fetched"https://betterairport.eu/demo/api/o/04f332b5663f/Forecast/QueueReservations/plans/2024-03-01"

Example:

{
 "url": "https://betterairport.eu/demo/api/o/04f332b5663f/Forecast/QueueReservations/plans/2024-03-01",
 "type": "bf.virtualQueue.slotPlansUpdated",
 "id": "bf47ad7f-8966-4a65-8270-5631a68ee40c",
 "timestamp": "2024-03-01T13:34:04.2816973+00:00"
}