付款重定向网址模板

预订具有特定价格的可用性空档后,系统将使用您在服务 Feed 中定义的网址将用户重定向到您的预订页面。以下是一个实用的网址模板的示例。

此模板中的参数将使用您的 Feed 中指定的值动态添加,并用于创建用户用于进入预订页面的链接。

`https://reservation-provider.com/examplerestaurant/book?date={availability_slot_start_seconds}&num_guests={resources_party_size}`

网址模板的可用值

模板参数 必需 / 可选 信息流 字段 示例值
availability_slot_availability_tag 选填 库存状况 availability_tag 标记
availability_slot_duration_seconds 必需 库存状况 duration_sec 3600
availability_slot_start_seconds 必需 库存状况 start_sec 4152695841
resources_party_size 必需 availability.resources party_size 2
resources_room_id 选填 availability.resources room_id bar_123

网址模板定义

以下是在您的服务 Feed 中发送的网址模板。

    Message Services {

      // ..
      UriTemplate uri_template;

      // A template specifying how Google should generate URLs to external site.
      message UriTemplate {

        // The uri template must follow the RFC6570, see
        // https://datatracker.ietf.org/doc/html/rfc6570.
        // Supports Level 2 templates.
        // e.g.
        // http://example.com/book/{foo}?b={bar}
        // * foo = 2
        // * bar = abc
        // https://example.com/book/2?b=abc
        // These parameters will be resolved to their values specified in their
        // respective entities.
        // 1) {availability_slot_start_seconds} :: populated from start_sec field in
        //   availability feed
        // 2) {resources_party_size} :: populated from party_size field in
        //   availability feed
        // 3) {availability_slot_duration_seconds} :: populated from duration_sec
        //   field in availability feed
        // 4) {resources_room_id} :: populated from room_id field in the
        //   resource section of the availability feed
        // 5) {availability_slot_availability_tag} :: populated from availability_tag
        //   field of the availability feed

        string uri_template = 1;
      }
    }