- HTTP request
- Path parameters
- Request body
- Response body
- Authorization Scopes
- ExtendedServiceAvailability
Replaces the Availability
of existing Services
. This batch call does not guarantee atomicity. Only successfully updated availability slots will be returned.
HTTP request
POST https://mapsbooking.googleapis.com/v1alpha/inventory/{parent=partners/*}/availability:replace
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
parent |
Format of |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"extendedServiceAvailability": [
{
object ( |
Fields | |
---|---|
extendedServiceAvailability[] |
The extended service availability that is used to replace the existing availability slots. |
Response body
If successful, the response body contains data with the following structure:
The batch response to replace multiple Service
's availability slots. Only successfully updated slots will be included in this message
JSON representation |
---|
{
"extendedServiceAvailability": [
{
object ( |
Fields | |
---|---|
extendedServiceAvailability[] |
The successfully updated extended service availability messages that were used to replace the existing availability slots. |
Authorization Scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/mapsbooking
ExtendedServiceAvailability
A list of availability and who/when they should be applied to.
JSON representation |
---|
{ "merchantId": string, "serviceId": string, "startTimeRestrict": string, "endTimeRestrict": string, "durationRestrict": string, "resourcesRestrict": { object ( |
Fields | |
---|---|
merchantId |
This is a mandatory field required to specify which merchant the availability messages below belong to. |
serviceId |
This is a mandatory field required to specify which service the availability messages below belong to. |
startTimeRestrict |
If provided, we will consider the Availability entities provided to be a complete snapshot from [startTimeRestrict, endTimeRestrict). That is, all existing availability will be deleted if the following condition holds true:
If a duration message is set, the condition is further restricted:
If a resourcesRestrict message is set, the condition is further restricted:
These fields are typically used to provide a complete update of availability in a given time range. Setting startTimeRestrict while leaving endTimeRestrict unset is interpreted to mean all time beginning at startTimeRestrict. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
endTimeRestrict |
Setting endTimeRestrict while leaving startTimeRestrict unset is interpreted to mean all time up to the endTimeRestrict. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
durationRestrict |
Setting duration further restricts the scope of the update to just the availability with matching duration. A duration in seconds with up to nine fractional digits, ending with ' |
resourcesRestrict |
Setting resourcesRestrict further restricts the scope of the update to just this set of resources. All id fields of the resources must match exactly. |
availability[] |
The new list of availability. |