Pular para o conteúdo

Read the attendance metric series

GET
/v1/metrics
curl --request GET \
--url 'https://open-api.live.gobots.com.br/v1/metrics?start_date=2026-06-01&end_date=2026-06-30&timezone=America%2FSao_Paulo&granularity=day&scopes=PRE_SALE%2FPRODUCT&metrics=total%2Cpending&dimensions=store&stores=st_0Q7pXmT2bK9wLf3ZrN1cVd&limit=50&cursor=cur_eyJlIjoxfQ.Ab3' \
--header 'Authorization: Bearer <token>'

Returns a cursor-paginated time series of the published metrics. The response echoes the canonical query the server ran; send it back unchanged when following meta.next_cursor.

If-None-Match
string

The ETag of a previously fetched representation; a match answers 304 with no body.

start_date
required
string format: date

First day of the period, inclusive.

Example

2026-06-01
end_date
required
string format: date

Last day of the period, inclusive. At most 90 days of range, never in the future.

Example

2026-06-30
timezone
string

IANA time zone every bucket and day boundary is computed in. Defaults to UTC.

Example

America/Sao_Paulo
granularity
string
Allowed values: day week month total

Bucket size. Defaults to day.

Example

day
scopes
Array<string>
Allowed values: PRE_SALE/PRODUCT AFTER_SALE/ORDER AFTER_SALE/TICKET CHAT/PRODUCT CHAT/ORDER

Scopes to report. Defaults to every scope the dictionary publishes.

Example

?scopes=PRE_SALE%2FPRODUCT
metrics
Array<string>

Dictionary ids to report. Defaults to every core id. An id a selected scope does not publish is accepted and simply absent from that scope’s rows.

Example

?metrics=total,pending
dimensions
Array<string>
Allowed values: store

Breakdown dimensions. Only store exists in v1.

Example

?dimensions=store
stores
Array<string>
<= 50 items

Opaque store ids to restrict the answer to, at most 50. An id that matches no store of this merchant answers 404. Defaults to every store of the merchant.

Example

?stores=st_0Q7pXmT2bK9wLf3ZrN1cVd
limit
integer
>= 1 <= 500

Rows per page, 1 to 500. Defaults to 50.

Example

50
cursor
string

Opaque page marker from meta.next_cursor. It is bound to the exact query that issued it and expires: changing any parameter other than limit, or waiting too long, answers 400 invalid_cursor. Paging is consistent over a closed period; a cursor into the current day may skip or repeat a row, because that bucket is still moving.

Example

cur_eyJlIjoxfQ.Ab3

The metric series for the requested period.

Media typeapplication/json
object
dictionary_version
required
string
query
required
object
start_date
required
string format: date
end_date
required
string format: date
granularity
required
string
Allowed values: day week month total
timezone
required
string
scopes
required
Array<string>
Allowed values: PRE_SALE/PRODUCT AFTER_SALE/ORDER AFTER_SALE/TICKET CHAT/PRODUCT CHAT/ORDER
metrics
required
Array<string>
dimensions
required
Array<string>
Allowed values: store
stores
required
Array<string>
series
required
Array<object>
object
scope
required
string
Allowed values: PRE_SALE/PRODUCT AFTER_SALE/ORDER AFTER_SALE/TICKET CHAT/PRODUCT CHAT/ORDER
store_id
required

Opaque store id, or null when the row is aggregated over stores.

string | null
marketplace
required
One of:
string
Allowed values: meli amazon magalu shopee viavarejo b2w whatsapp qa tiktok
bucket_start
required
string format: date
bucket_end
required

Last day of the bucket, inclusive, clipped to the requested period.

string format: date
metrics
required

Dictionary id to value. A metric that could not be measured for the bucket is absent, never zero.

object
key
additional properties
number
meta
required
object
next_cursor
required

Cursor of the next page, or null when the collection ends here.

string | null
status
string
Allowed values: partial
warnings
Array<string>

Example

{
"query": {
"granularity": "day",
"scopes": [
"PRE_SALE/PRODUCT"
],
"dimensions": [
"store"
]
},
"series": [
{
"scope": "PRE_SALE/PRODUCT",
"marketplace": "meli"
}
],
"meta": {
"status": "partial"
}
}
RateLimit-Policy
required
string

The policies that apply to this endpoint group, as draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.

RateLimit
required
string

