Saltar al contenido principal

kobana finance custom-classifiers

Comandos de kobana finance custom-classifiers. Toda opción global (Opciones globales) vale aquí.

ComandoHTTPDescripción
custom-classifiers values updatePATCH /v1/custom-classifiers/{id}/values/{valueId}Actualizar valor de clasificador personalizado
custom-classifiers values deleteDELETE /v1/custom-classifiers/{id}/values/{valueId}Eliminar valor de clasificador personalizado
custom-classifiers values createPOST /v1/custom-classifiers/{id}/valuesAgregar valor a un clasificador personalizado
custom-classifiers listGET /v1/custom-classifiersListar clasificadores personalizados
custom-classifiers createPOST /v1/custom-classifiersCrear clasificador personalizado
custom-classifiers getGET /v1/custom-classifiers/{id}Obtener clasificador personalizado por ID
custom-classifiers updatePATCH /v1/custom-classifiers/{id}Actualizar clasificador personalizado
custom-classifiers deleteDELETE /v1/custom-classifiers/{id}Eliminar clasificador personalizado

custom-classifiers values update​

Actualizar valor de clasificador personalizado

kobana finance custom-classifiers values update [ID] [VALUEID] [OPCIONES]

PATCH /v1/custom-classifiers/{id}/values/{valueId}

Partial update of a value's value, color, active. Requires scope finance/custom_classifiers with access level write. Send active: false to soft-deactivate, or color: null to clear the swatch.

Argumentos de la ruta: id, valueId

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Cuerpo de la solicitud

NombreTipoObligatorioDescripción
valuestringno
colorstringnoHex swatch, or null to clear it and fall back to the palette.
activebooleanno
custom_metadataobjectnoMetadados do usuário: objeto JSON livre. Envie null para limpar. Máx. 64 KB serializado, 16 níveis.
custom_metadata_modestringnoComo o custom_metadata enviado é reconciliado com o valor armazenado: replace (padrão) substitui o objeto inteiro, merge faz deep merge sobre o valor atual. Aceito apenas na atualização. Valores: replace, merge.

Otros campos y objetos anidados: kobana schema finance.custom-classifiers.values.update.

Respuestas

HTTPDescripción
200Updated value.
400Malformed JSON body.
404Value (or its parent dimension) not found within the tenant.
409X-Idempotency-Key reused with a different body.
422Schema validation failure.

custom-classifiers values delete​

Eliminar valor de clasificador personalizado

kobana finance custom-classifiers values delete [ID] [VALUEID] [OPCIONES]

DELETE /v1/custom-classifiers/{id}/values/{valueId}

Deletes a value. Requires scope finance/custom_classifiers with access level delete. Returns 422 (reason: in_use) when the value is assigned to a payable / receivable / transaction — soft-deactivate via PATCH { active: false } instead.

Argumentos de la ruta: id, valueId

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Respuestas

HTTPDescripción
200Value deleted.
404Value (or its parent dimension) not found within the tenant.
422The value is in use (reason: in_use).

custom-classifiers values create​

Agregar valor a un clasificador personalizado

kobana finance custom-classifiers values create [ID] [OPCIONES]

POST /v1/custom-classifiers/{id}/values

Adds a value to the dimension. Requires scope finance/custom_classifiers with access level write. Pass an X-Idempotency-Key header on retries.

Argumentos de la ruta: id

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Cuerpo de la solicitud

