Airline Check-in Reminder Template Reference

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.

Contents

Request URI

https://graph.facebook.com/v2.6/me/messages?access_token=<PAGE_ACCESS_TOKEN>

Example Request

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'>

Example Response

{
  "recipient_id": "1254477777772919",
  "message_id": "mid.$cAAJsujCd2ORj_1qmrFdzhVa-4cvO"
}  

Properties

recipient

Description of the message recipient. All requests must include one of id, phone_number, or user_ref.

Property Type Description

recipient.id

String

PSID of the message recipient. Either PSID or phone_number must be set.

recipient.phone_number

String

Optional. Phone number of the recipient with the format +1(212)555-2368.


Your bot must be approved for Customer Matching to send messages this way.

recipient.user_ref

String

Optional. user_ref from the checkbox plugin.

recipient.name

Object

Optional. Used only if phone_number is set. Specifies the person's name in the format:


{"first_name":"John", "last_name":"Doe"}

Providing a name increases the odds of a successful match.

message

Description of the message to be sent.
Property Type Description

message.attachment

Object

An object describing attachments to the message.

message.attachment

Property Type Description

type

String

Value must be template

payload

Object

payload of the template.

message.attachment.payload

Property Name Type Description

template_type

String

Value must be airline_checkin

intro_message

String

Introduction message

locale

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.

pnr_number

String

Optional. The Passenger Name Record number (Booking Number).

`checkin_url

String

The URL where the customer can check in for their flight.

message.attachment.payload.boarding_pass.flight_info

Property Name Type Required Description

flight_number

String

Flight number

departure_airport

Object

Departure airport. See departure_airport

arrival_airport

Object

Arrival airport. See arrival_airport.

flight_schedule

Object

Schedule for the flight. See flight_schedule.

message.attachment.payload.boarding_pass.flight_info.flight_schedule

Property Name Type Description

boarding_time

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).

departure_time

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).

arrival_time

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.boarding_pass.flight_info.departure_airport

Property Type Description

airport_code

String

Airport code of the departure airport.

city

String

Departure city of the flight.

terminal

String

Terminal of the departing flight.

gate

String

Gate for the departing flight.

message.attachment.payload.boarding_pass.flight_info.arrival_airport

Property Type Description

airport_code

String

Airport code of the arrival airport.

city

String

Arrival city of the flight.

terminal

String

Terminal of the departing flight.

gate

String

Gate for the departing flight.