The state of the endpoint group’s window: "<group>";r=<remaining>;t=<seconds to reset>.

ETag
required
string

Strong validator of the representation.

The representation is unchanged. The request still counts as one request.

ETag
required
string

Strong validator of the representation.

RateLimit-Policy
required
string

The policies that apply to this endpoint group, as draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.

RateLimit
required
string

The state of the endpoint group’s window: "<group>";r=<remaining>;t=<seconds to reset>.

A query parameter carries a value the contract does not accept (invalid_request), the period exceeds the maximum (period_too_long), or the cursor is expired or was not issued for this query (invalid_cursor).

Media typeapplication/json
object
code
required

Stable machine readable error code.

string
message
required

Human readable explanation. Never carries raw upstream text.

string
retry_after

Seconds to wait before retrying.

integer
limit

Limit that was exceeded.

integer
remaining

Remaining allowance in the current window.

integer

Example generated

{
"code": "example",
"message": "example",
"retry_after": 1,
"limit": 1,
"remaining": 1
}
RateLimit-Policy
required
string

The policies that apply to this endpoint group, as draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.

RateLimit
required
string

The state of the endpoint group’s window: "<group>";r=<remaining>;t=<seconds to reset>.

The API key is missing, malformed, unknown, revoked or expired.

Media typeapplication/json
object
code
required

Stable machine readable error code.

string
message
required

Human readable explanation. Never carries raw upstream text.

string
retry_after

Seconds to wait before retrying.

integer
limit

Limit that was exceeded.

integer
remaining

Remaining allowance in the current window.

integer

Example generated

{
"code": "example",
"message": "example",
"retry_after": 1,
"limit": 1,
"remaining": 1
}
WWW-Authenticate
string

Bearer challenge for the API realm.

The merchant does not have the Open API add-on active.

Media typeapplication/json
object
code
required

Stable machine readable error code.

string
message
required

Human readable explanation. Never carries raw upstream text.

string
retry_after

Seconds to wait before retrying.

integer
limit

Limit that was exceeded.

integer
remaining

Remaining allowance in the current window.

integer

Example generated

{
"code": "example",
"message": "example",
"retry_after": 1,
"limit": 1,
"remaining": 1
}

A requested store matches no store of this merchant.

Media typeapplication/json
object
code
required

Stable machine readable error code.

string
message
required

Human readable explanation. Never carries raw upstream text.

string
retry_after

Seconds to wait before retrying.

integer
limit

Limit that was exceeded.

integer
remaining

Remaining allowance in the current window.

integer

Example generated

{
"code": "example",
"message": "example",
"retry_after": 1,
"limit": 1,
"remaining": 1
}
RateLimit-Policy
required
string

The policies that apply to this endpoint group, as draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.

RateLimit
required
string

The state of the endpoint group’s window: "<group>";r=<remaining>;t=<seconds to reset>.

The requests-per-minute limit of the endpoint group was exceeded (rate_limited), or the monthly request quota of the merchant is exhausted (quota_exceeded).

Media typeapplication/json
object
code
required

Stable machine readable error code.

string
message
required

Human readable explanation. Never carries raw upstream text.

string
retry_after

Seconds to wait before retrying.

integer
limit

Limit that was exceeded.

integer
remaining

Remaining allowance in the current window.

integer

Example generated

{
"code": "example",
"message": "example",
"retry_after": 1,
"limit": 1,
"remaining": 1
}
RateLimit-Policy
required
string

The policies that apply to this endpoint group, as draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.

RateLimit
required
string

The state of the endpoint group’s window: "<group>";r=<remaining>;t=<seconds to reset>.

Retry-After
required
integer

Seconds to wait before retrying, per RFC 9110.

The upstream source is unavailable. When the merchant’s entitlement could not be resolved the request is refused before rate limiting, so the RateLimit headers are absent.

Media typeapplication/json
object
code
required

Stable machine readable error code.

string
message
required

Human readable explanation. Never carries raw upstream text.

string
retry_after

Seconds to wait before retrying.

integer
limit

Limit that was exceeded.

integer
remaining

Remaining allowance in the current window.

integer

Example generated

{
"code": "example",
"message": "example",
"retry_after": 1,
"limit": 1,
"remaining": 1
}
RateLimit-Policy
string

As the RateLimit-Policy response header; absent when entitlement could not be resolved.

RateLimit
string

As the RateLimit response header; absent when entitlement could not be resolved.