Pular para o conteúdo

Read the metric series of the whole Ads account, per store and per currency

GET
/v1/ads/{marketplace}/metrics
curl --request GET \
--url 'https://open-api.live.gobots.com.br/v1/ads/meli/metrics?start_date=2026-09-01&end_date=2026-09-30&timezone=America%2FSao_Paulo&granularity=week&store_id=st_0Q7pXmT2bK9wLf3ZrN1cVd' \
--header 'Authorization: Bearer <token>'

The same series as getAdCampaignMetrics, summed over every campaign of each store of the merchant, or of the one store store_id names. Every selected store is in data.stores, in its own currency and zone: ok, no_ads_account (zeros, a true answer) or unavailable (no totals, the warning ads_store_unavailable, meta.complete: false). data.by_currency sums the ok and no_ads_account stores of each currency by calendar date; amounts of different currencies are never summed. When no store answered the route answers 503.

marketplace
required
string
Allowed values: meli amazon magalu shopee viavarejo b2w whatsapp qa tiktok

Marketplace of the Ads account. Only meli has an adapter in v1; the others answer 501.

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 window, inclusive, at most 90 days before today.

Example

2026-09-01
end_date
required
string format: date

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

Example

2026-09-30
timezone
string

Defaults to each store’s site zone, the only zone its days exist in. When given, it must equal the zone of every store in the answer; otherwise the request answers 400.

Example

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

Bucket size. Defaults to day. total answers the totals and an empty series.

Example

week
store_id
string

Opaque id of one store to restrict the answer to. A store of another merchant answers 404.

Example

st_0Q7pXmT2bK9wLf3ZrN1cVd

The series of the account.

Media typeapplication/json
object
data
required
object
period
required
object
start_date
required
string format: date
end_date
required
string format: date
granularity
required
string
Allowed values: day week month total
stores
required

Every selected store, sorted by store_id.

Array<object>
object
store_id
required

Opaque store id.

string
status
required

ok: read. no_ads_account: the store has no Ads account on its site, or the site has no Product Ads; zeros are a true answer and carry no warning. unavailable: could not be read.

string
Allowed values: ok no_ads_account unavailable
currency
required

ISO 4217 code of the store’s site; every amount of this object is in it. Null only on an unavailable store the marketplace did not name it for.

string | null
timezone
required

IANA zone the store’s days are cut in. Null only on an unavailable store the marketplace did not name it for.

string | null
complete
required

False when a warning of this store says part of its window is missing or not final.

boolean
warnings
required
Array<string>
totals

A campaign’s current metric snapshot, or one bucket of a metric series. Ratios are decimal strings. A metric the origin did not send is absent, never zero. In a series every ratio is re-derived from the bucket’s sums (4 decimals, money 2) and is absent when its denominator is zero; share_of_voice is present on day buckets only.

object
spend
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
impressions
integer format: int64
clicks
integer format: int64
ctr
string
cpc
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
attributed_sales
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
acos
string
roas
string
remote_data
required

Marketplace-specific fields, keyed by marketplace and then by a documented key. Campaign: channel. Campaign metrics: share_of_voice (decimal string, a ratio in [0,1]). Ad group: status (the marketplace’s own), ad_group_type. Opportunity: action (an action outside the published set).

object
key
additional properties
object
key
additional properties
string
series

Every bucket of the window in order, days without activity included; empty for total. totals and series are absent when the store is unavailable.

Array<object>

One bucket, clipped to the window; a week starts on Monday.

object
start_date
required
string format: date
end_date
required
string format: date
metrics
required

A campaign’s current metric snapshot, or one bucket of a metric series. Ratios are decimal strings. A metric the origin did not send is absent, never zero. In a series every ratio is re-derived from the bucket’s sums (4 decimals, money 2) and is absent when its denominator is zero; share_of_voice is present on day buckets only.

object
spend
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
impressions
integer format: int64
clicks
integer format: int64
ctr
string
cpc
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
attributed_sales
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
acos
string
roas
string
remote_data
required

Marketplace-specific fields, keyed by marketplace and then by a documented key. Campaign: channel. Campaign metrics: share_of_voice (decimal string, a ratio in [0,1]). Ad group: status (the marketplace’s own), ad_group_type. Opportunity: action (an action outside the published set).

object
key
additional properties
object
key
additional properties
string
by_currency
required

