公交预订

使用场景

以下用例展示了 BusReservation 架构的常见使用示例。请使用这些示例来确保您的标记结构正确无误。

基本预订确认

发送预订确认电子邮件时,请在其中嵌入以下标记。

Google 应用会在行程当天显示预订详情,并通知用户何时出发才能及时到达公交车站(考虑到交通方式、路况等)。如果您提供入住网址(如下例所示),Google 应用会在行程开始前 24 小时向用户显示该网址。

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BusReservation",
  "reservationNumber": "123456",
  "underName": {
    "@type": "Person",
    "name": "John Smith"
  },
  "reservationStatus": "http://schema.org/ReservationConfirmed",
  "reservationFor": {
    "@type": "BusTrip",
    "busCompany": {
      "@type": "Organization",
      "name": "Bolt NYC"
    },
    "departureBusStop": {
      "@type": "BusStop",
      "name": "Port Authority, NYC"
    },
    "departureTime": "2017-01-04T12:30:00-05:00",
    "arrivalBusStop": {
      "@type": "BusStop",
      "name": "Boston South Station"
    },
    "arrivalTime": "2017-01-04T17:10:00-05:00"
  }
}
</script>

微数据

<div itemscope itemtype="http://schema.org/BusReservation">
  <meta itemprop="reservationNumber" content="123456"/>
  <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="John Smith"/>
  </div>
  <link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
  <div itemprop="reservationFor" itemscope itemtype="http://schema.org/BusTrip">
    <div itemprop="busCompany" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Bolt NYC"/>
    </div>
    <div itemprop="departureBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Port Authority, NYC"/>
    </div>
    <meta itemprop="departureTime" content="2017-01-04T12:30:00-05:00"/>
    <div itemprop="arrivalBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Boston South Station"/>
    </div>
    <meta itemprop="arrivalTime" content="2017-01-04T17:10:00-05:00"/>
  </div>
</div>

登机牌和票券

除了预订确认信息之外,您还可以在另一封电子邮件中触发确认卡登机牌。

确认卡片不仅可以帮助用户及时到达公交车站,还可以在旅途中向用户显示车票。为此,需要在标记中添加一些额外的字段。如果需要其他字段才能让乘客登机,请将其包含在 additionalTicketText 字段中。

对于没有预留座位的门票,这些字段为:numSeatsticketNumberticketToken

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BusReservation",
  "reservationNumber": "123456",
  "underName": {
    "@type": "Person",
    "name": "John Smith"
  },
  "reservationStatus": "http://schema.org/ReservationConfirmed",
  "reservationFor": {
    "@type": "BusTrip",
    "busCompany": "Bolt NYC",
    "departureBusStop": {
      "@type": "BusStop",
      "name": "Port Authority, NYC"
    },
    "departureTime": "2017-01-04T12:30:00-05:00",
    "arrivalBusStop": {
      "@type": "BusStop",
      "name": "Boston South Station"
    },
    "arrivalTime": "2017-01-04T17:10:00-05:00"
  },
  "reservedTicket": {
    "@type": "Ticket",
    "underName": "John Smith",
    "ticketNumber": "123XYZ",
    "ticketToken": "aztecCode:AB34",
    "additionalTicketText": "We recommend that you arrive at the station at least 30 minutes prior to your scheduled departure. Allow additional time if you need help with baggage or tickets."
  }
}
</script>

微数据

