Skip to content

Set the buttons on Google

PUT
/api/v1/reviews/google/buttons
curl --request PUT \
--url https://digize.com/api/v1/reviews/google/buttons \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "book": { "calendarId": "example", "online": true }, "shop": true }'

Sets the Google Business Profile’s “Book online” button to a calendar’s booking page (online for appointments held online) and its “Shop online” button to the store, each marked as the business’s preferred link; null or false takes one off.

Needs the reviews:write permission. It can’t be undone.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
book
required
Any of:
object
calendarId
required
string
>= 1 characters <= 64 characters
online
required
boolean
shop
required
boolean

Example generated

{
"book": {
"calendarId": "example",
"online": true
},
"shop": true
}

Done

Media typeapplication/json
object
book
required
Any of:
object
type
required
string
Allowed values: APPOINTMENT ONLINE_APPOINTMENT SHOP_ONLINE
uri
required
string
label
required

What it opens: the calendar’s name, or the store’s.

string
calendarId
required
string | null
state
required

On Google, on its way there, or refused with rejection.

string
Allowed values: live sending refused
rejection
required
string | null
updatedAt
required
string format: date-time
updatedBy
required
string
shop
required
Any of:
object
type
required
string
Allowed values: APPOINTMENT ONLINE_APPOINTMENT SHOP_ONLINE
uri
required
string
label
required

What it opens: the calendar’s name, or the store’s.

string
calendarId
required
string | null
state
required

On Google, on its way there, or refused with rejection.

string
Allowed values: live sending refused
rejection
required
string | null
updatedAt
required
string format: date-time
updatedBy
required
string
others
required

Links other providers put on the location.

Array<object>
object
name
required
string
type
required

Google’s place action type, such as DINING_RESERVATION.

string
uri
required
string
provider
required

The business itself, or a partner of Google’s such as a booking service.

string
Allowed values: merchant aggregator unknown
preferred
required
boolean
readAt
required
Any of:
string format: date-time
readError
required

Why Google wouldn’t list the location’s links.

string | null
calendars
required
Array<object>
object
id
required
string
name
required
string
url
required
string
online
required

Whether it’s a Google Meet calendar.

boolean
store
required
Any of:
object
name
required
string
url
required
string

Example

{
"book": {
"type": "APPOINTMENT",
"state": "live"
},
"shop": {
"type": "APPOINTMENT",
"state": "live"
},
"others": [
{
"provider": "merchant"
}
]
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}