Skip to main content

POST /api/accrued-expenses

Creates a new manual expense entry for a specific profile and period. This endpoint is used for expenses that are not imported from XML files.

Authentication

This endpoint requires authentication. Include your access token in the request cookies.

Request Body

string
required
ID of the profile (RFC emisor) to associate this expense with
string
required
ID of the accounting period for this expense
string
required
Description or concept of the expense
number
required
Subtotal amount before taxes
number
IVA (VAT) amount. If not provided, defaults to 0
string
required
Date of the expense in ISO 8601 format (e.g., “2024-03-15”)
string
required
Type of expense. Must be manual
string
Category for organizing the expense

Response

string
required
Success message
Expense
required
The created expense object

Example Request

Example Response

Error Responses

error
Authentication required or token expired
error
Invalid request body or missing required fields
error
User does not have permission to create expenses for this profile
error
Server error occurred