<div itemscope itemtype="http://schema.org/BusReservation">
  <meta itemprop="reservationNumber" content="123456"/>
  <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="John Smith"/>
  </div>
  <link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
  <div itemprop="reservationFor" itemscope itemtype="http://schema.org/BusTrip">
    <meta itemprop="busCompany" content="Bolt NYC"/>
    <div itemprop="departureBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Port Authority, NYC"/>
    </div>
    <meta itemprop="departureTime" content="2017-01-04T12:30:00-05:00"/>
    <div itemprop="arrivalBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Boston South Station"/>
    </div>
    <meta itemprop="arrivalTime" content="2017-01-04T17:10:00-05:00"/>
  </div>
  <div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
    <meta itemprop="underName" content="John Smith"/>
    <meta itemprop="ticketNumber" content="123XYZ"/>
    <meta itemprop="ticketToken" content="aztecCode:AB34"/>
    <meta itemprop="additionalTicketText" content="We recommend that you arrive at the station at least 30 minutes prior to your scheduled departure. Allow additional time if you need help with baggage or tickets."/>
  </div>
</div>

对于预留座位的门票,这些字段为:seatNumberseatingTypeticketNumberticketToken

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BusReservation",
  "reservationNumber": "123456",
  "underName": {
    "@type": "Person",
    "name": "John Smith"
  },
  "reservationStatus": "http://schema.org/ReservationConfirmed",
  "reservationFor": {
    "@type": "BusTrip",
    "busCompany": "Bolt NYC",
    "departureBusStop": {
      "@type": "BusStop",
      "name": "Port Authority, NYC"
    },
    "departureTime": "2017-01-04T12:30:00-05:00",
    "arrivalBusStop": {
      "@type": "BusStop",
      "name": "Boston South Station"
    },
    "arrivalTime": "2017-01-04T17:10:00-05:00"
  },
  "reservedTicket": {
    "@type": "Ticket",
    "underName": "John Smith",
    "ticketedSeat": {
      "@type": "Seat",
      "seatNumber": "27B",
      "seatingType": "Coach"
    },
    "ticketNumber": "123XYZ",
    "ticketToken": "aztecCode:AB34",
    "additionalTicketText": "We recommend that you arrive at the station at least 30 minutes prior to your scheduled departure. Allow additional time if you need help with baggage or tickets."
  }
}
</script>

微数据

<div itemscope itemtype="http://schema.org/BusReservation">
  <meta itemprop="reservationNumber" content="123456"/>
  <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="John Smith"/>
  </div>
  <link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
  <div itemprop="reservationFor" itemscope itemtype="http://schema.org/BusTrip">
    <meta itemprop="busCompany" content="Bolt NYC"/>
    <div itemprop="departureBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Port Authority, NYC"/>
    </div>
    <meta itemprop="departureTime" content="2017-01-04T12:30:00-05:00"/>
    <div itemprop="arrivalBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Boston South Station"/>
    </div>
    <meta itemprop="arrivalTime" content="2017-01-04T17:10:00-05:00"/>
  </div>
  <div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
    <meta itemprop="underName" content="John Smith"/>
    <div itemprop="ticketedSeat" itemscope itemtype="http://schema.org/Seat">
      <meta itemprop="seatNumber" content="27B"/>
      <meta itemprop="seatingType" content="Coach"/>
    </div>
    <meta itemprop="ticketNumber" content="123XYZ"/>
    <meta itemprop="ticketToken" content="aztecCode:AB34"/>
    <meta itemprop="additionalTicketText" content="We recommend that you arrive at the station at least 30 minutes prior to your scheduled departure. Allow additional time if you need help with baggage or tickets."/>
  </div>
</div>

包含所有受支持字段的示例

以下示例填充了所有受支持的字段,供您参考:

