Skip to main content

Customers

Who gets billed, their portal users and the consolidated statement. recalculate-mrr recomputes the customer's recurring revenue.

CommandHTTPDescription
customers listGET /v1/customersList customers
customers createPOST /v1/customersCreate a customer
customers getGET /v1/customers/{id}Get a customer
customers updatePATCH /v1/customers/{id}Update a customer
customers deleteDELETE /v1/customers/{id}Remove a customer (soft delete)
customers recalculate-mrrPOST /v1/customers/{id}/recalculate-mrrRecalculate the customer's MRR
customers statement getGET /v1/customers/{id}/statementList the customer's financial statement
customers statement sync createPOST /v1/customers/{id}/statement/syncRebuild the statement from history
customers users getGET /v1/customers/{id}/usersList the customer portal's users
customers users createPOST /v1/customers/{id}/usersInvite a portal user
customers users updatePATCH /v1/customers/{id}/users/{user_id}Update a portal user
customers users deleteDELETE /v1/customers/{id}/users/{user_id}Remove a portal user
customers users email-previewGET /v1/customers/{id}/users/{user_id}/email-previewPreview the portal user's e-mail
customers users resendPOST /v1/customers/{id}/users/{user_id}/resendRe-send the invitation or verification e-mail
customers users invite createPOST /v1/customers/{id}/users/inviteInvite 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​