Emissão de boleto registrado

Changed on

Gere um boleto registrado através desta API

post/

Request

  • Base URL
    https://api.stage.cora.com.br/v2/invoices
  • URL
    https://api.stage.cora.com.br/v2/invoices/
  • Auth
    OAuth 2

Headers

Idempotency-Keystring required

UUID aleatório gerado por você. Nós utilizamos esse header para evitar duplicidade de registros, ou seja, caso você não tenha recebido a resposta de alguma requisição e mandar o mesmo UUID, nós não duplicaremos o registro.

Request body

codestring
payment_formsstring[]

Para criar um boleto com opção de pagamento por QR code é preciso inserir as opções de "BANK_SLIP" e "PIX".

Response

200

OR

Example response

{
  "id": "inv_yOgInV7rSPu90wOp21ekGyQ",
  "status": "OPEN",
  "created_at": "2022-03-09T18:08:38Z",
  "total_amount": 1000,
  "code": "meu_id",
  "customer": {
    "name": "Gol Transportes Aereos Sa",
    "email": "email@email.com",
    "document": {
      "identity": "34052649000178",
      "type": "CNPJ"
    },
    "address": {
      "street": "Rua Gomes de Carvalho",
      "number": "1629",
      "district": "Vila Olímpia",
      "city": "São Paulo",
      "state": "SP",
      "complement": "N/A",
      "zip_code": "00111222"
    }
  },
  "services": [
    {
      "name": "Nome Do Serviço",
      "description": "Descrição do serviço",
      "amount": 1000,
      "unit": "AMOUNT"
    }
  ],
  "payment_terms": {
    "due_date": "2022-12-12",
    "fine": {
      "date": "2022-12-13",
      "amount": 200
    },
    "interest": {
      "rate": 3.67
    },
    "discount": {
      "percent": 1.5
    }
  },
  "payment_options": {
    "bank_slip": {
      "barcode": "00197914200000020000000003215837001258458017",
      "digitable": "00190000090321583700012584580174791420000002000",
      "our_number": "32158370012584580",
      "registered": true,
      "url": "https://storage.googleapis.com/download/storage/v1/b/cora_production_exporter_bankslip_storage/o/boleto-cdc8763a-e436-49b2-a5ad-14625e84dbf3.pdf?generation=1654625979053761&alt=media"
    }
  },
  "notifications": {
    "id": "64c88980-ec00-43f7-b119-0cf9ea38da75",
    "channels": [
      "EMAIL"
    ],
    "destination": {
      "name": "Fulano Ciclano Oliveira",
      "email": "email@email.com"
    },
    "schedules": [
      {
        "rule": "NOTIFY_TWO_DAYS_BEFORE_DUE_DATE",
        "status": "CREATED",
        "scheduledTo": "2022-12-10",
        "active": true
      }
    ]
  }
}

Changes

    • breaking

      added the new required header request parameter Idempotency-Key

    • breaking

      added subschema #1 subschema #2: QR Code Pix to the response body oneOf list for the response status

    • breaking

      added subschema #1: Past Date subschema #2: Null Parameter subschema #3: Idempotency-Key Required to the response body oneOf list for the response status

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      api path removed without deprecation

    • warning

      deleted the header request parameter connection

    • warning

      deleted the header request parameter content-length

    • warning

      deleted the header request parameter user-agent

    • warning

      deleted the header request parameter webhook-event-id

    • warning

      deleted the header request parameter webhook-event-type

    • warning

      deleted the header request parameter webhook-resource-id

    • warning

      removed the optional property from the response with the status

    • info

      api operation id exemplo-de-post-da-notificação removed and replaced with emissão-de-boleto-registrado

    • info

      added optional request body

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status