JSON-LD

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "BusReservation",
  "reservationNumber": "123456",
  "url": "http://boltbus.com/view/123456",
  "underName": {
    "@type": "Person",
    "name": "John Smith",
    "email": "john@mail.com"
  },
  "programMembership": {
    "@type": "ProgramMembership",
    "memberNumber": "12345",
    "program": "STA"
  },
  "bookingAgent": {
    "@type": "Organization",
    "name": "Bolt Bus NYC",
    "url": "http://boltbus.com/"
  },
  "bookingTime": "2013-01-14T13:05:00-05:00",
  "modifiedTime": "2013-03-14T13:05:00-05:00",
  "confirmReservationUrl": "http://boltbus.com/confirm?id=123456",
  "cancelReservationUrl": "http://boltbus.com/cancel?id=123456",
  "modifyReservationUrl": "http://boltbus.com/edit?id=123456",
  "checkinUrl": "http://boltbus.com/checkin?id=AB3XY2",
  "reservationStatus": "http://schema.org/ReservationConfirmed",
  "reservationFor": {
    "@type": "BusTrip",
    "name": "?",
    "busNumber": "63",
    "busName": "Bolt Bus NY:Boston",
    "busCompany": {
      "@type": "Organization",
      "name": "Bolt NYC"
    },
    "departureBusStop": {
      "@type": "BusStop",
      "name": "Port Authority, NYC",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "625 8th Avenue",
        "addressLocality": "New York",
        "addressRegion": "NY",
        "postalCode": "10018",
        "addressCountry": "USA"
      },
      "directions": "Bus terminals are at floors 2-4 of the Port Authority building"
    },
    "departureTime": "2017-01-04T12:30:00-05:00",
    "arrivalBusStop": {
      "@type": "BusStop",
      "name": "Boston South Station",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "Summer St.",
        "addressLocality": "Boston",
        "addressRegion": "MA",
        "postalCode": "02111",
        "addressCountry": "USA"
      },
      "directions": "Bus stops are at thewest side of the train station."
    },
    "arrivalTime": "2017-01-04T17:10:00-05:00"
  },
  "reservedTicket": {
    "@type": "Ticket",
    "ticketNumber": "123XYZ",
    "downloadUrl": "?",
    "printUrl": "?",
    "ticketToken": "qrCode:123456789",
    "additionalTicketText": "?",
    "price": "45.00",
    "priceCurrency": "USD",
    "underName": {
      "@type": "Person",
      "name": "Mary Smith"
    },
    "ticketedSeat": {
      "@type": "Seat",
      "seatingType": "Coach",
      "seatNumber": "27",
      "seatRow": "A"
    }
  }
}
</script>

微数据