NombreTipoObligatorioDescripción
valuestringsí
colorstringnoHex swatch (#rrggbb or #rrggbbaa). Omit for an auto-assigned palette color.
activebooleannoDefaults to true.
custom_metadataobjectnoMetadados do usuário: objeto JSON livre. Envie null para limpar. Máx. 64 KB serializado, 16 níveis.

Otros campos y objetos anidados: kobana schema finance.custom-classifiers.values.create.

Respuestas

HTTPDescripción
201Value created. The Location header points at the new value.
400Malformed JSON body.
404Parent custom classifier not found within the tenant.
409X-Idempotency-Key reused with a different body.
422Schema validation failure.

custom-classifiers list​

Listar clasificadores personalizados

kobana finance custom-classifiers list [OPCIONES]

GET /v1/custom-classifiers

Returns a cursor-paginated page of custom classifiers (user-defined classification dimensions) for the workspace tied to the token's sub claim. Each dimension carries its values[] inline. Company-scoped — pass ?company_id=… to narrow. Requires scope finance/custom_classifiers with access level read.

Parámetros de consulta

NombreTipoObligatorioDescripción
company_idstringnoFilter by owning company UUID. Accepts [in]=uuid1,uuid2 for OR matching.
activestringnoFilter by active flag. true returns only active; omit to return both. Valores: true, false.
namestringnoFilter by exact name. Accepts [in].
sort_bystringnoField to order by. Default: sort_by=name&sort_order=asc. Valores: created_at, name.
sort_orderstringnoOrder direction. Defaults to asc; ignored without sort_by. Valores: asc, desc.
limitintegernoPage size. Default 25, max 100.
cursorstringnoOpaque cursor for the next page. Round-trip meta.next_cursor from the previous response.
fieldsstringnoComma-separated top-level fields to return, e.g. fields=description,amount,due_date. Omit for every field. id is always included; naming an object field returns it whole. An unknown name is a 400 whose details lists unknown and available.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Respuestas

HTTPDescripción
200Page of custom classifiers plus pagination metadata.
400Malformed query (unknown filter / operator, invalid limit, bad cursor).

custom-classifiers create​

Crear clasificador personalizado

kobana finance custom-classifiers create [OPCIONES]

POST /v1/custom-classifiers

Creates a custom classifier dimension. Requires scope finance/custom_classifiers with access level write. workspace_id is taken from the token. Add values with POST /custom-classifiers/{id}/values. Pass an X-Idempotency-Key header on retries.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Cuerpo de la solicitud

NombreTipoObligatorioDescripción
company_idstring (uuid)síOwning company UUID. Must belong to the tenant.
namestringsí
field_typestringnoDefaults to dropdown. Valores: dropdown, radio, multi_select, number, text, phone, url, date, datetime.
number_formatstringnoOnly meaningful for number (defaults to formatted); ignored otherwise. Valores: formatted, unformatted, currency, percent, null.
option_stylestringnoOnly meaningful for list types (defaults to default); ignored otherwise. Valores: default, dot, null.
activebooleannoDefaults to true.
custom_metadataobjectnoMetadados do usuário: objeto JSON livre. Envie null para limpar. Máx. 64 KB serializado, 16 níveis.

Otros campos y objetos anidados: kobana schema finance.custom-classifiers.create.

Respuestas

HTTPDescripción
201Custom classifier created. The Location header points at the new row.
400Malformed JSON body.
409X-Idempotency-Key reused with a different body.
422Schema validation failure, or company_id not in the tenant.

custom-classifiers get​

Obtener clasificador personalizado por ID

kobana finance custom-classifiers get [ID] [OPCIONES]

GET /v1/custom-classifiers/{id}

Returns the same shape as the rows from the list endpoint. Requires scope finance/custom_classifiers with access level read. 404 covers both "doesn't exist" and "not in the tenant" — the API does not distinguish.

Argumentos de la ruta: id

Parámetros de consulta

NombreTipoObligatorioDescripción
fieldsstringnoComma-separated top-level fields to return, e.g. fields=description,amount,due_date. Omit for every field. id is always included; naming an object field returns it whole. An unknown name is a 400 whose details lists unknown and available.

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Respuestas

HTTPDescripción
200Get a custom classifier by id
404Custom classifier not found within the tenant.

custom-classifiers update​

Actualizar clasificador personalizado

kobana finance custom-classifiers update [ID] [OPCIONES]

PATCH /v1/custom-classifiers/{id}

Partial update of name, field_type, number_format, option_style, active. Requires scope finance/custom_classifiers with access level write. Send active: false to soft-deactivate (existing assignments are preserved).

Argumentos de la ruta: id

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Cuerpo de la solicitud

NombreTipoObligatorioDescripción
namestringno
field_typestringnoValores: dropdown, radio, multi_select, number, text, phone, url, date, datetime.
number_formatstringnoValores: formatted, unformatted, currency, percent, null.
option_stylestringnoValores: default, dot, null.
activebooleanno
custom_metadataobjectnoMetadados do usuário: objeto JSON livre. Envie null para limpar. Máx. 64 KB serializado, 16 níveis.
custom_metadata_modestringnoComo o custom_metadata enviado é reconciliado com o valor armazenado: replace (padrão) substitui o objeto inteiro, merge faz deep merge sobre o valor atual. Aceito apenas na atualização. Valores: replace, merge.

Otros campos y objetos anidados: kobana schema finance.custom-classifiers.update.

Respuestas

HTTPDescripción
200Updated custom classifier.
400Malformed JSON body.
404Custom classifier not found within the tenant.
409X-Idempotency-Key reused with a different body.
422Schema validation failure.

custom-classifiers delete​

Eliminar clasificador personalizado

kobana finance custom-classifiers delete [ID] [OPCIONES]

DELETE /v1/custom-classifiers/{id}

Deletes a custom classifier and its values. Requires scope finance/custom_classifiers with access level delete. Returns 422 (reason: in_use, with a usage breakdown) when any value is assigned to a payable / receivable / transaction — soft-deactivate via PATCH { active: false } instead. Calling DELETE twice returns 200 then 404.

Argumentos de la ruta: id

Encabezados

NombreTipoObligatorioDescripción
X-Workspace-IdstringsíWorkspace to act on, as a UUID. The token identifies the organization; this header picks which of its workspaces the request reads or writes. It is checked against the token's organization, so a workspace owned by anyone else answers UNKNOWN_WORKSPACE — the same code as one that does not exist. Omitting it answers WORKSPACE_REQUIRED (400).

Respuestas

HTTPDescripción
200Custom classifier deleted.
404Custom classifier not found within the tenant.
422The custom classifier is in use (reason: in_use).