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.
| Command | HTTP | Description |
|---|---|---|
people list | GET /v1/people | List customers |
people create | POST /v1/people | Create customer |
people get | GET /v1/people/{id} | Get customer |
people update | PUT /v1/people/{id} | Update customer |
people delete | DELETE /v1/people/{id} | Delete customer |
people statement-pdf | GET /v1/people/{id}/statement-pdf | Debtor statement (PDF) |
people bulk-archive create | POST /v1/people/bulk-archive | Bulk-archive customers |
people contact-points list | GET /v1/people/{id}/contact-points | List contact points |
people contact-points create | POST /v1/people/{id}/contact-points | Create contact point |
people contact-points update | PATCH /v1/people/{id}/contact-points/{cpId} | Update contact point |
people contact-points delete | DELETE /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​
- Classifications
- Schema introspection — every parameter this resource accepts.