Customers
Who gets billed, their portal users and the consolidated statement. recalculate-mrr recomputes the customer's recurring revenue.
| Command | HTTP | Description |
|---|---|---|
customers list | GET /v1/customers | List customers |
customers create | POST /v1/customers | Create a customer |
customers get | GET /v1/customers/{id} | Get a customer |
customers update | PATCH /v1/customers/{id} | Update a customer |
customers delete | DELETE /v1/customers/{id} | Remove a customer (soft delete) |
customers recalculate-mrr | POST /v1/customers/{id}/recalculate-mrr | Recalculate the customer's MRR |
customers statement get | GET /v1/customers/{id}/statement | List the customer's financial statement |
customers statement sync create | POST /v1/customers/{id}/statement/sync | Rebuild the statement from history |
customers users get | GET /v1/customers/{id}/users | List the customer portal's users |
customers users create | POST /v1/customers/{id}/users | Invite a portal user |
customers users update | PATCH /v1/customers/{id}/users/{user_id} | Update a portal user |
customers users delete | DELETE /v1/customers/{id}/users/{user_id} | Remove a portal user |
customers users email-preview | GET /v1/customers/{id}/users/{user_id}/email-preview | Preview the portal user's e-mail |
customers users resend | POST /v1/customers/{id}/users/{user_id}/resend | Re-send the invitation or verification e-mail |
customers users invite create | POST /v1/customers/{id}/users/invite | Invite a portal user (verb) |
Examples
--params carries query and path parameters (id, page, filters); --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 billing customers list \
--fields "id,public_id,external_id,name,nickname"
# Get a customer
kobana billing customers get --params '{"id": "CUSTOMER_ID"}'
# Create a customer
kobana billing customers create --json '{"name": "NAME"}'
# Update a customer
kobana billing customers update \
--params '{"id": "CUSTOMER_ID"}' \
--json '{"name": "NAME", "external_id": "EXTERNAL_ID", "nickname": "NICKNAME"}'
# Recalculate the customer's MRR
kobana billing customers recalculate-mrr --params '{"id": "CUSTOMER_ID"}'
# Remove a customer (soft delete)
kobana billing customers delete --params '{"id": "CUSTOMER_ID"}' --dry-run
Next steps
- Companies
- Schema introspection — every parameter this resource accepts.