Skip to main content
A Partner is any counterparty on an Entity’s books: a customer, a supplier, an employee, or a tax authority. Partners are referenced from Invoices, Ledger Lines with Open Items, and Bank Movement matches. This page covers Partner CRUD and the paginated Partner listing.
Source: apps/erp-backend/src/partner/partner.controller.ts. Base path: /api/entities/:entityId/partners.

GET /partners

List every Partner for the Entity, each row enriched with Open Item totals (unsettled AR and AP balances).
  • Response: array of partnerWithOpenTotalsSchema.

GET /partners/pages

Paginated Partner listing for UI use.
  • Query: ListPartnersPageQueryDto (cursor, page size, filters).
  • Response: partnersPageSchema ({ rows, nextCursor }).

POST /partners

Create a Partner.
  • Body: CreatePartnerDto.
  • Response: partnersPageRowSchema.

PATCH /partners/:partnerId

Update Partner attributes.
  • Body: UpdatePartnerDto.
  • Response: updatePartnerAnswerSchema.

DELETE /partners/:partnerId

Delete a Partner. Partners with outstanding Open Items or referenced Ledger Lines are refused.
  • Response: partnersPageRowSchema.

Status codes

Unverified: the exact set of fields on CreatePartnerDto and UpdatePartnerDto, including the country-specific tax ids (RUT for Chile, RFC for Mexico, and so on). Refer to the DTOs alongside the controller for authoritative shapes.