Save and sync listing details
const url = 'https://digize.com/api/v1/reviews/listings';const options = { method: 'PUT', headers: { 'Idempotency-Key': '5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69', 'x-api-key': '<x-api-key>', 'Content-Type': 'application/json' }, body: '{"details":{"name":"example","phone":"example","website":"example","address":{"line1":"example","line2":"example","city":"example","region":"example","postalCode":"example","country":"example"},"hours":[{"day":1,"open":true,"ranges":[{"start":1,"end":1}]}]},"google":true,"facebook":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://digize.com/api/v1/reviews/listings \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \ --header 'x-api-key: <x-api-key>' \ --data '{ "details": { "name": "example", "phone": "example", "website": "example", "address": { "line1": "example", "line2": "example", "city": "example", "region": "example", "postalCode": "example", "country": "example" }, "hours": [ { "day": 1, "open": true, "ranges": [ { "start": 1, "end": 1 } ] } ] }, "google": true, "facebook": true }'Keeps the business’s name, address, phone, website and hours, and sends them to the Google Business Profile and the Facebook Page when asked (Facebook doesn’t let apps change a Page’s name). Google checks edits before they show.
Needs the reviews:write permission. It can’t be undone.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”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-1f2d3c4b5a69Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
Example generated
{ "details": { "name": "example", "phone": "example", "website": "example", "address": { "line1": "example", "line2": "example", "city": "example", "region": "example", "postalCode": "example", "country": "example" }, "hours": [ { "day": 1, "open": true, "ranges": [ { "start": 1, "end": 1 } ] } ] }, "google": true, "facebook": true}Responses
Section titled “Responses”Done
object
object
object
object
object
Whether the details are the team’s own, or still read from the Business Profile.
object
found; missing when the source doesn’t know the business; off when it isn’t connected or set up on this server; error; never before the first audit.
object
object
object
Example
{ "sources": [ { "source": "google", "state": "found" } ], "sync": { "facebook": { "state": { "state": "sending" } } }}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}A request with the same Idempotency-Key is still running (conflict).
object
object
object
Example
{ "error": { "code": "invalid" }}The Idempotency-Key was used with a different request.
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}