Skip to main content
Retrieve a single expense by its ID. The expense must belong to a profile owned by the authenticated user.

Authentication

Requires a valid JWT token in the Authorization header.
Authorization: Bearer YOUR_JWT_TOKEN

Path Parameters

id
string
required
The UUID of the expense to retrieve.

Response

data
object
The expense object.
id
string
UUID of the expense.
profile_id
string
UUID of the associated profile.
profile
object
Profile information.
id
string
Profile UUID.
nombre
string
Profile name.
rfc
string
Profile RFC.
tipo_origen
string
Origin type: “XML” (from CFDI) or “MANUAL” (manually created).
fecha
string
Date of the expense (ISO 8601 format).
mes
number
Month of the expense (1-12).
año
number
Year of the expense.
total
number
Total amount of the expense.
subtotal
number
Subtotal amount (before taxes).
iva
number
IVA (VAT) percentage.
iva_amount
number
IVA amount in currency.
retencion_iva_amount
number
IVA withholding amount.
retencion_isr_amount
number
ISR withholding amount.
is_paid
boolean
Whether the expense has been paid.
payment_date
string
Date when the expense was paid (ISO 8601 format, nullable).
concepto
string
Description or concept of the expense.
categoria
string
Category of the expense.
uuid
string
Fiscal folio UUID from the CFDI (for XML expenses).
tipo
string
Payment type: “PUE” (Pago en Una Exhibición), “PPD” (Pago en Parcialidades o Diferido), or “COMPLEMENTO_PAGO”.
rfc_emisor
string
RFC (tax ID) of the issuer.
nombre_emisor
string
Name of the issuer.
regimen_fiscal_emisor
string
Tax regime code of the issuer.
rfc_receptor
string
RFC of the receiver.
nombre_receptor
string
Name of the receiver.
regimen_fiscal_receptor
string
Tax regime code of the receiver.
pagos
array
Array of partial payments (for PPD invoices).
complemento_pago
object
Payment complement data (for COMPLEMENTO_PAGO type).
validacion
object
Validation status of the expense.
rfcVerificado
boolean
Whether the RFC was verified.
regimenFiscalVerificado
boolean
Whether the tax regime was verified.
uuidDuplicado
boolean
Whether this UUID already exists.
valido
boolean
Overall validation status.
advertencias
array
List of warning messages.
errores
array
List of error messages.
estadoPago
object
Payment status information (only for XML expenses with tipo PUE/PPD).
estado
string
Payment status.
pagado
number
Amount paid.
pendiente
number
Amount pending.
created_at
string
Timestamp when the expense was created (ISO 8601).
updated_at
string
Timestamp when the expense was last updated (ISO 8601).

Example Request

cURL
curl -X GET https://api.tresacontafy.com/api/expenses/123e4567-e89b-12d3-a456-426614174000 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Error Responses

401
error
Unauthorized - Invalid or missing JWT token.
404
error
Expense not found or doesn’t belong to the user.
500
error
Internal server error.

Build docs developers (and LLMs) love