v2_get_brands
Find a brand ID before requesting its reports. Use the categories view to find approved category IDs for brand setup.
See the REST reference for GET /v2/brands.
Signature
v2_get_brands(
*,
category_id: str | None = None,
country: str | None = None,
cursor: str | None = None,
id: str | None = None,
include_archived: bool | None = None,
limit: int | None = None,
q: str | None = None,
view: Literal['brands', 'categories'] | None = None,
) -> Response[Any]Parameters
category_id- Identifier for the category.
country- Filter results by country.
cursor- Pass the previous page's next cursor with the original filters.
id- Fetch a specific record by its identifier.
include_archived- Include archived records when listing results.
limit- Maximum number of records per page. Each view sets its own limit.
q- Text to search for in this list.
view- Choose the result to read. See the linked REST reference for the fields and access each view requires.
Return value
The brands view returns response.data['items']. Read response.next_cursor for the next page.
Errors
- AeoApiError includes the HTTP status, error code and request ID. An invalid key raises UnauthenticatedError. Check the key’s scopes if you receive ForbiddenError.
- Invalid arguments can raise ValueError or TypeError before the SDK sends a request.
- AeoTransportError means the request could not reach the API after any allowed retries, or the response could not be read as JSON.
- PreconditionFailedError means the revision has changed. Read the current record before editing it again.
- For a conflict, read the error message before repeating the write. Check the saved record for a competing edit or a repeated request.
Python example
import os
from aeo_sdk import AeoClient
with AeoClient(os.environ["AEO_API_KEY"], base_url=os.environ["AEO_API_BASE_URL"]) as client:
response = client.v2_get_brands(
limit=10,
)
print(response.body)Async example
import asyncio
import os
from aeo_sdk import AsyncAeoClient
async def main():
async with AsyncAeoClient(os.environ["AEO_API_KEY"], base_url=os.environ["AEO_API_BASE_URL"]) as client:
response = await client.v2_get_brands(
limit=10,
)
print(response.body)
asyncio.run(main())Requests by feature
Brands, locations and connections
See Python client setup for the environment variables, response properties and retry settings.