<div itemscope itemtype="http://schema.org/BusReservation">
  <meta itemprop="reservationNumber" content="123456"/>
  <link itemprop="url" href="http://boltbus.com/view/123456"/>
  <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="John Smith"/>
    <meta itemprop="email" content="john@mail.com"/>
  </div>
  <div itemprop="programMembership" itemscope itemtype="http://schema.org/ProgramMembership">
    <meta itemprop="memberNumber" content="12345"/>
    <meta itemprop="program" content="STA"/>
  </div>
  <div itemprop="bookingAgent" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="Bolt Bus NYC"/>
    <link itemprop="url" href="http://boltbus.com/"/>
  </div>
  <meta itemprop="bookingTime" content="2013-01-14T13:05:00-05:00"/>
  <meta itemprop="modifiedTime" content="2013-03-14T13:05:00-05:00"/>
  <link itemprop="confirmReservationUrl" href="http://boltbus.com/confirm?id=123456"/>
  <link itemprop="cancelReservationUrl" href="http://boltbus.com/cancel?id=123456"/>
  <link itemprop="modifyReservationUrl" href="http://boltbus.com/edit?id=123456"/>
  <link itemprop="checkinUrl" href="http://boltbus.com/checkin?id=AB3XY2"/>
  <link itemprop="reservationStatus" href="http://schema.org/ReservationConfirmed"/>
  <div itemprop="reservationFor" itemscope itemtype="http://schema.org/BusTrip">
    <meta itemprop="name" content="?"/>
    <meta itemprop="busNumber" content="63"/>
    <meta itemprop="busName" content="Bolt Bus NY:Boston"/>
    <div itemprop="busCompany" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Bolt NYC"/>
    </div>
    <div itemprop="departureBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Port Authority, NYC"/>
      <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <meta itemprop="streetAddress" content="625 8th Avenue"/>
        <meta itemprop="addressLocality" content="New York"/>
        <meta itemprop="addressRegion" content="NY"/>
        <meta itemprop="postalCode" content="10018"/>
        <meta itemprop="addressCountry" content="USA"/>
      </div>
      <meta itemprop="directions" content="Bus terminals are at floors 2-4 of the Port Authority building"/>
    </div>
    <meta itemprop="departureTime" content="2017-01-04T12:30:00-05:00"/>
    <div itemprop="arrivalBusStop" itemscope itemtype="http://schema.org/BusStop">
      <meta itemprop="name" content="Boston South Station"/>
      <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
        <meta itemprop="streetAddress" content="Summer St."/>
        <meta itemprop="addressLocality" content="Boston"/>
        <meta itemprop="addressRegion" content="MA"/>
        <meta itemprop="postalCode" content="02111"/>
        <meta itemprop="addressCountry" content="USA"/>
      </div>
      <meta itemprop="directions" content="Bus stops are at thewest side of the train station."/>
    </div>
    <meta itemprop="arrivalTime" content="2017-01-04T17:10:00-05:00"/>
  </div>
  <div itemprop="reservedTicket" itemscope itemtype="http://schema.org/Ticket">
    <meta itemprop="ticketNumber" content="123XYZ"/>
    <meta itemprop="downloadUrl" content="?"/>
    <meta itemprop="printUrl" content="?"/>
    <meta itemprop="ticketToken" content="qrCode:123456789"/>
    <meta itemprop="additionalTicketText" content="?"/>
    <meta itemprop="price" content="45.00"/>
    <meta itemprop="priceCurrency" content="USD"/>
    <div itemprop="underName" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="Mary Smith"/>
    </div>
    <div itemprop="ticketedSeat" itemscope itemtype="http://schema.org/Seat">
      <meta itemprop="seatingType" content="Coach"/>
      <meta itemprop="seatNumber" content="27"/>
      <meta itemprop="seatRow" content="A"/>
    </div>
  </div>
</div>

测试您的标记

您可以使用电子邮件标记测试工具验证标记。粘贴您的标记代码,然后点击验证按钮扫描内容并接收有关任何存在错误的报告。

规范

查看电子邮件的详细信息,看看其中是否有任何属性适用于您的巴士预订。通过标记这些其他属性,您可以让 Google 向用户显示更丰富的巴士预订说明。

