> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zipdin.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Calcular oferta

> Calcula e valida uma oferta em faixa (mín/máx) antes de confirmá-la

Calcula/valida uma oferta em **faixa** (mín/máx) antes de confirmá-la — útil para simular condições sem
criar a oferta definitiva. O motor interno calcula IOF e CET a partir dos limites e taxas informados.

<Info>
  Todos os endpoints requerem autenticação via **Bearer token** no header `Authorization`.
  Consulte o [guia de autenticação](/docs/primeiros-passos/authentication) para obter suas credenciais e gerar um token.
</Info>

## Parâmetros

<ParamField body="action" type="string" required>
  `APROVADA` ativa todas as regras de negócio abaixo; qualquer outro valor pula essas validações
</ParamField>

<ParamField body="idRequest" type="integer" required />

<ParamField body="hasGuarantee" type="boolean" required />

<ParamField body="firstDueDate" type="string" required />

<ParamField body="creator" type="string" required>CNPJ — exatamente 14 caracteres</ParamField>

<ParamField body="issueDate" type="string" required />

<ParamField body="offerNoGuarantee" type="object" required>
  <Expandable>
    <ParamField body="offerNoGuarantee.installmentsNumber" type="integer" required />

    <ParamField body="offerNoGuarantee.installmentValue" type="number" required />

    <ParamField body="offerNoGuarantee.maxInstallmentValue" type="number" required />

    <ParamField body="offerNoGuarantee.minInstallmentValue" type="number" required>Deve ser ≤ `maxInstallmentValue`</ParamField>
    <ParamField body="offerNoGuarantee.maxLoanValue" type="number" required>> 0</ParamField>
    <ParamField body="offerNoGuarantee.minLoanValue" type="number" required>Deve ser ≤ `maxLoanValue`</ParamField>

    <ParamField body="offerNoGuarantee.monthlyRate" type="number" required />

    <ParamField body="offerNoGuarantee.creatorContacts" type="array">Opcional — mesmo formato de `POST /offers`</ParamField>
  </Expandable>
</ParamField>

<ParamField body="offerGuarantee" type="object">
  Obrigatório quando `hasGuarantee = true` e `action = APROVADA`. Mesmos campos de `offerNoGuarantee`, mais
  os três campos de garantia FGTS (ao menos um obrigatório) — mesmas regras de
  [Criar oferta](/docs/marketplace/criar-oferta).
</ParamField>

<ParamField body="creatorContext" type="array" required>
  Array de `{key, value}`
</ParamField>

## Exemplo

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://hml.zipdin.com.br/zipconsig-marketplace/offers-calculation \
    -H "Authorization: Bearer SEU_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "action": "APROVADA",
      "idRequest": 123,
      "hasGuarantee": false,
      "firstDueDate": "2026-07-20",
      "creator": "12345678000190",
      "issueDate": "2026-05-20",
      "offerNoGuarantee": {
        "installmentsNumber": 36,
        "installmentValue": 398.50,
        "maxInstallmentValue": 420.00,
        "minInstallmentValue": 380.00,
        "maxLoanValue": 12000.00,
        "minLoanValue": 8000.00,
        "monthlyRate": 2.49
      },
      "creatorContext": [{ "key": "origem", "value": "app" }]
    }'
  ```
</CodeGroup>
