Skip to content

Rate a Local Services lead

POST
/api/v1/ads/local-services/leads/{id}/rating
curl --request POST \
--url https://digize.com/api/v1/ads/local-services/leads/example/rating \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "rating": "VERY_SATISFIED", "reason": "BOOKED_CUSTOMER", "comment": "example" }'

Tells Google how good a Local Services lead was, which it uses to send better ones. A satisfied or dissatisfied rating takes a reason, and a reason of other takes a comment. Google takes one rating per lead.

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

id
required
string
>= 1 characters <= 64 characters
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
rating
required
string
Allowed values: VERY_SATISFIED SATISFIED NEUTRAL DISSATISFIED VERY_DISSATISFIED
reason
Any of:
string
Allowed values: BOOKED_CUSTOMER LIKELY_BOOKED_CUSTOMER SERVICE_RELATED HIGH_VALUE_SERVICE OTHER_SATISFIED_REASON SPAM DUPLICATE GEO_MISMATCH JOB_TYPE_MISMATCH NOT_READY_TO_BOOK SOLICITATION OTHER_DISSATISFIED_REASON
comment
Any of:
string
<= 1000 characters

Done

Media typeapplication/json
object
id
required

Google’s id for the lead.

string
type
required

PHONE_CALL, MESSAGE, BOOKING or COUPON.

string
category
required
string | null
service
required
string | null
status
required

Google’s, such as NEW, ACTIVE or BOOKED.

string
charged
required

Whether Google charged for it.

boolean
creditState
required
string | null
trackingPhone
required

Google’s tracking number with its extension, when the person’s own isn’t shared.

string | null
campaignName
required
string | null
rated
required
boolean
rating
required
Any of:
string
Allowed values: VERY_SATISFIED SATISFIED NEUTRAL DISSATISFIED VERY_DISSATISFIED
ratingReason
required
string | null
ratedBy
required
string | null
ratedAt
required
Any of:
string format: date-time
createdAt
required
string format: date-time
credited
required

Whether Google gave a bonus credit for the rating.

boolean

Example

{
"rating": "VERY_SATISFIED"
}

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