One entry per currency of stores, sorted by currency. A currency whose every store is unavailable keeps its entry, with zeros and complete: false. Amounts of different currencies are never summed.

Array<object>

The ok and no_ads_account stores of one currency, summed per calendar date as each store’s zone labels it; ratios are re-derived from the sums and share of voice is never present.

object
currency
required
string
timezones
required

Distinct zones of the summed stores. More than one means a day bucket is the same calendar date in each zone, and the entry carries the warning ads_currency_mixed_timezones, which leaves complete unchanged.

Array<string>
store_ids
required

Opaque ids of the summed stores.

Array<string>
complete
required

False when a store of this currency is unavailable or not complete.

boolean
warnings
required
Array<string>
totals
required

A campaign’s current metric snapshot, or one bucket of a metric series. Ratios are decimal strings. A metric the origin did not send is absent, never zero. In a series every ratio is re-derived from the bucket’s sums (4 decimals, money 2) and is absent when its denominator is zero; share_of_voice is present on day buckets only.

object
spend
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
impressions
integer format: int64
clicks
integer format: int64
ctr
string
cpc
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
attributed_sales
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
acos
string
roas
string
remote_data
required

Marketplace-specific fields, keyed by marketplace and then by a documented key. Campaign: channel. Campaign metrics: share_of_voice (decimal string, a ratio in [0,1]). Ad group: status (the marketplace’s own), ad_group_type. Opportunity: action (an action outside the published set).

object
key
additional properties
object
key
additional properties
string
series
required

Every bucket of the window in order; empty for total.

Array<object>

One bucket, clipped to the window; a week starts on Monday.

object
start_date
required
string format: date
end_date
required
string format: date
metrics
required

A campaign’s current metric snapshot, or one bucket of a metric series. Ratios are decimal strings. A metric the origin did not send is absent, never zero. In a series every ratio is re-derived from the bucket’s sums (4 decimals, money 2) and is absent when its denominator is zero; share_of_voice is present on day buckets only.

object
spend
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
impressions
integer format: int64
clicks
integer format: int64
ctr
string
cpc
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
attributed_sales
object
amount
required

Decimal string.

string
currency
required

ISO 4217, uppercase.

string
acos
string
roas
string
remote_data
required

Marketplace-specific fields, keyed by marketplace and then by a documented key. Campaign: channel. Campaign metrics: share_of_voice (decimal string, a ratio in [0,1]). Ad group: status (the marketplace’s own), ad_group_type. Opportunity: action (an action outside the published set).

object
key
additional properties
object
key
additional properties
string
meta
required
object
dictionary_version
required
string
complete
required

True when every store is complete and no other warning says part of the window is missing or not final; ads_currency_mixed_timezones alone leaves it true.

boolean
warnings
required

Distinct union of the warnings of every store and currency entry: ads_metrics_today_partial, ads_store_unavailable, ads_source_partial, ads_unmapped_row_skipped, unmapped_store_skipped, ads_currency_mixed_timezones.

Array<string>

Example

{
"data": {
"period": {
"granularity": "day"
},
"stores": [
{
"status": "ok",
"currency": "ARS",
"timezone": "America/Argentina/Buenos_Aires",
"warnings": [
"ads_metrics_today_partial"
],
"totals": {
"spend": {
"amount": "250.0"
},
"cpc": {
"amount": "250.0"
},
"attributed_sales": {
"amount": "250.0"
}
},
"series": [
{
"metrics": {
"spend": {
"amount": "250.0"
},
"cpc": {
"amount": "250.0"
},
"attributed_sales": {
"amount": "250.0"
}
}
}
]
}
],
"by_currency": [
{
"currency": "USD",
"warnings": [
"ads_currency_mixed_timezones"
],
"totals": {
"spend": {
"amount": "250.0"
},
"cpc": {
"amount": "250.0"
},
"attributed_sales": {
"amount": "250.0"
}
},
"series": [
{
"metrics": {
"spend": {
"amount": "250.0"
},
"cpc": {
"amount": "250.0"
},
"attributed_sales": {
"amount": "250.0"
}
}
}
]
}
]
},
"meta": {
"dictionary_version": "1.0.0",
"warnings": [
"ads_metrics_today_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 marketplace or 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
}

The resource, or a requested store, is not this merchant’s or does not exist; the two are indistinguishable.

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 route or marketplace is published but its adapter is not available yet.

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 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.