Skip to main content
GET
List deals
Each deal comes with its progress: installmentInfo (paid invoices over installments), nextDueDate (the earliest invoice still to be paid) and totalAmount (what its invoices are expected to charge in total). Filter by status, payer document (debitPartyDocuments, several at once), payer organization (debitPartyOrgIds, several at once: it matches the organization of the payer’s Portão 3 wallet, so a payer with no wallet is found by its document instead), charge type, number of installments, a text in the description, the start and end dates, and the creation date (startDate/endDate). Dates are read in UTC: a date without a time is its midnight. Sort with order and orderBy, and page with limit + next: pass the next of one page to get the following one — the last page answers next: null. Any member of the organization, or an admin of the realm, can list them.

Path Parameters

realmId
string<uuid>
required

ID of your realm.

Format: UUID

organizationId
string<uuid>
required

ID of your organization: the one whose deals you list.

Format: UUID

Query Parameters

status
enum<string>[]

Only deals in these statuses.


Example (comma-separated list): ?status=OPEN,TERMINATED

Available options:
OPEN,
CANCELED,
TERMINATED,
EXPIRED,
REVOKED
debitPartyDocuments
string[]

Only deals whose debit party has one of these documents (exact match).


Example (comma-separated list): ?debitPartyDocuments=11144477735,39053344705

debitPartyOrgIds
string<uuid>[]

Only deals whose payer (the debit party) pays from a Portão 3 wallet of one of these organizations. It matches the organization of the payer's wallet, so a payer with no wallet (a customer who pays by boleto or PIX, for example) is not found by it: filter by debitPartyDocuments instead.

Format: UUID


Example: ?debitPartyOrgIds=5e0a1c2b-3d4f-4a6b-8c9d-0e1f2a3b4c5d

chargeType
enum<string>

Only deals with this charge type.

Available options:
SINGLE,
RECURRENT,
SUBSCRIPTION
numberOfInstallments
integer

Only deals with exactly this number of installments.

Required range: x >= 1
description
string

Only deals whose description contains this text (case-insensitive).

Maximum string length: 250
startAt

Only deals that start on or after this date (ISO 8601 date or date-time).

endAt

Only deals that end on or before this date (ISO 8601 date or date-time). Combines with endAtFrom and endAtTo: every bound you send applies.

endAtFrom

Only deals that end on or after this date, inclusive (ISO 8601 date or date-time). Send endAtTo as well for a closed range.

endAtTo

Only deals that end on or before this date, inclusive (ISO 8601 date or date-time). Send endAtFrom as well for a closed range.

startDate

Only deals created on or after this date, inclusive (ISO 8601 date or date-time). Send endDate as well for a closed window.

endDate

Only deals created on or before this date, inclusive (ISO 8601 date or date-time). Send startDate as well for a closed window.

order
enum<string>
default:DESC

Sort direction. Case-insensitive.

Available options:
ASC,
DESC
orderBy
enum<string>
default:createdAt

Field to sort the deals by.

Available options:
createdAt,
description,
startAt
limit
integer
default:15

Page size.

Required range: 1 <= x <= 1000
next
string

Cursor returned as next by the previous page; it must be valid base64. Omit it for the first page. Use it with the same filters and order: a cursor that no longer matches a deal returns the first page.

Maximum string length: 128
Pattern: ^[A-Za-z0-9+/]+={0,2}$

Response

Successful response

A page of deals.

items
object[]
required

The deals of this page.

next
string | null
required

Cursor for the next page: pass it as next to get it. null on the last page.

Example:

"NjcxMWI0YzBkOGUxYTMwMDEyYjdjOWYy"