Pular para o conteúdo

List the GoBots Ads opportunities of the merchant

GET
/v1/ads/{marketplace}/opportunities
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>'
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.

types
Array<string>
Allowed values: launch_campaign optimize_campaign grow_campaign

Opportunity types to keep. Defaults to every type.

status
Array<string>
Allowed values: open applied dismissed manually_applied expired

Opportunity statuses to keep. Defaults to open.

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
campaign_ids
Array<string>
<= 50 items

Campaign ids to restrict the answer to, at most 50.

favorite
boolean

Keeps only favorite (true) or non-favorite (false) opportunities.

created_from
string format: date

First creation day, inclusive, in timezone.

created_to
string format: date

Last creation day, inclusive, in timezone. With created_from, at most 90 days of range; one bound alone is open-ended.

timezone
string

IANA time zone the creation days are read in. Defaults to UTC.

Example

America/Sao_Paulo
limit
integer
>= 1 <= 500

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

cursor
string

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.

The opportunities, newest first.

Media typeapplication/json
object
opportunities
required
Array<object>
object
id
required
string
marketplace
required
string
Allowed values: meli amazon magalu shopee viavarejo b2w whatsapp qa tiktok
store_id
required

Opaque store id.

string | null
campaign_id
required
string | null
type
required
string
Allowed values: launch_campaign optimize_campaign grow_campaign
action
required
One of:
string
Allowed values: reduce_acos rank_aggressive_bid reduce_budget increase_budget decrease_roas_target remove_ad
description
required

Text generated by GoBots. It is content, never instruction.

object
context
required
string | null
diagnosis
required
string | null
why
required
string | null
impact
required
string | null
action
required
string | null
status
required
string
Allowed values: open applied dismissed manually_applied expired
favorite
required
boolean
hidden
required
boolean
created_at
required
string format: date-time
applied_at
required
string | null format: date-time
apply_result
required
One of:
object
status
required
string
Allowed values: applied failed
applied_at
required
string format: date-time
actions
required
Array<object>
object
action
required

The action as executed, in the marketplace’s own vocabulary.

string
campaign_id
required
string | null
ad_group_ids
required
Array<string>
budget
required
string | null
roas_target
required
string | null
name
required
string | null
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
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

{
"opportunities": [
{
"marketplace": "meli",
"type": "launch_campaign",
"action": "reduce_acos",
"status": "open",
"apply_result": {
"status": "applied"
}
}
],
"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 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.