Merchants feed

MerchantFeed Definition

message MerchantFeed {
  FeedMetadata metadata = 1;
  repeated Merchant merchant = 2;
}

Merchant Definition

// Info about a merchant that is on the aggregator's platform.
// A merchant feed should be a list of this message.
message Merchant {
  // An opaque string generated by the partner that identifies a merchant.
  // Must be unique across all merchants.
  // Strongly recommended to only include URL-safe characters. (required)
  string merchant_id = 1;
  // The name, telephone, url and geo are used to support matching partner
  // inventory with merchants already present on Google Maps. This information
  // will not be displayed.
  //
  // The name of the merchant. (required)
  string name = 2;
  // The contact telephone number of the merchant including its country and area
  // codes, e.g. +14567891234. Highly recommended. (optional)
  string telephone = 3;
  // The url of the merchant's public website. Highly recommended. (optional)
  string url = 4;
  // The Geo info of the merchant, including latitude, longitude, and address.
  // (required)
  GeoCoordinates geo = 5;
  // The category of the business in aggregator's platform. (required)
  // You should categorize this business as you categorize it in your inventory.
  // We will use your provided category as a parameter in trying to determine
  // the best location match to the physical business.
  string category = 6;

  // An opaque string that identifies the consumer-facing brand to use when
  // displaying partner attribution. This field allows partners with multiple
  // consumer-facing brands to provide merchants for all brands within the same
  // feed.
  //
  // A brand consists of consumer-facing properties like the name, logo, Terms
  // of Service, and Privacy Policy.
  //
  // If there is only one consumer-facing partner brand, this field does not
  // need to be set and can be ignored.
  //
  // If the partner...
  //
  //   Does not have multiple consumer-facing brands?
  //     --> Ignore this field
  //
  //   Has Multiple Brands that are configured?
  //
  //       If this field is set
  //         --> Associated consumer-facing brand attribution is used
  //
  //       If this field is unset or the empty string
  //         --> Default consumer-facing brand attribution is used
  //
  // Careful Note: most partners do not need to set this field. If a partner
  // wishes to use this field, they must contact us first to configure separate
  // brands, including the default brand.
  string brand_id = 14;

  // Hints to help Google match a merchant to a place on Google Maps.
  // Note: Typically, this field does not need to be set, as Google will match
  // merchants to places on Google Maps using the information provided above.
  // (optional)
  MerchantMatchingHints matching_hints = 16;

  // Definitions for any service attributes used to describe the Services for
  // this Merchant.
  // <EPA: Optional (Category)>
  repeated ServiceAttribute service_attribute = 17;

  // ...

  // An action URL with associated language, list of countries restricted to,
  // type, and optional platform that indicates which platform this action
  // should be performed on. This action link is specifically for the merchant,
  // please use the ActionLink in the service feed to link to a specific
  // service.
  repeated ActionLink action_link = 20;
}

GeoCoordinates Definition

// The Geo data of a location, including latitude, longitude, and address.
// At least one of [lat/lng or address] should be provided (or both).
message GeoCoordinates {
  double latitude = 1;   // In degrees. (optional)
  double longitude = 2;  // In degrees. (optional)

  // Address for a location, could either be structured or unstructured.
  oneof addresses {
    // Postal address of the location, preferred.
    PostalAddress address = 3;
    // An unstructured address could also be provided as a fallback.
    // E.g. "1600 amphitheatre parkway mountain view, ca 94043"
    string unstructured_address = 4;
  }
}

PostalAddress Definition

// The postal address for a merchant.
message PostalAddress {
  // The country, using ISO 3166-1 alpha-2 country code, e.g. "US" (required)
  string country = 1;
  // The locality/city, e.g. "Mountain View". (required)
  string locality = 2;
  // The region/state/province, e.g. "CA". This field is only required in
  // countries where region is commonly a part of the address. (optional)
  string region = 3;
  // The postal code, e.g. "94043". (required)
  string postal_code = 4;
  // The street address, e.g. "1600 Amphitheatre Pkwy". (required)
  string street_address = 5;
}

MerchantMatchingHints Definition

