Categorías de gasto: las de sistema (con su concepto fiscal) y las propias
GET/v1/orgs/{orgId}/expense-categories
- Alcance de la clave
- Cualquier clave (read)
- operationId
listExpenseCategories
Parámetros
Parámetros de listExpenseCategories| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
Respuesta 200 · Categorías
application/json
Respuesta 200 de listExpenseCategories| Campo | Tipo | Descripción |
|---|
itemsobligatorio | ExpenseCategory[] | |
|---|
items[].codeobligatorio | string | Código de sistema o c:<id> para las propias |
|---|
items[].idobligatorio | string (uuid) | null | |
|---|
items[].nameobligatorio | string | |
|---|
items[].nameEnobligatorio | string | null | |
|---|
items[].systemobligatorio | boolean | |
|---|
items[].parentCodeobligatorio | string | null | |
|---|
items[].conceptobligatorio | string | Valores: consumos, sueldos, seguridad_social, arrendamientos, reparaciones, servicios_profesionales, suministros, otros_servicios_exteriores, tributos, gastos_financieros, amortizaciones, otros |
|---|
items[].pgcobligatorio | string | |
|---|
items[].vatDeductiblePctobligatorio | string | |
|---|
items[].irpfDeductiblePctobligatorio | string | |
|---|
items[].warningsobligatorio | object[] | |
|---|
items[].warnings[].codeobligatorio | string | |
|---|
items[].warnings[].esobligatorio | string | |
|---|
items[].warnings[].enobligatorio | string | |
|---|
items[].archivedAtobligatorio | string (date-time) | null | |
|---|
items[].versionobligatorio | integer | |
|---|
Errores (application/problem+json): 401, 403, 404
Crear una categoría propia que cuelga de una de sistema
POST/v1/orgs/{orgId}/expense-categories
- Alcance de la clave
purchases- operationId
createExpenseCategory
Parámetros
Parámetros de createExpenseCategory| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
Cuerpo application/json
Cuerpo de createExpenseCategory| Campo | Tipo | Descripción |
|---|
nameobligatorio | string | Mínimo 1 caracteres Máximo 120 caracteres |
|---|
parentCodeobligatorio | string | |
|---|
vatDeductiblePct | string | null | |
|---|
irpfDeductiblePct | string | null | |
|---|
Respuesta 201 · Creada
application/json
Respuesta 201 de createExpenseCategory| Campo | Tipo | Descripción |
|---|
codeobligatorio | string | Código de sistema o c:<id> para las propias |
|---|
idobligatorio | string (uuid) | null | |
|---|
nameobligatorio | string | |
|---|
nameEnobligatorio | string | null | |
|---|
systemobligatorio | boolean | |
|---|
parentCodeobligatorio | string | null | |
|---|
conceptobligatorio | string | Valores: consumos, sueldos, seguridad_social, arrendamientos, reparaciones, servicios_profesionales, suministros, otros_servicios_exteriores, tributos, gastos_financieros, amortizaciones, otros |
|---|
pgcobligatorio | string | |
|---|
vatDeductiblePctobligatorio | string | |
|---|
irpfDeductiblePctobligatorio | string | |
|---|
warningsobligatorio | object[] | |
|---|
warnings[].codeobligatorio | string | |
|---|
warnings[].esobligatorio | string | |
|---|
warnings[].enobligatorio | string | |
|---|
archivedAtobligatorio | string (date-time) | null | |
|---|
versionobligatorio | integer | |
|---|
Errores (application/problem+json): 400, 401, 403, 404, 422
Editar una categoría propia
PATCH/v1/orgs/{orgId}/expense-categories/{categoryId}
- Alcance de la clave
purchases- operationId
updateExpenseCategory
Parámetros
Parámetros de updateExpenseCategory| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
categoryIdobligatorio | string | En la ruta. |
|---|
Cuerpo application/json
Cuerpo de updateExpenseCategory| Campo | Tipo | Descripción |
|---|
name | string | Mínimo 1 caracteres Máximo 120 caracteres |
|---|
parentCode | string | |
|---|
vatDeductiblePct | string | null | |
|---|
irpfDeductiblePct | string | null | |
|---|
versionobligatorio | integer | Mínimo 1 |
|---|
Respuesta 200 · Guardada
application/json
Respuesta 200 de updateExpenseCategory| Campo | Tipo | Descripción |
|---|
codeobligatorio | string | Código de sistema o c:<id> para las propias |
|---|
idobligatorio | string (uuid) | null | |
|---|
nameobligatorio | string | |
|---|
nameEnobligatorio | string | null | |
|---|
systemobligatorio | boolean | |
|---|
parentCodeobligatorio | string | null | |
|---|
conceptobligatorio | string | Valores: consumos, sueldos, seguridad_social, arrendamientos, reparaciones, servicios_profesionales, suministros, otros_servicios_exteriores, tributos, gastos_financieros, amortizaciones, otros |
|---|
pgcobligatorio | string | |
|---|
vatDeductiblePctobligatorio | string | |
|---|
irpfDeductiblePctobligatorio | string | |
|---|
warningsobligatorio | object[] | |
|---|
warnings[].codeobligatorio | string | |
|---|
warnings[].esobligatorio | string | |
|---|
warnings[].enobligatorio | string | |
|---|
archivedAtobligatorio | string (date-time) | null | |
|---|
versionobligatorio | integer | |
|---|
Errores (application/problem+json): 400, 401, 403, 404, 409, 422
Archivar una categoría propia (los documentos que la usan no cambian)
POST/v1/orgs/{orgId}/expense-categories/{categoryId}/archive
- Alcance de la clave
purchases- operationId
archiveExpenseCategory
Parámetros
Parámetros de archiveExpenseCategory| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
categoryIdobligatorio | string | En la ruta. |
|---|
Cuerpo application/json
Cuerpo de archiveExpenseCategory| Campo | Tipo | Descripción |
|---|
versionobligatorio | integer | Mínimo 1 |
|---|
Respuesta 200 · Archivada
application/json
Respuesta 200 de archiveExpenseCategory| Campo | Tipo | Descripción |
|---|
codeobligatorio | string | Código de sistema o c:<id> para las propias |
|---|
idobligatorio | string (uuid) | null | |
|---|
nameobligatorio | string | |
|---|
nameEnobligatorio | string | null | |
|---|
systemobligatorio | boolean | |
|---|
parentCodeobligatorio | string | null | |
|---|
conceptobligatorio | string | Valores: consumos, sueldos, seguridad_social, arrendamientos, reparaciones, servicios_profesionales, suministros, otros_servicios_exteriores, tributos, gastos_financieros, amortizaciones, otros |
|---|
pgcobligatorio | string | |
|---|
vatDeductiblePctobligatorio | string | |
|---|
irpfDeductiblePctobligatorio | string | |
|---|
warningsobligatorio | object[] | |
|---|
warnings[].codeobligatorio | string | |
|---|
warnings[].esobligatorio | string | |
|---|
warnings[].enobligatorio | string | |
|---|
archivedAtobligatorio | string (date-time) | null | |
|---|
versionobligatorio | integer | |
|---|
Errores (application/problem+json): 400, 401, 403, 404, 409
«Por pagar»: compras confirmadas pendientes por vencimiento (vencidas, esta semana, este mes, después)
GET/v1/orgs/{orgId}/purchases/payables
- Alcance de la clave
- Cualquier clave (read)
- operationId
getPayables
Parámetros
Parámetros de getPayables| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
Respuesta 200 · Pendiente de pago
application/json
Respuesta 200 de getPayables| Campo | Tipo | Descripción |
|---|
asOfobligatorio | string | |
|---|
currencyobligatorio | string | |
|---|
totalMinorobligatorio | integer | |
|---|
groupsobligatorio | object[] | |
|---|
groups[].groupobligatorio | string | Valores: overdue, this_week, this_month, later |
|---|
groups[].totalMinorobligatorio | integer | |
|---|
groups[].itemsobligatorio | object[] | |
|---|
groups[].items[].idobligatorio | string (uuid) | |
|---|
groups[].items[].numberobligatorio | string | null | |
|---|
groups[].items[].supplierNameobligatorio | string | null | |
|---|
groups[].items[].contactIdobligatorio | string (uuid) | null | |
|---|
groups[].items[].issueDateobligatorio | string | |
|---|
groups[].items[].dueDateobligatorio | string | |
|---|
groups[].items[].dueSourceobligatorio | string | Valores: document, supplier, default |
|---|
groups[].items[].outstandingMinorobligatorio | integer | |
|---|
groups[].items[].ibanobligatorio | string | null | |
|---|
groups[].items[].ibanPendingobligatorio | boolean | |
|---|
Errores (application/problem+json): 401, 403, 404
Calcular cuotas, parte deducible y no deducible sin guardar nada
POST/v1/orgs/{orgId}/purchases/preview-totals
- Alcance de la clave
purchases- operationId
previewPurchaseTotals
Parámetros
Parámetros de previewPurchaseTotals| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
Cuerpo application/json
Cuerpo de previewPurchaseTotals| Campo | Tipo | Descripción |
|---|
documentKindobligatorio | string | Valores: invoice, simplified, other |
|---|
operationKind | string | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject Por defecto: "domestic" |
|---|
contactId | string (uuid) | null | |
|---|
supplierName | string | null | Máximo 200 caracteres |
|---|
supplierTaxId | string | null | Máximo 30 caracteres |
|---|
number | string | null | Máximo 60 caracteres |
|---|
issueDateobligatorio | string | |
|---|
operationDate | string | null | |
|---|
registrationDate | string | null | |
|---|
dueDate | string | null | |
|---|
paymentMethod | string | null | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
qualifiedSimplified | boolean | Por defecto: false |
|---|
supplierCashAccounting | boolean | Por defecto: false |
|---|
withholdingKind | string | null | Valores: professional, rental |
|---|
withholdingRate | string | null | |
|---|
withholdingMinor | integer | null | Mínimo -99999999999 Máximo 99999999999 |
|---|
attachmentFileId | string (uuid) | null | |
|---|
notes | string | null | Máximo 2000 caracteres |
|---|
linesobligatorio | object[] | Al menos 1 elementos Hasta 200 elementos |
|---|
lines[].description | string | null | Máximo 500 caracteres |
|---|
lines[].categoryCodeobligatorio | string | |
|---|
lines[].baseMinorobligatorio | integer | Mínimo -99999999999 Máximo 99999999999 |
|---|
lines[].taxRate | string | Por defecto: "21" |
|---|
lines[].surchargeRate | string | null | |
|---|
lines[].vatDeductiblePctobligatorio | string | |
|---|
lines[].irpfDeductiblePct | string | Por defecto: "100" |
|---|
lines[].selfAssessmentRate | string | null | |
|---|
lines[].isInvestment | boolean | Por defecto: false |
|---|
lines[].assetGroup | string | null | Máximo 8 caracteres |
|---|
Respuesta 200 · Totales
application/json
Respuesta 200 de previewPurchaseTotals| Campo | Tipo | Descripción |
|---|
baseMinorobligatorio | integer | |
|---|
taxMinorobligatorio | integer | |
|---|
surchargeMinorobligatorio | integer | |
|---|
selfAssessedTaxMinorobligatorio | integer | |
|---|
deductibleTaxMinorobligatorio | integer | |
|---|
nonDeductibleTaxMinorobligatorio | integer | |
|---|
expenseMinorobligatorio | integer | |
|---|
irpfExpenseMinorobligatorio | integer | |
|---|
withholdingMinorobligatorio | integer | |
|---|
totalMinorobligatorio | integer | |
|---|
payableMinorobligatorio | integer | |
|---|
linesobligatorio | object[] | |
|---|
lines[].taxMinorobligatorio | integer | |
|---|
lines[].selfAssessedTaxMinorobligatorio | integer | |
|---|
lines[].deductibleTaxMinorobligatorio | integer | |
|---|
lines[].nonDeductibleTaxMinorobligatorio | integer | |
|---|
lines[].irpfExpenseMinorobligatorio | integer | |
|---|
lines[].problemsobligatorio | string[] | |
|---|
errorsobligatorio | string[] | |
|---|
Errores (application/problem+json): 400, 401, 403, 404
Lo último usado con un proveedor (categoría, deducibilidad, tipo de operación)
GET/v1/orgs/{orgId}/purchases/supplier-defaults
- Alcance de la clave
- Cualquier clave (read)
- operationId
getSupplierDefaults
Parámetros
Parámetros de getSupplierDefaults| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
contactId | string (uuid) | En la consulta. |
|---|
taxId | string | En la consulta. Máximo 30 caracteres |
|---|
Respuesta 200 · Sugerencia
application/json
Respuesta 200 de getSupplierDefaults| Campo | Tipo | Descripción |
|---|
foundobligatorio | boolean | |
|---|
basisobligatorio | integer | |
|---|
operationKindobligatorio | string | null | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject |
|---|
documentKindobligatorio | string | null | Valores: invoice, simplified, other |
|---|
categoryCodeobligatorio | string | null | |
|---|
vatDeductiblePctobligatorio | string | null | |
|---|
irpfDeductiblePctobligatorio | string | null | |
|---|
withholdingKindobligatorio | string | null | Valores: professional, rental |
|---|
withholdingRateobligatorio | string | null | |
|---|
Errores (application/problem+json): 401, 403, 404
Documentos de compra, del más reciente al más antiguo, con búsqueda y filtros
GET/v1/orgs/{orgId}/purchases
- Alcance de la clave
- Cualquier clave (read)
- operationId
listPurchases
Parámetros
Parámetros de listPurchases| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
limit | integer | En la consulta. Mínimo 1 Máximo 100 Por defecto: 25 |
|---|
cursor | string | En la consulta. Máximo 512 caracteres |
|---|
q | string | En la consulta. Máximo 100 caracteres |
|---|
status | string | En la consulta. Valores: draft, confirmed |
|---|
from | string | En la consulta. |
|---|
to | string | En la consulta. |
|---|
contactId | string (uuid) | En la consulta. |
|---|
Respuesta 200 · Página
application/json
Respuesta 200 de listPurchases| Campo | Tipo | Descripción |
|---|
itemsobligatorio | Purchase[] | |
|---|
items[].idobligatorio | string (uuid) | |
|---|
items[].statusobligatorio | string | Valores: draft, confirmed |
|---|
items[].documentKindobligatorio | string | Valores: invoice, simplified, other |
|---|
items[].operationKindobligatorio | string | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject |
|---|
items[].contactIdobligatorio | string (uuid) | null | |
|---|
items[].supplierNameobligatorio | string | null | |
|---|
items[].supplierTaxIdobligatorio | string | null | |
|---|
items[].numberobligatorio | string | null | |
|---|
items[].issueDateobligatorio | string | |
|---|
items[].operationDateobligatorio | string | null | |
|---|
items[].registrationDateobligatorio | string | |
|---|
items[].dueDateobligatorio | string | null | |
|---|
items[].qualifiedSimplifiedobligatorio | boolean | |
|---|
items[].supplierCashAccountingobligatorio | boolean | |
|---|
items[].withholdingKindobligatorio | string | null | Valores: professional, rental |
|---|
items[].withholdingRateobligatorio | string | null | |
|---|
items[].baseMinorobligatorio | integer | |
|---|
items[].taxMinorobligatorio | integer | |
|---|
items[].surchargeMinorobligatorio | integer | |
|---|
items[].selfAssessedTaxMinorobligatorio | integer | |
|---|
items[].deductibleTaxMinorobligatorio | integer | |
|---|
items[].nonDeductibleTaxMinorobligatorio | integer | |
|---|
items[].expenseMinorobligatorio | integer | |
|---|
items[].irpfExpenseMinorobligatorio | integer | |
|---|
items[].withholdingMinorobligatorio | integer | |
|---|
items[].totalMinorobligatorio | integer | |
|---|
items[].payableMinorobligatorio | integer | |
|---|
items[].paidMinorobligatorio | integer | |
|---|
items[].paymentStatusobligatorio | string | Valores: unpaid, partial, paid |
|---|
items[].paymentMethodobligatorio | string | null | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
items[].attachmentFileIdobligatorio | string (uuid) | null | |
|---|
items[].sourceobligatorio | string | Valores: manual, ai |
|---|
items[].notesobligatorio | string | null | |
|---|
items[].periodClosedobligatorio | boolean | |
|---|
items[].linesobligatorio | PurchaseLine[] | |
|---|
items[].lines[].idobligatorio | string (uuid) | |
|---|
items[].lines[].positionobligatorio | integer | |
|---|
items[].lines[].descriptionobligatorio | string | null | |
|---|
items[].lines[].categoryCodeobligatorio | string | |
|---|
items[].lines[].baseMinorobligatorio | integer | |
|---|
items[].lines[].taxRateobligatorio | string | |
|---|
items[].lines[].surchargeRateobligatorio | string | null | |
|---|
items[].lines[].vatDeductiblePctobligatorio | string | |
|---|
items[].lines[].irpfDeductiblePctobligatorio | string | |
|---|
items[].lines[].selfAssessmentRateobligatorio | string | null | |
|---|
items[].lines[].taxMinorobligatorio | integer | |
|---|
items[].lines[].surchargeMinorobligatorio | integer | |
|---|
items[].lines[].selfAssessedTaxMinorobligatorio | integer | |
|---|
items[].lines[].deductibleTaxMinorobligatorio | integer | |
|---|
items[].lines[].nonDeductibleTaxMinorobligatorio | integer | |
|---|
items[].lines[].expenseMinorobligatorio | integer | |
|---|
items[].lines[].irpfExpenseMinorobligatorio | integer | |
|---|
items[].lines[].isInvestmentobligatorio | boolean | |
|---|
items[].lines[].assetGroupobligatorio | string | null | |
|---|
items[].versionobligatorio | integer | |
|---|
items[].createdAtobligatorio | string (date-time) | |
|---|
items[].updatedAtobligatorio | string (date-time) | |
|---|
nextCursorobligatorio | string | null | |
|---|
Errores (application/problem+json): 400, 401, 403, 404
Registrar una factura recibida, un ticket o un gasto sin factura
POST/v1/orgs/{orgId}/purchases
- Alcance de la clave
purchases- operationId
createPurchase
Parámetros
Parámetros de createPurchase| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
Cuerpo application/json
Cuerpo de createPurchase| Campo | Tipo | Descripción |
|---|
id | string | |
|---|
documentKindobligatorio | string | Valores: invoice, simplified, other |
|---|
operationKind | string | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject Por defecto: "domestic" |
|---|
contactId | string (uuid) | null | |
|---|
supplierName | string | null | Máximo 200 caracteres |
|---|
supplierTaxId | string | null | Máximo 30 caracteres |
|---|
number | string | null | Máximo 60 caracteres |
|---|
issueDateobligatorio | string | |
|---|
operationDate | string | null | |
|---|
registrationDate | string | null | |
|---|
dueDate | string | null | |
|---|
paymentMethod | string | null | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
qualifiedSimplified | boolean | Por defecto: false |
|---|
supplierCashAccounting | boolean | Por defecto: false |
|---|
withholdingKind | string | null | Valores: professional, rental |
|---|
withholdingRate | string | null | |
|---|
withholdingMinor | integer | null | Mínimo -99999999999 Máximo 99999999999 |
|---|
attachmentFileId | string (uuid) | null | |
|---|
notes | string | null | Máximo 2000 caracteres |
|---|
linesobligatorio | object[] | Al menos 1 elementos Hasta 200 elementos |
|---|
lines[].description | string | null | Máximo 500 caracteres |
|---|
lines[].categoryCodeobligatorio | string | |
|---|
lines[].baseMinorobligatorio | integer | Mínimo -99999999999 Máximo 99999999999 |
|---|
lines[].taxRate | string | Por defecto: "21" |
|---|
lines[].surchargeRate | string | null | |
|---|
lines[].vatDeductiblePctobligatorio | string | |
|---|
lines[].irpfDeductiblePct | string | Por defecto: "100" |
|---|
lines[].selfAssessmentRate | string | null | |
|---|
lines[].isInvestment | boolean | Por defecto: false |
|---|
lines[].assetGroup | string | null | Máximo 8 caracteres |
|---|
status | string | Valores: draft, confirmed Por defecto: "confirmed" |
|---|
Respuesta 200 · Ya existía con ese id
application/json
Respuesta 200 de createPurchase| Campo | Tipo | Descripción |
|---|
idobligatorio | string (uuid) | |
|---|
statusobligatorio | string | Valores: draft, confirmed |
|---|
documentKindobligatorio | string | Valores: invoice, simplified, other |
|---|
operationKindobligatorio | string | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject |
|---|
contactIdobligatorio | string (uuid) | null | |
|---|
supplierNameobligatorio | string | null | |
|---|
supplierTaxIdobligatorio | string | null | |
|---|
numberobligatorio | string | null | |
|---|
issueDateobligatorio | string | |
|---|
operationDateobligatorio | string | null | |
|---|
registrationDateobligatorio | string | |
|---|
dueDateobligatorio | string | null | |
|---|
qualifiedSimplifiedobligatorio | boolean | |
|---|
supplierCashAccountingobligatorio | boolean | |
|---|
withholdingKindobligatorio | string | null | Valores: professional, rental |
|---|
withholdingRateobligatorio | string | null | |
|---|
baseMinorobligatorio | integer | |
|---|
taxMinorobligatorio | integer | |
|---|
surchargeMinorobligatorio | integer | |
|---|
selfAssessedTaxMinorobligatorio | integer | |
|---|
deductibleTaxMinorobligatorio | integer | |
|---|
nonDeductibleTaxMinorobligatorio | integer | |
|---|
expenseMinorobligatorio | integer | |
|---|
irpfExpenseMinorobligatorio | integer | |
|---|
withholdingMinorobligatorio | integer | |
|---|
totalMinorobligatorio | integer | |
|---|
payableMinorobligatorio | integer | |
|---|
paidMinorobligatorio | integer | |
|---|
paymentStatusobligatorio | string | Valores: unpaid, partial, paid |
|---|
paymentMethodobligatorio | string | null | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
attachmentFileIdobligatorio | string (uuid) | null | |
|---|
sourceobligatorio | string | Valores: manual, ai |
|---|
notesobligatorio | string | null | |
|---|
periodClosedobligatorio | boolean | |
|---|
linesobligatorio | PurchaseLine[] | |
|---|
lines[].idobligatorio | string (uuid) | |
|---|
lines[].positionobligatorio | integer | |
|---|
lines[].descriptionobligatorio | string | null | |
|---|
lines[].categoryCodeobligatorio | string | |
|---|
lines[].baseMinorobligatorio | integer | |
|---|
lines[].taxRateobligatorio | string | |
|---|
lines[].surchargeRateobligatorio | string | null | |
|---|
lines[].vatDeductiblePctobligatorio | string | |
|---|
lines[].irpfDeductiblePctobligatorio | string | |
|---|
lines[].selfAssessmentRateobligatorio | string | null | |
|---|
lines[].taxMinorobligatorio | integer | |
|---|
lines[].surchargeMinorobligatorio | integer | |
|---|
lines[].selfAssessedTaxMinorobligatorio | integer | |
|---|
lines[].deductibleTaxMinorobligatorio | integer | |
|---|
lines[].nonDeductibleTaxMinorobligatorio | integer | |
|---|
lines[].expenseMinorobligatorio | integer | |
|---|
lines[].irpfExpenseMinorobligatorio | integer | |
|---|
lines[].isInvestmentobligatorio | boolean | |
|---|
lines[].assetGroupobligatorio | string | null | |
|---|
versionobligatorio | integer | |
|---|
createdAtobligatorio | string (date-time) | |
|---|
updatedAtobligatorio | string (date-time) | |
|---|
Respuesta 201 · Registrado
application/json
Respuesta 201 de createPurchase| Campo | Tipo | Descripción |
|---|
idobligatorio | string (uuid) | |
|---|
statusobligatorio | string | Valores: draft, confirmed |
|---|
documentKindobligatorio | string | Valores: invoice, simplified, other |
|---|
operationKindobligatorio | string | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject |
|---|
contactIdobligatorio | string (uuid) | null | |
|---|
supplierNameobligatorio | string | null | |
|---|
supplierTaxIdobligatorio | string | null | |
|---|
numberobligatorio | string | null | |
|---|
issueDateobligatorio | string | |
|---|
operationDateobligatorio | string | null | |
|---|
registrationDateobligatorio | string | |
|---|
dueDateobligatorio | string | null | |
|---|
qualifiedSimplifiedobligatorio | boolean | |
|---|
supplierCashAccountingobligatorio | boolean | |
|---|
withholdingKindobligatorio | string | null | Valores: professional, rental |
|---|
withholdingRateobligatorio | string | null | |
|---|
baseMinorobligatorio | integer | |
|---|
taxMinorobligatorio | integer | |
|---|
surchargeMinorobligatorio | integer | |
|---|
selfAssessedTaxMinorobligatorio | integer | |
|---|
deductibleTaxMinorobligatorio | integer | |
|---|
nonDeductibleTaxMinorobligatorio | integer | |
|---|
expenseMinorobligatorio | integer | |
|---|
irpfExpenseMinorobligatorio | integer | |
|---|
withholdingMinorobligatorio | integer | |
|---|
totalMinorobligatorio | integer | |
|---|
payableMinorobligatorio | integer | |
|---|
paidMinorobligatorio | integer | |
|---|
paymentStatusobligatorio | string | Valores: unpaid, partial, paid |
|---|
paymentMethodobligatorio | string | null | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
attachmentFileIdobligatorio | string (uuid) | null | |
|---|
sourceobligatorio | string | Valores: manual, ai |
|---|
notesobligatorio | string | null | |
|---|
periodClosedobligatorio | boolean | |
|---|
linesobligatorio | PurchaseLine[] | |
|---|
lines[].idobligatorio | string (uuid) | |
|---|
lines[].positionobligatorio | integer | |
|---|
lines[].descriptionobligatorio | string | null | |
|---|
lines[].categoryCodeobligatorio | string | |
|---|
lines[].baseMinorobligatorio | integer | |
|---|
lines[].taxRateobligatorio | string | |
|---|
lines[].surchargeRateobligatorio | string | null | |
|---|
lines[].vatDeductiblePctobligatorio | string | |
|---|
lines[].irpfDeductiblePctobligatorio | string | |
|---|
lines[].selfAssessmentRateobligatorio | string | null | |
|---|
lines[].taxMinorobligatorio | integer | |
|---|
lines[].surchargeMinorobligatorio | integer | |
|---|
lines[].selfAssessedTaxMinorobligatorio | integer | |
|---|
lines[].deductibleTaxMinorobligatorio | integer | |
|---|
lines[].nonDeductibleTaxMinorobligatorio | integer | |
|---|
lines[].expenseMinorobligatorio | integer | |
|---|
lines[].irpfExpenseMinorobligatorio | integer | |
|---|
lines[].isInvestmentobligatorio | boolean | |
|---|
lines[].assetGroupobligatorio | string | null | |
|---|
versionobligatorio | integer | |
|---|
createdAtobligatorio | string (date-time) | |
|---|
updatedAtobligatorio | string (date-time) | |
|---|
Errores (application/problem+json): 400, 401, 403, 404, 409, 422
Un documento de compra con sus líneas
GET/v1/orgs/{orgId}/purchases/{purchaseId}
- Alcance de la clave
- Cualquier clave (read)
- operationId
getPurchase
Parámetros
Parámetros de getPurchase| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
purchaseIdobligatorio | string | En la ruta. |
|---|
Respuesta 200 · Documento
application/json
Respuesta 200 de getPurchase| Campo | Tipo | Descripción |
|---|
idobligatorio | string (uuid) | |
|---|
statusobligatorio | string | Valores: draft, confirmed |
|---|
documentKindobligatorio | string | Valores: invoice, simplified, other |
|---|
operationKindobligatorio | string | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject |
|---|
contactIdobligatorio | string (uuid) | null | |
|---|
supplierNameobligatorio | string | null | |
|---|
supplierTaxIdobligatorio | string | null | |
|---|
numberobligatorio | string | null | |
|---|
issueDateobligatorio | string | |
|---|
operationDateobligatorio | string | null | |
|---|
registrationDateobligatorio | string | |
|---|
dueDateobligatorio | string | null | |
|---|
qualifiedSimplifiedobligatorio | boolean | |
|---|
supplierCashAccountingobligatorio | boolean | |
|---|
withholdingKindobligatorio | string | null | Valores: professional, rental |
|---|
withholdingRateobligatorio | string | null | |
|---|
baseMinorobligatorio | integer | |
|---|
taxMinorobligatorio | integer | |
|---|
surchargeMinorobligatorio | integer | |
|---|
selfAssessedTaxMinorobligatorio | integer | |
|---|
deductibleTaxMinorobligatorio | integer | |
|---|
nonDeductibleTaxMinorobligatorio | integer | |
|---|
expenseMinorobligatorio | integer | |
|---|
irpfExpenseMinorobligatorio | integer | |
|---|
withholdingMinorobligatorio | integer | |
|---|
totalMinorobligatorio | integer | |
|---|
payableMinorobligatorio | integer | |
|---|
paidMinorobligatorio | integer | |
|---|
paymentStatusobligatorio | string | Valores: unpaid, partial, paid |
|---|
paymentMethodobligatorio | string | null | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
attachmentFileIdobligatorio | string (uuid) | null | |
|---|
sourceobligatorio | string | Valores: manual, ai |
|---|
notesobligatorio | string | null | |
|---|
periodClosedobligatorio | boolean | |
|---|
linesobligatorio | PurchaseLine[] | |
|---|
lines[].idobligatorio | string (uuid) | |
|---|
lines[].positionobligatorio | integer | |
|---|
lines[].descriptionobligatorio | string | null | |
|---|
lines[].categoryCodeobligatorio | string | |
|---|
lines[].baseMinorobligatorio | integer | |
|---|
lines[].taxRateobligatorio | string | |
|---|
lines[].surchargeRateobligatorio | string | null | |
|---|
lines[].vatDeductiblePctobligatorio | string | |
|---|
lines[].irpfDeductiblePctobligatorio | string | |
|---|
lines[].selfAssessmentRateobligatorio | string | null | |
|---|
lines[].taxMinorobligatorio | integer | |
|---|
lines[].surchargeMinorobligatorio | integer | |
|---|
lines[].selfAssessedTaxMinorobligatorio | integer | |
|---|
lines[].deductibleTaxMinorobligatorio | integer | |
|---|
lines[].nonDeductibleTaxMinorobligatorio | integer | |
|---|
lines[].expenseMinorobligatorio | integer | |
|---|
lines[].irpfExpenseMinorobligatorio | integer | |
|---|
lines[].isInvestmentobligatorio | boolean | |
|---|
lines[].assetGroupobligatorio | string | null | |
|---|
versionobligatorio | integer | |
|---|
createdAtobligatorio | string (date-time) | |
|---|
updatedAtobligatorio | string (date-time) | |
|---|
Errores (application/problem+json): 401, 403, 404
Editar un documento de compra (todo a la vez) mientras su periodo no esté cerrado
PUT/v1/orgs/{orgId}/purchases/{purchaseId}
- Alcance de la clave
purchases- operationId
updatePurchase
Parámetros
Parámetros de updatePurchase| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
purchaseIdobligatorio | string | En la ruta. |
|---|
Cuerpo application/json
Cuerpo de updatePurchase| Campo | Tipo | Descripción |
|---|
versionobligatorio | integer | Mínimo 1 |
|---|
documentKindobligatorio | string | Valores: invoice, simplified, other |
|---|
operationKind | string | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject Por defecto: "domestic" |
|---|
contactId | string (uuid) | null | |
|---|
supplierName | string | null | Máximo 200 caracteres |
|---|
supplierTaxId | string | null | Máximo 30 caracteres |
|---|
number | string | null | Máximo 60 caracteres |
|---|
issueDateobligatorio | string | |
|---|
operationDate | string | null | |
|---|
registrationDate | string | null | |
|---|
dueDate | string | null | |
|---|
paymentMethod | string | null | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
qualifiedSimplified | boolean | Por defecto: false |
|---|
supplierCashAccounting | boolean | Por defecto: false |
|---|
withholdingKind | string | null | Valores: professional, rental |
|---|
withholdingRate | string | null | |
|---|
withholdingMinor | integer | null | Mínimo -99999999999 Máximo 99999999999 |
|---|
attachmentFileId | string (uuid) | null | |
|---|
notes | string | null | Máximo 2000 caracteres |
|---|
linesobligatorio | object[] | Al menos 1 elementos Hasta 200 elementos |
|---|
lines[].description | string | null | Máximo 500 caracteres |
|---|
lines[].categoryCodeobligatorio | string | |
|---|
lines[].baseMinorobligatorio | integer | Mínimo -99999999999 Máximo 99999999999 |
|---|
lines[].taxRate | string | Por defecto: "21" |
|---|
lines[].surchargeRate | string | null | |
|---|
lines[].vatDeductiblePctobligatorio | string | |
|---|
lines[].irpfDeductiblePct | string | Por defecto: "100" |
|---|
lines[].selfAssessmentRate | string | null | |
|---|
lines[].isInvestment | boolean | Por defecto: false |
|---|
lines[].assetGroup | string | null | Máximo 8 caracteres |
|---|
Respuesta 200 · Guardado
application/json
Respuesta 200 de updatePurchase| Campo | Tipo | Descripción |
|---|
idobligatorio | string (uuid) | |
|---|
statusobligatorio | string | Valores: draft, confirmed |
|---|
documentKindobligatorio | string | Valores: invoice, simplified, other |
|---|
operationKindobligatorio | string | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject |
|---|
contactIdobligatorio | string (uuid) | null | |
|---|
supplierNameobligatorio | string | null | |
|---|
supplierTaxIdobligatorio | string | null | |
|---|
numberobligatorio | string | null | |
|---|
issueDateobligatorio | string | |
|---|
operationDateobligatorio | string | null | |
|---|
registrationDateobligatorio | string | |
|---|
dueDateobligatorio | string | null | |
|---|
qualifiedSimplifiedobligatorio | boolean | |
|---|
supplierCashAccountingobligatorio | boolean | |
|---|
withholdingKindobligatorio | string | null | Valores: professional, rental |
|---|
withholdingRateobligatorio | string | null | |
|---|
baseMinorobligatorio | integer | |
|---|
taxMinorobligatorio | integer | |
|---|
surchargeMinorobligatorio | integer | |
|---|
selfAssessedTaxMinorobligatorio | integer | |
|---|
deductibleTaxMinorobligatorio | integer | |
|---|
nonDeductibleTaxMinorobligatorio | integer | |
|---|
expenseMinorobligatorio | integer | |
|---|
irpfExpenseMinorobligatorio | integer | |
|---|
withholdingMinorobligatorio | integer | |
|---|
totalMinorobligatorio | integer | |
|---|
payableMinorobligatorio | integer | |
|---|
paidMinorobligatorio | integer | |
|---|
paymentStatusobligatorio | string | Valores: unpaid, partial, paid |
|---|
paymentMethodobligatorio | string | null | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
attachmentFileIdobligatorio | string (uuid) | null | |
|---|
sourceobligatorio | string | Valores: manual, ai |
|---|
notesobligatorio | string | null | |
|---|
periodClosedobligatorio | boolean | |
|---|
linesobligatorio | PurchaseLine[] | |
|---|
lines[].idobligatorio | string (uuid) | |
|---|
lines[].positionobligatorio | integer | |
|---|
lines[].descriptionobligatorio | string | null | |
|---|
lines[].categoryCodeobligatorio | string | |
|---|
lines[].baseMinorobligatorio | integer | |
|---|
lines[].taxRateobligatorio | string | |
|---|
lines[].surchargeRateobligatorio | string | null | |
|---|
lines[].vatDeductiblePctobligatorio | string | |
|---|
lines[].irpfDeductiblePctobligatorio | string | |
|---|
lines[].selfAssessmentRateobligatorio | string | null | |
|---|
lines[].taxMinorobligatorio | integer | |
|---|
lines[].surchargeMinorobligatorio | integer | |
|---|
lines[].selfAssessedTaxMinorobligatorio | integer | |
|---|
lines[].deductibleTaxMinorobligatorio | integer | |
|---|
lines[].nonDeductibleTaxMinorobligatorio | integer | |
|---|
lines[].expenseMinorobligatorio | integer | |
|---|
lines[].irpfExpenseMinorobligatorio | integer | |
|---|
lines[].isInvestmentobligatorio | boolean | |
|---|
lines[].assetGroupobligatorio | string | null | |
|---|
versionobligatorio | integer | |
|---|
createdAtobligatorio | string (date-time) | |
|---|
updatedAtobligatorio | string (date-time) | |
|---|
Errores (application/problem+json): 400, 401, 403, 404, 409, 422
Borrar un documento de compra sin pagos, si su periodo no está cerrado
DELETE/v1/orgs/{orgId}/purchases/{purchaseId}
- Alcance de la clave
purchases- operationId
deletePurchase
Parámetros
Parámetros de deletePurchase| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
purchaseIdobligatorio | string | En la ruta. |
|---|
Respuesta 204 · Borrado
Sin cuerpo.
Errores (application/problem+json): 401, 403, 404, 409
Confirmar un borrador (por ejemplo, el que deja la lectura con IA)
POST/v1/orgs/{orgId}/purchases/{purchaseId}/confirm
- Alcance de la clave
purchases- operationId
confirmPurchase
Parámetros
Parámetros de confirmPurchase| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
purchaseIdobligatorio | string | En la ruta. |
|---|
Cuerpo application/json
Cuerpo de confirmPurchase| Campo | Tipo | Descripción |
|---|
versionobligatorio | integer | Mínimo 1 |
|---|
linkSupplier | boolean | Por defecto: false |
|---|
Respuesta 200 · Confirmado
application/json
Respuesta 200 de confirmPurchase| Campo | Tipo | Descripción |
|---|
idobligatorio | string (uuid) | |
|---|
statusobligatorio | string | Valores: draft, confirmed |
|---|
documentKindobligatorio | string | Valores: invoice, simplified, other |
|---|
operationKindobligatorio | string | Valores: domestic, intra_goods, intra_services, import, reverse_charge_domestic, not_subject |
|---|
contactIdobligatorio | string (uuid) | null | |
|---|
supplierNameobligatorio | string | null | |
|---|
supplierTaxIdobligatorio | string | null | |
|---|
numberobligatorio | string | null | |
|---|
issueDateobligatorio | string | |
|---|
operationDateobligatorio | string | null | |
|---|
registrationDateobligatorio | string | |
|---|
dueDateobligatorio | string | null | |
|---|
qualifiedSimplifiedobligatorio | boolean | |
|---|
supplierCashAccountingobligatorio | boolean | |
|---|
withholdingKindobligatorio | string | null | Valores: professional, rental |
|---|
withholdingRateobligatorio | string | null | |
|---|
baseMinorobligatorio | integer | |
|---|
taxMinorobligatorio | integer | |
|---|
surchargeMinorobligatorio | integer | |
|---|
selfAssessedTaxMinorobligatorio | integer | |
|---|
deductibleTaxMinorobligatorio | integer | |
|---|
nonDeductibleTaxMinorobligatorio | integer | |
|---|
expenseMinorobligatorio | integer | |
|---|
irpfExpenseMinorobligatorio | integer | |
|---|
withholdingMinorobligatorio | integer | |
|---|
totalMinorobligatorio | integer | |
|---|
payableMinorobligatorio | integer | |
|---|
paidMinorobligatorio | integer | |
|---|
paymentStatusobligatorio | string | Valores: unpaid, partial, paid |
|---|
paymentMethodobligatorio | string | null | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
attachmentFileIdobligatorio | string (uuid) | null | |
|---|
sourceobligatorio | string | Valores: manual, ai |
|---|
notesobligatorio | string | null | |
|---|
periodClosedobligatorio | boolean | |
|---|
linesobligatorio | PurchaseLine[] | |
|---|
lines[].idobligatorio | string (uuid) | |
|---|
lines[].positionobligatorio | integer | |
|---|
lines[].descriptionobligatorio | string | null | |
|---|
lines[].categoryCodeobligatorio | string | |
|---|
lines[].baseMinorobligatorio | integer | |
|---|
lines[].taxRateobligatorio | string | |
|---|
lines[].surchargeRateobligatorio | string | null | |
|---|
lines[].vatDeductiblePctobligatorio | string | |
|---|
lines[].irpfDeductiblePctobligatorio | string | |
|---|
lines[].selfAssessmentRateobligatorio | string | null | |
|---|
lines[].taxMinorobligatorio | integer | |
|---|
lines[].surchargeMinorobligatorio | integer | |
|---|
lines[].selfAssessedTaxMinorobligatorio | integer | |
|---|
lines[].deductibleTaxMinorobligatorio | integer | |
|---|
lines[].nonDeductibleTaxMinorobligatorio | integer | |
|---|
lines[].expenseMinorobligatorio | integer | |
|---|
lines[].irpfExpenseMinorobligatorio | integer | |
|---|
lines[].isInvestmentobligatorio | boolean | |
|---|
lines[].assetGroupobligatorio | string | null | |
|---|
versionobligatorio | integer | |
|---|
createdAtobligatorio | string (date-time) | |
|---|
updatedAtobligatorio | string (date-time) | |
|---|
Errores (application/problem+json): 400, 401, 403, 404, 409, 422
Pagos de un documento de compra, con lo pendiente
GET/v1/orgs/{orgId}/purchases/{purchaseId}/payments
- Alcance de la clave
- Cualquier clave (read)
- operationId
listPurchasePayments
Parámetros
Parámetros de listPurchasePayments| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
purchaseIdobligatorio | string | En la ruta. |
|---|
Respuesta 200 · Pagos
application/json
Respuesta 200 de listPurchasePayments| Campo | Tipo | Descripción |
|---|
itemsobligatorio | PurchasePayment[] | |
|---|
items[].idobligatorio | string (uuid) | |
|---|
items[].paidOnobligatorio | string | |
|---|
items[].amountMinorobligatorio | integer | |
|---|
items[].methodobligatorio | string | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
items[].referenceobligatorio | string | null | |
|---|
items[].createdAtobligatorio | string (date-time) | |
|---|
paidMinorobligatorio | integer | |
|---|
pendingMinorobligatorio | integer | |
|---|
paymentStatusobligatorio | string | Valores: unpaid, partial, paid |
|---|
purchaseVersionobligatorio | integer | |
|---|
Errores (application/problem+json): 401, 403, 404
Registrar un pago a proveedor (nunca más de lo pendiente)
POST/v1/orgs/{orgId}/purchases/{purchaseId}/payments
- Alcance de la clave
purchases- operationId
createPurchasePayment
Parámetros
Parámetros de createPurchasePayment| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
purchaseIdobligatorio | string | En la ruta. |
|---|
Cuerpo application/json
Cuerpo de createPurchasePayment| Campo | Tipo | Descripción |
|---|
paidOnobligatorio | string | |
|---|
amountMinorobligatorio | integer | Mínimo -99999999999 Máximo 99999999999 |
|---|
method | string | Valores: transfer, card, cash, direct_debit, bizum, other Por defecto: "transfer" |
|---|
reference | string | null | Máximo 140 caracteres |
|---|
Respuesta 201 · Registrado
application/json
Respuesta 201 de createPurchasePayment| Campo | Tipo | Descripción |
|---|
itemsobligatorio | PurchasePayment[] | |
|---|
items[].idobligatorio | string (uuid) | |
|---|
items[].paidOnobligatorio | string | |
|---|
items[].amountMinorobligatorio | integer | |
|---|
items[].methodobligatorio | string | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
items[].referenceobligatorio | string | null | |
|---|
items[].createdAtobligatorio | string (date-time) | |
|---|
paidMinorobligatorio | integer | |
|---|
pendingMinorobligatorio | integer | |
|---|
paymentStatusobligatorio | string | Valores: unpaid, partial, paid |
|---|
purchaseVersionobligatorio | integer | |
|---|
Errores (application/problem+json): 400, 401, 403, 404, 409, 422
Borrar un pago a proveedor
DELETE/v1/orgs/{orgId}/purchases/{purchaseId}/payments/{paymentId}
- Alcance de la clave
purchases- operationId
deletePurchasePayment
Parámetros
Parámetros de deletePurchasePayment| Campo | Tipo | Descripción |
|---|
orgIdobligatorio | string | Identificador de la organización de la clave. En la ruta. |
|---|
purchaseIdobligatorio | string | En la ruta. |
|---|
paymentIdobligatorio | string | En la ruta. |
|---|
Respuesta 200 · Borrado
application/json
Respuesta 200 de deletePurchasePayment| Campo | Tipo | Descripción |
|---|
itemsobligatorio | PurchasePayment[] | |
|---|
items[].idobligatorio | string (uuid) | |
|---|
items[].paidOnobligatorio | string | |
|---|
items[].amountMinorobligatorio | integer | |
|---|
items[].methodobligatorio | string | Valores: transfer, card, cash, direct_debit, bizum, other |
|---|
items[].referenceobligatorio | string | null | |
|---|
items[].createdAtobligatorio | string (date-time) | |
|---|
paidMinorobligatorio | integer | |
|---|
pendingMinorobligatorio | integer | |
|---|
paymentStatusobligatorio | string | Valores: unpaid, partial, paid |
|---|
purchaseVersionobligatorio | integer | |
|---|
Errores (application/problem+json): 401, 403, 404, 409