The airline check-in reminder template allows you to send a structured message that contains a check-in reminder with flight information. For complete implementation details, see Airline Check-in Reminder Template.
https://graph.facebook.com/v10.0
/me/messages?access_token=<PAGE_ACCESS_TOKEN>
curl -X POST -H "Content-Type: application/json" -d '{
"recipient": {
"id": "<PSID>"
},
"message": {
"attachment": {
"type": "template",
"payload": {
"template_type": "airline_checkin",
"intro_message": "Check-in is available now.",
"locale": "en_US",
"pnr_number": "ABCDEF",
"checkin_url": "https:\/\/www.airline.com\/check-in",
"flight_info": [
{
"flight_number": "f001",
"departure_airport": {
"airport_code": "SFO",
"city": "San Francisco",
"terminal": "T4",
"gate": "G8"
},
"arrival_airport": {
"airport_code": "SEA",
"city": "Seattle",
"terminal": "T4",
"gate": "G8"
},
"flight_schedule": {
"boarding_time": "2016-01-05T15:05",
"departure_time": "2016-01-05T15:45",
"arrival_time": "2016-01-05T17:30"
}
}
]
}
}
}
}' 'https://graph.facebook.com/v2.6/me/messages?access_token=<PAGE_ACCESS_TOKEN>'
{ "recipient_id": "1254477777772919", "message_id": "AG5Hz2Uq7tuwNEhXfYYKj8mJEM_QPpz5jdCK48PnKAjSdjfipqxqMvK8ma6AC8fplwlqLP_5cgXIbu7I3rBN0P" }
recipient
Description of the message recipient. All requests must include one of the following properties to identify the recipient.
Property | Type | Description |
---|---|---|
| String | Page Scoped User ID (PSID) of the message recipient. The user needs to have interacted with any of the Messenger entry points in order to opt-in into messaging with the Page. Note that Facebook Login integrations return user IDs are app-scoped and will not work with the Messenger platform. |
| String | Used for the checkbox plugin and customer chat plugin. |
| String | Used for Private Replies to reference the visitor post to reply to. |
| String | Used for Private Replies to reference the post comment to reply to. |
message
Property | Type | Description |
---|---|---|
| Object | An object describing attachments to the message. |
message.attachment
Property | Type | Description |
---|---|---|
| String | Value must be |
| Object |
|
message.attachment.payload
Property Name | Type | Description |
---|---|---|
| String | Value must be |
| String | Introduction message |
| String | Two-letter language region code. Must be a two-letter ISO 639-1 language code and a ISO 3166-1 alpha-2 region code separated by an underscore character. Used to translate field labels (e.g. en_US). See this document for more information about Facebook's locale support. |
| String | Optional. The Passenger Name Record number (Booking Number). |
| String | The URL where the customer can check in for their flight. |
| Array | The flight number, departure airport, arrival airport, and schedule information for the flight. |
message.attachment.payload.flight_info
Property Name | Type | Required | Description |
---|---|---|
| String | Flight number |
| Object | Departure airport. See departure_airport |
| Object | Arrival airport. See arrival_airport. |
| Object | Schedule for the flight. See flight_schedule. |
message.attachment.payload.flight_info.flight_schedule
Property Name | Type | Description |
---|---|---|
| String | Optional. Boarding time in departure airport timezone. Must be in the ISO 8601-based format YYYY-MM-DDThh:mm (e.g. 2015-09-26T10:30). |
| String | Departure time in departure airport timezone. Must be in the ISO 8601-based format YYYY-MM-DDThh:mm (e.g. 2015-09-26T10:30). |
| String | Optional. Arrival time in arrival airport timezone. Must be in the ISO 8601-based format YYYY-MM-DDThh:mm (e.g. 2015-09-26T10:30). |
message.attachment.payload.flight_info.departure_airport
Property | Type | Description |
---|---|---|
| String | Airport code of the departure airport. |
| String | Departure city of the flight. |
| String | Terminal of the departing flight. |
| String | Gate for the departing flight. |
message.attachment.payload.flight_info.arrival_airport
Property | Type | Description |
---|---|---|
| String | Airport code of the arrival airport. |
| String | Arrival city of the flight. |
| String | Terminal of the departing flight. |
| String | Gate for the departing flight. |