// Hints used to help Google match a merchant to a place on Google Maps.
message MerchantMatchingHints {
  // The Place ID for a place in the Google Places database and on Google Maps.
  // See https://developers.google.com/places/place-id for more about Place IDs.
  // If this is provided, Google will use it as a hint when matching, and
  // prioritize the hint over other candidates.
  string place_id = 1;

  // ...
}

ServiceAttribute Definition

// Service attributes are partner-defined categories that describe the Services
// for a Merchant. For example, a bank may define an "Account Type"
// service attribute with possible values of "Personal" and "Business", while a
// hair salon may define a "Service Type" service attribute with possible
// values of "Haircut", "Color", and "Style".
message ServiceAttribute {
  // An identifier that uniquely identifies this service attribute among others
  // for the same merchant, e.g. "account-type".
  string attribute_id = 1;

  // A user-visible name for this attribute, e.g. "Account Type".
  string attribute_name = 2;

  // Represents a possible value for a particular service attribute.
  message Value {
    // An identifier that uniquely identifies this value among others for
    // this service attribute, e.g. "personal".
    string value_id = 1;

    // A user-visible name for the value, e.g. "Personal".
    string value_name = 2;
  }

  // All possible values for this service attribute.
  repeated Value value = 3;
}
// An action URL with associated language, list of countries restricted to, and
// optional platform that indicates which platform this action should be
// performed on.
message ActionLink {
  // The entry point URL for this action link.
  string url = 1;

  // The BCP-47 language tag identifying the language in which the content
  // from this URI is available.
  string language = 2;

  // An unordered list of ISO 3166-1 alpha-2 country codes. Leave empty for
  // unrestricted visibility.
  repeated string restricted_country = 3;

  // The platform that this action should be performed on. If this field is
  // unset, ACTION_PLATFORM_WEB_APPLICATION will be used as fallback.
  ActionPlatform platform = 4;

  // Predetermined type of action associated with an action link.
  enum ActionLinkType {
    // The action link type is unspecified.
    ACTION_LINK_TYPE_UNSPECIFIED = 0;
    // The action link type is booking an appointment.
    ACTION_LINK_TYPE_BOOK_APPOINTMENT = 1;
    // The action link type is booking an online appointment.
    ACTION_LINK_TYPE_BOOK_ONLINE_APPOINTMENT = 2;
    // The action link type is ordering food for delivery or takeout or both.
    ACTION_LINK_TYPE_ORDER_FOOD = 3;
    // The action link type is ordering food for delivery.
    ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY = 4;
    // The action link type is ordering food for takeout.
    ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT = 5;
    // The action link type is making a dining reservation.
    ACTION_LINK_TYPE_MAKE_DINING_RESERVATION = 6;
    // The action link type allows users to shop from the given merchant. It
    // could either be delivery or pickup.
    ACTION_LINK_TYPE_SHOP_ONLINE = 7;
  }

  // Predetermined type of action associated with an action link.
  ActionLinkType action_link_type = 5;

  // Metadata for the order online link.
  // Supports action with ActionLinkType of ACTION_LINK_TYPE_SHOP_ONLINE.
  OrderOnlineMetadata order_online_metadata = 6;

  // Metadata for Food Ordering links.
  // Supports action type:
  //   *  `ACTION_LINK_TYPE_ORDER_FOOD_DELIVERY`
  //   *  `ACTION_LINK_TYPE_ORDER_FOOD_TAKEOUT`
  // Does NOT support `ACTION_LINK_TYPE_ORDER_FOOD`
  FoodOrderingMetadata food_ordering_metadata = 7
      // ...
      ;
}

ActionPlatform Definition

// The platform that the action is performed on. Web application is the general
// fallback. It is recommended to have at least one ActionLink with
// ACTION_PLATFORM_WEB_APPLICATION. Links with Android and iOS as platform are
// only used on the respective system.
enum ActionPlatform {
  // The platform is unspecified.
  ACTION_PLATFORM_UNSPECIFIED = 0;

  // The action platform is web in general.
  ACTION_PLATFORM_WEB_APPLICATION = 1;

  // The action platform is web on mobile devices.
  ACTION_PLATFORM_MOBILE_WEB = 2;

  // The action platform is Android OS.
  ACTION_PLATFORM_ANDROID = 3;

  // The action platform is iOS.
  ACTION_PLATFORM_IOS = 4;
}