Skip to main content

Customers

The portfolio: the debtors (individuals or companies) that charges belong to. statement-pdf produces the debtor statement, bulk-archive create archives up to 100 customers at once, and each customer's contact channels (e-mail, phone, WhatsApp, postal address) live under contact-points.

CommandHTTPDescription
people listGET /v1/peopleList customers
people createPOST /v1/peopleCreate customer
people getGET /v1/people/{id}Get customer
people updatePUT /v1/people/{id}Update customer
people deleteDELETE /v1/people/{id}Delete customer
people statement-pdfGET /v1/people/{id}/statement-pdfDebtor statement (PDF)
people bulk-archive createPOST /v1/people/bulk-archiveBulk-archive customers
people contact-points listGET /v1/people/{id}/contact-pointsList contact points
people contact-points createPOST /v1/people/{id}/contact-pointsCreate contact point
people contact-points updatePATCH /v1/people/{id}/contact-points/{cpId}Update contact point
people contact-points deleteDELETE /v1/people/{id}/contact-points/{cpId}Delete contact point

Examples​

--params carries query, path and header parameters (id, page, filters, X-Workspace-Id); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.

# List customers
kobana dunning people list \
--params '{"search": "Silva", "per_page": 50}' \
--fields "id,name,document_number,classification_id"

# Create a customer
kobana dunning people create \
--json '{"name": "Maria da Silva", "document_type": "cpf", "document_number": "12345678901"}'

# Debtor statement as PDF
kobana dunning people statement-pdf --params '{"id": "PERSON_ID"}' --output extrato.pdf

# Add a contact point
kobana dunning people contact-points create \
--params '{"id": "PERSON_ID"}' \
--json '{"channel": "whatsapp", "value": "+5511999990000", "is_primary": true}'

# Bulk-archive customers
kobana dunning people bulk-archive create \
--json '{"ids": ["PERSON_ID_1", "PERSON_ID_2"]}' --dry-run

Next steps​