{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-parceiros/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Rate limits","description":"APIs públicas da Movvia para parceiros, estabelecimentos comerciais e clientes de dados veiculares.","meta":[{"name":"theme-color","content":"#7E3DEE"},{"name":"apple-mobile-web-app-title","content":"Movvia Docs"},{"name":"application-name","content":"Movvia Docs"}],"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"rate-limits","__idx":0},"children":["Rate limits"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"limites-padrão","__idx":1},"children":["Limites padrão"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Janela"},"children":["Janela"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Limite (produção)"},"children":["Limite (produção)"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Limite (sandbox)"},"children":["Limite (sandbox)"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Por minuto"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.000 req/min"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["100 req/min"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Por hora"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["10.000 req/hora"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1.000 req/hora"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Os limites são por credencial (par ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id:client_secret"]},"), não por IP."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"headers-de-controle","__idx":2},"children":["Headers de controle"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Toda resposta inclui headers de diagnóstico:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"X-RateLimit-Limit: 1000\nX-RateLimit-Remaining: 743\nX-RateLimit-Reset: 1745491200\n"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-RateLimit-Limit"]}," — limite da janela atual."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-RateLimit-Remaining"]}," — requisições restantes na janela."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-RateLimit-Reset"]}," — timestamp Unix do reset da janela."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resposta-429","__idx":3},"children":["Resposta 429"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ao atingir o limite, a API retorna ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429 Too Many Requests"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"erro\": \"RATE_LIMIT_EXCEEDED\",\n  \"mensagem\": \"Limite de requisições atingido. Tente novamente após o reset.\",\n  \"resetEm\": \"2026-04-24T10:01:00Z\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tratar-429-no-cliente","__idx":4},"children":["Tratar 429 no cliente"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Implemente retry com backoff exponencial:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"typescript","header":{"controls":{"copy":{}}},"source":"async function chamarComRetry(\n  fn: () => Promise<Response>,\n  tentativas = 3\n): Promise<Response> {\n  for (let i = 0; i < tentativas; i++) {\n    const res = await fn();\n    if (res.status !== 429) return res;\n\n    const reset = res.headers.get('X-RateLimit-Reset');\n    const aguardar = reset\n      ? Number(reset) * 1000 - Date.now()\n      : Math.pow(2, i) * 1000;\n\n    await new Promise(r => setTimeout(r, Math.max(aguardar, 0)));\n  }\n  throw new Error('Rate limit excedido após retries');\n}\n","lang":"typescript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"limites-customizados","__idx":5},"children":["Limites customizados"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Para volumes acima dos limites padrão, entre em contato com ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"mailto:comercial@movvia.com.br"},"children":["comercial@movvia.com.br"]},". Limites aumentados estão disponíveis no plano Enterprise."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success","name":"Distribuir requisições"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Em batch jobs (importação de placas em massa, reconciliação), distribua as requisições ao longo do tempo em vez de enviar tudo em burst. Use a janela de 1 hora como referência de planejamento."]}]}]},"headings":[{"value":"Rate limits","id":"rate-limits","depth":1},{"value":"Limites padrão","id":"limites-padrão","depth":2},{"value":"Headers de controle","id":"headers-de-controle","depth":2},{"value":"Resposta 429","id":"resposta-429","depth":2},{"value":"Tratar 429 no cliente","id":"tratar-429-no-cliente","depth":2},{"value":"Limites customizados","id":"limites-customizados","depth":2}],"frontmatter":{"title":"Rate limits — Parceiros Movvia","description":"Limites de requisições por credencial na API de Parceiros Movvia e como tratar respostas 429.","seo":{"title":"Rate limits"}},"lastModified":"2026-04-25T15:17:56.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/parceiros/guides/rate-limits","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}