Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Bem-vindo ao nosso novo hub de docs! Central de Ajuda + Docs para Desenvolvedores em um só lugar.
Paginação baseada em cursor para endpoints de listagem.
{ "data": [...], "pagination": { "cursor": "eyJpZCI6IjEyMyJ9", "hasMore": true, "total": 487 } }
cursor
# Primeira página (padrão: 50 itens) curl ".../brands?limit=20" # Próxima página curl ".../brands?limit=20&cursor=eyJpZCI6IjEyMyJ9"
limit
async function fetchAllBrands(workspaceId) { let cursor = null; const allBrands = []; do { const url = new URL(`.../brands`); url.searchParams.set('limit', '100'); if (cursor) url.searchParams.set('cursor', cursor); const response = await fetch(url, { headers: { Authorization: `Bearer ${apiKey}` } }); const { data, pagination } = await response.json(); allBrands.push(...data); cursor = pagination.hasMore ? pagination.cursor : null; } while (cursor); return allBrands; }