The creator visits at this account's locations, newest update first
const url = 'https://api.creatorain.com/v1/visits?status=booked&limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.creatorain.com/v1/visits?status=booked&limit=50' \ --header 'Authorization: Bearer <token>'Scope read. CreatoRain Network visits only: a store’s bookings on another campaign of
its own are not listed, and neither are bookings not yet confirmed or declined.
?location= of another account is 404 not_found (field location). Visits page by their
last update, so dedupe on id across a walk.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only this location’s items. Another account’s location is 404 not_found (field location).
The first visit day, YYYY-MM-DD, in the store’s own calendar.
The last visit day, YYYY-MM-DD, inclusive.
The next_cursor of the previous page, unchanged. Omit it for the first page. Anything else is 400 parameter_invalid (field cursor).
Items a page, 1 to 200.
Responses
Section titled “Responses”One page of visits.
object
Times are RFC 3339 on the STORE’s offset (the restaurant’s wall clock), unlike a location’s created_at.
object
object
The creator’s public handle.
When someone at the store first confirmed seeing it.
Example
{ "object": "list", "data": [ { "object": "visit", "id": "vis_3f2a9c1e5b7d4a6f8e0c2b4d6f8a0c2e", "location_id": "loc_3f2a9c1e5b7d4a6f8e0c2b4d6f8a0c2e", "status": "booked" } ]}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Example
600Requests allowed in the current minute for this workspace (600).
Requests left in the current minute for this workspace.
Seconds until the current window resets.
Parameter_invalid (with field) or invalid_json.
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Invalid_key, test_key_on_live or live_key_on_sandbox.
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Scope_missing or forbidden_ip.
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Not_found.
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Rate_limited (600 a minute per workspace, an onboarding create limit, or an address blocked after failed authentication), or slow_down (an onboarding session polled too fast).
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Seconds to wait before retrying (at least 1).
Internal_error (500) or service_unavailable (503). The message never carries a cause.
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.
Service_unavailable. The read is unavailable right now (for the bill preview, an account over 2000 locations).
object
object
The request field at fault
Batch_invalid only. Every refused location, by its index in the request.
object
One of the error codes above.
Example
{ "error": { "type": "invalid_request_error", "code": "parameter_invalid", "doc_url": "https://www.creatorain.com/api/errors#scope_missing", "items": [ { "field": "locations.1.videos_per_month" } ] }}Headers
Section titled “Headers”This request’s id. Equal to error.request_id; quote it to support.