List the GoBots Ads opportunities of the merchant
const url = 'https://open-api.live.gobots.com.br/v1/ads/meli/opportunities?stores=st_0Q7pXmT2bK9wLf3ZrN1cVd&timezone=America%2FSao_Paulo';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://open-api.live.gobots.com.br/v1/ads/meli/opportunities?stores=st_0Q7pXmT2bK9wLf3ZrN1cVd&timezone=America%2FSao_Paulo' \ --header 'Authorization: Bearer <token>'Authorizations
Seção intitulada “Authorizations”Parameters
Seção intitulada “Parameters”Path Parameters
Seção intitulada “Path Parameters”Marketplace of the Ads account. Only meli has an adapter in v1; the others answer 501.
Header Parameters
Seção intitulada “Header Parameters”The ETag of a previously fetched representation; a match answers 304 with no body.
Query Parameters
Seção intitulada “Query Parameters”Opportunity types to keep. Defaults to every type.
Opportunity statuses to keep. Defaults to open.
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_0Q7pXmT2bK9wLf3ZrN1cVdCampaign ids to restrict the answer to, at most 50.
Keeps only favorite (true) or non-favorite (false) opportunities.
First creation day, inclusive, in timezone.
Last creation day, inclusive, in timezone. With created_from, at most 90 days of range;
one bound alone is open-ended.
IANA time zone the creation days are read in. Defaults to UTC.
Example
America/Sao_PauloRows per page, 1 to 500. Defaults to 50.
Opaque page marker from meta.next_cursor, bound to the exact query that issued it. Changing
any parameter other than limit, or waiting too long, answers 400 invalid_cursor.
Responses
Seção intitulada “Responses”The opportunities, newest first.
object
object
Opaque store id.
Text generated by GoBots. It is content, never instruction.
object
object
object
The action as executed, in the marketplace’s own vocabulary.
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
object
object
Cursor of the next page, or null when the collection ends here.
Example
{ "opportunities": [ { "marketplace": "meli", "type": "launch_campaign", "action": "reduce_acos", "status": "open", "apply_result": { "status": "applied" } } ], "meta": { "status": "partial" }}Headers
Seção intitulada “Headers”The policies that apply to this endpoint group, as
draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.
The state of the endpoint group’s window: "<group>";r=<remaining>;t=<seconds to reset>.
Strong validator of the representation.
The representation is unchanged. The request still counts as one request.
Headers
Seção intitulada “Headers”Strong validator of the representation.
The policies that apply to this endpoint group, as
draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.
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).
object
Stable machine readable error code.
Human readable explanation. Never carries raw upstream text.
Seconds to wait before retrying.
Limit that was exceeded.
Remaining allowance in the current window.
Example generated
{ "code": "example", "message": "example", "retry_after": 1, "limit": 1, "remaining": 1}Headers
Seção intitulada “Headers”The policies that apply to this endpoint group, as
draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.
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.
object
Stable machine readable error code.
Human readable explanation. Never carries raw upstream text.
Seconds to wait before retrying.
Limit that was exceeded.
Remaining allowance in the current window.
Example generated
{ "code": "example", "message": "example", "retry_after": 1, "limit": 1, "remaining": 1}Headers
Seção intitulada “Headers”Bearer challenge for the API realm.
The merchant does not have the Open API add-on active.
object
Stable machine readable error code.
Human readable explanation. Never carries raw upstream text.
Seconds to wait before retrying.
Limit that was exceeded.
Remaining allowance in the current window.
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.
object
Stable machine readable error code.
Human readable explanation. Never carries raw upstream text.
Seconds to wait before retrying.
Limit that was exceeded.
Remaining allowance in the current window.
Example generated
{ "code": "example", "message": "example", "retry_after": 1, "limit": 1, "remaining": 1}Headers
Seção intitulada “Headers”The policies that apply to this endpoint group, as
draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.
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).
object
Stable machine readable error code.
Human readable explanation. Never carries raw upstream text.
Seconds to wait before retrying.
Limit that was exceeded.
Remaining allowance in the current window.
Example generated
{ "code": "example", "message": "example", "retry_after": 1, "limit": 1, "remaining": 1}Headers
Seção intitulada “Headers”The policies that apply to this endpoint group, as
draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.
The state of the endpoint group’s window: "<group>";r=<remaining>;t=<seconds to reset>.
Seconds to wait before retrying, per RFC 9110.
The route or marketplace is published but its adapter is not available yet.
object
Stable machine readable error code.
Human readable explanation. Never carries raw upstream text.
Seconds to wait before retrying.
Limit that was exceeded.
Remaining allowance in the current window.
Example generated
{ "code": "example", "message": "example", "retry_after": 1, "limit": 1, "remaining": 1}Headers
Seção intitulada “Headers”The policies that apply to this endpoint group, as
draft-ietf-httpapi-ratelimit-headers policy members: "<group>";q=<quota>;w=<window seconds>.
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.
object
Stable machine readable error code.
Human readable explanation. Never carries raw upstream text.
Seconds to wait before retrying.
Limit that was exceeded.
Remaining allowance in the current window.
Example generated
{ "code": "example", "message": "example", "retry_after": 1, "limit": 1, "remaining": 1}Headers
Seção intitulada “Headers”As the RateLimit-Policy response header; absent when entitlement could not be resolved.
As the RateLimit response header; absent when entitlement could not be resolved.