Skip to content

Add or change a review site

PUT
/api/v1/reviews/links
curl --request PUT \
--url https://digize.com/api/v1/reviews/links \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "id": "example", "kind": "google", "name": "example", "url": "", "location": null, "enabled": true, "weight": 1 }'

Adds a review site for request links, or changes one by id. Google, Facebook, Yelp and Trustpilot fill their address from what’s connected when url is empty; any other needs its https address. weight sets its share when Reviews settings rotate them.

Needs the reviews:write permission.

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
id
string
>= 1 characters <= 64 characters
kind
required
string
Allowed values: google facebook yelp tripadvisor trustpilot other
name
required
string
>= 1 characters <= 60 characters
url
string
"" <= 500 characters
location
Any of:
string
/^locations\/\d+$/
enabled
boolean
default: true
weight
integer
default: 1 >= 1 <= 10

Done

Media typeapplication/json
object
rows
required
Array<object>
object
id
required
string
kind
required
string
Allowed values: google facebook yelp tripadvisor trustpilot other
name
required
string
url
required

Where it opens now; empty when there’s nowhere yet.

string
customUrl
required

The address typed for it; empty for one filled from a connection.

string
location
required

A Google link’s location.

string | null
enabled
required
boolean
weight
required

Its share of rotations, 1 to 10.

number
offered
required
number
clicks
required
number

Example

{
"rows": [
{
"kind": "google"
}
]
}

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"
}
}