Stay organized with collections
Save and categorize content based on your preferences.
Definitions
OffersFeed Definition
message OffersFeed {
repeated Offer data = 1;
}
Offers Definition
//Definitionofoffersprovidedbymerchantsfortheirservices.messageOffer{//Anopaquestringfromanaggregatorpartnerwhichuniquelyidentifiesa//merchant.(required)//Thismerchant_idshouldmatchwiththemerchant_idssentaspartof//Merchantfeed/RealTimeUpdate(RTU).stringmerchant_id=1;//Anopaquestringfromanaggregatorpartnertoidentifyaserviceofthe//merchantwherethisofferapplies.repeatedstringservice_id=3;//Anopaquestringfromanaggregatorpartnertouniquelyidentifyanoffer.//(required)stringoffer_id=4;//Onesentenceunlocalized,unstructuredoffertitle(eg.10%offfoodand//drink).(required)stringunlocalized_title=5;//Urlassociatedwiththeoffer.Itshouldpointtothewebpagewherethis//offerispresentinthemostdetailedway.stringurl=6;//Theimagetobeshownwiththeoffer.Theurlshouldpointdirectlytoa//specificimage,whichalmostalwaysendswithjpg,gif,png,orbmp,rather//thanpointingtoanentireindexorwebsite.//Theimageshouldbeatleast250pixelsinbothwidthandheight.stringimage_url=7;//Thespecificoffer's Terms and Conditions displayed to user.Termsterms=8;//Trueiftheofferisonlyredeemableonlybyarestrictedgroupofusers//(eg:paidmembers,certaincreditcardholders,etc.).boolrestricted_to_certain_users=9;//Valid_periodandvalid_time_of_weekfieldsareusedtospecifytheregular//availabilityoftheoffer.Valid_periodrepresentstheoverarchingdate//rangewhentheofferisvalid,whereasvalid_time_of_weekfieldsrepresent//therecurringweeklyschedule.//Then,valid_time_exceptionfieldsareusedtorepresentspecial//schdulefortimeswheretheofferhasalternativeavailabilitythanthe//regularschedule,suchasspecialavailabilityscheduleduringholidays.//Toillustratetherelationshipamongthesefields,weconsider//atimeTisvalidifandonlyif//Tisinvalid_periodAND//((Tisinvalid_time_of_weekAND//(valid_time_exceptionisnotspecifiedOR//TisNOTinvalid_time_exception))OR//Tisinvalid_time_exception)//TimeRangemessageisusedtorepresenttheoverarchingvalidperiodofthe//offer.Itisaclosed-opentimerangeinsecondsofUTCtimesinceUnix//epoch.Itshouldhavethesecondofthedatewhentheofferstartstobe//validasthestart,andthesecondofthedatewhentheofferstartstobe//invalidastheend.Example:Tospecifythattheofferisvalidforthe//entireyearof2019,//valid_period{begin_sec:1546300800end_sec:1577836800}////Notethatbecausethevalidperiodisclosed-open,theendsecondisnot//consideredaswithinthevalidperiodofthisoffer.//(required)TimeRangevalid_period=10;//Thismessagestoresthestartandendtimeofacontinuousvalidtime//intervaloftheofferatagivendayoftheweek.Itisusedto//specifytherecurrenceavailabilityoftheofferonaweeklybasis.//Thistimeintervalisaclosed-openinterval,i.e.[start,end)messageValidTimeOfWeek{//Thedayofweekwherethefollowingvalidtimeapplies.(required)enumDayOfWeek{DAY_OF_WEEK_UNSPECIFIED=0;MON=1;TUE=2;WED=3;THU=4;FRI=5;SAT=6;SUN=7;}DayOfWeekday_of_week=1;//Starttime(inclusive)ofthisoffervalidtimeinterval,usingseconds//fromMidnight,inmerchant's local timezone. Must be in the range//[0,86400).(required)int64start=2;//Endtime(exclusive)ofthisoffervalidtimeinterval,usingseconds//fromMidnight,inmerchant's local timezone. Must be in the range//(0,86400].(required)int64end=3;}//Thevalidtimeoftheofferinmerchant's local timezone, specified with//multiplecontinuoustimeintervalsusingthemessageabove.Forexample,if//anofferisvalidonMondaysfrom11:30-13:00plus16:00-20:00,andon//Tuesdaysfrom12:00-23:00,youcanspecifythevalidhoursasfollows://valid_time_of_week{day_of_week:MONstart:41400end:46800}//valid_time_of_week{day_of_week:MONstart:57600end:72000}//valid_time_of_week{day_of_week:TUEstart:43200end:82800}////Notethatitisaclose-openinterval.Itmeansthattheofferwouldbe//availableforallbookingslotswhosestarttimeisfrom,forexample,//Monday11:30uptothelaststartingtimebefore13:00,buttheofferwould//notbeavailablefortheslotstartingatMonday13:00.////Ifvalid_time_of_weekisnotpresent,weconsidertheoffertobevalidat//alltimewithinthevalid_periodtimerangespecifiedabove.repeatedValidTimeOfWeekvalid_time_of_week=11;//Thismessagerepresentsthetimeperiodswhentheofferhasalternative//availabilityschedulethantheregularone,suchasspecialscheduleduring//holidays.messageValidTimeException{//Theoverarchingtimerangeoftheexceptioninthesameformat//astheregularvalid_periodfieldabove.Itisaclosed-openinterval//specifyingwhentheexpectional_time_of_weekbelowwouldapply,replacing//theregularvalid_time_of_weekschedule.(required)TimeRangeexceptional_period=1;//Theweeklyavailabilityscheduletobeappliedforthetimerange//specifiedintheexceptionalperiodabove.Itshouldbeinthesame//formatastheregularvalid_time_of_weekfieldabove.Ifnotpresent,all//timeswithintheexceptional_periodwillbeconsideredasvalidforthe//offer.repeatedValidTimeOfWeekexceptional_time_of_week=2;}//Exceptionstotheregularrecurringvalid_time_of_weekavailability//schedule.Ifset,anyregularvalid_time_of_weekwithinthis//exceptional_periodareignoredandreplacedbytheexceptional_time_of_week//specified.repeatedValidTimeExceptionvalid_time_exception=12;//Anumberfrom1-100indicatingthepriorityoftheofferunderthe//specifiedmerchantandservice.1isthemostimportantand100isthe//leastimportant.Offerswithsmallerprioritynumberswillbeshownbefore//offerswithlargerprioritynumberswhentheyareequallyavailable.int64priority=13;}
TimeRange Definition
// A closed-open time range, i.e. [begin_sec, end_sec)messageTimeRange{// Seconds of UTC time since Unix epoch (required)int64begin_sec=1;// Seconds of UTC time since Unix epoch (required)int64end_sec=2;}
Terms Definition
// A set of rules and guidelines that are displayed to the// user in order to make a booking through Reserve with Google.messageTerms{// The URL to the Terms and Conditions. (optional)stringurl=1;// The unlocalized text to be displayed to the user. (required)stringunlocalized_text=2;}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-09 UTC."],[[["Offers are defined using the Offers feed specification, which outlines the required information for each offer, such as merchant ID, service ID, offer ID, title, URL, image, terms, validity period, and priority."],["While the Offers feed can be defined in protobuffer format, it is recommended to upload the feeds in JSON format for better readability and compatibility."],["The `valid_period`, `valid_time_of_week`, and `valid_time_exception` fields are used together to define the offer's availability, allowing for regular schedules and exceptions."],["Each offer should have a `priority` value (ranging from 1 to 100) that determines its relative importance compared to other offers from the same merchant and service, with lower numbers indicating higher priority."],["Sample JSON feeds for merchants, services, and offers are provided to illustrate the expected data structure and content for each feed type."]]],[]]