Pular para o conteúdo

Describe the published metric dictionary

GET
/v1/metrics/dictionary
curl --request GET \
--url https://open-api.live.gobots.com.br/v1/metrics/dictionary \
--header 'Authorization: Bearer <token>'

Returns the versioned catalogue of scopes, metrics, granularities and dimensions this API publishes. It makes no upstream call of its own; it answers 503 only when the merchant’s entitlement cannot be resolved. It is in the metrics group and therefore consumes one unit of the monthly quota: use the ETag instead of polling it.

If-None-Match
string

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

The published metric dictionary.

Media typeapplication/json
object
dictionary_version
required

Semantic version of the dictionary. A new optional metric or scope bumps the minor.

string
granularities
required
Array<string>
Allowed values: day week month total
dimensions
required
Array<string>
Allowed values: store
scopes
required

Only the scopes an enabled source serves, each listing exactly the metrics that source computes for it; a core metric a scope does not list is absent from that scope’s rows.

Array<object>
object
key
required
string
Allowed values: PRE_SALE/PRODUCT AFTER_SALE/ORDER AFTER_SALE/TICKET CHAT/PRODUCT CHAT/ORDER
conversation_type
required
string
resource
required
string
metrics
required
Array<object>
object
id
required

Dictionary id. A parameterised metric is named under its parent, engaged.seller.

string
kind
required
string
Allowed values: core optional
type
required
string
Allowed values: integer decimal ratio
unit
required
string
Allowed values: count seconds ratio
aggregation
required
string
Allowed values: sum average
parent

The root this metric parameterises, or null when it is a root itself.

string | null
description
required
string
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

{
"granularities": [
"day"
],
"dimensions": [
"store"
],
"scopes": [
{
"key": "PRE_SALE/PRODUCT",
"metrics": [
{
"kind": "core",
"type": "integer",
"unit": "count",
"aggregation": "sum"
}
]
}
],
"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>.

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
}

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.