属性 类型 说明
reservationNumber 文本 必需)预订的编号或 ID。
网址 网址 可查看预订的网页。
underName PersonOrganization 必需)乘客。
underName.name 文本 必需)人员的姓名。
underName.email 文本 电子邮件地址。
programMembership ProgramMembership 预订中应用的任何飞行常客计划、酒店会员回馈计划等的会员资格。
programMembership.memberNumber 文本 会员资格的标识符。
programMembership.program 文本 课程的名称。
bookingAgent OrganizationPerson 预订代理或代理机构。也接受字符串(例如“”“)。
bookingAgent.name 文本 代理/服务的名称。
bookingAgent.url 网址 代理机构/服务的网站。
bookingTime DateTime 预订日期。
modifiedTime DateTime (建议用于确认卡片/Google 搜索答案)预订上次修改的时间。
confirmReservationUrl 网址 可确认预订的网页。
cancelReservationUrl 网址 可取消预订的网页。
modifyReservationUrl 网址 建议用于确认卡片/搜索答案)可修改预订的网页。
checkinUrl 网址 乘客可以在其中办理值机手续的网页。
reservationStatus ReservationStatus 必需)预订的当前状态。
reservationFor BusTrip 必需)有关公交车行程的信息。
reservationFor.name 文本 公交车行程的名称。
reservationFor.busNumber 文本 例如 101.
reservationFor.busName 文本 例如 Bolt Express。
reservationFor.busCompany 组织 必需)例如 Bolt NYC。还接受字符串(例如“Bolt NYC”)。
reservationFor.busCompany.name 文本 必填)组织名称。
reservationFor.departureBusStop BusStopBusStation 必需)公交车的出发地。
reservationFor.departureBusStop.name 文本 必需)公交站的名称。
reservationFor.departureBusStop.address PostalAddress 出发公交站 / 车站的地址。
reservationFor.departureBusStop.address.streetAddress 文本 建议用于确认卡片/Google 搜索答案)出发公交车站 / 火车站的街道地址。
reservationFor.departureBusStop.address.addressLocality 文本 建议用于确认卡片/搜索答案)出发公交车站 / 火车站的地点(例如城市)。
reservationFor.departureBusStop.address.addressRegion 文本 建议用于确认卡片/Google 搜索答案)出发公交车站 / 火车站所在的区域(例如州)。
reservationFor.departureBusStop.address.postalCode 文本 建议用于确认卡片/搜索答案)出发公交车站 / 火车站的邮政编码。
reservationFor.departureBusStop.address.addressCountry 文本或国家/地区 建议用于确认卡片/搜索答案)出发地公交车站 / 火车站。
reservationFor.departureBusStop.directions 文本 前往公交站的路线。
reservationFor.departureTime DateTime (必需)公交车发车时间。
reservationFor.arrivalBusStop BusStopBusStation 必需)公交车的到达地点。
reservationFor.arrivalBusStop.name 文本 必需)公交站的名称。
reservationFor.arrivalBusStop.address PostalAddress 到达公交站 / 车站的地址。
reservationFor.arrivalBusStop.address.streetAddress 文本 建议用于确认卡片/Google 搜索答案)到达公交车站 / 火车站的街道地址。
reservationFor.arrivalBusStop.address.addressLocality 文本 建议用于确认卡片/搜索答案)到达公交车站 / 火车站的地点(例如城市)。
reservationFor.arrivalBusStop.address.addressRegion 文本 建议用于确认卡片/搜索答案)到达公交站 / 火车站所在的地区(例如州)。
reservationFor.arrivalBusStop.address.postalCode 文本 建议用于确认卡片/Google 搜索答案)到达公交车站 / 火车站的邮政编码。
reservationFor.arrivalBusStop.address.addressCountry 文本或国家/地区 建议用于确认卡片/搜索答案)到达国家/地区的公交车站/火车站。
reservationFor.arrivalBusStop.directions 文本 前往公交站的路线。
reservationFor.arrivalTime DateTime 必需)公交车到达时间。
reservedTicket 票务信息。
reservedTicket.ticketNumber 文本 车票的编号或 ID。
reservedTicket.downloadUrl 网址
reservedTicket.printUrl 网址
reservedTicket.ticketToken Text 或 URL 如果条形码图片托管在您的网站上,则该字段的值为图片的网址,或条形码或二维码 URI,例如“barcode128:AB34”(ISO-15417 条形码)、“qrCode:AB34”(二维码)、“aztecCode:AB34”(Aztec 代码)、“barcodeEAN:1234”(EAN 代码)和“barcodeUPCA:1234”(UPCA 代码)。
reservedTicket.additionalTicketText 文本 有关工单的其他说明性文字。
reservedTicket.price 文本 机票总价。
reservedTicket.priceCurrency 文本 门票价格所用的币种(采用由 3 个字母表示的 ISO 4217 格式)。
reservedTicket.underName PersonOrganization 门票的适用对象(个人或组织)。
reservedTicket.underName.name 文本 人员的姓名。
reservedTicket.ticketedSeat 座位 预订座位的位置(例如 27B)。。
reservedTicket.ticketedSeat.seatingType 文本 座位类型/舱位等级。
reservedTicket.ticketedSeat.seatNumber 文本 预留座位的位置。
reservedTicket.ticketedSeat.seatRow 文本 预留座位的行位置。