Service
实体用于定义餐厅提供的食品订购服务,例如外卖或送餐。定义 Service
实体时,请使用 Service 类型。每家餐厅都需要与至少一个外卖或外送类型的服务实体相关联,并且最多与两个服务实体相关联(一个外卖类型,一个外送类型)。
服务实体用于定义服务类型、服务时间和服务区域等属性。服务实体预计会随着每次上传的数据 Feed 而发生变化和刷新。
服务实体示例
以下示例定义了一个每天接受订单的基本 Service
实体。
{
"@type":"Service",
"@id":"takeout_1",
"serviceType":"TAKEOUT",
"menuId":"menu_1",
"restaurantId":"restaraunt_1"
}
{
"@type":"OperationHours",
"@id":"takeout_1_op_hours",
"serviceId":"takeout_1",
"opens":"00:00",
"closes":"23:59"
}
{
"@type":"ServiceHours",
"@id":"takeout_1_service_hours",
"orderType":"ASAP",
"serviceId":"takeout_1",
"operationHoursId":"takeout_1_op_hours",
"opens":"11:00",
"closes":"21:00",
"dayOfWeek":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY", "FRIDAY", "SATURDAY"],
"leadTimeMin":"20",
"leadTimeMax":"20",
"isSpecialHour":false
}
{
"@type":"ServiceHours",
"@id":"takeout_1_service_hours_sun",
"orderType":"ASAP",
"serviceId":"takeout_1",
"operationHoursId":"takeout_1_op_hours",
"opens":"16:00",
"closes":"21:00",
"dayOfWeek":["SUNDAY"],
"leadTimeMin":"20",
"leadTimeMax":"20",
"isSpecialHour":false
}
{
"@type":"Service",
"@id":"delivery_1",
"serviceType":"DELIVERY",
"menuId":"10824",
"restaurantId":"10824"
}
{
"@type":"OperationHours",
"@id":"delivery_1_op_hours",
"serviceId":"delivery_1",
"opens":"00:00",
"closes":"23:59"
}
{
"@type":"ServiceHours",
"@id":"delivery_1_service_hours",
"orderType":"ASAP",
"serviceId":"delivery_1",
"operationHoursId":"delivery_1_op_hours",
"opens":"11:00",
"closes":"21:00",
"dayOfWeek":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY", "FRIDAY", "SATURDAY",
"SUNDAY"],
"leadTimeMin":"50",
"leadTimeMax":"50",
"isSpecialHour":false
}
{
"@type":"ServiceArea",
"@id":"delivery_1_service_area",
"serviceId":"delivery_1",
"polygon":["37.4818562 -122.25801303 37.48247836 -122.25801303 37.48434484
-122.25621319 37.48621133 -122.25424681 37.49181077 -122.24704744 37.49305509
-122.24541414 37.49429942 -122.2436143 37.49803238 -122.23821477 37.49803238
-122.21285044 37.49367726 -122.15885517 37.49056645 -122.15722187 37.48621133
-122.15542202 37.48558917 -122.15525548 37.4818562 -122.15525548 37.43191387
-122.17865343 37.43191387 -122.23444854"]
}
{
"@type":"Fee",
"@id":"delivery_1_fee",
"serviceId":"delivery_1",
"feeType":"DELIVERY",
"priceCurrency":"USD",
"eligibleRegion":"delivery_1_service_area",
"eligibleTransactionVolumeMin":20,
"percentageOfCart": 7
}
“ASAP”和“提前”选项
用户可以在餐厅的“ASAP”ServiceHours内下单,也可以在餐厅的OperationHours内提前下单,以便在提前ServiceHours内完成订单。如需定义提前服务时间,请创建一个 ServiceHours 实体,并将 orderType
属性设置为 ADVANCE
。如需了解详情和示例,请参阅送货和自提时间。
暂时停用 Service
实体
您可以通过设置节假日和特殊营业时间,暂时暂停或覆盖ServiceHours 在预先知晓的特定时间段内的值。如需出于意外原因停用服务实体,请发送实时更新请求,并将服务实体 isDisabled
属性设置为 true
。
如需了解详情和查看示例,请参阅删除和停用实体。