Skip to main content

kobana billing certificates

Commands of kobana billing certificates. Every global option (Global options) applies here.

CommandHTTPDescription
certificates listGET /v1/certificatesList digital certificates
certificates createPOST /v1/certificatesUpload digital certificate
certificates getGET /v1/certificates/{id}Get certificate
certificates deleteDELETE /v1/certificates/{id}Delete certificate

certificates list​

List digital certificates

kobana billing certificates list [OPTIONS]

GET /v1/certificates

Returns a paginated list of the current organization’s digital (A1) certificates. For security reasons, the response never includes the private key nor the PFX password — only metadata extracted from the certificate.

Query parameters

NameTypeRequiredDescription
pageintegernoPage (starts at 1). Default: 1.
per_pageintegernoItems per page. Default: 20. Maximum: 100.
sort_bystringnoSort field. Default depends on the resource.
sort_orderstringnoSort direction. Default: desc. Values: asc, desc.
person_idstringnoFilter by associated person UUID.
person_document_numberstringnoFilter by person CPF/CNPJ (exact match).
person_name_containsstringnoFilter by person name (partial search, case-insensitive).
statusstringnoFilter by certificate status. expiring_soon returns active certificates expiring within 30 days. Values: active, expired, revoked, expiring_soon.
searchstringnoFree-text search in name, common_name, document or organization_name.
formatstringnoFilter by stored certificate format (pfx, pem).
documentstringnoFilter by CPF or CNPJ extracted from the certificate (digits only).
serial_numberstringnoFilter by certificate serial number.
not_after_fromstringnoReturns certificates whose expiry date (not_after) is greater than or equal to the given date (ISO 8601).
not_after_tostringnoReturns certificates whose expiry date (not_after) is less than or equal to the given date (ISO 8601).
not_before_fromstringnoReturns certificates whose validity start date (not_before) is greater than or equal to the given date (ISO 8601).
not_before_tostringnoReturns certificates whose validity start date (not_before) is less than or equal to the given date (ISO 8601).
created_afterstringnoReturns certificates created from the given date (ISO 8601).
created_beforestringnoReturns certificates created up to the given date (ISO 8601).

Responses

HTTPDescription
200Paginated list of certificates.
404Resource not found in the current organization.

certificates create​

Upload digital certificate

kobana billing certificates create [OPTIONS]

POST /v1/certificates

Uploads an A1 digital certificate via multipart/form-data. The private key and password are encrypted at rest and are never returned by the API. The endpoint detects duplicates by thumbprint and automatically associates the certificate with a person based on the extracted CNPJ/CPF.

Accepted type values:

  • pfx — send file (binary PFX/P12) and password.
  • cert_key — send cert_file (certificate PEM) and key_file (key PEM).
  • combined_pem — send file (PEM containing certificate + key).
  • cert_key_password — send cert_file, key_file and password (password-protected key).

Request body

Sent as a multipart/form-data form: files go in --file FIELD=PATH.

NameTypeRequiredDescription
typestringyesUpload format: pfx, cert_key, combined_pem or cert_key_password. Values: pfx, cert_key, combined_pem, cert_key_password.
namestringnoFriendly certificate name. When omitted, it is derived from common_name or the document.
filestring (binary)noBinary file (PFX/P12) when type=pfx, or combined PEM when type=combined_pem.
cert_filestring (binary)noCertificate PEM file (only for type=cert_key or type=cert_key_password).
key_filestring (binary)noPrivate key PEM file (only for type=cert_key or type=cert_key_password).
passwordstringnoPFX password (type=pfx) or private key password (type=cert_key_password). Stored encrypted and never returned.
external_idstringnoIdentifier in your external system, for idempotency/sync.

More fields and nested objects: kobana schema billing.certificates.create.

Responses

HTTPDescription
201Certificate uploaded and stored successfully.
400Request body failed validation.
404Resource not found in the current organization.
422Request body failed validation.

certificates get​

Get certificate

kobana billing certificates get [ID] [OPTIONS]

GET /v1/certificates/{id}

Path arguments: id

Responses

HTTPDescription
200Certificate detail (no sensitive data).
404Resource not found in the current organization.

certificates delete​

Delete certificate

kobana billing certificates delete [ID] [OPTIONS]

DELETE /v1/certificates/{id}

Removes the certificate via soft delete. Encrypted data remains in the database for audit purposes only.

Path arguments: id

Responses

HTTPDescription
200Certificate deleted.
404Resource not found in the current organization.