跳到导航

确认服务更新

保存会更改现有预订价格的服务更新。也可选择重新定价未来预订。

路径参数

service_idstring必需

服务 ID。创建时返回;可使用 GET /v1/reception/services 列出。

请求头

xi-api-keystring可选
xi-workspace-idstring必需

经销商 API 密钥操作的客户工作区。

查询参数

repriceboolean可选默认为 false
Also update the price on the service's future bookings.

请求

This endpoint expects an object.
pricing_modeenum可选默认为 fixed

‘fixed’ (default): the item has a known price the agent can quote, and customers can book or order it directly. ‘quote’: the price depends on the job (renovation, catering, custom work), so no price or slot is offered; the agent collects the intake_questions and files a quote request instead. Takes effect only while quotes are enabled for the business. Group services cannot use ‘quote’.

允许的值:
intake_questionslist of objects可选

智能体在预订或订购此项目之前提出的问题。对于实用的 pricing_mode='quote' 项目,此项必填——否则报价请求中没有可供定价的信息——但也适用于需要补充详情的固定价格项目(例如染发前询问当前发色、护理前询问过敏情况)。

groupslist of objects可选

此项目的分组成员关系。每个条目包含分组标签及该项目在组内从 0 开始的排名。

ungrouped_rankinteger or null可选

无分组项目中的显示位置;null 排在最后。可通过重新排序端点更改。

namestring可选

向客户和接待员显示的服务名称。

descriptionstring可选

Details about the service for customers and the receptionist; empty string means none.

variantslist of objects可选

Bookable options for this service. Always non-empty; variants[0] is the default option shown when callers don’t pick a specific variant. Each entry has its own duration and (optional) price, and uniqueness is keyed by duration.

kindenum可选默认为 classic

Classic = staff-delivered; rental = asset-based; group = multi-participant session.

允许的值:
buffer_minutesinteger可选

每次预约后预留的周转/清洁时间。适用于所有服务类型;默认值 0 表示无缓冲时间。

service_locationenum可选默认为 business

服务提供地点。business = 客户前往营业地点(默认);customer = 员工前往客户所在地。仅对 kind='classic' 有意义。

允许的值:
add_onslist of objects可选
Optional extras that can be added to a booking of this service.
max_participantsinteger or null可选2-200

Capacity for kind='group': how many seats a single session can sell across all registrations. Must be null for classic and rental services (those are always exclusive to one client per booking).

capacityinteger or null可选

Not used to limit bookings; set max_participants on group services instead.

is_activeboolean可选

是否提供该服务;停用的服务无法预约。

any_staff_memberboolean可选

是否任意员工均可提供该服务。设为 false 时,只有 staff_ids 中的员工可以提供。租赁服务会忽略此项。

staff_idslist of strings可选

分配给此服务的员工;当 kind=‘rental’ 时必须为空。

asset_idslist of strings可选
Assets, such as rooms or equipment, this service can be booked on.
advance_booking_minutesinteger可选

面向客户的渠道(公开预订页面、语音智能体)最远可提前多久预订此服务。适用于所有类型。

location_idslist of strings可选

Locations where this service is offered; empty list means all locations.

display_on_booking_pageboolean可选

该服务是否列在公开预约页面上。

travel_minutesinteger可选

为客户地点服务在预约前后添加的出行时间(分钟)。会占用员工日历,但客户不可见。service_location='business' 时忽略。

travel_beforeboolean可选

Add travel time before the appointment (outbound trip).

travel_afterboolean可选

Add travel time after the appointment (return trip).

promotionslist of objects可选

适用于此服务或特定变体的限时折扣。

duration_minutesinteger or null可选<=43200

设置第一个变体的时长。发送 variants 时将忽略此项。

pricedouble or null可选>=0

设置第一个变体的价格。发送 variants 时将忽略此项。

响应

成功响应

has_affected_eventsboolean

更新会改变即将到来的预约价格且尚未保存时为 true;请再次发送至确认更新端点以应用。

serviceobject or null可选

更新后的服务;如果更新因会重新定价现有预约而被暂缓,则为 null。

错误

422
Unprocessable Entity Error