messageServiceAvailability{//Ifprovided,wewillconsidertheAvailabilityentitiesprovidedtobea//completesnapshotfrom[start_timestamp_restrict,end_timestamp_restrict).// That is, all existing availability will be deleted if the following// condition holds true://// start_timestamp_restrict <= Availability.start_sec&&
// Availability.start_sec < end_timestamp_restrict//// If a duration message is set, the condition is further restricted:// Availability.duration == duration_restrict_sec//// If a resource_restrict message is set, the condition is further restricted://// Availability.resource.staff_id == resource_restrict.staff_id&&
// Availability.resource.room_id == resource_restrict.room_id//// These fields are typically used to provide a complete update of// availability in a given time range.//// Setting start_timestamp_restrict while leaving end_timestamp_restrict unset// is interpreted to mean all time beginning at start_timestamp_restrict.//// Setting end_timestamp_restrict while leaving start_timestamp_restrict unset// is interpreted to mean all time up to the end_timestamp_restrict.//// In Unix time format (seconds since the epoch) from UTC. (both optional)int64start_timestamp_restrict=1;int64end_timestamp_restrict=2;// If provided, the timestamp restricts will be applied only to the given// merchant or service.//// These fields are typically used to provide complete snapshot of// availability in a given range (defined above) for a specific merchant or// service.//// Leaving these fields unset, or setting these to the empty string or null,// is interpreted to mean that no restrict is intended. (both optional)stringmerchant_id_restrict=3;stringservice_id_restrict=4;// Setting duration further restricts the scope of the update to just the// availability with matching duration.//// In seconds. (optional)int64duration_restrict_sec=7;// Setting resources_restrict further restricts the scope of the update to// just this set of resources. All id fields of the resources must match// exactly. (optional)Resourcesresources_restrict=6;// All Availability Slots included in this Service Availability (required)repeatedAvailabilityavailability=5;}
Availability Definition
//Anavailabilityofthemerchant's service, indicating time and number//ofspots.//Theavailabilityfeedshouldbealistofthismessage.//Pleasenotethatit's up to the partner to call out all the possible//availabilities.//Ifamassagetherapistisavailable9am-12pm,andtheyprovide//one-hourmassagesessions,theaggregatorshouldprovidethefeedas//availability{start_sec:9am,duration:60minutes,...}//availability{start_sec:10am,duration:60minutes,...}//availability{start_sec:11am,duration:60minutes,...}//insteadof//availability{start_sec:9am,duration:180minutes,...}//messageAvailability{//Anopaquestringfromanaggregatortoidentifyamerchant.(required)stringmerchant_id=1;//Anopaquestringfromaggregatortoidentifyaserviceofthe//merchant.(required)stringservice_id=2;//Starttimeofthisavailability,usingepochtimeinsecondsinUTC.//(required)int64start_sec=3;//Durationoftheserviceinseconds,e.g.30minutesforachairmassage.//(required)int64duration_sec=4;//Numberoftotalspotsandopenspotsofthisavailability.//E.g.aYogaclassof10spotswith3booked.//availability{spots_total:10,spots_open:7...}//E.g.achairmassagesessionwhichwasalreadybooked.//availability{spots_total:1,spots_open:0...}////Note:Ifsendingrequestsusingtheavailabilitycompressionformatdefined//below,thesetwofieldswillbeinferred.ARecurrence//impliesspots_total=1andspots_open=1.AScheduleExceptionimplies//spots_total=1andspots_open=0.//(bothrequiredifrecurrencenotset)int64spots_total=5;int64spots_open=6;//Anoptionalopaquestringtoidentifythisavailabilityslot.Ifset,it//willbeincludedintherequeststhatbook/update/cancelappointments.//(optional)stringavailability_tag=7;//Optionalresourcesusedtodisambiguatethisavailabilityslotfrom//otherswhendifferentstaff,room,orparty_sizevaluesarepart//oftheservice.////E.g.thesameYogaclasswithtwo2instructors.//availability{resources{staff_id:"1"staff_name:"Amy"}//spots_total:10spots_open:7}//availability{resources{staff_id:"2"staff_name:"John"}//spots_total:5spots_open:2}//(optional)Resourcesresources=8;//AlistofIDsreferencingthepaymentoptionswhichcanbeusedtopay//forthisslot.TheactualpaymentoptionsaredefinedattheMerchant//level,andcanalsobesharedamongmultipleMerchants.////Thisfieldoverridesanypayment_option_idsspecifiedintheservice//message.Similarlypayment_option_idsspecifiedheredoNOThavetobe//presentintheservicemessage,thoughmustbedefinedatthe//Merchantlevel.//Ourcurrentimplementationlimitsthenumberofentriesinthisarrayto//oneelement.Multiplepayment_option_idarestillallowedattheService//level,butanoverrideattheavailabilityslotlevel,islimitedtoa//singlepayment_option_id.(optional)repeatedstringpayment_option_id=9;//Recurrencemessagesareoptional,butallowforamorecompact//representationofconsistentlyrepeatingavailabilityslots.Theytypically//representaday's working schedule.//ScheduleExceptionmessagesarethenusedtorepresentbooked/unavailable//timerangeswithintheworkday.////Requirements://1.TheexpansionofavailabilityslotsorrecurrencesmustNOTcreate//identicalslots.Iftheids,start_sec,duration_sec,andresources//match,slotsareconsideredidentical.//2.DoNOTmixthestandardavailabilityformatandrecurrencewithinthe//slotsofasingleservice.Recurrencebenefitsmerchants/servicesthat//offerappointments.Thestandardformatisgearedtowards//merchants/serviceswithregularlyscheduledclasses.messageRecurrence{//TheinclusivemaximumUTCtimestamptheavailabilityrepeatsuntil.//(required)int64repeat_until_sec=1;//Definesthetimebetweensuccessiveavailabilityslots.////Example:Anavailabilitywithadurationof20min,arepeat_every_secof//30min,astart_secof9:00am,andarepeat_until_secof11:00amwill//yieldslotsat9-9:20am,9:30-9:50am,10-10:20am,10:30-10:50am,//11-11:20am.(required)int32repeat_every_sec=2;}//Therecurrenceinformationfortheavailability,representingmorethanone//starttime.Arecurrenceshouldcontainappointmentsforoneworkingday.//(optional)Recurrencerecurrence=10;//ScheduleExceptionmessagesrepresentbooked/unavailabletimerangeswithin//theworkday,whichareexceptionstotherecurrencedescribedabove.As//timeslotsarebooked,thelistofexceptionsshouldbeupdatedtoreflect//thenewlyunavailabletimeranges.Therecurrenceitselfshouldn't be//modified.messageScheduleException{//Thetimerangeoftheexception.Anyslotsdescribedbytherecurrence//whichoverlapthisclosed-opentimerangewillbeconsideredunavailable.////Example:Iftherecurrencespecifiesadurationof20min,a//repeat_every_secof30min,astart_timeof9:00am,anda//repeat_until_secof11:00am,thenaScheduleExceptionwithatime_range//of9:45am-11:00amwouldmakeunavailabletheslotsat9:30-9:50am,//10-10:20am,and10:30-10:50am.////Notethatbecausethetimerangeisclosed-open,theslotbeginningat//11amslotwouldnotbeimpacted.TimeRangetime_range=1;}//Timeswhenthisservicecannotbescheduled.Tolimitthenumberof//schedule_exceptionmessages,considerjoiningadjacentexceptions.//(optional)repeatedScheduleExceptionschedule_exception=11;//Defineshowadepositmaybechargedtotheuser.Overridestheservice//depositifonewasspecified.SettingthistoanemptyDepositmessage//removesanyservice-leveldeposit.(optional)Depositdeposit=12;//Definesanoshowfeethatmaybechargedtotheuser.Overridesthe//servicenoshowfeeifonewasspecified.Settingthistoanempty//NoShowFeemessageremovesanyservice-levelnoshowfee.(optional)NoShowFeeno_show_fee=13;//Optionalprepaymentinformationforthisavailability.Prepaymentisonly//availablethroughthePaymentRedirectAdd-onPrepaymentprepayment=20;//Indicateswhethertheusermustprovideacreditcardinordertobookthis//availabilityslot.//Ifthevalueisnotset,itisinheritedfromtheservicelevelifit's set//there.(optional)RequireCreditCardrequire_credit_card=14;//Availabilitylevelschedulingrules.messageSchedulingRuleOverrides{//Thelasttime(inseconds)thatthisslotisabletobebooked.This//timestampmustbebeforethestart_secoftheslottoberespected//(ifusersshouldbeabletobookafterthestarttime,useservicelevel//SchedulingRules.min_booking_buffer_before_end_time).Ifpresent,will//overrideanythingspecifiedinthemin_booking_bufferofthe//correspondingService's SchedulingRules.int64last_bookable_sec=1;//Thefirsttime(inseconds)thatthisslotisabletobebooked.int64first_bookable_sec=2;//Ifset,thelasttime(insecondssincetheUnixepoch)thatthis//specificappointmentslotcanbecancelledthroughReservewithGoogle.//Thisfieldwilloverrideanyservice-levelcancellationrules.(optional)int64last_online_cancellable_sec=3;}//Availabilityschedulingrules.Iffieldsarepopulated,theywilloverride//anycorrespondingschedulingrulesontheservice-levelSchedulingRules.SchedulingRuleOverridesscheduling_rule_overrides=16;//Thisenumindicateswhatrequirementsexistfortheuserto//acknowledgeorviewtherequestedslotsduration/endtime.enumDurationRequirement{//Thehandlingoftheendtimeisnotspecified.Thisisthedefault.DURATION_REQUIREMENT_UNSPECIFIED=0;//Theendtimeisnotshowntotheuser.DO_NOT_SHOW_DURATION=1;//Theendtimehastobeshowntotheuserbeforeanappointmentcanbe//made.MUST_SHOW_DURATION=2;}//Therequirementtoshowtheslotsdurationand/orendtime.//Thisfieldwillbeignorediftheslotisunavailable.Notusedinthe//Things-To-Dovertical.(optional)DurationRequirementduration_requirement=18;//Theconfirmationmodesusedwhenbookingavailabilities.enumConfirmationMode{//Theconfirmationmodewasnotspecified.//Synchronousconfirmationwillbeassumed.CONFIRMATION_MODE_UNSPECIFIED=0;//Bookingsforthisavailabilitywillbeconfirmedsynchronously.CONFIRMATION_MODE_SYNCHRONOUS=1;//Bookingsforthisavailabilitywillbeconfirmedasynchronously.CONFIRMATION_MODE_ASYNCHRONOUS=2;}//Theconfirmationmodethatwillbeusedwhenbookingthisavailability.//Attemptstocreatebookingsforavailabilitieswithaconfirmationmode//ofCONFIRMATION_MODE_SYNCHRONOUSmustbeimmediatlelyconfirmedordenied.//Attemptstocreatebookingsforavailabilitieswithconfirmationmode//ofCONFIRMATION_MODE_ASYNCHRONOUSmustbeeitherimmediatelydenied//orcreatedwithstatusPENDING.Populatingconfirmation_modeisstrongly//recommended,butnotstrictlyrequired.(optional)ConfirmationModeconfirmation_mode=17;//Thereasonwhyaslotrequiresalinkout.CurrentlyonlyusedforDining//ReservationsPaymentRedirectPartners.enumLinkoutRequiredReason{//Defaultvalue:Donotuse,equatestounknown.LINKOUT_REQUIRED_REASON_UNSPECIFIED=0;//Slotrequirespaymentinthepartnerplatformtobebooked.PAYMENT_REQUIRED=1;}//Thereasonalinkoutisrequiredforthisslot.Ifset,theMerchant//resourceforthisslotmusthaveavalidLinkoutTemplate.LinkoutRequiredReasonlinkout_required_reason=19;}
Resources Definition
// A resource is used to disambiguate availability slots from one another when// different staff, room or party_size values are part of the service.// Multiple slots for the same service and time interval can co-exist when they// have different resources.messageResources{// One of staff_id, room_id, or party_size must be set.// Optional ID for a staff member providing the service. This field identifies// the staff member across all merchants, services, and availability records.// It also needs to be stable over time to allow correlation with past// bookings. (optional but required if staff_name is present)stringstaff_id=1;// Optional name of a staff member providing the service. This field will be// displayed to users making a booking, and should be human-readable, as// opposed to an opaque identifier. (optional but required if staff_id is// present)stringstaff_name=2;// An optional ID for the room the service is located in. This field// identifies the room across all merchants, services, and availability// records. It also needs to be stable over time to allow correlation with// past bookings. (optional but required if room_name is present)stringroom_id=3;// An optional name for the room the service is located in or experience of// of the service. This field will be displayed to users making a booking,// and should be human readable, as opposed to an opaque identifier.// A room name should only be used for seating areas or prepaid experiences.// Examples of room names include "Bar", "Patio", "Dining Room". Examples of// dining experiences using room names include "Five-Course Tasting Menu",// "Chef Omakase". It is strongly recommended that the default seating area// does not have a room associated with it.stringroom_name=4;// Applicable only for Dining: The party size that can be accommodated// during this time slot. A restaurant can be associated with multiple Slots// for the same time, each specifying a different party_size, if for instance// 2, 3, or 4 people can be seated with a reservation. (optional)int32party_size=5;// Localized room description with a limit of 500 characters. If set,// a default value must be provided, it is preferred to use the common// languages for the merchant's locale.Textroom_description=7;}
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;}
Price Definition
// The price of a service or a fee.messagePrice{// The price in micro-units of the currency.// For example: 1.95 USD is 1950000 in micro-units.// If your price contains fractions of the smallest currency unit, then it// will be rounded using nearest even rounding (e.g. 2.5 cents rounded// to 2 cents, 3.5 cents rounded to 4 cents, 0.5 cents rounded to 0 cents,// 2.51 cents rounded to 3 cents). (required)int64price_micros=1;// The currency of the price that is defined in ISO 4217. (required)stringcurrency_code=2;// An optional and opaque string that identifies the pricing option that is// associated with the extended price. (optional)stringpricing_option_tag=3;}
PriceRange Definition
// Wrapper for a range of monetary amount treated as unbounded unless both// values are set. At least one of min_amount and max_amount is required.messagePriceRange{// Minimum amount.Pricemin_price=1;// Maximum amount. Should always be > min_price.Pricemax_price=2;}
PriceInfo Definition
// Container for price details.messagePriceInfo{oneofprice_options{Priceprice=1;// The upper and/or lower boundPriceRangeprice_range=2;}// Defines how price or price range is applied (per person or fixed)PriceTypeprice_type=3;}
// A deposit that the user may be charged or have a hold on their credit card// for.messageDeposit{// Deposit amount.Pricedeposit=1;// Minimum advance cancellation for the deposit.int64min_advance_cancellation_sec=2;// Defines how the deposit is determined from the availability.PriceTypedeposit_type=3;}
Prepayment Definition
// A payment the user may be charged as part of their reservation.messagePrepayment{PriceInfoprice_info=1;}
NoShowFee Definition
// A fee that a user may be charged if they have made a booking but do not// show up.messageNoShowFee{// The amount the user may be charged if they do not show up for their// reservation.Pricefee=1;// Defines how the fee is determined from the availability.PriceTypefee_type=3;}
[[["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-31 UTC."],[[["Daily availability data uploads in JSON format are required."],["`spots_open`/`spots_total` fields are crucial for Local Services Ads integration."],["`Availability` objects define specific service slots with details like time, duration, and resources."],["`Recurrence` and `ScheduleException` allow for defining repeating patterns and exceptions."],["Various fields like `deposit`, `prepayment`, and `require_credit_card` manage booking requirements."]]],[]]