Skip to main content

Postman and SDKs

You do not need to build requests from scratch: the Postman collection and the OpenAPI spec are generated from the same source as the API Reference and always stay in sync with it.

Postman collection

Collections in Postman v2.1 format, one per language:

Each collection comes organized in folders per resource (Customers, Charges, Agreements, Disputes, Tasks, Interactions, Notifications, Collection rules, Message templates, Classifications, Negotiation campaigns, Negativations, Protests, Imports, Exports, Webhooks, Audit trail, Metrics, Email layouts, Notification preferences), with ready-made body examples. Optional parameters come disabled, so the request runs clean on the first try.

Import and configure

  1. In Postman: Import → drag the JSON in (or paste the URL).
  2. Fill in the collection's two variables:
    • baseUrl: comes preset with production (https://dunning.kobana.com.br/api/v1);
    • bearerToken: your API key.
  3. Run GET /people to validate the setup and explore the folders.

The same collection works in Insomnia and Bruno (both import Postman v2.1); for those tools, importing the OpenAPI spec directly (below) usually gives even better results.

OpenAPI: the source of truth

The OpenAPI 3.1 spec is available in the three languages, straight from the API:

GET https://dunning.kobana.com.br/api/v1/openapi.yaml?locale=pt|en|es
GET https://dunning.kobana.com.br/api/v1/openapi.json?locale=pt|en|es

Without ?locale=, Accept-Language applies (default: Portuguese). Details in OpenAPI specifications.

Generating an SDK

There are no official per-language SDKs; the supported path is generating a client from the OpenAPI spec, which describes all endpoints, schemas and error codes. With the OpenAPI Generator:

# TypeScript (fetch)
openapi-generator-cli generate \
-i https://dunning.kobana.com.br/api/v1/openapi.yaml \
-g typescript-fetch -o ./dunning-client

# Outras linguagens: -g python | go | ruby | php | csharp | java ...

Two things to take care of in the generated client:

  • Configure the User-Agent identifying your integration (it is required).
  • Send X-Idempotency-Key on mutations; generators do not do this on their own (why).

Staying up to date

The reference, the collection and the spec all come from the same versioned OpenAPI source. When the API gains features, re-import the collection (Postman preserves your variables) or re-generate the client pointing at the spec URL.