Companies
The issuing companies — who is charging. They carry the fiscal profile used when issuing invoices, and one of them is the default.
| Command | HTTP | Description |
|---|---|---|
companies list | GET /v1/companies | List companies |
companies create | POST /v1/companies | Create a company |
companies get | GET /v1/companies/{id} | Get a company by ID |
companies update | PATCH /v1/companies/{id} | Update a company |
companies delete | DELETE /v1/companies/{id} | Delete a company |
companies deactivate | POST /v1/companies/{id}/deactivate | Deactivate a company (POST /deactivate) |
companies reactivate | POST /v1/companies/{id}/reactivate | Reactivate a company |
companies set-default | POST /v1/companies/{id}/set-default | Set the default company |
companies fiscal get | GET /v1/companies/{id}/fiscal | Get the fiscal profile |
companies fiscal update | PATCH /v1/companies/{id}/fiscal | Update the fiscal profile |
companies fiscal-profile get | GET /v1/companies/{id}/fiscal-profile | Get the fiscal profile (alias) |
companies fiscal-profile update | PATCH /v1/companies/{id}/fiscal-profile | Update the fiscal profile (alias) |
companies matriz list | GET /v1/companies/matriz | List head offices |
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 companies
kobana billing companies list \
--fields "id,public_id,external_id,organization_id,person_id"
# Get a company by ID
kobana billing companies get --params '{"id": "COMPANIE_ID"}'
# Create a company
kobana billing companies create \
--json '{"name": "NAME", "document_type": "cpf", "document_number": "DOCUMENT_NUMBER", "email": "EMAIL"}'
# Update a company
kobana billing companies update \
--params '{"id": "COMPANIE_ID"}' \
--json '{"name": "NAME", "external_id": "EXTERNAL_ID", "legal_name": "LEGAL_NAME"}'
# Deactivate a company (POST /deactivate)
kobana billing companies deactivate --params '{"id": "COMPANIE_ID"}'
# Delete a company
kobana billing companies delete --params '{"id": "COMPANIE_ID"}' --dry-run
Next steps
- Organization
- Schema introspection — every parameter this resource accepts.