Presupuestos (quotes) are the starting point of Eme2App’s sales workflow. You can create a budget, share it with a client by email, and — once accepted — convert it directly into aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/eme2dev/Eme2App/llms.txt
Use this file to discover all available pages before exploring further.
borrador factura with a single API call. Quotes go through their own lifecycle: borrador → emitida → pagada or cancelada; acceptance also sets the status to aceptada and locks the quote from further editing. All endpoints require a Bearer token with a valid empresa_id.
Base path: /api/presupuestos
Authorization: Authorization: Bearer <token> with empresa_id embedded.
Endpoint reference
| Method | Path | Description |
|---|---|---|
| GET | /api/presupuestos | List quotes (paginated) |
| POST | /api/presupuestos | Create quote |
| GET | /api/presupuestos/proximo-numero | Next available quote number |
| GET | /api/presupuestos/:id | Get quote by ID |
| PUT | /api/presupuestos/:id | Update quote |
| PUT | /api/presupuestos/:id/estado | Update quote status |
| POST | /api/presupuestos/:id/aceptar | Accept quote → create draft invoice |
| DELETE | /api/presupuestos/:id | Delete quote |
| POST | /api/presupuestos/:id/enviar-email | Send PDF by email |
GET /api/presupuestos
Returns a paginated list of quotes for the active company. Query parameters| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
pageSize | integer | Results per page (default: company setting) |
Array of presupuesto objects for the active company.
Pagination metadata:
page, pageSize, and total record count.POST /api/presupuestos
Creates a new quote inborrador status. Tax amounts (IVA, IRPF) are computed server-side from the article catalogue.
ID of the client for this quote. Must belong to the active company.
Quote number. Must be unique within the company. Use
GET /api/presupuestos/proximo-numero to fetch the next available value.Quote date. Defaults to today if omitted.
Whether to calculate and display taxes (IVA, IRPF). Defaults to
true. Set false for net-amount quotes.Free-text notes. Max 1000 characters.
Array of quote line items. At least one non-comment line is required.
GET /api/presupuestos/proximo-numero
Returns the next sequential quote number for the active company. ResponseGET /api/presupuestos/:id
Returns a single quote with its header and all line details.PUT /api/presupuestos/:id
Full update of a quote. Only quotes inborrador state can be edited. The body mirrors POST /api/presupuestos. Existing line items are replaced entirely.
Response
PUT /api/presupuestos/:id/estado
Manually updates the quote status.Target status. Allowed values:
"borrador", "emitida", "pagada", "cancelada".POST /api/presupuestos/:id/aceptar
Accepts the quote and creates a linkedborrador factura in a single operation. The quote is marked aceptada and locked. Quotes in cancelada, aceptada, or convertida states are rejected.
Invoice number to assign to the new factura. Use
GET /api/facturas/proximo-numero to fetch the next available value.Invoice date. Defaults to today.
Invoice series to use. Required when the company has
usa_series = true.Series code. Alternative to
serie_id.Payment terms for the invoice. If omitted, falls back to the client’s
forma_pago_defecto_id.UUID of the newly created
facturas record.Invoice number assigned to the new factura.
| Status | mensaje |
|---|---|
| 400 | "Este presupuesto no se puede aceptar" (already accepted, cancelled, or converted) |
| 400 | "Debes indicar un número de factura válido" |
| 400 | "El número de factura ya existe" |
| 400 | "Cliente debe tener una forma de pago defecto o debe proporcionar una forma_pago_id" |
DELETE /api/presupuestos/:id
Permanently deletes a quote. Only quotes inborrador state can be deleted.
Response
POST /api/presupuestos/:id/enviar-email
Sends the quote PDF to a recipient email address.Recipient email address.
Base64-encoded PDF generated client-side.
Attachment filename. Defaults to
presupuesto-{numero}.pdf.Email subject. Defaults to
"Presupuesto {numero}".Plain-text email body.