{"openapi":"3.1.0","info":{"title":"Factuarea Public API","version":"1.0.0","description":"Public REST API for invoicing in Spain — manage invoices, quotes, proformas, delivery notes, products, clients and webhooks.\n\n## Authentication\n\nThe API authenticates with a secret **API key**, sent on every request as:\n\n```\nAuthorization: Bearer fact_live_xxxxxxxxxxxxxxxxxxxxxxxx\n```\n\nor, alternatively, in the `X-API-Key` header. The key is issued from the Factuarea portal and must NEVER be exposed in public clients (browser, mobile apps).\n\n## Environments: `live` and `test`\n\nEach API key belongs to one of two environments, unambiguously identifiable by its **prefix**:\n\n| Prefix | Environment | Data it operates on | External effects |\n|---------|---------|---------------------------|------------------|\n| `fact_live_` | **live** (production) | Your real company | Real: legal fiscal numbering, VeriFactu→AEAT, emails to clients, outbound webhooks |\n| `fact_test_` | **test** (sandbox) | An isolated *sandbox* company | **Neutralized** (see below) |\n\nThe prefix is the **source of truth** for the environment: a `fact_test_` key always operates in test mode and a `fact_live_` key always in live. There is no request parameter that changes the environment — it is determined by the key.\n\n### Data isolation (sandbox)\n\n`fact_test_` keys operate on a dedicated **sandbox company** (a technical \"twin company\" of the account holder, automatically provisioned the first time test mode is used, which inherits the plan of your real company for faithful *feature-gating*). Thanks to per-company data isolation:\n\n- Resources created with a `fact_test_` key are **not visible** from a `fact_live_` key, and vice versa.\n- Test fiscal numbering uses the sandbox's own series and **never** consumes or alters the sequential numbering of your production series.\n\nThe functional surface is **identical** in both environments: the same endpoints and operations are available in test as in live.\n\n### External effects neutralized in test\n\nWhen you operate with a `fact_test_` key (sandbox environment), outbound effects are **disabled** so you can test your integration without real consequences:\n\n- **VeriFactu**: the Alta record is created locally, but **not transmitted to AEAT**.\n- **Email**: document emails are **not delivered** to real recipients.\n- **Webhooks**: events are **not delivered** to your external HTTP endpoints.\n\nIn `live`, all these effects fire normally.\n\n> **Recommendation**: always integrate and test first with a `fact_test_` key. Once your flow works, switch to the `fact_live_` prefix to operate in production."},"servers":[{"url":"https://api.factuarea.com/v1","description":"Production"}],"tags":[{"name":"Clients","description":"Manage your customers."},{"name":"Suppliers","description":"Manage your suppliers and vendors."},{"name":"Invoices","description":"Create and manage sales invoices (compliant with Spanish AEAT VeriFactu)."},{"name":"Quotes","description":"Create quotes and convert them to invoices."},{"name":"Proformas","description":"Create proforma invoices and convert them to final invoices."},{"name":"Delivery Notes","description":"Track goods delivered to customers; convert to invoice."},{"name":"Purchase Invoices","description":"Record invoices received from suppliers."},{"name":"Recurring Invoices","description":"Schedule invoices that auto-generate on a fixed cadence."},{"name":"Products","description":"Manage your product catalog."},{"name":"Webhooks","description":"Subscribe to events via HTTPS callbacks with HMAC-signed payloads."},{"name":"Events","description":"Read the event log for auditing and replay."},{"name":"Series","description":"Configure document numbering series (immutable by AEAT compliance)."},{"name":"Taxes","description":"Manage configured tax rates (IVA, IGIC, IRPF) and calculate totals."},{"name":"VeriFactu","description":"Inspect and manage Spanish AEAT VeriFactu submissions (Ley Antifraude 11/2021)."},{"name":"FacturaE","description":"Generate FacturaE 3.2.x XML for B2G invoicing to Spanish public administration."},{"name":"Tax Reports","description":"Generate Spanish tax reports (Modelo 303 IVA, Modelo 347 informativa)."},{"name":"Account","description":"Introspect the authenticated company, plan, and API key."}],"security":[{"http":[]},{"BearerAuth":[]},{"ApiKeyAuth":[]}],"paths":{"/proformas/{proforma}/accept":{"post":{"operationId":"public-api.v1.proformas.accept","description":"Mark a proforma as accepted by the client. Returns 422 if the proforma is in a status that cannot transition to `accepted`.","summary":"Accept a proforma","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptProformaRequest"},"example":{"reason":"Cliente confirma pedido por telefono"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictProforma"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.accept(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasAccept(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/proformas/{proforma}/accept \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/quotes/{quote}/accept":{"post":{"operationId":"public-api.v1.quotes.accept","description":"Mark a quote as accepted by the client. Sets `accepted_at` to the current timestamp.","summary":"Accept a quote","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptQuoteRequest"},"example":{"accepted_on":"2026-06-01","notes":"Aceptado por el cliente via telefono"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictQuote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.accept(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesAccept(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/quotes/{quote}/accept \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/verifactu/certificates/{certificate}/activate":{"post":{"operationId":"public-api.v1.verifactu.certificates.activate","description":"Make a previously uploaded certificate the active one. Any other active certificate is deactivated atomically. Returns 404 if the certificate does not exist within your company.","summary":"Activate a company certificate","tags":["VeriFactu"],"parameters":[{"name":"certificate","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyCertificate"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.certificates","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.certificates.activate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->certificates->publicApiV1VerifactuCertificatesActivate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/verifactu/certificates/{certificate}/activate \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/recurring_invoices/{recurring_invoice}/activate":{"post":{"operationId":"public-api.v1.recurring_invoices.activate","description":"Activate a paused recurring invoice. The next invoice will be generated according to the schedule. This is a semantic alias of `POST /recurring_invoices/{recurring_invoice}/resume` — both map to the same handler and behave identically; neither is deprecated.","summary":"Activate recurring invoice","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.activate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesActivate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice}/activate \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/invoices/{invoice}/annul":{"post":{"operationId":"public-api.v1.invoices.annul","description":"Annuls an invoice with a documented reason. When VeriFactu is enabled the handler automatically creates the AEAT anulacion record.","summary":"Annul an invoice","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnulInvoiceV1Request"},"example":{"reason":"Anulación solicitada por el cliente: pedido cancelado antes de la entrega."}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.annul(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesAnnul(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/annul \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/series/{series}/archive":{"post":{"operationId":"public-api.v1.series.archive","description":"Archive a series so it stops appearing as available for new documents. Fails with 409 if the series is the default and the only active series of its type. Returns 204 on success.","summary":"Archive a series","tags":["Series"],"parameters":[{"name":"series","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.archive(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesArchive(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/series/{series}/archive \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/invoices/{invoice}/assign-real-number":{"post":{"operationId":"public-api.v1.invoices.assign_real_number","description":"Promotes a draft to a definitive invoice by assigning its real series number. In VeriFactu-enabled companies the same happens automatically on send.","summary":"Assign a real invoice number","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.assignRealNumber(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesAssignRealNumber(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/assign-real-number \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/purchase_invoices/{purchase_invoice}/attach-file":{"post":{"operationId":"public-api.v1.purchase_invoices.attach_file","description":"Upload the original PDF document for a purchase invoice as `multipart/form-data`. Replaces any previously attached file. Returns the updated purchase invoice.","summary":"Attach a file to a purchase invoice","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/AttachPurchaseInvoiceFileRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictPurchaseInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.attachFile(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", file);"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesAttachFile(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $file);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice}/attach-file \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -F \"file=@./path/to/file\""}]}},"/clients/bulk-delete":{"post":{"operationId":"public-api.v1.clients.bulk_delete","description":"Delete up to 200 clients in one request. Returns the deletion count and the list of UUIDs that could not be removed (clients with associated documents are reported in failed).","summary":"Delete multiple clients in bulk","tags":["Clients"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteClientsRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkDeleteResult"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.bulkDelete({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsBulkDelete($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/clients/bulk-delete \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/delivery_notes/bulk-delete":{"post":{"operationId":"public-api.v1.delivery_notes.bulk_delete","description":"Delete several delivery notes in a single request. The body takes an `ids` array of `uuid`s. Returns a `bulk_delete_result` with the count of deleted notes and a `failed` list (`id` + Spanish `reason`) for those that could not be deleted (e.g. signed or invoiced). Supports `Idempotency-Key` for safe retries.","summary":"Bulk delete delivery notes","tags":["Delivery Notes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteDeliveryNotesRequest"},"example":{"ids":["019e822d-1ffb-7179-8a4d-8872118a5627"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkDeleteResult"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.bulkDelete({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesBulkDelete($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes/bulk-delete \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/bulk-delete":{"post":{"operationId":"public-api.v1.invoices.bulk_delete","description":"Deletes up to 100 invoices in one call. Returns counts of deleted and failed entries with the reason for each failure.","summary":"Bulk delete invoices","tags":["Invoices"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteInvoicesV1Request"},"example":{"ids":["dd6b82a6-3bb6-4b54-b06e-4515c0ec7260","c08e0274-d2f3-4337-85c7-a1f918ee8f8c"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkDeleteResult"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.bulkDelete({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesBulkDelete($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/bulk-delete \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/products/bulk-delete":{"post":{"operationId":"public-api.v1.products.bulk_delete","description":"Delete up to 200 products in one request. Products included in packs are reported in skipped instead of failing. Decrements the plan usage counter accordingly.","summary":"Delete multiple products in bulk","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteProductsRequest"},"example":{"ids":["019e5584-7c1b-7260-bc52-34613ad04c09","019e5584-7c1c-71b6-b825-01f5443bae47"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkDeleteResult"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.bulkDelete({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsBulkDelete($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/products/bulk-delete \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/proformas/bulk-delete":{"post":{"operationId":"public-api.v1.proformas.bulk_delete","description":"Deletes up to 100 proformas in one call. Returns counts of deleted and failed entries with the reason for each failure.","summary":"Bulk delete proformas","tags":["Proformas"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteProformasV1Request"},"example":{"ids":["019e822d-33c9-736d-9cc2-c271735ebcf0"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkDeleteResult"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictProforma"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.bulkDelete({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasBulkDelete($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/proformas/bulk-delete \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/purchase_invoices/bulk-delete":{"post":{"operationId":"public-api.v1.purchase_invoices.bulk_delete","description":"Delete up to 100 purchase invoices by UUID in a single request.","summary":"Bulk delete purchase invoices","tags":["Purchase Invoices"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeletePurchaseInvoicesRequest"},"example":{"ids":["019e822c-f683-7277-a6ee-c4a8d42088c0"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkDeleteResult"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictPurchaseInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.bulkDelete({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesBulkDelete($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/purchase_invoices/bulk-delete \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/quotes/bulk-delete":{"post":{"operationId":"public-api.v1.quotes.bulk_delete","description":"Deletes up to 100 quotes in one call. Returns counts of deleted and failed entries with the reason for each failure.","summary":"Bulk delete quotes","tags":["Quotes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteQuotesV1Request"},"example":{"ids":["019e822d-e304-72b7-a2af-4c95eb872c95","019e822d-e3aa-72e1-bc45-16feaffccf06"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkDeleteResult"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictQuote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.bulkDelete({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesBulkDelete($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/quotes/bulk-delete \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/recurring_invoices/bulk-delete":{"post":{"operationId":"public-api.v1.recurring_invoices.bulk-delete","description":"Delete multiple recurring invoices in a single request (POST with a body of `ids`). Returns the count of deleted resources and a list of failures with their reason. Recurring invoices that already generated invoices cannot be deleted.","summary":"Bulk delete recurring invoices","tags":["Recurring Invoices"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteRecurringInvoicesRequest"},"example":{"ids":["019e7f80-1a2b-7c3d-8e4f-5a6b7c8d9e0f","019e7f80-2b3c-7d4e-9f5a-6b7c8d9e0f1a"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkDeleteResult"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.bulkDelete({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesBulkDelete($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/recurring_invoices/bulk-delete \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/suppliers/bulk-delete":{"post":{"operationId":"public-api.v1.suppliers.bulk_delete","description":"Delete up to 200 suppliers in one request. Suppliers with associated contracts are reported in failed together with their display names; UUIDs from other tenants are ignored.","summary":"Delete multiple suppliers in bulk","tags":["Suppliers"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteSuppliersRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BulkDeleteResult"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.bulkDelete({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersBulkDelete($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/suppliers/bulk-delete \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/products/bulk-update-stock":{"post":{"operationId":"public-api.v1.products.bulk_update_stock","description":"Apply a stock operation to multiple products in one request (up to 500). UUIDs that do not belong to your company are ignored silently.","summary":"Update stock for many products","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateProductStockRequest"},"example":{"updates":[{"product_id":"019e5584-7c1b-7260-bc52-34613ad04c09","stock":999,"operation":"set"},{"product_id":"019e5584-7c1c-71b6-b825-01f5443bae47","stock":999,"operation":"set"}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object":{"type":"string","const":"product_stock_bulk_update_result","example":"product_stock_bulk_update_result","examples":["product_stock_bulk_update_result"]},"updated":{"type":"integer","example":2,"examples":[2]}},"required":["object","updated"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.bulkUpdateStock({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsBulkUpdateStock($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/products/bulk-update-stock \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/taxes/calculate":{"post":{"operationId":"public-api.v1.taxes.calculate","description":"Apply the referenced tax to a base amount and return the breakdown: base, tax_rate, tax_amount, total_amount and the full tax object.","summary":"Calculate a tax over a base amount","tags":["Taxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateTaxRequest"},"example":{"base":1000,"taxes_id":"019e5584-7a7f-70fd-b9cb-9466c3ee12a8"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxCalculation"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.calculate({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesCalculate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/taxes/calculate \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/taxes/calculate-totals":{"post":{"operationId":"public-api.v1.taxes.calculate_totals","description":"Compute subtotal, VAT, surcharge, retention and grand total for an array of line items with quantity, price, discount and tax rates. Returns the document totals plus the per-line breakdown.","summary":"Calculate totals for a set of lines","tags":["Taxes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateTotalsRequest"},"example":{"lines":[{"quantity":2,"unit_price":100,"discount":10,"vat_rate":21,"retention_rate":15,"surcharge_rate":5.2}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxTotals"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.calculateTotals({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesCalculateTotals($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/taxes/calculate-totals \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/{invoice}/can-annul":{"get":{"operationId":"public-api.v1.invoices.can_annul","description":"Validates whether the invoice can be annulled and whether a VeriFactu anulacion record will be created. Call before posting to /annul.","summary":"Check annulment eligibility","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CanAnnulInvoice"}},"required":["data"]},"example":{"data":{"can_annul":true,"reasons":[],"will_create_verifactu":true,"info":["La anulación generará un registro de anulación en VeriFactu."]}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.canAnnul(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesCanAnnul(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/can-annul \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/delivery_notes/{delivery_note}/cancel":{"post":{"operationId":"public-api.v1.delivery_notes.cancel","description":"Transition a delivery note to the `cancelled` state. Canonical REST replacement for the deprecated `POST /change_status`. Returns 409 `invalid_status_transition` if the note cannot be cancelled (e.g. already invoiced). Supports `Idempotency-Key` for safe retries.","summary":"Cancel a delivery note","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.cancel(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesCancel(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes/{delivery_note}/cancel \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/face-submissions/{faceSubmission}/cancel":{"post":{"operationId":"public-api.v1.face_submissions.cancel","description":"Requests the cancellation (anulación 4200) of a FACe submission with a mandatory `reason`. Only allowed while the submission is in a cancellable state (`submitted`, `registered_rcf`, `accounted`); otherwise returns 422 `face_submission_not_cancellable`. The submission transitions to `cancellation_requested` until FACe confirms.","summary":"Request FACe submission cancellation","tags":["FacturaE"],"parameters":[{"name":"faceSubmission","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelFaceSubmissionV1Request"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FaceSubmission"}},"required":["data"]},"example":{"data":{"id":"01972f4e-9c2b-7d3a-8e5f-1a2b3c4d5e6f","object":"face_submission","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8d01","status":"cancellation_requested","registry_number":"202600123456","dir3_accounting_office":"E04921301","dir3_managing_body":"E04921302","dir3_processing_unit":"E04921303","error_code":null,"error_message":null,"status_updated_at":"2026-06-12T09:00:00+00:00","last_polled_at":"2026-06-12T08:15:00+00:00","created_at":"2026-06-11T10:30:00+00:00"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"faceSubmissions","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.faceSubmissions.cancel(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->faceSubmissions->publicApiV1FaceSubmissionsCancel(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/face-submissions/{faceSubmission}/cancel \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/recurring_invoices/{recurring_invoice}/cancel":{"post":{"operationId":"public-api.v1.recurring_invoices.cancel","description":"Cancel a recurring invoice. Unlike `pause`, this is a terminal, irreversible state: a cancelled recurring invoice can never be resumed or reactivated. Previously generated invoices are unaffected.","summary":"Cancel recurring invoice","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.cancel(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesCancel(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice}/cancel \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/invoices/simplified-eligibility":{"post":{"operationId":"public-api.v1.invoices.simplified_eligibility","description":"Determines if an invoice may be issued as simplified (F2) under Real Decreto 1619/2012 art. 4 based on amount and counterparty data.","summary":"Check simplified invoice eligibility","tags":["Invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimplifiedInvoiceEligibilityV1Request"},"example":{"total":5000,"client_id":"f58fbf7f-333f-499b-affc-c0d396cbd83f","client_country":"ES","is_intra_community":false,"is_reverse_charge":false,"client_requires_deductible":false}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SimplifiedInvoiceEligibility"}},"required":["data"]},"example":{"data":{"can_be_simplified":false,"must_be_complete":true,"reason_code":"over_absolute_limit","reason_message":"El importe 3.500,00 € supera el límite de 3.000,00 € para una factura simplificada.","sector_limit":3000}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.simplifiedEligibility({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesSimplifiedEligibility($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/simplified-eligibility \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/taxes/{tax}/is-in-use":{"get":{"operationId":"public-api.v1.taxes.is_in_use","description":"Return whether the tax is referenced by existing documents. Useful for safe-deletion checks before calling DELETE.","summary":"Check whether a tax is in use","tags":["Taxes"],"parameters":[{"name":"tax","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"`TaxUsageV1Resource`","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxUsage"},"taxes_id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a9b","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a9b"]}},"required":["data","taxes_id"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.isInUse(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesIsInUse(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/taxes/{tax}/is-in-use \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/delivery_notes/{delivery_note}/convert":{"post":{"operationId":"public-api.v1.delivery_notes.convert","description":"Convert a delivery note into a sales invoice. The delivery note moves to `invoiced` with `converted_to_id` populated and the new invoice is returned under `data`. Only `target=invoice` is supported.","summary":"Convert delivery note to invoice","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertDeliveryNoteRequest"},"example":{"target":"invoice"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.convert(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesConvert(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes/{delivery_note}/convert \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/proformas/{proforma}/convert":{"post":{"operationId":"public-api.v1.proformas.convert","description":"Convert a proforma into a final sales invoice. The new invoice references the source proforma; the proforma moves to status `converted`.","summary":"Convert proforma to invoice","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertProformaRequest"},"example":{"target":"invoice"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictProforma"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.convert(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasConvert(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/proformas/{proforma}/convert \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/quotes/{quote}/convert":{"post":{"operationId":"public-api.v1.quotes.convert","description":"Convert an accepted quote into a sales invoice. The new invoice references the source quote via metadata; the quote moves to status `converted`.","summary":"Convert quote to invoice","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertQuoteRequest"},"example":{"target":"invoice","issued_on":"2026-06-01","due_on":"2026-07-01"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictQuote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.convert(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesConvert(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/quotes/{quote}/convert \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/clients":{"post":{"operationId":"public-api.v1.clients.create","description":"Create a new client (customer) for your company. The returned object includes the generated `uuid` you should store for subsequent operations.","summary":"Create a client","tags":["Clients"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClientRequest"},"example":{"name":"Talleres Mediterráneo S.L.","commercial_name":"Talleres Med","tax_id":"B66778899","vat_id":"ESB66778899","email":"facturacion@talleresmed.es","phone":"961112233","mobile":"611223344","fax":"961112234","website":"https://talleresmed.es","contact_person":"Lucía Fernández","billing_emails":["administracion@talleresmed.es","contabilidad@talleresmed.es"],"latitude":39.4699,"longitude":-0.3763,"default_discount":5,"default_vat_rate":21,"default_retention_rate":-15,"is_surcharge_subject":false,"bank_accounts":[{"iban":"ES9121000418450200051332","bic":"CAIXESBBXXX","is_default":true,"notes":"Cuenta principal"}],"preferred_operation_regime":"general","payment_method":"direct_debit","payment_terms_days":30,"address":{"line1":"Calle Mayor","number":"42","floor":"3","door":"B","postal_code":"46001","city":"Valencia","province":"Valencia","country":"ES"},"notes":"Cliente preferente con domiciliación bancaria.","metadata":{"erp_ref":"CLI-0042","segment":"premium"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Client"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","object":"client","name":"Acme Corporation","commercial_name":"Acme SL","tax_id":"B12345678","vat_id":"ESB12345678","email":"billing@acme.com","phone":"+34 600 123 456","fax":"+34 91 123 45 68","mobile":"+34 600 000 000","website":"https://acme.com","contact_person":"Juan García","billing_emails":["facturacion@acme.com","contabilidad@acme.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":39.4699,"longitude":-0.3763},"default_discount":5,"default_vat_rate":21,"default_retention_rate":15,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"dir3_accounting_office":"L01280796","dir3_managing_body":"L01280796","dir3_processing_unit":"L01280796","external_id":"CRM-99","notes":"Pago al contado.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-15T10:30:00Z","updated_at":"2026-01-15T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"201":{"description":"Client created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Client"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","object":"client","name":"Acme Corporation","commercial_name":"Acme SL","tax_id":"B12345678","vat_id":"ESB12345678","email":"billing@acme.com","phone":"+34 600 123 456","fax":"+34 91 123 45 68","mobile":"+34 600 000 000","website":"https://acme.com","contact_person":"Juan García","billing_emails":["facturacion@acme.com","contabilidad@acme.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":39.4699,"longitude":-0.3763},"default_discount":5,"default_vat_rate":21,"default_retention_rate":15,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"dir3_accounting_office":"L01280796","dir3_managing_body":"L01280796","dir3_processing_unit":"L01280796","external_id":"CRM-99","notes":"Pago al contado.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-15T10:30:00Z","updated_at":"2026-01-15T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/clients/01HKQS5N8VR7QXJ9K3T6BWPMZA"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/clients \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.clients.list","description":"List your clients with cursor-based pagination. Supports filtering by `is_active`, `created_at[gte|lte]`, and `name[in]`.","summary":"List all clients","tags":["Clients"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"tax_id","in":"query","description":"Fiscal tax number (NIF/CIF/NIE) of the client. Exact match on `tax_id`.","schema":{"type":"string"}},{"name":"tax_id[in]","in":"query","description":"Fiscal tax number (NIF/CIF/NIE) of the client. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"email","in":"query","description":"Client email. Exact match on `email`.","schema":{"type":"string","format":"email"}},{"name":"name","in":"query","description":"Trade name of the client. Exact match on `name`.","schema":{"type":"string"}},{"name":"is_active","in":"query","description":"Filter by active / inactive clients. Exact match on `is_active`.","schema":{"type":"boolean"}},{"name":"created[gte]","in":"query","description":"Creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Client"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","object":"client","name":"Acme Corporation","commercial_name":"Acme SL","tax_id":"B12345678","vat_id":"ESB12345678","email":"billing@acme.com","phone":"+34 600 123 456","fax":"+34 91 123 45 68","mobile":"+34 600 000 000","website":"https://acme.com","contact_person":"Juan García","billing_emails":["facturacion@acme.com","contabilidad@acme.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":39.4699,"longitude":-0.3763},"default_discount":5,"default_vat_rate":21,"default_retention_rate":15,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"dir3_accounting_office":"L01280796","dir3_managing_body":"L01280796","dir3_processing_unit":"L01280796","external_id":"CRM-99","notes":"Pago al contado.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-15T10:30:00Z","updated_at":"2026-01-15T10:30:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.clients.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/clients \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices/{invoice}/corrective":{"post":{"operationId":"public-api.v1.invoices.corrective","description":"Generate a corrective (rectificativa) invoice that amends a previously issued invoice. The corrective is returned as a new Invoice with `type: \"corrective\"` referencing the original.","summary":"Generate corrective invoice","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCorrectiveInvoiceRequest"},"example":{"correction_reason":"error_importe","correction_type":"full","notes":"Rectificación total por error en el importe facturado"}}}},"responses":{"201":{"description":"Corrective invoice created successfully. The `Location` header contains the canonical URL of the NEW corrective invoice.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a60","object":"invoice","number":"RECT-2026-00007","is_number_assigned":true,"type":"R1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b04","code":"RECT-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"issued","issued_on":"2026-03-22","due_on":"2026-04-21","subtotal":-500,"taxes_total":-105,"total":-605,"currency":"EUR","notes":"Rectificativa por descuento comercial sobre FAC-2026-00010.","external_id":"ERP-RECT-2026-0007","lines":[{"object":"invoice_line","description":"Rectificación: descuento comercial 5 h consultoría","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":5,"unit_price":-100,"tax_rate":21,"discount_percent":0,"subtotal":-500,"taxes":-105,"total":-605}],"metadata":{"order_id":"PO-2026-0010"},"tags":["rectificativa","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":0,"pending_amount":-605,"payments":{"detail":[],"total":0,"pending":-605},"is_corrective":true,"corrective":{"original_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a10","original_number":"FAC-2026-00010","original_date":"2026-02-01","correction_reason":"R1","correction_type":"por_sustitucion","correction_nature":"S","base_rectificada":-500,"cuota_rectificada":-105,"correction_aeat_type":"R1"},"payment":null,"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a60","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a60","enabled":true,"expires_at":"2026-09-22T23:59:59Z","max_days":120},"substituted_by":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a50","number":"FAC-2026-00050"},"recurring":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08"},"paid_at":null,"paid_on":null,"sent_at":"2026-03-22T09:10:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-22T09:00:00Z","updated_at":"2026-03-22T09:10:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/invoices/01HKQS5NXR4D7P2K9V3M6BWTLH"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.corrective(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesCorrective(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/corrective \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/delivery_notes":{"post":{"operationId":"public-api.v1.delivery_notes.create","description":"Create a new delivery note (albarán) in `draft` status. Delivery notes track goods shipped to a customer and can later be converted to invoices.","summary":"Create a delivery note","tags":["Delivery Notes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeliveryNoteRequest"},"example":{"client_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","series_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","delivery_date":"2026-01-21","notes":"Entregar en horario de mañana.","reference_number":"PED-2026-0099","vehicle_plate":"5678JKL","driver_name":"Pedro Sánchez Ruiz","driver_tax_id":"12345678Z","tracking_number":"TRK-2026-0099","carrier_company":"SEUR","billing_emails":["administracion@cliente.com"],"metadata":{"orden_interna":"OT-554"},"lines":[{"description":"Portátil 14\" i7","quantity":2,"unit_price":400,"tax_rate":21}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06","object":"delivery_note","number":"A-2026-00031","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"signed","issued_on":"2026-01-19","delivery_date":"2026-01-21","signed_at":"2026-01-21T14:50:00Z","signed_by":"María García López","signature_image_url":"https://files.factuarea.com/signatures/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06.png","vehicle_plate":"5678JKL","driver":{"name":"Pedro Sánchez Ruiz","tax_id":"12345678Z"},"tracking":{"number":"TRK-2026-0099","carrier":"SEUR"},"received_by":{"name":"María García López","tax_id":"87654321X"},"billing_emails":["administracion@cliente.com"],"subtotal":800,"taxes_total":168,"total":968,"currency":"EUR","notes":"Entregado en almacén central.","external_id":"ERP-ALB-2026-0031","lines":[{"object":"delivery_note_line","description":"Cajas de material A4 (500u)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":2,"unit_price":400,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":800,"taxes":168,"total":968}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["logistica","almacen-central"],"custom_fields":[{"field":"muelle_carga","value":"Muelle 3"}],"converted_to_id":null,"created_at":"2026-01-19T08:00:00Z","updated_at":"2026-01-21T14:50:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"201":{"description":"Delivery note created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06","object":"delivery_note","number":"A-2026-00031","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"signed","issued_on":"2026-01-19","delivery_date":"2026-01-21","signed_at":"2026-01-21T14:50:00Z","signed_by":"María García López","signature_image_url":"https://files.factuarea.com/signatures/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06.png","vehicle_plate":"5678JKL","driver":{"name":"Pedro Sánchez Ruiz","tax_id":"12345678Z"},"tracking":{"number":"TRK-2026-0099","carrier":"SEUR"},"received_by":{"name":"María García López","tax_id":"87654321X"},"billing_emails":["administracion@cliente.com"],"subtotal":800,"taxes_total":168,"total":968,"currency":"EUR","notes":"Entregado en almacén central.","external_id":"ERP-ALB-2026-0031","lines":[{"object":"delivery_note_line","description":"Cajas de material A4 (500u)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":2,"unit_price":400,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":800,"taxes":168,"total":968}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["logistica","almacen-central"],"custom_fields":[{"field":"muelle_carga","value":"Muelle 3"}],"converted_to_id":null,"created_at":"2026-01-19T08:00:00Z","updated_at":"2026-01-21T14:50:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/delivery_notes/01HKQS5NDE5R9P3MX6V8SLNHQF"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.delivery_notes.list","description":"List your delivery notes with cursor-based pagination.","summary":"List all delivery notes","tags":["Delivery Notes"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Public delivery note status: `draft`, `sent`, `signed`, `invoiced`, `cancelled` (the same values returned by the resource `status` field). `sent` and `signed` filter by the internal delivered state (with/without signature); use the `signed` filter as well to distinguish them precisely. Exact match on `status`.","schema":{"type":"string"}},{"name":"status[in]","in":"query","description":"Public delivery note status: `draft`, `sent`, `signed`, `invoiced`, `cancelled` (the same values returned by the resource `status` field). `sent` and `signed` filter by the internal delivered state (with/without signature); use the `signed` filter as well to distinguish them precisely. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"client_id","in":"query","description":"Client ID (UUID v7). Exact match on `client_id`.","schema":{"type":"string","format":"uuid"}},{"name":"client_id[in]","in":"query","description":"Client ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"series_id","in":"query","description":"Series ID (UUID v7). Exact match on `series_id`.","schema":{"type":"string","format":"uuid"}},{"name":"series_id[in]","in":"query","description":"Series ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"created[gte]","in":"query","description":"Creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"delivery_date[gte]","in":"query","description":"Delivery date. Greater than or equal to the given value.","schema":{"type":"string","format":"date"}},{"name":"delivery_date[lte]","in":"query","description":"Delivery date. Less than or equal to the given value.","schema":{"type":"string","format":"date"}},{"name":"delivery_date[gt]","in":"query","description":"Delivery date. Strictly greater than the given value.","schema":{"type":"string","format":"date"}},{"name":"delivery_date[lt]","in":"query","description":"Delivery date. Strictly less than the given value.","schema":{"type":"string","format":"date"}},{"name":"signed","in":"query","description":"Filter by signed delivery notes (`true`) or with no recorded signature (`false`). Exact match on `signed`.","schema":{"type":"boolean"}},{"name":"vehicle_plate","in":"query","description":"License plate of the delivery vehicle (exact match). Exact match on `vehicle_plate`.","schema":{"type":"string"}},{"name":"carrier_company","in":"query","description":"Transport / courier company (exact match). Exact match on `carrier_company`.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches delivery notes carrying ANY of the tags). Exact match on `tags`.","schema":{"type":"string"}},{"name":"tags[in]","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches delivery notes carrying ANY of the tags). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"sort","in":"query","description":"Sort order. Use a field for ascending or a `-` prefix for descending (e.g. `-created`). Allowed fields: `created`, `number`, `delivery_date`. Combined with the cursor, ordering stays deterministic (a stable secondary sort by the cursor id, Stripe-style). When omitted, results follow the default cursor order (`created` descending).","schema":{"type":"string","enum":["created","-created","number","-number","delivery_date","-delivery_date"]},"example":"-created"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryNote"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06","object":"delivery_note","number":"A-2026-00031","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"signed","issued_on":"2026-01-19","delivery_date":"2026-01-21","signed_at":"2026-01-21T14:50:00Z","signed_by":"María García López","signature_image_url":"https://files.factuarea.com/signatures/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06.png","vehicle_plate":"5678JKL","driver":{"name":"Pedro Sánchez Ruiz","tax_id":"12345678Z"},"tracking":{"number":"TRK-2026-0099","carrier":"SEUR"},"received_by":{"name":"María García López","tax_id":"87654321X"},"billing_emails":["administracion@cliente.com"],"subtotal":800,"taxes_total":168,"total":968,"currency":"EUR","notes":"Entregado en almacén central.","external_id":"ERP-ALB-2026-0031","lines":[{"object":"delivery_note_line","description":"Cajas de material A4 (500u)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":2,"unit_price":400,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":800,"taxes":168,"total":968}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["logistica","almacen-central"],"custom_fields":[{"field":"muelle_carga","value":"Muelle 3"}],"converted_to_id":null,"created_at":"2026-01-19T08:00:00Z","updated_at":"2026-01-21T14:50:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.deliveryNotes.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/delivery_notes \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices":{"post":{"operationId":"public-api.v1.invoices.create","description":"Create a new sales invoice. The invoice is created in `draft` status by default and submitted to AEAT VeriFactu asynchronously. Supports `Idempotency-Key` for safe retries.","summary":"Create an invoice","tags":["Invoices"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceRequest"},"example":{"client_id":"f58fbf7f-333f-499b-affc-c0d396cbd83f","series_id":"019e5584-7a72-7038-a8f6-561ed180b699","issued_on":"2026-06-01","due_on":"2026-07-01","notes":"Factura creada via API v1","metadata":{"order_ref":"PO-2026-0042"},"lines":[{"description":"Servicio de consultoria","quantity":2,"unit_price":150,"tax_rate_id":"019e5584-7a7f-70fd-b9cb-9466c3ee12a8","discount_percent":0}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"201":{"description":"Invoice created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/invoices/01HKQS5NXR4D7P2K9V3M6BWTLF"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.invoices.list","description":"List your sales invoices with cursor-based pagination. Supports filtering by `status[in]`, `client_id`, `series_id`, `issued_on[gte|lte]`, and `total[gte|lte]`.","summary":"List all invoices","tags":["Invoices"],"parameters":[{"name":"original_invoice_id","in":"query","schema":{"type":["string","null"],"format":"uuid"}},{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Invoice status. Exact match on `status`.","schema":{"type":"string"}},{"name":"status[in]","in":"query","description":"Invoice status. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"client_id","in":"query","description":"Client ID (UUID v7). Exact match on `client_id`.","schema":{"type":"string","format":"uuid"}},{"name":"client_id[in]","in":"query","description":"Client ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"series_id","in":"query","description":"Series ID (UUID v7). Exact match on `series_id`.","schema":{"type":"string","format":"uuid"}},{"name":"series_id[in]","in":"query","description":"Series ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"created[gte]","in":"query","description":"Creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"due_on[gte]","in":"query","description":"Due date. Greater than or equal to the given value.","schema":{"type":"string","format":"date"}},{"name":"due_on[lte]","in":"query","description":"Due date. Less than or equal to the given value.","schema":{"type":"string","format":"date"}},{"name":"due_on[gt]","in":"query","description":"Due date. Strictly greater than the given value.","schema":{"type":"string","format":"date"}},{"name":"due_on[lt]","in":"query","description":"Due date. Strictly less than the given value.","schema":{"type":"string","format":"date"}},{"name":"total[gte]","in":"query","description":"Total amount. Greater than or equal to the given value.","schema":{"type":"number"}},{"name":"total[lte]","in":"query","description":"Total amount. Less than or equal to the given value.","schema":{"type":"number"}},{"name":"total[gt]","in":"query","description":"Total amount. Strictly greater than the given value.","schema":{"type":"number"}},{"name":"total[lt]","in":"query","description":"Total amount. Strictly less than the given value.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"ISO 4217 currency code (e.g. EUR). Exact match on `currency`.","schema":{"type":"string"}},{"name":"currency[in]","in":"query","description":"ISO 4217 currency code (e.g. EUR). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"number","in":"query","description":"Invoice number. Exact match on `number`.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches invoices carrying ANY of the tags). Exact match on `tags`.","schema":{"type":"string"}},{"name":"tags[in]","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches invoices carrying ANY of the tags). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"sort","in":"query","description":"Sort order. Use a field for ascending or a `-` prefix for descending (e.g. `-created`). Allowed fields: `created`, `total`, `number`. Combined with the cursor, ordering stays deterministic (a stable secondary sort by the cursor id, Stripe-style). When omitted, results follow the default cursor order (`created` descending).","schema":{"type":"string","enum":["created","-created","total","-total","number","-number"]},"example":"-created"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.invoices.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices/{invoice}/verifactu":{"post":{"operationId":"public-api.v1.invoices.verifactu_create","description":"Creates the VeriFactu alta record for an already-issued invoice and enqueues AEAT transmission. Use when automatic creation on send was skipped.","summary":"Force-create VeriFactu record for invoice","tags":["VeriFactu"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.verifactuCreate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesVerifactuCreate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/verifactu \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.invoices.verifactu_get","description":"Returns the VeriFactu (Spanish AEAT SIF) record associated with the invoice if one exists. Responds with `data: null` when the invoice has no record yet.","summary":"Retrieve invoice VeriFactu record","tags":["VeriFactu"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"},"verifactu_enabled":{"type":"boolean"}},"required":["data","verifactu_enabled"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"},"verifactu_enabled":true}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.verifactuGet(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesVerifactuGet(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/verifactu \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/products":{"post":{"operationId":"public-api.v1.products.create","description":"Create a new product in your catalog.","summary":"Create a product","tags":["Products"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest"},"example":{"name":"Monitor 27 pulgadas 4K","sku":"MON-27-4K-001","price":"329.90","currency":"EUR","tax_rate_id":"019e5584-7a7f-70fd-b9cb-9466c3ee12a8","is_active":true,"metadata":{"categoria":"monitores","fabricante":"Dell"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","object":"product","name":"Teclado mecánico RGB","sku":"KEY-RGB-01","price":"1234.56","currency":"EUR","tax_rate":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","rate":21},"stock":120,"gallery":[{"index":0,"url":"https://files.factuarea.com/products/key-rgb-01-front.jpg","content_type":"image/jpeg"}],"video":{"url":"https://files.factuarea.com/products/key-rgb-01-demo.mp4","content_type":"video/mp4"},"is_active":true,"description":"Teclado mecánico retroiluminado RGB con switches Cherry MX Red y carcasa de aluminio.","tags":["periféricos","gaming"],"low_stock_threshold":10,"is_low_stock":false,"is_in_stock":true,"specifications":{"switch":"Cherry MX Red","layout":"ES","conexion":"USB-C"},"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"SHOP-42","created_at":"2026-01-02T08:30:00Z","updated_at":"2026-01-02T08:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"201":{"description":"Product created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","object":"product","name":"Teclado mecánico RGB","sku":"KEY-RGB-01","price":"1234.56","currency":"EUR","tax_rate":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","rate":21},"stock":120,"gallery":[{"index":0,"url":"https://files.factuarea.com/products/key-rgb-01-front.jpg","content_type":"image/jpeg"}],"video":{"url":"https://files.factuarea.com/products/key-rgb-01-demo.mp4","content_type":"video/mp4"},"is_active":true,"description":"Teclado mecánico retroiluminado RGB con switches Cherry MX Red y carcasa de aluminio.","tags":["periféricos","gaming"],"low_stock_threshold":10,"is_low_stock":false,"is_in_stock":true,"specifications":{"switch":"Cherry MX Red","layout":"ES","conexion":"USB-C"},"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"SHOP-42","created_at":"2026-01-02T08:30:00Z","updated_at":"2026-01-02T08:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/products/01HKQS5NW2A6QZ3B8K1M4XPVTC"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/products \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.products.list","description":"List products in your catalog with cursor-based pagination.","summary":"List all products","tags":["Products"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"sku","in":"query","description":"Product SKU. Exact match on `sku`.","schema":{"type":"string"}},{"name":"sku[in]","in":"query","description":"Product SKU. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"name","in":"query","description":"Product name. Exact match on `name`.","schema":{"type":"string"}},{"name":"is_active","in":"query","description":"Filter by active / inactive products. Exact match on `is_active`.","schema":{"type":"boolean"}},{"name":"created[gte]","in":"query","description":"Creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"price[gte]","in":"query","description":"Unit price. Greater than or equal to the given value.","schema":{"type":"number"}},{"name":"price[lte]","in":"query","description":"Unit price. Less than or equal to the given value.","schema":{"type":"number"}},{"name":"price[gt]","in":"query","description":"Unit price. Strictly greater than the given value.","schema":{"type":"number"}},{"name":"price[lt]","in":"query","description":"Unit price. Strictly less than the given value.","schema":{"type":"number"}},{"name":"in_stock","in":"query","description":"Filter by products with available stock (`true` → stock > 0) or out of stock (`false` → stock = 0). Exact match on `in_stock`.","schema":{"type":"boolean"}},{"name":"low_stock","in":"query","description":"Filter by products with low stock (`true` → 0 < stock ≤ configured threshold) or with ample stock (`false` → stock > threshold). Exact match on `low_stock`.","schema":{"type":"boolean"}},{"name":"tag","in":"query","description":"Filter by classification tag. Supports multiple values with `tag[in]`. Exact match on `tag`.","schema":{"type":"string"}},{"name":"tag[in]","in":"query","description":"Filter by classification tag. Supports multiple values with `tag[in]`. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","object":"product","name":"Teclado mecánico RGB","sku":"KEY-RGB-01","price":"1234.56","currency":"EUR","tax_rate":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","rate":21},"stock":120,"gallery":[{"index":0,"url":"https://files.factuarea.com/products/key-rgb-01-front.jpg","content_type":"image/jpeg"}],"video":{"url":"https://files.factuarea.com/products/key-rgb-01-demo.mp4","content_type":"video/mp4"},"is_active":true,"description":"Teclado mecánico retroiluminado RGB con switches Cherry MX Red y carcasa de aluminio.","tags":["periféricos","gaming"],"low_stock_threshold":10,"is_low_stock":false,"is_in_stock":true,"specifications":{"switch":"Cherry MX Red","layout":"ES","conexion":"USB-C"},"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"SHOP-42","created_at":"2026-01-02T08:30:00Z","updated_at":"2026-01-02T08:30:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.products.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/products \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/proformas":{"post":{"operationId":"public-api.v1.proformas.create","description":"Create a new proforma invoice in `draft` status. Proformas can later be converted to final invoices.","summary":"Create a proforma","tags":["Proformas"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProformaRequest"},"example":{"client_id":"019e5584-79ba-718e-80e3-3d257e1e67f0","series_id":"019e5584-7a7b-7222-991b-a39255914278","issued_on":"2026-05-31","valid_until":"2026-06-30","validity_days":30,"reference":"REF-API-2026-001","notes":"Proforma de ejemplo para documentacion de la API publica v1.","terms_and_conditions":"Validez 30 dias. Proforma sin valor fiscal hasta su conversion en factura.","payment_method":"bank_transfer","payment_terms":30,"shipping_cost":15.5,"delivery_terms":"Entrega en 5 dias habiles, portes incluidos","estimated_delivery_date":"2026-06-10","metadata":{"origen":"api_publica"},"lines":[{"description":"Consultoria tecnica (paquete 10h)","quantity":10,"unit_price":90,"tax_rate_id":"019e5584-7a7f-70fd-b9cb-9466c3ee12a8","discount_percent":0},{"description":"Licencia software anual","quantity":1,"unit_price":600,"tax_rate_id":"019e5584-7a7f-70fd-b9cb-9466c3ee12a8","discount_percent":10}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a05","object":"proforma","number":"PRO-2026-00007","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"draft","issued_on":"2026-01-22","valid_until":"2026-02-21","validity_days":30,"reference":"REF-API-2026-001","converted_to_id":null,"converted_invoice_number":"F-2025-003","subtotal":1500,"taxes_total":315,"total_vat":315,"total_retention":0,"total_surcharge":0,"total":1815,"shipping_cost":15.5,"total_with_shipping":1830.5,"currency":"EUR","payment_method":"bank_transfer","payment_terms_days":30,"delivery_terms":"Entrega en 5 dias habiles, portes incluidos","estimated_delivery_date":"2026-06-10","notes":"Proforma pendiente de validación.","terms_and_conditions":"Validez 30 dias. Proforma sin valor fiscal hasta su conversion en factura.","external_id":"ERP-PRO-2026-0007","lines":[{"object":"proforma_line","description":"Setup inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":1,"unit_price":1500,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":1500,"taxes":315,"total":1815}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["exportacion","pendiente-validar"],"custom_fields":[{"field":"incoterm","value":"EXW"}],"link_expires_at":"2026-07-01T09:53:23+02:00","link_is_active":true,"created_at":"2026-01-22T09:10:00Z","updated_at":"2026-01-22T09:10:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"201":{"description":"Proforma created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a05","object":"proforma","number":"PRO-2026-00007","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"draft","issued_on":"2026-01-22","valid_until":"2026-02-21","validity_days":30,"reference":"REF-API-2026-001","converted_to_id":null,"converted_invoice_number":"F-2025-003","subtotal":1500,"taxes_total":315,"total_vat":315,"total_retention":0,"total_surcharge":0,"total":1815,"shipping_cost":15.5,"total_with_shipping":1830.5,"currency":"EUR","payment_method":"bank_transfer","payment_terms_days":30,"delivery_terms":"Entrega en 5 dias habiles, portes incluidos","estimated_delivery_date":"2026-06-10","notes":"Proforma pendiente de validación.","terms_and_conditions":"Validez 30 dias. Proforma sin valor fiscal hasta su conversion en factura.","external_id":"ERP-PRO-2026-0007","lines":[{"object":"proforma_line","description":"Setup inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":1,"unit_price":1500,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":1500,"taxes":315,"total":1815}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["exportacion","pendiente-validar"],"custom_fields":[{"field":"incoterm","value":"EXW"}],"link_expires_at":"2026-07-01T09:53:23+02:00","link_is_active":true,"created_at":"2026-01-22T09:10:00Z","updated_at":"2026-01-22T09:10:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/proformas/01HKQS5NBC3P8M1KX4V7SLNHQE"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictProforma"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/proformas \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.proformas.list","description":"List your proforma invoices with cursor-based pagination.","summary":"List all proformas","tags":["Proformas"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Proforma status. Exact match on `status`.","schema":{"type":"string"}},{"name":"status[in]","in":"query","description":"Proforma status. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"client_id","in":"query","description":"Client ID (UUID v7). Exact match on `client_id`.","schema":{"type":"string","format":"uuid"}},{"name":"client_id[in]","in":"query","description":"Client ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"series_id","in":"query","description":"Series ID (UUID v7). Exact match on `series_id`.","schema":{"type":"string","format":"uuid"}},{"name":"series_id[in]","in":"query","description":"Series ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"created[gte]","in":"query","description":"Creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"total[gte]","in":"query","description":"Total amount. Greater than or equal to the given value.","schema":{"type":"number"}},{"name":"total[lte]","in":"query","description":"Total amount. Less than or equal to the given value.","schema":{"type":"number"}},{"name":"total[gt]","in":"query","description":"Total amount. Strictly greater than the given value.","schema":{"type":"number"}},{"name":"total[lt]","in":"query","description":"Total amount. Strictly less than the given value.","schema":{"type":"number"}},{"name":"tags","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches proformas carrying ANY of the tags). Exact match on `tags`.","schema":{"type":"string"}},{"name":"tags[in]","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches proformas carrying ANY of the tags). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"sort","in":"query","description":"Sort order. Use a field for ascending or a `-` prefix for descending (e.g. `-created`). Allowed fields: `created`, `total`, `number`, `valid_until`. Combined with the cursor, ordering stays deterministic (a stable secondary sort by the cursor id, Stripe-style). When omitted, results follow the default cursor order (`created` descending).","schema":{"type":"string","enum":["created","-created","total","-total","number","-number","valid_until","-valid_until"]},"example":"-created"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Proforma"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a05","object":"proforma","number":"PRO-2026-00007","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"draft","issued_on":"2026-01-22","valid_until":"2026-02-21","validity_days":30,"reference":"REF-API-2026-001","converted_to_id":null,"converted_invoice_number":"F-2025-003","subtotal":1500,"taxes_total":315,"total_vat":315,"total_retention":0,"total_surcharge":0,"total":1815,"shipping_cost":15.5,"total_with_shipping":1830.5,"currency":"EUR","payment_method":"bank_transfer","payment_terms_days":30,"delivery_terms":"Entrega en 5 dias habiles, portes incluidos","estimated_delivery_date":"2026-06-10","notes":"Proforma pendiente de validación.","terms_and_conditions":"Validez 30 dias. Proforma sin valor fiscal hasta su conversion en factura.","external_id":"ERP-PRO-2026-0007","lines":[{"object":"proforma_line","description":"Setup inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":1,"unit_price":1500,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":1500,"taxes":315,"total":1815}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["exportacion","pendiente-validar"],"custom_fields":[{"field":"incoterm","value":"EXW"}],"link_expires_at":"2026-07-01T09:53:23+02:00","link_is_active":true,"created_at":"2026-01-22T09:10:00Z","updated_at":"2026-01-22T09:10:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.proformas.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/proformas \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/purchase_invoices":{"post":{"operationId":"public-api.v1.purchase_invoices.create","description":"Record an invoice received from a supplier.","summary":"Create a purchase invoice","tags":["Purchase Invoices"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePurchaseInvoiceRequest"},"example":{"supplier_id":"456abe0d-79de-44e4-aa62-beedd41a7993","external_invoice_number":"HARVEST-PI-EXT-2026-0007","internal_code":"GASTO-2026-0007","issued_on":"2026-04-15","received_on":"2026-04-18","due_on":"2026-05-15","status":"draft","notes":"Factura de suministro electrico abril 2026.","internal_notes":"Revisar con contabilidad antes del cierre trimestral.","payment_method":"bank_transfer","payment_terms_days":30,"expense_account":"6280001","tax_period":"2026-Q2","tags":["suministros","electricidad","recurrente"],"is_reverse_charge":false,"metadata":{"cost_center":"operaciones","po_number":"PO-4521"},"lines":[{"description":"Suministro electrico abril 2026","quantity":1,"unit_price":450,"tax_rate":21},{"description":"Cargo fijo de potencia contratada","quantity":1,"unit_price":50,"tax_rate":21}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a07","object":"purchase_invoice","external_invoice_number":"INV-2026-001-DI","external_id":"ERP-COMPRA-2026-0007","internal_code":"GASTO-2026-0007","supplier":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","name":"Distribuciones Ibéricas, S.L."},"status":"paid","issued_on":"2026-01-05","received_on":"2026-04-18","due_on":"2026-02-04","subtotal":350,"taxes_total":73.5,"total_retention":0,"total":423.5,"currency":"EUR","paid_amount":423.5,"pending_amount":0,"payment_status":"paid","paid_at":"2026-01-10","payment_method":"transferencia","payment_terms_days":30,"bank_account":null,"expense_account":"6280001","expense_category_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c01","deductible_percentage":100,"operation_class":"corriente","exclude_347":false,"tax_period":"2026-Q2","is_reverse_charge":false,"tags":["suministros","oficina"],"custom_fields":[{"field":"centro_coste","value":"CC-OFICINA"}],"internal_notes":"Revisar con contabilidad antes del cierre trimestral.","attachment":{"filename":"factura-suministros-abril-2026.pdf","mime_type":"application/pdf","size_bytes":241,"download_url":"/v1/purchase_invoices/019e822c-555a-709d-99d7-2cfeac9fc920/file"},"lines":[{"object":"purchase_invoice_line","description":"Material oficina pedido Q1","quantity":1,"unit_price":350,"tax_rate":21,"retention_rate":0,"subtotal":350,"taxes":73.5,"retention_amount":0,"vat_deductible":true,"total":423.5}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"notes":"Pedido material oficina Q1.","created_at":"2026-01-08T10:00:00Z","updated_at":"2026-01-10T12:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"201":{"description":"Purchase invoice created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a07","object":"purchase_invoice","external_invoice_number":"INV-2026-001-DI","external_id":"ERP-COMPRA-2026-0007","internal_code":"GASTO-2026-0007","supplier":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","name":"Distribuciones Ibéricas, S.L."},"status":"paid","issued_on":"2026-01-05","received_on":"2026-04-18","due_on":"2026-02-04","subtotal":350,"taxes_total":73.5,"total_retention":0,"total":423.5,"currency":"EUR","paid_amount":423.5,"pending_amount":0,"payment_status":"paid","paid_at":"2026-01-10","payment_method":"transferencia","payment_terms_days":30,"bank_account":null,"expense_account":"6280001","expense_category_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c01","deductible_percentage":100,"operation_class":"corriente","exclude_347":false,"tax_period":"2026-Q2","is_reverse_charge":false,"tags":["suministros","oficina"],"custom_fields":[{"field":"centro_coste","value":"CC-OFICINA"}],"internal_notes":"Revisar con contabilidad antes del cierre trimestral.","attachment":{"filename":"factura-suministros-abril-2026.pdf","mime_type":"application/pdf","size_bytes":241,"download_url":"/v1/purchase_invoices/019e822c-555a-709d-99d7-2cfeac9fc920/file"},"lines":[{"object":"purchase_invoice_line","description":"Material oficina pedido Q1","quantity":1,"unit_price":350,"tax_rate":21,"retention_rate":0,"subtotal":350,"taxes":73.5,"retention_amount":0,"vat_deductible":true,"total":423.5}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"notes":"Pedido material oficina Q1.","created_at":"2026-01-08T10:00:00Z","updated_at":"2026-01-10T12:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/purchase_invoices/01HKQS5NFG7T1R4M8V9SLNHQH"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictPurchaseInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/purchase_invoices \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.purchase_invoices.list","description":"List purchase invoices received from suppliers with cursor-based pagination.","summary":"List all purchase invoices","tags":["Purchase Invoices"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Purchase invoice status. Exact match on `status`.","schema":{"type":"string"}},{"name":"status[in]","in":"query","description":"Purchase invoice status. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"supplier_id","in":"query","description":"Supplier ID (UUID v7). Exact match on `supplier_id`.","schema":{"type":"string","format":"uuid"}},{"name":"supplier_id[in]","in":"query","description":"Supplier ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"created[gte]","in":"query","description":"Creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"issued_on[gte]","in":"query","description":"Issue date. Greater than or equal to the given value.","schema":{"type":"string","format":"date"}},{"name":"issued_on[lte]","in":"query","description":"Issue date. Less than or equal to the given value.","schema":{"type":"string","format":"date"}},{"name":"issued_on[gt]","in":"query","description":"Issue date. Strictly greater than the given value.","schema":{"type":"string","format":"date"}},{"name":"issued_on[lt]","in":"query","description":"Issue date. Strictly less than the given value.","schema":{"type":"string","format":"date"}},{"name":"total[gte]","in":"query","description":"Total amount. Greater than or equal to the given value.","schema":{"type":"number"}},{"name":"total[lte]","in":"query","description":"Total amount. Less than or equal to the given value.","schema":{"type":"number"}},{"name":"total[gt]","in":"query","description":"Total amount. Strictly greater than the given value.","schema":{"type":"number"}},{"name":"total[lt]","in":"query","description":"Total amount. Strictly less than the given value.","schema":{"type":"number"}},{"name":"currency","in":"query","description":"ISO 4217 currency code. Exact match on `currency`.","schema":{"type":"string"}},{"name":"currency[in]","in":"query","description":"ISO 4217 currency code. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"external_invoice_number","in":"query","description":"Invoice number issued by the supplier. Exact match on `external_invoice_number`.","schema":{"type":"string"}},{"name":"tags","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches purchase invoices carrying ANY of the tags). Exact match on `tags`.","schema":{"type":"string"}},{"name":"tags[in]","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches purchase invoices carrying ANY of the tags). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"sort","in":"query","description":"Sort order. Use a field for ascending or a `-` prefix for descending (e.g. `-created`). Allowed fields: `created`, `total`, `issued_on`, `due_on`. Combined with the cursor, ordering stays deterministic (a stable secondary sort by the cursor id, Stripe-style). When omitted, results follow the default cursor order (`created` descending).","schema":{"type":"string","enum":["created","-created","total","-total","issued_on","-issued_on","due_on","-due_on"]},"example":"-created"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseInvoice"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a07","object":"purchase_invoice","external_invoice_number":"INV-2026-001-DI","external_id":"ERP-COMPRA-2026-0007","internal_code":"GASTO-2026-0007","supplier":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","name":"Distribuciones Ibéricas, S.L."},"status":"paid","issued_on":"2026-01-05","received_on":"2026-04-18","due_on":"2026-02-04","subtotal":350,"taxes_total":73.5,"total_retention":0,"total":423.5,"currency":"EUR","paid_amount":423.5,"pending_amount":0,"payment_status":"paid","paid_at":"2026-01-10","payment_method":"transferencia","payment_terms_days":30,"bank_account":null,"expense_account":"6280001","expense_category_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c01","deductible_percentage":100,"operation_class":"corriente","exclude_347":false,"tax_period":"2026-Q2","is_reverse_charge":false,"tags":["suministros","oficina"],"custom_fields":[{"field":"centro_coste","value":"CC-OFICINA"}],"internal_notes":"Revisar con contabilidad antes del cierre trimestral.","attachment":{"filename":"factura-suministros-abril-2026.pdf","mime_type":"application/pdf","size_bytes":241,"download_url":"/v1/purchase_invoices/019e822c-555a-709d-99d7-2cfeac9fc920/file"},"lines":[{"object":"purchase_invoice_line","description":"Material oficina pedido Q1","quantity":1,"unit_price":350,"tax_rate":21,"retention_rate":0,"subtotal":350,"taxes":73.5,"retention_amount":0,"vat_deductible":true,"total":423.5}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"notes":"Pedido material oficina Q1.","created_at":"2026-01-08T10:00:00Z","updated_at":"2026-01-10T12:00:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.purchaseInvoices.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/purchase_invoices \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/quotes":{"post":{"operationId":"public-api.v1.quotes.create","description":"Create a new sales quote in `draft` status. Quotes can later be converted to invoices via `POST /quotes/{quote}/convert`.","summary":"Create a quote","tags":["Quotes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuoteRequest"},"example":{"client_id":"019e5584-79ba-718e-80e3-3d257e1e67f0","series_id":"019e5584-7a74-7035-aac1-fc6e278c57f8","issued_on":"2026-06-01","valid_until":"2026-07-01","notes":"Presupuesto de servicios de consultoria Q3","terms":"Presupuesto valido durante 30 dias desde la fecha de emision.","metadata":{"po_number":"PO-2026-0042","channel":"api"},"lines":[{"description":"Consultoria estrategica anual","quantity":12,"unit_price":120,"tax_rate_id":"019e5584-7a7f-70fd-b9cb-9466c3ee12a8","product_id":"019e5584-7c1b-7260-bc52-34613ad04c09","discount_percent":0},{"description":"Formacion presencial (sesion)","quantity":4,"unit_price":350,"tax_rate_id":"019e5584-7a7f-70fd-b9cb-9466c3ee12a8","discount_percent":10}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04","object":"quote","number":"P-2026-00012","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"sent","issued_on":"2026-01-18","valid_until":"2026-02-17","accepted_at":null,"rejected_at":null,"converted_to_id":null,"converted_invoice_number":"F-2025-001","subtotal":500,"taxes_total":105,"total_vat":105,"total_retention":0,"total_surcharge":0,"total":605,"currency":"EUR","notes":"Presupuesto válido 30 días.","terms":"Presupuesto valido durante 30 dias desde la fecha de emision.","external_id":"CRM-PRES-2026-0012","lines":[{"object":"quote_line","description":"Auditoría inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":5,"unit_price":100,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":500,"taxes":105,"total":605}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["comercial","q1-2026"],"custom_fields":[{"field":"campania","value":"Promo primavera"}],"link_expires_at":"2026-07-01T09:53:57+02:00","link_is_active":true,"created_at":"2026-01-18T16:20:00Z","updated_at":"2026-01-18T16:25:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"201":{"description":"Quote created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04","object":"quote","number":"P-2026-00012","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"sent","issued_on":"2026-01-18","valid_until":"2026-02-17","accepted_at":null,"rejected_at":null,"converted_to_id":null,"converted_invoice_number":"F-2025-001","subtotal":500,"taxes_total":105,"total_vat":105,"total_retention":0,"total_surcharge":0,"total":605,"currency":"EUR","notes":"Presupuesto válido 30 días.","terms":"Presupuesto valido durante 30 dias desde la fecha de emision.","external_id":"CRM-PRES-2026-0012","lines":[{"object":"quote_line","description":"Auditoría inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":5,"unit_price":100,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":500,"taxes":105,"total":605}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["comercial","q1-2026"],"custom_fields":[{"field":"campania","value":"Promo primavera"}],"link_expires_at":"2026-07-01T09:53:57+02:00","link_is_active":true,"created_at":"2026-01-18T16:20:00Z","updated_at":"2026-01-18T16:25:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/quotes/01HKQS5NBC3P8M1KX4V7SLNHQD"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictQuote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/quotes \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.quotes.list","description":"List your sales quotes with cursor-based pagination. Supports filtering by `status[in]`, `client_id`, `issued_on[gte|lte]`.","summary":"List all quotes","tags":["Quotes"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Quote status. Exact match on `status`.","schema":{"type":"string"}},{"name":"status[in]","in":"query","description":"Quote status. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"client_id","in":"query","description":"Client ID (UUID v7). Exact match on `client_id`.","schema":{"type":"string","format":"uuid"}},{"name":"client_id[in]","in":"query","description":"Client ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"series_id","in":"query","description":"Series ID (UUID v7). Exact match on `series_id`.","schema":{"type":"string","format":"uuid"}},{"name":"series_id[in]","in":"query","description":"Series ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"created[gte]","in":"query","description":"Creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"valid_until[gte]","in":"query","description":"Validity date. Greater than or equal to the given value.","schema":{"type":"string","format":"date"}},{"name":"valid_until[lte]","in":"query","description":"Validity date. Less than or equal to the given value.","schema":{"type":"string","format":"date"}},{"name":"valid_until[gt]","in":"query","description":"Validity date. Strictly greater than the given value.","schema":{"type":"string","format":"date"}},{"name":"valid_until[lt]","in":"query","description":"Validity date. Strictly less than the given value.","schema":{"type":"string","format":"date"}},{"name":"total[gte]","in":"query","description":"Total amount. Greater than or equal to the given value.","schema":{"type":"number"}},{"name":"total[lte]","in":"query","description":"Total amount. Less than or equal to the given value.","schema":{"type":"number"}},{"name":"total[gt]","in":"query","description":"Total amount. Strictly greater than the given value.","schema":{"type":"number"}},{"name":"total[lt]","in":"query","description":"Total amount. Strictly less than the given value.","schema":{"type":"number"}},{"name":"tags","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches quotes carrying ANY of the tags). Exact match on `tags`.","schema":{"type":"string"}},{"name":"tags[in]","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches quotes carrying ANY of the tags). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"sort","in":"query","description":"Sort order. Use a field for ascending or a `-` prefix for descending (e.g. `-created`). Allowed fields: `created`, `total`, `number`, `valid_until`. Combined with the cursor, ordering stays deterministic (a stable secondary sort by the cursor id, Stripe-style). When omitted, results follow the default cursor order (`created` descending).","schema":{"type":"string","enum":["created","-created","total","-total","number","-number","valid_until","-valid_until"]},"example":"-created"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04","object":"quote","number":"P-2026-00012","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"sent","issued_on":"2026-01-18","valid_until":"2026-02-17","accepted_at":null,"rejected_at":null,"converted_to_id":null,"converted_invoice_number":"F-2025-001","subtotal":500,"taxes_total":105,"total_vat":105,"total_retention":0,"total_surcharge":0,"total":605,"currency":"EUR","notes":"Presupuesto válido 30 días.","terms":"Presupuesto valido durante 30 dias desde la fecha de emision.","external_id":"CRM-PRES-2026-0012","lines":[{"object":"quote_line","description":"Auditoría inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":5,"unit_price":100,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":500,"taxes":105,"total":605}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["comercial","q1-2026"],"custom_fields":[{"field":"campania","value":"Promo primavera"}],"link_expires_at":"2026-07-01T09:53:57+02:00","link_is_active":true,"created_at":"2026-01-18T16:20:00Z","updated_at":"2026-01-18T16:25:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.quotes.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/quotes \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/recurring_invoices":{"post":{"operationId":"public-api.v1.recurring_invoices.create","description":"Create a recurring invoice template that auto-generates invoices on a fixed cadence (weekly, monthly, quarterly, yearly).","summary":"Create a recurring invoice","tags":["Recurring Invoices"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecurringInvoiceRequest"},"example":{"client_id":"019e7f77-2dd2-7060-8cb7-41b3e35d5fba","series_id":"019e7f77-6dd3-70c7-94f8-ba48b9c90c8d","name":"Mantenimiento mensual Acme","description":"Contrato de soporte y mantenimiento Plan Pro","notes":"Renovación automática. Facturar el día 1 de cada mes.","frequency":"monthly","start_on":"2026-06-01","holiday_handling":"before","days_before_due":5,"max_occurrences":12,"email_to":"facturacion@cliente.com","metadata":{"team":"integrations"},"lines":[{"description":"Cuota soporte mensual","quantity":1,"unit_price":200,"tax_rate":21}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08","object":"recurring_invoice","client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"status":"active","frequency":"monthly","name":"Cuota mantenimiento mensual Acme","description":"Contrato de soporte y mantenimiento Plan Pro","notes":"Renovación automática. Facturar el día 1 de cada mes.","email_to":"facturacion@acme.example","send_automatically":true,"days_before_due":30,"max_occurrences":12,"occurrences_count":3,"remaining_occurrences":9,"holiday_handling":"next_business_day","start_on":"2026-01-01","end_on":"2026-12-31","next_run_at":"2026-02-01T09:00:00Z","last_run_at":"2026-01-01T09:00:00Z","cancelled_at":null,"subtotal":200,"taxes_total":42,"total":242,"currency":"EUR","lines":[{"object":"recurring_invoice_line","description":"Cuota soporte mensual","quantity":1,"unit_price":200,"tax_rate":21,"retention":0,"surcharge":0,"subtotal":200,"taxes":42,"total":242}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"ERP-REC-2026-0008","tags":["suscripcion","mantenimiento"],"custom_fields":[{"field":"contrato","value":"CTR-2026-0007"}],"created_at":"2025-12-20T15:00:00Z","updated_at":"2026-01-01T09:05:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"201":{"description":"Recurring invoice created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08","object":"recurring_invoice","client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"status":"active","frequency":"monthly","name":"Cuota mantenimiento mensual Acme","description":"Contrato de soporte y mantenimiento Plan Pro","notes":"Renovación automática. Facturar el día 1 de cada mes.","email_to":"facturacion@acme.example","send_automatically":true,"days_before_due":30,"max_occurrences":12,"occurrences_count":3,"remaining_occurrences":9,"holiday_handling":"next_business_day","start_on":"2026-01-01","end_on":"2026-12-31","next_run_at":"2026-02-01T09:00:00Z","last_run_at":"2026-01-01T09:00:00Z","cancelled_at":null,"subtotal":200,"taxes_total":42,"total":242,"currency":"EUR","lines":[{"object":"recurring_invoice_line","description":"Cuota soporte mensual","quantity":1,"unit_price":200,"tax_rate":21,"retention":0,"surcharge":0,"subtotal":200,"taxes":42,"total":242}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"ERP-REC-2026-0008","tags":["suscripcion","mantenimiento"],"custom_fields":[{"field":"contrato","value":"CTR-2026-0007"}],"created_at":"2025-12-20T15:00:00Z","updated_at":"2026-01-01T09:05:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/recurring_invoices/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/recurring_invoices \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.recurring_invoices.list","description":"List your recurring invoice templates with cursor-based pagination.","summary":"List all recurring invoices","tags":["Recurring Invoices"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Recurring plan status. Exact match on `status`.","schema":{"type":"string"}},{"name":"status[in]","in":"query","description":"Recurring plan status. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"client_id","in":"query","description":"Client ID (UUID v7). Exact match on `client_id`.","schema":{"type":"string","format":"uuid"}},{"name":"client_id[in]","in":"query","description":"Client ID (UUID v7). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"frequency","in":"query","description":"Issuance frequency (e.g. monthly, yearly). Exact match on `frequency`.","schema":{"type":"string"}},{"name":"frequency[in]","in":"query","description":"Issuance frequency (e.g. monthly, yearly). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"next_run_at[gte]","in":"query","description":"Next run date. Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"next_run_at[lte]","in":"query","description":"Next run date. Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"next_run_at[gt]","in":"query","description":"Next run date. Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"next_run_at[lt]","in":"query","description":"Next run date. Strictly less than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"tags","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches recurring invoices carrying ANY of the tags). Exact match on `tags`.","schema":{"type":"string"}},{"name":"tags[in]","in":"query","description":"Filter by classification tag (lowercase slug). Supports multiple values with `tags[in]=a,b` (JSON_CONTAINS, OR semantics — matches recurring invoices carrying ANY of the tags). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"sort","in":"query","description":"Sort order. Use a field for ascending or a `-` prefix for descending (e.g. `-created`). Allowed fields: `created`, `next_run_at`. Combined with the cursor, ordering stays deterministic (a stable secondary sort by the cursor id, Stripe-style). When omitted, results follow the default cursor order (`created` descending).","schema":{"type":"string","enum":["created","-created","next_run_at","-next_run_at"]},"example":"-created"}],"responses":{"200":{"description":"Non-existent or cross-company public FK (`client_uuid`/`series_uuid`)\n→ empty result without leaking cross-tenant existence.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecurringInvoice"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08","object":"recurring_invoice","client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"status":"active","frequency":"monthly","name":"Cuota mantenimiento mensual Acme","description":"Contrato de soporte y mantenimiento Plan Pro","notes":"Renovación automática. Facturar el día 1 de cada mes.","email_to":"facturacion@acme.example","send_automatically":true,"days_before_due":30,"max_occurrences":12,"occurrences_count":3,"remaining_occurrences":9,"holiday_handling":"next_business_day","start_on":"2026-01-01","end_on":"2026-12-31","next_run_at":"2026-02-01T09:00:00Z","last_run_at":"2026-01-01T09:00:00Z","cancelled_at":null,"subtotal":200,"taxes_total":42,"total":242,"currency":"EUR","lines":[{"object":"recurring_invoice_line","description":"Cuota soporte mensual","quantity":1,"unit_price":200,"tax_rate":21,"retention":0,"surcharge":0,"subtotal":200,"taxes":42,"total":242}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"ERP-REC-2026-0008","tags":["suscripcion","mantenimiento"],"custom_fields":[{"field":"contrato","value":"CTR-2026-0007"}],"created_at":"2025-12-20T15:00:00Z","updated_at":"2026-01-01T09:05:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.recurringInvoices.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/recurring_invoices \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/series":{"post":{"operationId":"public-api.v1.series.create","description":"Create a document numbering series. Optional `number_format` sets the numbering mask (padding + year token + separator, e.g. `{code}-{YYYY}-{00000}`); a malformed mask returns 422. Optional `initial_number` (>= 1) starts the counter at a given value to continue an existing numbering when migrating (defaults to 1). The same code may be reused across document types (multi-series). Once created, a series is immutable per AEAT compliance (the `PUT` method returns 405), so `number_format` and `initial_number` can only be set here.","summary":"Create a series","tags":["Series"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSeriesRequest"},"example":{"code":"HARV01","name":"Facturas Harvest","document_type":"invoice","prefix":"HARV01","year_reset":true}}}},"responses":{"201":{"description":"Series created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Series"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","object":"series","code":"F-2026","name":"Facturas 2026","document_type":"invoice","prefix":"F-2026-","number_format":"{code}-{YYYY}-{000}","next_number":46,"current_number":45,"initial_number":1,"year_reset":true,"is_default":true,"is_active":true,"created_at":"2026-01-01T00:00:00Z","updated_at":"2026-01-20T11:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/series/01HKQS5NXR4D7P2K9V3M6BWTLE"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/series \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.series.list","description":"List your document numbering series with cursor-based pagination.","summary":"List all series","tags":["Series"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"document_type","in":"query","description":"Document type (invoice, quote, etc.). Exact match on `document_type`.","schema":{"type":"string"}},{"name":"document_type[in]","in":"query","description":"Document type (invoice, quote, etc.). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Series"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","object":"series","code":"F-2026","name":"Facturas 2026","document_type":"invoice","prefix":"F-2026-","number_format":"{code}-{YYYY}-{000}","next_number":46,"current_number":45,"initial_number":1,"year_reset":true,"is_default":true,"is_active":true,"created_at":"2026-01-01T00:00:00Z","updated_at":"2026-01-20T11:30:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.series.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/series \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/suppliers":{"post":{"operationId":"public-api.v1.suppliers.create","description":"Create a new supplier (vendor) for your company. The returned object includes the generated `uuid`.","summary":"Create a supplier","tags":["Suppliers"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSupplierRequest"},"example":{"name":"Transportes Garcia e Hijos S.L.","business_name":"Transportes Garcia e Hijos S.L.","commercial_name":"Garcia Logistica","tax_id":"B12345674","vat_id":"ESB12345674","email":"administracion@garcialogistica.es","phone":"952667788","mobile":"655443322","fax":"952667789","website":"https://www.garcialogistica.es","contact_person":"Maria Garcia","billing_emails":["facturacion@garcialogistica.es","contabilidad@garcialogistica.es"],"coordinates":{"latitude":36.7202,"longitude":-4.4203},"default_discount":5,"default_vat_rate":21,"default_retention_rate":15,"is_surcharge_subject":false,"bank_accounts":[{"iban":"ES9121000418450200051332","bic":"CAIXESBBXXX","is_default":true,"notes":"Cuenta principal"}],"preferred_operation_regime":"general","payment_method":"bank_transfer","payment_terms_days":30,"address":{"line1":"Calle Mendez Nunez 12","line2":"Edificio Central","number":"12","floor":"3","door":"B","postal_code":"29008","city":"Malaga","province":"Malaga","country":"ES"},"notes":"Proveedor de transporte y logistica","metadata":{"erp_code":"PROV-2026-001"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Supplier"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","object":"supplier","name":"Distribuciones Ibéricas, S.L.","business_name":"Distribuciones Ibéricas Sociedad Limitada","commercial_name":"Distribuciones IB","tax_id":"B87654321","vat_id":"ESB87654321","email":"facturacion@distribibericas.com","phone":"+34 911 234 567","fax":"+34 911 234 568","mobile":"+34 600 234 567","website":"https://distribibericas.com","contact_person":"María López","billing_emails":["facturas@distribibericas.com","contabilidad@distribibericas.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":36.6954,"longitude":-4.4564},"iban":"ES9121000418450200051332","default_taxes_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","default_discount":3,"default_vat_rate":21,"default_retention_rate":0,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"external_id":"SUP-1","notes":"Proveedor preferente de material de oficina.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-10T09:00:00Z","updated_at":"2026-01-10T09:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"201":{"description":"Supplier created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Supplier"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","object":"supplier","name":"Distribuciones Ibéricas, S.L.","business_name":"Distribuciones Ibéricas Sociedad Limitada","commercial_name":"Distribuciones IB","tax_id":"B87654321","vat_id":"ESB87654321","email":"facturacion@distribibericas.com","phone":"+34 911 234 567","fax":"+34 911 234 568","mobile":"+34 600 234 567","website":"https://distribibericas.com","contact_person":"María López","billing_emails":["facturas@distribibericas.com","contabilidad@distribibericas.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":36.6954,"longitude":-4.4564},"iban":"ES9121000418450200051332","default_taxes_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","default_discount":3,"default_vat_rate":21,"default_retention_rate":0,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"external_id":"SUP-1","notes":"Proveedor preferente de material de oficina.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-10T09:00:00Z","updated_at":"2026-01-10T09:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/suppliers/01HKQS5N8VR7QXJ9K3T6BWPMZA"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/suppliers \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.suppliers.list","description":"List your suppliers with cursor-based pagination. Supports filtering by `is_active`, `created_at[gte|lte]`.","summary":"List all suppliers","tags":["Suppliers"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"tax_id","in":"query","description":"Fiscal tax number (NIF/CIF/NIE) of the supplier. Exact match on `tax_id`.","schema":{"type":"string"}},{"name":"tax_id[in]","in":"query","description":"Fiscal tax number (NIF/CIF/NIE) of the supplier. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"vat_id","in":"query","description":"Intra-community VAT number. Exact match on `vat_id`.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Trade name of the supplier. Exact match on `name`.","schema":{"type":"string"}},{"name":"is_active","in":"query","description":"Filter by active / inactive suppliers. Exact match on `is_active`.","schema":{"type":"boolean"}},{"name":"created[gte]","in":"query","description":"Creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Supplier"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","object":"supplier","name":"Distribuciones Ibéricas, S.L.","business_name":"Distribuciones Ibéricas Sociedad Limitada","commercial_name":"Distribuciones IB","tax_id":"B87654321","vat_id":"ESB87654321","email":"facturacion@distribibericas.com","phone":"+34 911 234 567","fax":"+34 911 234 568","mobile":"+34 600 234 567","website":"https://distribibericas.com","contact_person":"María López","billing_emails":["facturas@distribibericas.com","contabilidad@distribibericas.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":36.6954,"longitude":-4.4564},"iban":"ES9121000418450200051332","default_taxes_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","default_discount":3,"default_vat_rate":21,"default_retention_rate":0,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"external_id":"SUP-1","notes":"Proveedor preferente de material de oficina.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-10T09:00:00Z","updated_at":"2026-01-10T09:00:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.suppliers.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/suppliers \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/taxes":{"post":{"operationId":"public-api.v1.taxes.create","description":"Register a new tax with name, unique code, type (vat, retention, surcharge or other), rate and scope (sale, purchase or both). The ISO-2 country code is required.","summary":"Create a tax","tags":["Taxes"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaxRequest"},"example":{"name":"IVA campaña verano","code":"IVA_HARV_24238","type":"vat","rate":21,"applies_to":"both","country":"ES","description":"IVA general para campaña de verano","is_active":true,"customer_visible_label":"IVA 21% incluido","external_reference":"S1","valid_from":"2026-06-01","valid_until":"2026-09-30","reverse_charge":false,"country_aeat_zone":"peninsula","metadata":{"campaign":"verano-2026"},"default_for_documents":{"invoice":false,"quote":false,"delivery_note":false,"proforma":false,"purchase_invoice":false,"recurring_invoice":false}}}}},"responses":{"201":{"description":"Tax created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tax"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","object":"tax","name":"IVA general 21%","code":"IVA21","rate":21,"type":"vat","applies_to":"both","country":"ES","is_default":true,"is_active":true,"is_system":true,"description":"IVA general aplicable en territorio peninsular y Baleares.","default_for_documents":{"invoice":true,"quote":true,"delivery_note":true,"proforma":true,"purchase_invoice":true,"recurring_invoice":true},"customer_visible_label":"IVA 21%","external_reference":"S1","valid_from":"2012-09-01","valid_until":null,"reverse_charge":false,"country_aeat_zone":"peninsula","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"created_at":"2024-01-01T00:00:00Z","updated_at":"2024-01-01T00:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/taxes/01HKQS5NPVZ8XJ3R4K7W9YQTLR"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/taxes \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.taxes.list","description":"List the tax rates available to your company (Spanish IVA, IRPF, recargo, etc.).","summary":"List all taxes","tags":["Taxes"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","description":"Tax type: `vat`, `retention`, `surcharge`, `other`. Exact match on `type`.","schema":{"type":"string"}},{"name":"type[in]","in":"query","description":"Tax type: `vat`, `retention`, `surcharge`, `other`. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"is_active","in":"query","description":"Filter active / inactive taxes. Exact match on `is_active`.","schema":{"type":"boolean"}},{"name":"is_default","in":"query","description":"Filter taxes marked as global default (legacy flag). Exact match on `is_default`.","schema":{"type":"boolean"}},{"name":"applies_to","in":"query","description":"Scope: `sales`, `purchases`, `both`. Exact match on `applies_to`.","schema":{"type":"string"}},{"name":"applies_to[in]","in":"query","description":"Scope: `sales`, `purchases`, `both`. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"country","in":"query","description":"ISO 3166-1 alpha-2 country code. Exact match on `country`.","schema":{"type":"string"}},{"name":"code","in":"query","description":"Short tax code (exact match). Exact match on `code`.","schema":{"type":"string"}},{"name":"search","in":"query","description":"Escaped LIKE search over `name` and `code` (limit 80 chars). Exact match on `search`.","schema":{"type":"string"}},{"name":"external_reference","in":"query","description":"Exact AEAT key: S1..S3, E1..E6, N1..N2. Exact match on `external_reference`.","schema":{"type":"string"}},{"name":"external_reference[in]","in":"query","description":"Exact AEAT key: S1..S3, E1..E6, N1..N2. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"is_system","in":"query","description":"Filter system taxes (global catalog) vs custom. Exact match on `is_system`.","schema":{"type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tax"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","object":"tax","name":"IVA general 21%","code":"IVA21","rate":21,"type":"vat","applies_to":"both","country":"ES","is_default":true,"is_active":true,"is_system":true,"description":"IVA general aplicable en territorio peninsular y Baleares.","default_for_documents":{"invoice":true,"quote":true,"delivery_note":true,"proforma":true,"purchase_invoice":true,"recurring_invoice":true},"customer_visible_label":"IVA 21%","external_reference":"S1","valid_from":"2012-09-01","valid_until":null,"reverse_charge":false,"country_aeat_zone":"peninsula","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"created_at":"2024-01-01T00:00:00Z","updated_at":"2024-01-01T00:00:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.taxes.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/taxes \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/webhook_endpoints":{"post":{"operationId":"public-api.v1.webhook_endpoints.create","description":"Create a webhook endpoint that receives event notifications via HTTPS callbacks. The signing `secret` is returned **once** in this response and never again — store it securely.","summary":"Create a webhook endpoint","tags":["Webhooks"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"},"example":{"url":"https://example.com/webhooks/factuarea","description":"Webhook principal de producción.","enabled_events":["invoice.created","invoice.paid","quote.converted"],"api_version":"2026-05-01","timeout_seconds":10,"ip_allowlist":["203.0.113.10","198.51.100.0/24"],"custom_headers":{"X-Custom-Auth":"tenant-a"},"metadata":{"team":"integrations"}}}}},"responses":{"201":{"description":"Webhook endpoint created successfully. The `Location` header contains the canonical URL of the newly created resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b","object":"webhook_endpoint","url":"https://example.com/webhooks/factuarea","description":"Webhook principal de producción.","enabled_events":["invoice.created","invoice.paid","quote.approved"],"status":"enabled","ip_allowlist":["203.0.113.10","198.51.100.0/24"],"delivery_success_rate_24h":99.5,"last_delivery_at":"2026-01-25T18:00:00Z","last_failure_at":"2026-01-20T09:14:33Z","previous_secret_valid_until":"2026-01-26T18:00:00Z","created_at":"2025-12-15T12:00:00Z","updated_at":"2026-01-25T18:00:00Z","api_version":"2026-05-01","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"custom_headers":{"Authorization":"Bearer integration-token","X-Custom-Auth":"tenant-a"},"timeout_seconds":10,"degraded_since":"2026-01-24T07:30:00Z","secret":"whsec_01HKQS5N8VR7QXJ9K3T6BWPMZA9876543210ABCDEF"}}}},"headers":{"Warning":{"description":"RFC 7234 warning. Indicates that the response body contains a value (`secret`) that will not be returned in subsequent requests. Store it securely on receipt.","schema":{"type":"string","example":"199 - \"secret is only shown once\""}},"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/webhook_endpoints/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.webhookEndpoints.create({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->publicApiV1WebhookEndpointsCreate($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/webhook_endpoints \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]},"get":{"operationId":"public-api.v1.webhook_endpoints.list","description":"List your webhook endpoints with cursor-based pagination.","summary":"List all webhook endpoints","tags":["Webhooks"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b","object":"webhook_endpoint","url":"https://example.com/webhooks/factuarea","description":"Webhook principal de producción.","enabled_events":["invoice.created","invoice.paid","quote.approved"],"status":"enabled","ip_allowlist":["203.0.113.10","198.51.100.0/24"],"delivery_success_rate_24h":99.5,"last_delivery_at":"2026-01-25T18:00:00Z","last_failure_at":"2026-01-20T09:14:33Z","previous_secret_valid_until":"2026-01-26T18:00:00Z","created_at":"2025-12-15T12:00:00Z","updated_at":"2026-01-25T18:00:00Z","api_version":"2026-05-01","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"custom_headers":{"Authorization":"Bearer integration-token","X-Custom-Auth":"tenant-a"},"timeout_seconds":10,"degraded_since":"2026-01-24T07:30:00Z"}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.webhookEndpoints.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->publicApiV1WebhookEndpointsList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/webhook_endpoints \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/clients/{client}":{"delete":{"operationId":"public-api.v1.clients.delete","description":"Delete a client. Returns 422 if the client is referenced by any document (invoice, quote, etc.).","summary":"Delete a client","tags":["Clients"],"parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/clients/{client} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.clients.show","description":"Retrieve a client by its `uuid`. Returns 404 if the client does not exist or belongs to another company.","summary":"Retrieve a client","tags":["Clients"],"parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Client"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","object":"client","name":"Acme Corporation","commercial_name":"Acme SL","tax_id":"B12345678","vat_id":"ESB12345678","email":"billing@acme.com","phone":"+34 600 123 456","fax":"+34 91 123 45 68","mobile":"+34 600 000 000","website":"https://acme.com","contact_person":"Juan García","billing_emails":["facturacion@acme.com","contabilidad@acme.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":39.4699,"longitude":-0.3763},"default_discount":5,"default_vat_rate":21,"default_retention_rate":15,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"dir3_accounting_office":"L01280796","dir3_managing_body":"L01280796","dir3_processing_unit":"L01280796","external_id":"CRM-99","notes":"Pago al contado.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-15T10:30:00Z","updated_at":"2026-01-15T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/clients/{client} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.clients.update","description":"Update a client. Only fields included in the payload are modified; omitted fields retain their previous values.","summary":"Update a client","tags":["Clients"],"parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClientRequest"},"example":{"email":"nuevo-contacto@talleresmed.es","phone":"961119988","contact_person":"Pablo Ruiz","notes":"Se actualizó el contacto comercial.","default_discount":8}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Client"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","object":"client","name":"Acme Corporation","commercial_name":"Acme SL","tax_id":"B12345678","vat_id":"ESB12345678","email":"billing@acme.com","phone":"+34 600 123 456","fax":"+34 91 123 45 68","mobile":"+34 600 000 000","website":"https://acme.com","contact_person":"Juan García","billing_emails":["facturacion@acme.com","contabilidad@acme.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":39.4699,"longitude":-0.3763},"default_discount":5,"default_vat_rate":21,"default_retention_rate":15,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"dir3_accounting_office":"L01280796","dir3_managing_body":"L01280796","dir3_processing_unit":"L01280796","external_id":"CRM-99","notes":"Pago al contado.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-15T10:30:00Z","updated_at":"2026-01-15T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/clients/{client} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/delivery_notes/{delivery_note}":{"delete":{"operationId":"public-api.v1.delivery_notes.delete","description":"Delete a delivery note. Only `draft` notes without an assigned number can be deleted; any other state returns 409 `invalid_status_transition`.","summary":"Delete a delivery note","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/delivery_notes/{delivery_note} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.delivery_notes.show","description":"Retrieve a delivery note by its `uuid`.","summary":"Retrieve a delivery note","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06","object":"delivery_note","number":"A-2026-00031","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"signed","issued_on":"2026-01-19","delivery_date":"2026-01-21","signed_at":"2026-01-21T14:50:00Z","signed_by":"María García López","signature_image_url":"https://files.factuarea.com/signatures/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06.png","vehicle_plate":"5678JKL","driver":{"name":"Pedro Sánchez Ruiz","tax_id":"12345678Z"},"tracking":{"number":"TRK-2026-0099","carrier":"SEUR"},"received_by":{"name":"María García López","tax_id":"87654321X"},"billing_emails":["administracion@cliente.com"],"subtotal":800,"taxes_total":168,"total":968,"currency":"EUR","notes":"Entregado en almacén central.","external_id":"ERP-ALB-2026-0031","lines":[{"object":"delivery_note_line","description":"Cajas de material A4 (500u)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":2,"unit_price":400,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":800,"taxes":168,"total":968}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["logistica","almacen-central"],"custom_fields":[{"field":"muelle_carga","value":"Muelle 3"}],"converted_to_id":null,"created_at":"2026-01-19T08:00:00Z","updated_at":"2026-01-21T14:50:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/delivery_notes/{delivery_note} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.delivery_notes.update","description":"Update a draft delivery note. Once signed or invoiced, the delivery note becomes immutable.","summary":"Update a delivery note","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeliveryNoteRequest"},"example":{"notes":"Cambio de dirección de entrega.","vehicle_plate":"9012MNP","driver_name":"Lucía Fernández","driver_tax_id":"87654321X"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06","object":"delivery_note","number":"A-2026-00031","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"signed","issued_on":"2026-01-19","delivery_date":"2026-01-21","signed_at":"2026-01-21T14:50:00Z","signed_by":"María García López","signature_image_url":"https://files.factuarea.com/signatures/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06.png","vehicle_plate":"5678JKL","driver":{"name":"Pedro Sánchez Ruiz","tax_id":"12345678Z"},"tracking":{"number":"TRK-2026-0099","carrier":"SEUR"},"received_by":{"name":"María García López","tax_id":"87654321X"},"billing_emails":["administracion@cliente.com"],"subtotal":800,"taxes_total":168,"total":968,"currency":"EUR","notes":"Entregado en almacén central.","external_id":"ERP-ALB-2026-0031","lines":[{"object":"delivery_note_line","description":"Cajas de material A4 (500u)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":2,"unit_price":400,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":800,"taxes":168,"total":968}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["logistica","almacen-central"],"custom_fields":[{"field":"muelle_carga","value":"Muelle 3"}],"converted_to_id":null,"created_at":"2026-01-19T08:00:00Z","updated_at":"2026-01-21T14:50:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/delivery_notes/{delivery_note} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/{invoice}":{"delete":{"operationId":"public-api.v1.invoices.delete","description":"Delete a draft invoice. Issued invoices cannot be deleted (use `void` instead).","summary":"Delete an invoice","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/invoices/{invoice} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.invoices.show","description":"Retrieve a sales invoice by its `uuid`.","summary":"Retrieve an invoice","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.invoices.update","description":"Update a draft invoice. Once an invoice has been issued (status `issued`), most fields become immutable per AEAT compliance.","summary":"Update an invoice","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceRequest"},"example":{"notes":"Notas actualizadas via API v1","lines":[{"description":"Servicio de consultoria (revisado)","quantity":3,"unit_price":150,"tax_rate_id":"019e5584-7a7f-70fd-b9cb-9466c3ee12a8","discount_percent":10}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/invoices/{invoice} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/products/{product}":{"delete":{"operationId":"public-api.v1.products.delete","description":"Delete a product. Returns 422 if the product is referenced by any document line.","summary":"Delete a product","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/products/{product} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.products.show","description":"Retrieve a product by its `uuid`.","summary":"Retrieve a product","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","object":"product","name":"Teclado mecánico RGB","sku":"KEY-RGB-01","price":"1234.56","currency":"EUR","tax_rate":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","rate":21},"stock":120,"gallery":[{"index":0,"url":"https://files.factuarea.com/products/key-rgb-01-front.jpg","content_type":"image/jpeg"}],"video":{"url":"https://files.factuarea.com/products/key-rgb-01-demo.mp4","content_type":"video/mp4"},"is_active":true,"description":"Teclado mecánico retroiluminado RGB con switches Cherry MX Red y carcasa de aluminio.","tags":["periféricos","gaming"],"low_stock_threshold":10,"is_low_stock":false,"is_in_stock":true,"specifications":{"switch":"Cherry MX Red","layout":"ES","conexion":"USB-C"},"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"SHOP-42","created_at":"2026-01-02T08:30:00Z","updated_at":"2026-01-02T08:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/products/{product} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.products.update","description":"Update a product in your catalog.","summary":"Update a product","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductRequest"},"example":{"name":"Desarrollo web a medida (jornada)","sku":"DEV-WEB-001","price":"480.00","currency":"EUR","tax_rate_id":"019e5584-7a7f-70fd-b9cb-9466c3ee12a8","is_active":true,"metadata":{"tipo":"servicio","categoria":"desarrollo"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","object":"product","name":"Teclado mecánico RGB","sku":"KEY-RGB-01","price":"1234.56","currency":"EUR","tax_rate":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","rate":21},"stock":120,"gallery":[{"index":0,"url":"https://files.factuarea.com/products/key-rgb-01-front.jpg","content_type":"image/jpeg"}],"video":{"url":"https://files.factuarea.com/products/key-rgb-01-demo.mp4","content_type":"video/mp4"},"is_active":true,"description":"Teclado mecánico retroiluminado RGB con switches Cherry MX Red y carcasa de aluminio.","tags":["periféricos","gaming"],"low_stock_threshold":10,"is_low_stock":false,"is_in_stock":true,"specifications":{"switch":"Cherry MX Red","layout":"ES","conexion":"USB-C"},"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"SHOP-42","created_at":"2026-01-02T08:30:00Z","updated_at":"2026-01-02T08:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/products/{product} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/products/{product}/gallery/{index}":{"delete":{"operationId":"public-api.v1.products.gallery.delete","description":"Delete a gallery image by its 0-based index. Remaining images shift positions to fill the gap.","summary":"Remove a gallery image from a product","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products.gallery","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.gallery.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->gallery->publicApiV1ProductsGalleryDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/products/{product}/gallery/{index} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/products/{product}/video":{"delete":{"operationId":"public-api.v1.products.video.delete","description":"Delete the video associated with the product and release the storage. Idempotent: returns 204 even when no video was attached.","summary":"Remove the product video","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products.video","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.video.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->video->publicApiV1ProductsVideoDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/products/{product}/video \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"post":{"operationId":"public-api.v1.products.video.upload","description":"Attach a video file (mp4, mov, avi or webm; up to 50 MB) to the product. Replaces any existing video.","summary":"Upload a video to a product","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadProductVideoRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products.video","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.video.upload(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", file);"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->video->publicApiV1ProductsVideoUpload(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $file);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/products/{product}/video \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -F \"file=@./path/to/file\""}]}},"/proformas/{proforma}":{"delete":{"operationId":"public-api.v1.proformas.delete","description":"Delete a proforma. Returns 422 if the proforma has been converted to an invoice.","summary":"Delete a proforma","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictProforma"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/proformas/{proforma} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.proformas.show","description":"Retrieve a proforma invoice by its `uuid`.","summary":"Retrieve a proforma","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a05","object":"proforma","number":"PRO-2026-00007","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"draft","issued_on":"2026-01-22","valid_until":"2026-02-21","validity_days":30,"reference":"REF-API-2026-001","converted_to_id":null,"converted_invoice_number":"F-2025-003","subtotal":1500,"taxes_total":315,"total_vat":315,"total_retention":0,"total_surcharge":0,"total":1815,"shipping_cost":15.5,"total_with_shipping":1830.5,"currency":"EUR","payment_method":"bank_transfer","payment_terms_days":30,"delivery_terms":"Entrega en 5 dias habiles, portes incluidos","estimated_delivery_date":"2026-06-10","notes":"Proforma pendiente de validación.","terms_and_conditions":"Validez 30 dias. Proforma sin valor fiscal hasta su conversion en factura.","external_id":"ERP-PRO-2026-0007","lines":[{"object":"proforma_line","description":"Setup inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":1,"unit_price":1500,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":1500,"taxes":315,"total":1815}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["exportacion","pendiente-validar"],"custom_fields":[{"field":"incoterm","value":"EXW"}],"link_expires_at":"2026-07-01T09:53:23+02:00","link_is_active":true,"created_at":"2026-01-22T09:10:00Z","updated_at":"2026-01-22T09:10:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/proformas/{proforma} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.proformas.update","description":"Update a draft proforma. Once converted, the proforma becomes immutable.","summary":"Update a proforma","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProformaRequest"},"example":{"notes":"Notas actualizadas via API","reference":"REF-UPD-001","payment_terms":15}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a05","object":"proforma","number":"PRO-2026-00007","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"draft","issued_on":"2026-01-22","valid_until":"2026-02-21","validity_days":30,"reference":"REF-API-2026-001","converted_to_id":null,"converted_invoice_number":"F-2025-003","subtotal":1500,"taxes_total":315,"total_vat":315,"total_retention":0,"total_surcharge":0,"total":1815,"shipping_cost":15.5,"total_with_shipping":1830.5,"currency":"EUR","payment_method":"bank_transfer","payment_terms_days":30,"delivery_terms":"Entrega en 5 dias habiles, portes incluidos","estimated_delivery_date":"2026-06-10","notes":"Proforma pendiente de validación.","terms_and_conditions":"Validez 30 dias. Proforma sin valor fiscal hasta su conversion en factura.","external_id":"ERP-PRO-2026-0007","lines":[{"object":"proforma_line","description":"Setup inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":1,"unit_price":1500,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":1500,"taxes":315,"total":1815}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["exportacion","pendiente-validar"],"custom_fields":[{"field":"incoterm","value":"EXW"}],"link_expires_at":"2026-07-01T09:53:23+02:00","link_is_active":true,"created_at":"2026-01-22T09:10:00Z","updated_at":"2026-01-22T09:10:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictProforma"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/proformas/{proforma} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/purchase_invoices/{purchase_invoice}":{"delete":{"operationId":"public-api.v1.purchase_invoices.delete","description":"Delete a purchase invoice.","summary":"Delete a purchase invoice","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictPurchaseInvoice"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.purchase_invoices.show","description":"Retrieve a purchase invoice by its `uuid`.","summary":"Retrieve a purchase invoice","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a07","object":"purchase_invoice","external_invoice_number":"INV-2026-001-DI","external_id":"ERP-COMPRA-2026-0007","internal_code":"GASTO-2026-0007","supplier":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","name":"Distribuciones Ibéricas, S.L."},"status":"paid","issued_on":"2026-01-05","received_on":"2026-04-18","due_on":"2026-02-04","subtotal":350,"taxes_total":73.5,"total_retention":0,"total":423.5,"currency":"EUR","paid_amount":423.5,"pending_amount":0,"payment_status":"paid","paid_at":"2026-01-10","payment_method":"transferencia","payment_terms_days":30,"bank_account":null,"expense_account":"6280001","expense_category_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c01","deductible_percentage":100,"operation_class":"corriente","exclude_347":false,"tax_period":"2026-Q2","is_reverse_charge":false,"tags":["suministros","oficina"],"custom_fields":[{"field":"centro_coste","value":"CC-OFICINA"}],"internal_notes":"Revisar con contabilidad antes del cierre trimestral.","attachment":{"filename":"factura-suministros-abril-2026.pdf","mime_type":"application/pdf","size_bytes":241,"download_url":"/v1/purchase_invoices/019e822c-555a-709d-99d7-2cfeac9fc920/file"},"lines":[{"object":"purchase_invoice_line","description":"Material oficina pedido Q1","quantity":1,"unit_price":350,"tax_rate":21,"retention_rate":0,"subtotal":350,"taxes":73.5,"retention_amount":0,"vat_deductible":true,"total":423.5}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"notes":"Pedido material oficina Q1.","created_at":"2026-01-08T10:00:00Z","updated_at":"2026-01-10T12:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.purchase_invoices.update","description":"Update a purchase invoice.","summary":"Update a purchase invoice","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePurchaseInvoiceRequest"},"example":{"internal_notes":"Validada por contabilidad. Lista para pago.","payment_terms_days":45,"expense_account":"6280002","tax_period":"2026-Q2","tags":["suministros","electricidad","validada"],"is_reverse_charge":false,"notes":"Factura de suministro electrico abril 2026 (revisada)."}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a07","object":"purchase_invoice","external_invoice_number":"INV-2026-001-DI","external_id":"ERP-COMPRA-2026-0007","internal_code":"GASTO-2026-0007","supplier":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","name":"Distribuciones Ibéricas, S.L."},"status":"paid","issued_on":"2026-01-05","received_on":"2026-04-18","due_on":"2026-02-04","subtotal":350,"taxes_total":73.5,"total_retention":0,"total":423.5,"currency":"EUR","paid_amount":423.5,"pending_amount":0,"payment_status":"paid","paid_at":"2026-01-10","payment_method":"transferencia","payment_terms_days":30,"bank_account":null,"expense_account":"6280001","expense_category_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c01","deductible_percentage":100,"operation_class":"corriente","exclude_347":false,"tax_period":"2026-Q2","is_reverse_charge":false,"tags":["suministros","oficina"],"custom_fields":[{"field":"centro_coste","value":"CC-OFICINA"}],"internal_notes":"Revisar con contabilidad antes del cierre trimestral.","attachment":{"filename":"factura-suministros-abril-2026.pdf","mime_type":"application/pdf","size_bytes":241,"download_url":"/v1/purchase_invoices/019e822c-555a-709d-99d7-2cfeac9fc920/file"},"lines":[{"object":"purchase_invoice_line","description":"Material oficina pedido Q1","quantity":1,"unit_price":350,"tax_rate":21,"retention_rate":0,"subtotal":350,"taxes":73.5,"retention_amount":0,"vat_deductible":true,"total":423.5}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"notes":"Pedido material oficina Q1.","created_at":"2026-01-08T10:00:00Z","updated_at":"2026-01-10T12:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictPurchaseInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/purchase_invoices/{purchase_invoice}/file":{"delete":{"operationId":"public-api.v1.purchase_invoices.delete_file","description":"Delete the original file attached to a purchase invoice and release its storage. Idempotent: succeeds even when no file was attached.","summary":"Remove a purchase invoice file","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictPurchaseInvoice"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.deleteFile(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesDeleteFile(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice}/file \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.purchase_invoices.file","description":"Stream the original PDF attached to the purchase invoice when it was uploaded. Returns 404 if no attachment is present.","summary":"Download the original purchase invoice file","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.file(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesFile(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice}/file \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/quotes/{quote}":{"delete":{"operationId":"public-api.v1.quotes.delete","description":"Delete a quote. Returns 422 if the quote has been converted to an invoice.","summary":"Delete a quote","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictQuote"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/quotes/{quote} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.quotes.show","description":"Retrieve a sales quote by its `uuid`.","summary":"Retrieve a quote","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04","object":"quote","number":"P-2026-00012","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"sent","issued_on":"2026-01-18","valid_until":"2026-02-17","accepted_at":null,"rejected_at":null,"converted_to_id":null,"converted_invoice_number":"F-2025-001","subtotal":500,"taxes_total":105,"total_vat":105,"total_retention":0,"total_surcharge":0,"total":605,"currency":"EUR","notes":"Presupuesto válido 30 días.","terms":"Presupuesto valido durante 30 dias desde la fecha de emision.","external_id":"CRM-PRES-2026-0012","lines":[{"object":"quote_line","description":"Auditoría inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":5,"unit_price":100,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":500,"taxes":105,"total":605}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["comercial","q1-2026"],"custom_fields":[{"field":"campania","value":"Promo primavera"}],"link_expires_at":"2026-07-01T09:53:57+02:00","link_is_active":true,"created_at":"2026-01-18T16:20:00Z","updated_at":"2026-01-18T16:25:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/quotes/{quote} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.quotes.update","description":"Update a draft quote. Once accepted/rejected/converted, the quote becomes immutable.","summary":"Update a quote","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuoteRequest"},"example":{"notes":"Presupuesto actualizado: revision de alcance Q3","terms":"Presupuesto valido durante 45 dias desde la fecha de emision.","metadata":{"revision":"2"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04","object":"quote","number":"P-2026-00012","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"status":"sent","issued_on":"2026-01-18","valid_until":"2026-02-17","accepted_at":null,"rejected_at":null,"converted_to_id":null,"converted_invoice_number":"F-2025-001","subtotal":500,"taxes_total":105,"total_vat":105,"total_retention":0,"total_surcharge":0,"total":605,"currency":"EUR","notes":"Presupuesto válido 30 días.","terms":"Presupuesto valido durante 30 dias desde la fecha de emision.","external_id":"CRM-PRES-2026-0012","lines":[{"object":"quote_line","description":"Auditoría inicial","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","name":"Consultoría hora estándar"},"quantity":5,"unit_price":100,"tax_rate":21,"retention_rate":0,"surcharge_rate":0,"discount_percent":0,"subtotal":500,"taxes":105,"total":605}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"tags":["comercial","q1-2026"],"custom_fields":[{"field":"campania","value":"Promo primavera"}],"link_expires_at":"2026-07-01T09:53:57+02:00","link_is_active":true,"created_at":"2026-01-18T16:20:00Z","updated_at":"2026-01-18T16:25:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictQuote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/quotes/{quote} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/recurring_invoices/{recurring_invoice}":{"delete":{"operationId":"public-api.v1.recurring_invoices.delete","description":"Delete a recurring invoice template. Future invoices stop being generated; existing invoices remain.","summary":"Delete a recurring invoice","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.recurring_invoices.show","description":"Retrieve a recurring invoice template by its `uuid`.","summary":"Retrieve a recurring invoice","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08","object":"recurring_invoice","client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"status":"active","frequency":"monthly","name":"Cuota mantenimiento mensual Acme","description":"Contrato de soporte y mantenimiento Plan Pro","notes":"Renovación automática. Facturar el día 1 de cada mes.","email_to":"facturacion@acme.example","send_automatically":true,"days_before_due":30,"max_occurrences":12,"occurrences_count":3,"remaining_occurrences":9,"holiday_handling":"next_business_day","start_on":"2026-01-01","end_on":"2026-12-31","next_run_at":"2026-02-01T09:00:00Z","last_run_at":"2026-01-01T09:00:00Z","cancelled_at":null,"subtotal":200,"taxes_total":42,"total":242,"currency":"EUR","lines":[{"object":"recurring_invoice_line","description":"Cuota soporte mensual","quantity":1,"unit_price":200,"tax_rate":21,"retention":0,"surcharge":0,"subtotal":200,"taxes":42,"total":242}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"ERP-REC-2026-0008","tags":["suscripcion","mantenimiento"],"custom_fields":[{"field":"contrato","value":"CTR-2026-0007"}],"created_at":"2025-12-20T15:00:00Z","updated_at":"2026-01-01T09:05:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.recurring_invoices.update","description":"Update a recurring invoice template. The cadence and lines apply to invoices generated after the update; previously generated invoices are unaffected.","summary":"Update a recurring invoice","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRecurringInvoiceRequest"},"example":{"name":"Mantenimiento mensual (revisado)","frequency":"quarterly","notes":"Actualizado a facturación trimestral","lines":[{"description":"Cuota soporte trimestral","quantity":1,"unit_price":540,"tax_rate":21}]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08","object":"recurring_invoice","client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation"},"series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","code":"F-2026"},"status":"active","frequency":"monthly","name":"Cuota mantenimiento mensual Acme","description":"Contrato de soporte y mantenimiento Plan Pro","notes":"Renovación automática. Facturar el día 1 de cada mes.","email_to":"facturacion@acme.example","send_automatically":true,"days_before_due":30,"max_occurrences":12,"occurrences_count":3,"remaining_occurrences":9,"holiday_handling":"next_business_day","start_on":"2026-01-01","end_on":"2026-12-31","next_run_at":"2026-02-01T09:00:00Z","last_run_at":"2026-01-01T09:00:00Z","cancelled_at":null,"subtotal":200,"taxes_total":42,"total":242,"currency":"EUR","lines":[{"object":"recurring_invoice_line","description":"Cuota soporte mensual","quantity":1,"unit_price":200,"tax_rate":21,"retention":0,"surcharge":0,"subtotal":200,"taxes":42,"total":242}],"metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"external_id":"ERP-REC-2026-0008","tags":["suscripcion","mantenimiento"],"custom_fields":[{"field":"contrato","value":"CTR-2026-0007"}],"created_at":"2025-12-20T15:00:00Z","updated_at":"2026-01-01T09:05:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/suppliers/{supplier}":{"delete":{"operationId":"public-api.v1.suppliers.delete","description":"Delete a supplier. Returns 422 if the supplier is referenced by any purchase invoice.","summary":"Delete a supplier","tags":["Suppliers"],"parameters":[{"name":"supplier","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/suppliers/{supplier} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.suppliers.show","description":"Retrieve a supplier by its `uuid`.","summary":"Retrieve a supplier","tags":["Suppliers"],"parameters":[{"name":"supplier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Supplier"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","object":"supplier","name":"Distribuciones Ibéricas, S.L.","business_name":"Distribuciones Ibéricas Sociedad Limitada","commercial_name":"Distribuciones IB","tax_id":"B87654321","vat_id":"ESB87654321","email":"facturacion@distribibericas.com","phone":"+34 911 234 567","fax":"+34 911 234 568","mobile":"+34 600 234 567","website":"https://distribibericas.com","contact_person":"María López","billing_emails":["facturas@distribibericas.com","contabilidad@distribibericas.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":36.6954,"longitude":-4.4564},"iban":"ES9121000418450200051332","default_taxes_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","default_discount":3,"default_vat_rate":21,"default_retention_rate":0,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"external_id":"SUP-1","notes":"Proveedor preferente de material de oficina.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-10T09:00:00Z","updated_at":"2026-01-10T09:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/suppliers/{supplier} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.suppliers.update","description":"Update a supplier. Only fields present in the payload are modified.","summary":"Update a supplier","tags":["Suppliers"],"parameters":[{"name":"supplier","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSupplierRequest"},"example":{"email":"nuevo-contacto@garcialogistica.es","phone":"952667700","default_retention_rate":7,"notes":"Datos de contacto actualizados"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Supplier"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","object":"supplier","name":"Distribuciones Ibéricas, S.L.","business_name":"Distribuciones Ibéricas Sociedad Limitada","commercial_name":"Distribuciones IB","tax_id":"B87654321","vat_id":"ESB87654321","email":"facturacion@distribibericas.com","phone":"+34 911 234 567","fax":"+34 911 234 568","mobile":"+34 600 234 567","website":"https://distribibericas.com","contact_person":"María López","billing_emails":["facturas@distribibericas.com","contabilidad@distribibericas.com"],"address":{"line1":"Calle Mayor 1","line2":"Edificio Central","number":"42","floor":"3","door":"B","staircase":"A","postal_code":"28001","city":"Madrid","province":"Madrid","country":"ES"},"coordinates":{"latitude":36.6954,"longitude":-4.4564},"iban":"ES9121000418450200051332","default_taxes_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","default_discount":3,"default_vat_rate":21,"default_retention_rate":0,"is_surcharge_subject":false,"preferred_operation_regime":"general","accumulate_347":true,"external_id":"SUP-1","notes":"Proveedor preferente de material de oficina.","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"is_active":true,"created_at":"2026-01-10T09:00:00Z","updated_at":"2026-01-10T09:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/suppliers/{supplier} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/taxes/{tax}":{"delete":{"operationId":"public-api.v1.taxes.delete","description":"Delete a tax. Fails with 409 if the tax is referenced by existing documents. System taxes (is_system=true) cannot be deleted.","summary":"Delete a tax","tags":["Taxes"],"parameters":[{"name":"tax","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/taxes/{tax} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.taxes.show","description":"Retrieve a tax rate by its `uuid`.","summary":"Retrieve a tax","tags":["Taxes"],"parameters":[{"name":"tax","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tax"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","object":"tax","name":"IVA general 21%","code":"IVA21","rate":21,"type":"vat","applies_to":"both","country":"ES","is_default":true,"is_active":true,"is_system":true,"description":"IVA general aplicable en territorio peninsular y Baleares.","default_for_documents":{"invoice":true,"quote":true,"delivery_note":true,"proforma":true,"purchase_invoice":true,"recurring_invoice":true},"customer_visible_label":"IVA 21%","external_reference":"S1","valid_from":"2012-09-01","valid_until":null,"reverse_charge":false,"country_aeat_zone":"peninsula","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"created_at":"2024-01-01T00:00:00Z","updated_at":"2024-01-01T00:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/taxes/{tax} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.taxes.update","description":"Partial update of a tax: name, code, rate, applies_to, country and description. System taxes (is_system=true) are not editable.","summary":"Update a tax","tags":["Taxes"],"parameters":[{"name":"tax","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTaxRequest"},"example":{"name":"IVA campaña verano (renombrado)","description":"Descripción actualizada","reverse_charge":true,"customer_visible_label":"IVA 21%"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tax"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","object":"tax","name":"IVA general 21%","code":"IVA21","rate":21,"type":"vat","applies_to":"both","country":"ES","is_default":true,"is_active":true,"is_system":true,"description":"IVA general aplicable en territorio peninsular y Baleares.","default_for_documents":{"invoice":true,"quote":true,"delivery_note":true,"proforma":true,"purchase_invoice":true,"recurring_invoice":true},"customer_visible_label":"IVA 21%","external_reference":"S1","valid_from":"2012-09-01","valid_until":null,"reverse_charge":false,"country_aeat_zone":"peninsula","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"created_at":"2024-01-01T00:00:00Z","updated_at":"2024-01-01T00:00:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/taxes/{tax} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/webhook_endpoints/{webhook_endpoint}":{"delete":{"operationId":"public-api.v1.webhook_endpoints.delete","description":"Delete a webhook endpoint. In-flight deliveries are not cancelled but no new deliveries are queued.","summary":"Delete a webhook endpoint","tags":["Webhooks"],"parameters":[{"name":"webhook_endpoint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.webhookEndpoints.delete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->publicApiV1WebhookEndpointsDelete(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/webhook_endpoints/{webhook_endpoint} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]},"get":{"operationId":"public-api.v1.webhook_endpoints.show","description":"Retrieve a webhook endpoint by its `uuid`. The signing secret is never exposed in this representation.","summary":"Retrieve a webhook endpoint","tags":["Webhooks"],"parameters":[{"name":"webhook_endpoint","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEndpoint"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b","object":"webhook_endpoint","url":"https://example.com/webhooks/factuarea","description":"Webhook principal de producción.","enabled_events":["invoice.created","invoice.paid","quote.approved"],"status":"enabled","ip_allowlist":["203.0.113.10","198.51.100.0/24"],"delivery_success_rate_24h":99.5,"last_delivery_at":"2026-01-25T18:00:00Z","last_failure_at":"2026-01-20T09:14:33Z","previous_secret_valid_until":"2026-01-26T18:00:00Z","created_at":"2025-12-15T12:00:00Z","updated_at":"2026-01-25T18:00:00Z","api_version":"2026-05-01","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"custom_headers":{"Authorization":"Bearer integration-token","X-Custom-Auth":"tenant-a"},"timeout_seconds":10,"degraded_since":"2026-01-24T07:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.webhookEndpoints.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->publicApiV1WebhookEndpointsShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/webhook_endpoints/{webhook_endpoint} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.webhook_endpoints.update","description":"Update a webhook endpoint (URL, description, enabled events, status, IP allowlist).","summary":"Update a webhook endpoint","tags":["Webhooks"],"parameters":[{"name":"webhook_endpoint","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointRequest"},"example":{"url":"https://example.com/webhooks/factuarea","description":"Webhook principal de producción.","enabled_events":["invoice.created","invoice.paid","quote.converted"],"api_version":"2026-05-01","timeout_seconds":10,"ip_allowlist":["203.0.113.10","198.51.100.0/24"],"custom_headers":{"X-Custom-Auth":"tenant-a"},"metadata":{"team":"integrations"}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEndpoint"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b","object":"webhook_endpoint","url":"https://example.com/webhooks/factuarea","description":"Webhook principal de producción.","enabled_events":["invoice.created","invoice.paid","quote.approved"],"status":"enabled","ip_allowlist":["203.0.113.10","198.51.100.0/24"],"delivery_success_rate_24h":99.5,"last_delivery_at":"2026-01-25T18:00:00Z","last_failure_at":"2026-01-20T09:14:33Z","previous_secret_valid_until":"2026-01-26T18:00:00Z","created_at":"2025-12-15T12:00:00Z","updated_at":"2026-01-25T18:00:00Z","api_version":"2026-05-01","metadata":{"erp_code":"IVA-GEN","ledger_account":"477000"},"custom_headers":{"Authorization":"Bearer integration-token","X-Custom-Auth":"tenant-a"},"timeout_seconds":10,"degraded_since":"2026-01-24T07:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.webhookEndpoints.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->publicApiV1WebhookEndpointsUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/webhook_endpoints/{webhook_endpoint} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/delivery_notes/{delivery_note}/pdf":{"get":{"operationId":"public-api.v1.delivery_notes.pdf","description":"Download the PDF representation of a delivery note. Returns the binary PDF stream (`application/pdf`). Pass `?download=1` for `Content-Disposition: attachment` (file download); otherwise it is served `inline`. The response carries an `ETag`; resend it via `If-None-Match` to receive `304 Not Modified` when the document is unchanged.","summary":"Download delivery note PDF","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}},{"name":"download","in":"query","description":"Cuando es truthy (`1`/`true`), fuerza `Content-Disposition: attachment` (descarga de fichero) en lugar de `inline`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Binary PDF stream of the delivery note (`application/pdf`). Use `?download=1` to receive `Content-Disposition: attachment` (forces a file download); otherwise the disposition is `inline`. The response carries an `ETag`; send it back via `If-None-Match` to get a `304 Not Modified` when the PDF has not changed.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"ETag":{"description":"Entity tag of the PDF (`sha1` of uuid + updated_at). Send it back in `If-None-Match` to leverage the 304 cache.","schema":{"type":"string"}},"Content-Disposition":{"description":"Disposition of the PDF: `inline; filename=\"…\"` by default, or `attachment; filename=\"…\"` when `?download=1` is passed (RFC 5987 `filename*` included for UTF-8 names).","schema":{"type":"string"}},"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"304":{"description":""},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.pdf(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesPdf(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/delivery_notes/{delivery_note}/pdf \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices/{invoice}/facturae":{"get":{"operationId":"public-api.v1.invoices.facturae","description":"Streams the FacturaE **3.2.2** XML for the invoice (B2G compliance), XSD-conformant with full tax breakdown. When the company has an active signing certificate the body is signed **XAdES-EPES** (Facturae v3.1 signature policy) and the filename is `.xsig`; without a certificate the XML is returned unsigned as `.xml`. The `X-Facturae-Signed: true|false` response header tells both cases apart. Draft invoices return 422 `invoice_not_emittable_for_facturae`.","summary":"Download FacturaE XML","tags":["FacturaE"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/xml":{"schema":{"type":"string"}}},"headers":{"Content-Disposition":{"schema":{"type":"string"}},"X-Facturae-Signed":{"schema":{"type":"string","enum":["true","false"]}},"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.facturae(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesFacturae(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/facturae \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices/{invoice}/pdf":{"get":{"operationId":"public-api.v1.invoices.pdf","description":"Download the PDF representation of an invoice. Returns the binary PDF stream (`application/pdf`).","summary":"Download invoice PDF","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"name":"download","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"304":{"description":""},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.pdf(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesPdf(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/pdf \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/products/{product}/gallery/{index}/download":{"get":{"operationId":"public-api.v1.products.gallery.download","description":"Stream the raw binary of a product gallery image by its 0-based index. Returns 404 if the index is missing or the file is not on disk.","summary":"Download a product gallery image binary","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"name":"index","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products.gallery","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.gallery.download(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->gallery->publicApiV1ProductsGalleryDownload(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/products/{product}/gallery/{index}/download \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/products/{product}/video/download":{"get":{"operationId":"public-api.v1.products.video.download","description":"Stream the raw binary of the product video. Returns 404 if the product has no video or the file is not on disk.","summary":"Download the product video binary","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products.video","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.video.download(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->video->publicApiV1ProductsVideoDownload(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/products/{product}/video/download \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/proformas/{proforma}/pdf":{"get":{"operationId":"public-api.v1.proformas.pdf","description":"Download the PDF representation of a proforma.","summary":"Download proforma PDF","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}},{"name":"download","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"304":{"description":""},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.pdf(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasPdf(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/proformas/{proforma}/pdf \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/purchase_invoices/{purchase_invoice}/payment-receipt":{"get":{"operationId":"public-api.v1.purchase_invoices.payment_receipt","description":"Stream the PDF payment receipt for a paid purchase invoice. Returns 409 if the invoice has not been paid yet.","summary":"Download a purchase invoice payment receipt","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.paymentReceipt(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesPaymentReceipt(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice}/payment-receipt \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/quotes/{quote}/pdf":{"get":{"operationId":"public-api.v1.quotes.pdf","description":"Download the PDF representation of a quote.","summary":"Download quote PDF","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}},{"name":"download","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"304":{"description":""},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.pdf(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesPdf(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/quotes/{quote}/pdf \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/tax_reports/{tax_report}/download":{"get":{"operationId":"public-api.v1.tax_reports.download","description":"Downloads the generated file for a tax report. Adds `X-Tax-Report-Hash` header for integrity verification.","summary":"Download tax report file","tags":["Tax Reports"],"parameters":[{"name":"tax_report","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":["string","null"]}}},"headers":{"Content-Length":{"schema":{"type":"string"}},"Content-Disposition":{"schema":{"type":"string"}},"X-Tax-Report-Hash":{"schema":{"type":"string"}},"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxReports","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxReports.download(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxReports->publicApiV1TaxReportsDownload(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/tax_reports/{tax_report}/download \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/delivery_notes/{delivery_note}/duplicate":{"post":{"operationId":"public-api.v1.delivery_notes.duplicate","description":"Create a new draft delivery note by copying lines, client, and metadata.","summary":"Duplicate a delivery note","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.duplicate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesDuplicate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes/{delivery_note}/duplicate \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/invoices/{invoice}/duplicate":{"post":{"operationId":"public-api.v1.invoices.duplicate","description":"Create a new draft invoice by copying the lines, client, and metadata from an existing invoice. The new invoice gets a fresh `uuid` and number.","summary":"Duplicate an invoice","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"Invoice duplicated successfully. The `Location` header contains the canonical URL of the NEW invoice created.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/invoices/01HKQS5NXR4D7P2K9V3M6BWTLG"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.duplicate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesDuplicate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/duplicate \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/proformas/{proforma}/duplicate":{"post":{"operationId":"public-api.v1.proformas.duplicate","description":"Create a new draft proforma by copying lines, client, and metadata from an existing proforma.","summary":"Duplicate a proforma","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictProforma"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.duplicate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasDuplicate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/proformas/{proforma}/duplicate \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/quotes/{quote}/duplicate":{"post":{"operationId":"public-api.v1.quotes.duplicate","description":"Create a new draft quote by copying the lines, client, and metadata from an existing quote.","summary":"Duplicate a quote","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictQuote"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.duplicate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesDuplicate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/quotes/{quote}/duplicate \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/clients/find-by-external-id":{"post":{"operationId":"public-api.v1.clients.find_by_external_id","description":"Look up a client by their `external_id` (sent in the JSON body), the integration key that maps them to a record in a third-party system (ERP/CRM/e-commerce). Distinct from the fiscal `tax_id`. Returns the matching client or 404 if no client uses that external_id within your company.","summary":"Find a client by external ID","tags":["Clients"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindClientByExternalIdRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Client"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.findByExternalId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsFindByExternalId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/clients/find-by-external-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/clients/find-by-tax-id":{"post":{"operationId":"public-api.v1.clients.find_by_tax_id","description":"Look up a client by their Spanish tax identifier (NIF/CIF/NIE). Returns the matching client or 404 if no client uses that tax_id within your company.","summary":"Find a client by tax ID","tags":["Clients"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindClientByTaxIdRequest"},"example":{"tax_id":"A87654321"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Client"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.findByTaxId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsFindByTaxId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/clients/find-by-tax-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/delivery_notes/find-by-external-id":{"post":{"operationId":"public-api.v1.delivery_notes.find_by_external_id","description":"Look up a single delivery note by its `external_id` (sent in the JSON body), the integration key that maps it to a record in a third-party system (ERP/CRM/e-commerce). Returns the matching delivery note or 404 `delivery_note_not_found` if no delivery note uses that external_id within your company.","summary":"Find a delivery note by external ID","tags":["Delivery Notes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindDeliveryNoteByExternalIdRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.findByExternalId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesFindByExternalId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes/find-by-external-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/find-by-external-id":{"post":{"operationId":"public-api.v1.invoices.find_by_external_id","description":"Look up a single invoice by its `external_id` (sent in the JSON body), the integration key that maps it to a record in a third-party system (ERP/CRM/e-commerce). Distinct from the fiscal number and the `uuid`. Returns the matching invoice or 404 `invoice_not_found` if no invoice uses that external_id within your company.","summary":"Find an invoice by external ID","tags":["Invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindInvoiceByExternalIdRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.findByExternalId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesFindByExternalId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/find-by-external-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/find-by-number":{"post":{"operationId":"public-api.v1.invoices.find_by_number","description":"Looks up a single invoice by its number, with optional `year` to disambiguate across fiscal years. Returns 404 if not found and 422 if the number is ambiguous and no `year` is supplied.","summary":"Find an invoice by number","tags":["Invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindInvoiceByNumberRequest"},"example":{"number":"F-2026-015","year":2026}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.findByNumber({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesFindByNumber($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/find-by-number \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/products/find-by-external-id":{"post":{"operationId":"public-api.v1.products.find_by_external_id","description":"Look up a single product by its `external_id` (sent in the JSON body), the integration key that maps it to a record in a third-party system (ERP/CRM/e-commerce). Orthogonal to the catalog `sku`. Returns the matching product or 404 if no product uses that external_id within your company.","summary":"Find a product by external ID","tags":["Products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindProductByExternalIdRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.findByExternalId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsFindByExternalId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/products/find-by-external-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/products/find-by-sku":{"post":{"operationId":"public-api.v1.products.find_by_sku","description":"Look up a single product by its `sku` (sent in the JSON body). Returns the matching product or 404 if no product uses that SKU within your company.","summary":"Find a product by SKU","tags":["Products"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindProductBySkuRequest"},"example":{"sku":"CONS-EST-001"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.findBySku({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsFindBySku($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/products/find-by-sku \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/proformas/find-by-external-id":{"post":{"operationId":"public-api.v1.proformas.find_by_external_id","description":"Look up a single proforma by its `external_id` (sent in the JSON body), the integration key that maps it to a record in a third-party system (ERP/CRM/e-commerce). Returns the matching proforma or 404 `proforma_not_found` if no proforma uses that external_id within your company.","summary":"Find a proforma by external ID","tags":["Proformas"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindProformaByExternalIdRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictProforma"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.findByExternalId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasFindByExternalId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/proformas/find-by-external-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/purchase_invoices/find-by-external-id":{"post":{"operationId":"public-api.v1.purchase_invoices.find_by_external_id","description":"Look up a single purchase invoice by its `external_id` (sent in the JSON body), the integration key that maps it to a record in a third-party system (ERP/CRM/e-commerce). Orthogonal to the supplier-provided `external_invoice_number` (the vendor's fiscal number). Returns the matching purchase invoice or 404 `purchase_invoice_not_found` if none uses that external_id within your company.","summary":"Find a purchase invoice by external ID","tags":["Purchase Invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindPurchaseInvoiceByExternalIdRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictPurchaseInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.findByExternalId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesFindByExternalId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/purchase_invoices/find-by-external-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/quotes/find-by-external-id":{"post":{"operationId":"public-api.v1.quotes.find_by_external_id","description":"Look up a single quote by its `external_id` (sent in the JSON body), the integration key that maps it to a record in a third-party system (ERP/CRM/e-commerce). Returns the matching quote or 404 `quote_not_found` if no quote uses that external_id within your company.","summary":"Find a quote by external ID","tags":["Quotes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindQuoteByExternalIdRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictQuote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.findByExternalId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesFindByExternalId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/quotes/find-by-external-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/verifactu/records/find-by-csv":{"post":{"operationId":"public-api.v1.verifactu.records.find_by_csv","description":"Look up a VeriFactu record by the `aeat_csv` (Código Seguro de Verificación) returned by AEAT on acceptance, sent in the JSON body. Returns the matching record or 404 `verifactu_record_not_found`.","summary":"Find a VeriFactu record by AEAT CSV","tags":["VeriFactu"],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FindRecordByAeatCsvV1Request"},{"type":"object","properties":{"aeat_csv":{"type":"string"}}}]},"example":{"aeat_csv":"ABC123DEF456GHI789"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VeriFactuRecord"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.records","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.records.findByCsv({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->records->publicApiV1VerifactuRecordsFindByCsv($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/verifactu/records/find-by-csv \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/verifactu/records/find-by-huella":{"post":{"operationId":"public-api.v1.verifactu.records.find_by_huella","description":"Look up a VeriFactu record by its `huella` (the chained SHA-256 fingerprint sent in the JSON body). Returns the matching record or 404 `verifactu_record_not_found` if none exists within your company.","summary":"Find a VeriFactu record by hash","tags":["VeriFactu"],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FindRecordByHuellaV1Request"},{"type":"object","properties":{"huella":{"type":"string"}}}]},"example":{"huella":"3C8F1A2B9D4E5F6071829304A5B6C7D8E9F0A1B2C3D4E5F60718293041526378"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VeriFactuRecord"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.records","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.records.findByHuella({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->records->publicApiV1VerifactuRecordsFindByHuella($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/verifactu/records/find-by-huella \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/verifactu/records/find-by-invoice-number":{"post":{"operationId":"public-api.v1.verifactu.records.find_by_invoice_number","description":"Look up the VeriFactu record associated with a given invoice number (sent in the JSON body). Returns the matching record or 404 `verifactu_record_not_found` if the invoice has no record within your company.","summary":"Find a VeriFactu record by invoice number","tags":["VeriFactu"],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/FindRecordByInvoiceNumberV1Request"},{"type":"object","properties":{"series":{"type":"string"},"number":{"type":"string"}}}]},"example":{"series":"FAC-2026","number":"00042"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VeriFactuRecord"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.records","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.records.findByInvoiceNumber({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->records->publicApiV1VerifactuRecordsFindByInvoiceNumber($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/verifactu/records/find-by-invoice-number \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/recurring_invoices/find-by-external-id":{"post":{"operationId":"public-api.v1.recurring_invoices.find_by_external_id","description":"Look up a single recurring invoice template by its `external_id` (sent in the JSON body), the integration key that maps it to a record in a third-party system (ERP/CRM/e-commerce). Returns the matching recurring invoice or 404 `recurring_invoice_not_found` if none uses that external_id within your company.","summary":"Find a recurring invoice by external ID","tags":["Recurring Invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindRecurringInvoiceByExternalIdRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.findByExternalId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesFindByExternalId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/recurring_invoices/find-by-external-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/series/find-by-code":{"post":{"operationId":"public-api.v1.series.find_by_code","description":"Look up a series by its `code` (sent in the JSON body, case-insensitive). A `code` is NOT globally unique: the same `code` may be reused across different `document_type`s (multi-series — e.g. one `2026` series for invoices and another `2026` for quotes). Therefore: pass `document_type` to disambiguate and resolve the exact `(code, document_type)` series. If you omit `document_type`, the code is matched across all document types ordered by `uuid` ascending — when exactly one series matches it is returned, but when several match (ambiguous code) the request returns 422 `document_type_required_for_ambiguous_code` (it does NOT silently pick one). Returns the matching series, or 404 if none exists within your company.","summary":"Find a series by code","tags":["Series"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindSeriesByCodeRequest"},"example":{"code":"HARV01","document_type":"invoice"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Series"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.findByCode({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesFindByCode($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/series/find-by-code \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/suppliers/find-by-external-id":{"post":{"operationId":"public-api.v1.suppliers.find_by_external_id","description":"Look up a supplier by its `external_id` (sent in the JSON body), the persistent integration key that maps it to a record in a third-party system (ERP/CRM). Distinct from the fiscal `tax_id` and from the request-level `Idempotency-Key`. Returns the matching supplier or 404 if no supplier uses that external_id within your company.","summary":"Find a supplier by external ID","tags":["Suppliers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindSupplierByExternalIdRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Supplier"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.findByExternalId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersFindByExternalId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/suppliers/find-by-external-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/suppliers/find-by-tax-id":{"post":{"operationId":"public-api.v1.suppliers.find_by_tax_id","description":"Look up a supplier by its Spanish tax identifier (NIF/CIF/NIE/VAT). Returns the matching supplier or 404 if no supplier uses that tax_id within your company.","summary":"Find a supplier by tax ID","tags":["Suppliers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindSupplierByTaxIdRequest"},"example":{"tax_id":"A29111222"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Supplier"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.findByTaxId({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersFindByTaxId($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/suppliers/find-by-tax-id \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/tax_reports/find-by-period":{"post":{"operationId":"public-api.v1.tax_reports.find_by_period","description":"Looks up the most recent generated tax report for a given type and period. Returns the report or 404 `tax_report_not_found` when none exists for the period.","summary":"Find a tax report by period","tags":["Tax Reports"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindTaxReportByPeriodV1Request"},"example":{"type":"modelo_303","year":2026,"quarter":1}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxReport"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxReports","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxReports.findByPeriod({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxReports->publicApiV1TaxReportsFindByPeriod($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/tax_reports/find-by-period \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/delivery_notes/signature-audits/{auditId}/forget":{"post":{"operationId":"public-api.v1.delivery_notes.signature_audits.forget","description":"GDPR Art. 17 (right to erasure) — remove the personal data (recipient name/DNI) from a signature audit log entry while preserving the non-PII audit trail required for LSSI-CE compliance. The `{auditId}` is the numeric primary key of the signature audit record. Requires the `delivery_notes:gdpr_forget` scope.","summary":"Forget delivery note signature PII","tags":["Delivery Notes"],"parameters":[{"name":"auditId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer","example":19,"examples":[19]},"forgotten":{"type":"boolean","example":true,"examples":[true]}},"required":["id","forgotten"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes.signatureAudits","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.signatureAudits.forget(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->signatureAudits->publicApiV1DeliveryNotesSignatureAuditsForget(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes/signature-audits/{auditId}/forget \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/tax_reports/130":{"post":{"operationId":"public-api.v1.tax_reports.generate_130","description":"Generates the Spanish Modelo 130 (quarterly IRPF instalment payment, direct estimation) for the given year and quarter in the requested format (txt_aeat, pdf, excel; defaults to pdf). The calculation is cumulative year-to-date (1 Jan to end of quarter).","summary":"Generate Modelo 130","tags":["Tax Reports"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateModelo130V1Request"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxReports","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxReports.generate130({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxReports->publicApiV1TaxReportsGenerate130($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/tax_reports/130 \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/tax_reports/303":{"post":{"operationId":"public-api.v1.tax_reports.generate_303","description":"Generates the Spanish Modelo 303 (quarterly VAT) for the given year and quarter in the requested format (txt_aeat, pdf, excel).","summary":"Generate Modelo 303","tags":["Tax Reports"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateModelo303V1Request"},"example":{"year":2026,"quarter":1,"format":"pdf"}}}},"responses":{"201":{"description":"Modelo 303 generated successfully. The `Location` header contains the relative download URL of the generated resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxReport"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/tax_reports/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b/download"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxReports","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxReports.generate303({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxReports->publicApiV1TaxReportsGenerate303($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/tax_reports/303 \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/tax_reports/347":{"post":{"operationId":"public-api.v1.tax_reports.generate_347","description":"Generates the Spanish Modelo 347 (annual third-party operations > 3,005.06 EUR) for the given year.","summary":"Generate Modelo 347","tags":["Tax Reports"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateModelo347V1Request"},"example":{"year":2025,"format":"txt_aeat"}}}},"responses":{"201":{"description":"Modelo 347 generated successfully. The `Location` header contains the relative download URL of the generated resource.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxReport"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/tax_reports/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b/download"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxReports","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxReports.generate347({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxReports->publicApiV1TaxReportsGenerate347($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/tax_reports/347 \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/recurring_invoices/{recurring_invoice}/generate":{"post":{"operationId":"public-api.v1.recurring_invoices.generate","description":"Trigger immediate invoice generation from the recurring configuration, outside the scheduled cycle.","summary":"Generate an invoice from a recurring template","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object":{"type":"string","const":"recurring_invoice.generate_result","example":"recurring_invoice.generate_result","examples":["recurring_invoice.generate_result"]},"invoice_id":{"type":["string","null"],"example":"019e8233-b23e-7258-97ad-37a831d1ef9c","examples":["019e8233-b23e-7258-97ad-37a831d1ef9c"]},"invoice_number":{"type":["string","null"],"example":"RUNREF-2026-004","examples":["RUNREF-2026-004"]}},"required":["object","invoice_id","invoice_number"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.generate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesGenerate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice}/generate \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/account":{"get":{"operationId":"public-api.v1.account.show","description":"Stripe-like account endpoint: returns the authenticated company together with its plan, add-ons, and the metadata of the API key in use (environment, scopes). Use it to introspect what the current key can do.","summary":"Retrieve account details","tags":["Account"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Account"}},"required":["data"]},"example":{"data":{"object":"account","company":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation","tax_id":"B12345678"},"plan":{"slug":"enterprise","name":"Enterprise"},"addon":{"active":true,"in_grace":false,"expires_at":null},"api_key":{"id":"019e81ef-e1d4-7208-a51d-94c2c2a54a84","name":"Producción","prefix":"fact_live_1OSf9KdP","scopes":["account:read","series:read","series:write"],"tier":"scale","created_at":"2026-01-15T09:30:00Z","last_used_at":"2026-05-25T18:00:00Z","expires_at":null}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"account","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.account.show();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->account->publicApiV1AccountShow();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/account \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/certificates/active":{"get":{"operationId":"public-api.v1.verifactu.certificates.active","description":"Return the currently active FNMT certificate used to sign VeriFactu transmissions. Returns 404 if no certificate has been uploaded yet.","summary":"Retrieve the active certificate","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyCertificate"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.certificates","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.certificates.active();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->certificates->publicApiV1VerifactuCertificatesActive();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/certificates/active \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/taxes/active":{"get":{"operationId":"public-api.v1.taxes.active","description":"Return the active taxes available to your company, combining system-wide defaults plus company-specific definitions.","summary":"List active taxes","tags":["Taxes"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tax"}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.active();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesActive();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/taxes/active \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/clients/{client}/activities":{"get":{"operationId":"public-api.v1.clients.activities","description":"Return the audit timeline for a client combining its own domain events plus invoice, quote, delivery note, proforma and purchase invoice events that reference it. Paginated with page and per_page query params (default 50).","summary":"List client activity timeline","tags":["Clients"],"parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ClientActivity"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.activities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsActivities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/clients/{client}/activities \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/clients/stats":{"get":{"operationId":"public-api.v1.clients.stats","description":"Aggregated KPIs for the authenticated company: total client count, active count, count with sales invoices, count with quotes, and totals by document type. Returned as `{ \"data\": ClientStats }`.","summary":"Get client stats","tags":["Clients"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ClientStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/clients/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/declaracion-responsable/history":{"get":{"operationId":"public-api.v1.verifactu.declaracion.history","description":"Return every version of the producer-level VeriFactu Declaración Responsable (the SIF compliance declaration issued by Factuarea), ordered by `version` descending. Read-only: the declaration is global to the producer of the system, not per-company.","summary":"List declaración responsable history","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DeclaracionResponsable"}},"total_count":{"type":"integer"}},"required":["data","total_count"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.declaracion","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.declaracion.history();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->declaracion->publicApiV1VerifactuDeclaracionHistory();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/declaracion-responsable/history \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/declaracion-responsable":{"get":{"operationId":"public-api.v1.verifactu.declaracion.current","description":"Return the current (latest) version of the producer-level VeriFactu Declaración Responsable. Read-only: the declaration is global to the producer of the system (Factuarea), not per-company. Returns 404 `declaracion_not_found` if none has been published.","summary":"Retrieve the current declaración responsable","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeclaracionResponsable"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.declaracion","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.declaracion.current();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->declaracion->publicApiV1VerifactuDeclaracionCurrent();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/declaracion-responsable \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/series/default":{"get":{"operationId":"public-api.v1.series.default","description":"Return the default numbering series for the given document type (invoice, quote, proforma, delivery_note). Returns 404 when no default is configured.","summary":"Get the default series for a document type","tags":["Series"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Series"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.default();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesDefault();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/series/default \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/delivery_notes/{delivery_note}/public-link":{"get":{"operationId":"public-api.v1.delivery_notes.public_link.get","description":"Return the public share link state of a delivery note: `url` (absolute, ready to send to the client), `enabled`, `expires_at` (`null` = unlimited), and `max_days` (plan-enforced maximum when extending the link).","summary":"Retrieve a delivery note public link","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicLink"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes.publicLink","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.publicLink.get(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicLink->publicApiV1DeliveryNotesPublicLinkGet(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/delivery_notes/{delivery_note}/public-link \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.delivery_notes.public_link.update","description":"Enable/disable the public share link of a delivery note or change its expiry. Returns 422 `expiry_exceeds_max_days` if the requested expiry exceeds the plan-enforced `max_days`. Supports `Idempotency-Key` for safe retries.","summary":"Update a delivery note public link","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDeliveryNotePublicLinkRequest"},"example":{"action":"extend","extend_days":30}}}},"responses":{"200":{"description":"Updated state of the delivery note public link after applying the requested action (`revoke`, `activate`, `extend` or `reset`). Returns the canonical `url`, whether the link is `enabled`, its `expires_at` and the plan `max_days` cap.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicLink"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes.publicLink","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.publicLink.update(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicLink->publicApiV1DeliveryNotesPublicLinkUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/delivery_notes/{delivery_note}/public-link \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/delivery_notes/stats":{"get":{"operationId":"public-api.v1.delivery_notes.stats","description":"Return aggregated KPIs for your delivery notes: total count, accumulated amount, per-status breakdown, count pending signature, and count converted to invoice this month.","summary":"Retrieve delivery note stats","tags":["Delivery Notes"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNoteStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/delivery_notes/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/face-submissions/{faceSubmission}":{"get":{"operationId":"public-api.v1.face_submissions.show","description":"Retrieves a FACe submission by its `id` (UUID). The `status` field reflects the latest known FACe processing state (`submitted`, `registered_rcf`, `accounted`, `paid`, `rejected`, `cancellation_requested`, `cancelled`, `error`) — the system polls FACe periodically, so a plain GET is the way to track progress (there is no refresh endpoint in v1).","summary":"Retrieve a FACe submission","tags":["FacturaE"],"parameters":[{"name":"faceSubmission","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FaceSubmission"}},"required":["data"]},"example":{"data":{"id":"01972f4e-9c2b-7d3a-8e5f-1a2b3c4d5e6f","object":"face_submission","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8d01","status":"registered_rcf","registry_number":"202600123456","dir3_accounting_office":"E04921301","dir3_managing_body":"E04921302","dir3_processing_unit":"E04921303","error_code":null,"error_message":null,"status_updated_at":"2026-06-12T08:15:00+00:00","last_polled_at":"2026-06-12T08:15:00+00:00","created_at":"2026-06-11T10:30:00+00:00"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"faceSubmissions","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.faceSubmissions.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->faceSubmissions->publicApiV1FaceSubmissionsShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/face-submissions/{faceSubmission} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices/{invoice}/pdf-link":{"get":{"operationId":"public-api.v1.invoices.pdf_link","description":"Returns a temporary URL to the invoice PDF instead of streaming the bytes. Convenient for embedding in emails or messaging apps. Dual contract: 200 with the URL when the PDF is already materialized; 202 with `status: pendiente` when generation was enqueued (the PDF renders on the `pdf` queue) — retry until you get the 200.","summary":"Generate temporary PDF link","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"},"filename":{"type":"string"},"expires_at":{"type":"string"}},"required":["url","filename","expires_at"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"202":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","const":"pendiente"},"document_uuid":{"type":"string"},"pdf_path":{"type":"string"},"pdf_url":{"type":"string"}},"required":["status","document_uuid","pdf_path","pdf_url"]},"message":{"type":"string","const":"La generación del PDF está en curso. El enlace estará disponible en unos segundos."}},"required":["data","message"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.pdfLink(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesPdfLink(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/pdf-link \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices/{invoice}/public-link":{"get":{"operationId":"public-api.v1.invoices.public_link_get","description":"Returns the shareable public URL of the invoice (/d/{uuid}) along with its status, expiration, and the plan-allowed maximum extension days.","summary":"Retrieve invoice public link","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicLink"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.publicLinkGet(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesPublicLinkGet(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/public-link \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.invoices.public_link_update","description":"Applies an action to the public link: `revoke`, `activate`, `extend` (with `extend_days`), or `reset` to the plan default.","summary":"Update invoice public link","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoicePublicLinkRequest"},"example":{"action":"extend","extend_days":30}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicLink"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.publicLinkUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesPublicLinkUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/invoices/{invoice}/public-link \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/stats":{"get":{"operationId":"public-api.v1.invoices.stats","description":"Returns aggregate KPIs for the company: counts by status, revenue, pending and overdue totals, average days to payment, and corrective counts. Filterable by period (defaults to the current year).","summary":"Get invoice statistics","tags":["Invoices"],"parameters":[{"name":"date_from","in":"query","schema":{"type":["string","null"],"format":"date"}},{"name":"date_to","in":"query","schema":{"type":["string","null"],"format":"date"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InvoiceStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/products/low-stock-report":{"get":{"operationId":"public-api.v1.products.low_stock_report","description":"Return products whose current stock is below their configured low-stock threshold. Useful for inventory alerts.","summary":"List products below the stock threshold","tags":["Products"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"},"total_count":{"type":"string"}},"required":["data","total_count"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.lowStockReport();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsLowStockReport();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/products/low-stock-report \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/products/{product}/activities":{"get":{"operationId":"public-api.v1.products.activities","description":"Return the audit timeline for a product combining its own domain events plus document events whose lines reference it. Paginated with page and per_page query params (default 50).","summary":"List product activity timeline","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"name":"per_page","in":"query","schema":{"type":"integer","default":50}},{"name":"page","in":"query","schema":{"type":"integer","default":1}}],"responses":{"200":{"description":"`ProductActivityV1Collection`","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductActivity"}},"total":{"type":"integer","description":"Total number of available activities.","example":3},"current_page":{"type":"integer","description":"Current page (1-based).","example":1},"per_page":{"type":"integer","description":"Number of activities per page.","example":50},"from":{"type":["integer","null"],"description":"Index of the first activity on the page, or `null` if empty.","example":1},"to":{"type":["integer","null"],"description":"Index of the last activity on the page, or `null` if empty.","example":3},"last_page":{"type":"integer","description":"Number of the last available page.","example":1}},"required":["data","total","current_page","per_page","from","to","last_page"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.activities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsActivities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/products/{product}/activities \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/products/{product}/sales-analytics":{"get":{"operationId":"public-api.v1.products.sales_analytics","description":"Return units sold, revenue, invoice count, month-over-month delta, monthly trend for the last 6 months, last buyer and recent activity feed for a single product.","summary":"Get product sales analytics","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.salesAnalytics(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsSalesAnalytics(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/products/{product}/sales-analytics \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/products/stats":{"get":{"operationId":"public-api.v1.products.stats","description":"Aggregated KPIs for your product catalog: total product count, active count, count below the low-stock threshold, accumulated stock value, and totals by category. Returned as `{ \"data\": ProductStats }`.","summary":"Get product stats","tags":["Products"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ProductStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/products/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/proformas/{proforma}/public-link":{"get":{"operationId":"public-api.v1.proformas.public_link_get","description":"Returns the shareable public URL of the proforma (/d/{uuid}) along with its status, expiration, and the plan-allowed maximum extension days.","summary":"Retrieve proforma public link","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicLink"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.publicLinkGet(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasPublicLinkGet(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/proformas/{proforma}/public-link \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.proformas.public_link_update","description":"Applies an action to the public link: `revoke`, `activate`, `extend` (with `extend_days`), or `reset` to the plan default.","summary":"Update proforma public link","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProformaPublicLinkRequest"},"example":{"action":"extend","extend_days":30}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicLink"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictProforma"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.publicLinkUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasPublicLinkUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/proformas/{proforma}/public-link \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/proformas/stats":{"get":{"operationId":"public-api.v1.proformas.stats","description":"Aggregated KPIs for the authenticated company: total proforma count and amount, count per status, expired count, and count converted to invoice. Returned as `{ \"data\": ProformaStats }`.","summary":"Get proforma stats","tags":["Proformas"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ProformaStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/proformas/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/purchase_invoices/stats":{"get":{"operationId":"public-api.v1.purchase_invoices.stats","description":"Aggregated KPIs for your purchase invoices: total count and amount, counts per status, pending and overdue totals, and amounts by supplier. Returned as `{ \"data\": PurchaseInvoiceStats }`.","summary":"Get purchase invoice stats","tags":["Purchase Invoices"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoiceStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/purchase_invoices/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/quotes/{quote}/public-link":{"get":{"operationId":"public-api.v1.quotes.public_link_get","description":"Returns the shareable public URL of the quote (/d/{uuid}) along with its status, expiration, and the plan-allowed maximum extension days.","summary":"Retrieve quote public link","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicLink"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.publicLinkGet(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesPublicLinkGet(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/quotes/{quote}/public-link \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"put":{"operationId":"public-api.v1.quotes.public_link_update","description":"Applies an action to the public link: `revoke`, `activate`, `extend` (with `extend_days`), or `reset` to the plan default.","summary":"Update quote public link","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuotePublicLinkRequest"},"example":{"action":"extend","extend_days":30}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PublicLink"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictQuote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.publicLinkUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesPublicLinkUpdate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/quotes/{quote}/public-link \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/quotes/stats":{"get":{"operationId":"public-api.v1.quotes.stats","description":"Aggregated KPIs for the authenticated company: total quote count and amount, count per status, expired count, and converted count. Returned as `{ \"data\": QuoteStats }`.","summary":"Get quote stats","tags":["Quotes"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/QuoteStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/quotes/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/recurring_invoices/stats":{"get":{"operationId":"public-api.v1.recurring_invoices.stats","description":"Aggregate KPIs for your recurring invoices: counts by status, due today / this week, generated and failed this month, breakdown by frequency, next scheduled runs and estimated revenue this month.","summary":"Retrieve recurring invoice stats","tags":["Recurring Invoices"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoiceStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/recurring_invoices/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/series/{series}/activities":{"get":{"operationId":"public-api.v1.series.activities","description":"Return the audit timeline for a series combining its own domain events (creation, archive/unarchive, default changes, number consumption). Paginated with a page-number cursor (`starting_after` is the next page number).","summary":"List series activity timeline","tags":["Series"],"parameters":[{"name":"series","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SeriesActivity"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.activities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesActivities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/series/{series}/activities \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/series/stats":{"get":{"operationId":"public-api.v1.series.stats","description":"Aggregated KPIs for your document numbering series: total series count, active and archived counts, and a breakdown by document type. Returned as `{ \"data\": SeriesStats }`.","summary":"Get series stats","tags":["Series"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"total":{"type":"integer","example":17,"examples":[17]},"invoice":{"type":"integer","example":5,"examples":[5]},"quote":{"type":"integer","example":2,"examples":[2]},"delivery_note":{"type":"integer","example":3,"examples":[3]},"proforma":{"type":"integer","example":4,"examples":[4]}},"required":["total","invoice","quote","delivery_note","proforma"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/series/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/suppliers/{supplier}/activities":{"get":{"operationId":"public-api.v1.suppliers.activities","description":"Return the audit timeline for a supplier combining its own domain events plus purchase invoice and contract events that reference it. Paginated with page and per_page query params (default 50).","summary":"List supplier activity timeline","tags":["Suppliers"],"parameters":[{"name":"supplier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SupplierActivity"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.activities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersActivities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/suppliers/{supplier}/activities \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/suppliers/stats":{"get":{"operationId":"public-api.v1.suppliers.stats","description":"Aggregated KPIs for the authenticated company: total supplier count, active count, count with contracts, and amount totals by status. Returned as `{ \"data\": SupplierStats }`.","summary":"Get supplier stats","tags":["Suppliers"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SupplierStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/suppliers/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/taxes/defaults/{docType}":{"get":{"operationId":"public-api.v1.taxes.defaults","description":"Return the configured default taxes (vat, retention, surcharge) for the given document type, scoped to your company. Each slot is either a Tax or null when no default is configured.","summary":"Get default taxes for a document type","tags":["Taxes"],"parameters":[{"name":"docType","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxDefaultsForDocuments"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.defaults(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesDefaults(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/taxes/defaults/{docType} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/tax_reports/{tax_report}/activities":{"get":{"operationId":"public-api.v1.tax_reports.activities","description":"Returns the cursor-paginated activity timeline (generation, download, etc.) of a single tax report generation.","summary":"List tax report activities","tags":["Tax Reports"],"parameters":[{"name":"tax_report","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TaxReportActivity"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxReports","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxReports.activities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxReports->publicApiV1TaxReportsActivities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/tax_reports/{tax_report}/activities \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/tax_reports/stats":{"get":{"operationId":"public-api.v1.tax_reports.stats","description":"Returns aggregate KPIs of the generated tax report history: totals by type and format, accumulated file size, and the current fiscal quarter/year.","summary":"Retrieve tax report stats","tags":["Tax Reports"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxReportStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxReports","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxReports.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxReports->publicApiV1TaxReportsStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/tax_reports/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/taxes/stats":{"get":{"operationId":"public-api.v1.taxes.stats","description":"Aggregated KPIs for the tax rates available to your company: total tax count, active count, and breakdown by type (vat, retention, surcharge, other). Returned as `{ \"data\": TaxStats }`.","summary":"Get tax stats","tags":["Taxes"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/taxes/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/taxes/by-type":{"get":{"operationId":"public-api.v1.taxes.by_type","description":"Return taxes filtered by category via the type query param (vat, retention, surcharge, other). Defaults to vat when omitted.","summary":"List taxes filtered by type","tags":["Taxes"],"parameters":[{"name":"type","in":"query","schema":{"type":"string","default":"vat"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tax"}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.byType();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesByType();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/taxes/by-type \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/taxes/for-purchases":{"get":{"operationId":"public-api.v1.taxes.for_purchases","description":"Return the taxes available for purchase documents (supplier invoices).","summary":"List taxes applicable to purchases","tags":["Taxes"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tax"}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.forPurchases();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesForPurchases();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/taxes/for-purchases \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/taxes/for-sales":{"get":{"operationId":"public-api.v1.taxes.for_sales","description":"Return the taxes available for sales documents (invoices, quotes, proformas, delivery notes).","summary":"List taxes applicable to sales","tags":["Taxes"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tax"}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.forSales();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesForSales();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/taxes/for-sales \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/records/{record}/activities":{"get":{"operationId":"public-api.v1.verifactu.records.activities","description":"Return the audit timeline for a single VeriFactu record (creation, transmission attempts, AEAT acceptance/rejection). Paginated with a page-number cursor.","summary":"List VeriFactu record activity timeline","tags":["VeriFactu"],"parameters":[{"name":"record","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VeriFactuActivity"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.records","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.records.activities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->records->publicApiV1VerifactuRecordsActivities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/records/{record}/activities \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/config":{"get":{"operationId":"public-api.v1.verifactu.config","description":"Return the VeriFactu configuration of your company (mode, environment, enrollment status). The certificate password is never exposed. Returned as `{ \"data\": VeriFactuConfig }`.","summary":"Retrieve VeriFactu config","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VeriFactuConfig"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.config();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->publicApiV1VerifactuConfig();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/config \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/events/summary":{"get":{"operationId":"public-api.v1.verifactu.events.summary","description":"Return an aggregated summary of your VeriFactu SIF events grouped by type and outcome. Useful for dashboards. Returned as `{ \"data\": VeriFactuEventSummary }`.","summary":"Get VeriFactu event summary","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VeriFactuEventSummary"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.events","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.events.summary();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->events->publicApiV1VerifactuEventsSummary();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/events/summary \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/stats":{"get":{"operationId":"public-api.v1.verifactu.stats","description":"Aggregated KPIs of your VeriFactu records: total count, counts per status (pending, submitted, accepted, rejected, error), breakdown by record and invoice type, and last transmission timestamp. Accepts optional `date_from`, `date_to`, and `environment` filters. Returned as `{ \"data\": VeriFactuStats }`.","summary":"Get VeriFactu stats","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VeriFactuStats"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.stats();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->publicApiV1VerifactuStats();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/stats \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/series/active":{"get":{"operationId":"public-api.v1.series.active","description":"Return all non-archived series for the given document type within your company.","summary":"List active series by document type","tags":["Series"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Series"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.active();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesActive();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/series/active \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/aeat-access/records":{"get":{"operationId":"public-api.v1.verifactu.aeat_access.list","description":"Return the dissociated (anonymized) AEAT access ledger with cursor-based pagination. Third-party tax identifiers (NIF) are never exposed; the cursor uses the underlying record UUID v7 only for ordering.","summary":"List AEAT access records","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AeatAccessRecord"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.aeatAccess","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.verifactu.aeatAccess.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->aeatAccess->publicApiV1VerifactuAeatAccessList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/aeat-access/records \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/certificates":{"get":{"operationId":"public-api.v1.verifactu.certificates.list","description":"List the FNMT (PKCS#12) certificates uploaded for your company. The certificate password is never exposed in this representation.","summary":"List company certificates","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CompanyCertificate"}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.certificates","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.verifactu.certificates.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->certificates->publicApiV1VerifactuCertificatesList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/certificates \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"post":{"operationId":"public-api.v1.verifactu.certificates.upload","description":"Upload an FNMT certificate (PKCS#12, `.p12`/`.pfx`) as `multipart/form-data` with `certificate_file` and `certificate_password`. The file is validated by magic bytes (ASN.1 DER) and capped at 100 KB; the password is encrypted at rest. The uploaded certificate is activated automatically (previous ones are deactivated). The `Location` header points to `/v1/verifactu/certificates/active`.","summary":"Upload a company certificate","tags":["VeriFactu"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadCompanyCertificateV1Request"}}}},"responses":{"201":{"description":"FNMT certificate uploaded and activated successfully. The `Location` header contains the canonical (relative) URL of the active certificate.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyCertificate"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/verifactu/certificates/active"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.certificates","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.certificates.upload(file);"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->certificates->publicApiV1VerifactuCertificatesUpload($file);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/verifactu/certificates \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -F \"file=@./path/to/file\""}]}},"/delivery_notes/statuses":{"get":{"operationId":"public-api.v1.delivery_notes.statuses","description":"List the closed catalog of delivery note statuses (`draft`, `delivered`, `invoiced`, `cancelled`) with their public labels and colors. Use it to populate filters or status pickers instead of hard-coding values. The response `data` is an array of `{ value, label, color }` items.","summary":"List delivery note statuses","tags":["Delivery Notes"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryNoteStatusItem"}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.statuses();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesStatuses();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/delivery_notes/statuses \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/event-catalog":{"get":{"operationId":"public-api.v1.event_catalog.list","description":"List the closed catalog of event types that Factuarea can emit to webhook endpoints. Use it to populate a subscription UI instead of hard-coding event names. Each entry exposes its `name`, `category` (derived from the `<category>.*` prefix), a Spanish `description`, and a `status`: `available` means the type is emitted today and may be subscribed to via `enabled_events`; `coming_soon` means the type is reserved for a future release — it is listed for discovery but is NOT yet subscribable (passing it in `enabled_events` returns 422). The set of currently emitted (`available`) types is the closed source of truth `EventName::CATALOG`.","summary":"List event types","tags":["Events"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"}},"required":["name","category","description","status"]}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"eventCatalog","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.eventCatalog.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->eventCatalog->publicApiV1EventCatalogList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/event-catalog \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/events":{"get":{"operationId":"public-api.v1.events.list","description":"List events in your event log with cursor-based pagination. Each event records something that happened in your account (an invoice was paid, a quote accepted, …) and is the same object delivered to your webhook endpoints. Supports filtering by `type[in]` and `created[gte|lte]`.","summary":"List all events","tags":["Events"],"parameters":[{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"type","in":"query","description":"Event type (e.g. invoice.created). Exact match on `type`.","schema":{"type":"string"}},{"name":"type[in]","in":"query","description":"Event type (e.g. invoice.created). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"created[gte]","in":"query","description":"Creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}}]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0d","object":"event","type":"invoice.paid","aggregate_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","correlation_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a99","api_version":"2026-05-22","livemode":true,"data":{"type":"invoice.paid","object":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"},"amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_reference":"TRF-2026-0042"},"created":1774002600}],"has_more":true,"next_cursor":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"events","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.events.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->events->publicApiV1EventsList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/events \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices/{invoice}/activities":{"get":{"operationId":"public-api.v1.invoices.activities","description":"Returns the cursor-paginated activity timeline (audit log) of a single invoice: status transitions, emails, reminders, and metadata changes.","summary":"List invoice activity","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceActivity"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.activities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesActivities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/activities \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices/{invoice}/correctives":{"get":{"operationId":"public-api.v1.invoices.correctives","description":"Returns all corrective invoices associated with the original invoice. Used to reconstruct the original → rectificativa tree.","summary":"List corrective invoices","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}},"required":["data"]},"example":{"data":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a60","object":"invoice","number":"RECT-2026-00007","is_number_assigned":true,"type":"R1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b04","code":"RECT-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"issued","issued_on":"2026-03-22","due_on":"2026-04-21","subtotal":-500,"taxes_total":-105,"total":-605,"currency":"EUR","notes":"Rectificativa por descuento comercial sobre FAC-2026-00010.","external_id":"ERP-RECT-2026-0007","lines":[{"object":"invoice_line","description":"Rectificación: descuento comercial 5 h consultoría","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":5,"unit_price":-100,"tax_rate":21,"discount_percent":0,"subtotal":-500,"taxes":-105,"total":-605}],"metadata":{"order_id":"PO-2026-0010"},"tags":["rectificativa","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":0,"pending_amount":-605,"payments":{"detail":[],"total":0,"pending":-605},"is_corrective":true,"corrective":{"original_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a10","original_number":"FAC-2026-00010","original_date":"2026-02-01","correction_reason":"R1","correction_type":"por_sustitucion","correction_nature":"S","base_rectificada":-500,"cuota_rectificada":-105,"correction_aeat_type":"R1"},"payment":null,"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a60","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a60","enabled":true,"expires_at":"2026-09-22T23:59:59Z","max_days":120},"substituted_by":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a50","number":"FAC-2026-00050"},"recurring":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08"},"paid_at":null,"paid_on":null,"sent_at":"2026-03-22T09:10:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-22T09:00:00Z","updated_at":"2026-03-22T09:10:00Z"}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.correctives(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesCorrectives(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/correctives \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/invoices/{invoice}/face-submissions":{"get":{"operationId":"public-api.v1.invoices.face_submissions.list","description":"Lists the FACe submission history of an invoice (flat array, newest included). Returns `data: []` when the invoice has never been submitted.","summary":"List invoice FACe submissions","tags":["FacturaE"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FaceSubmission"}}},"required":["data"]},"example":{"data":[{"id":"01972f4e-9c2b-7d3a-8e5f-1a2b3c4d5e6f","object":"face_submission","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8d01","status":"submitted","registry_number":"202600123456","dir3_accounting_office":"E04921301","dir3_managing_body":"E04921302","dir3_processing_unit":"E04921303","error_code":null,"error_message":null,"status_updated_at":"2026-06-11T10:30:00+00:00","last_polled_at":null,"created_at":"2026-06-11T10:30:00+00:00"}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices.faceSubmissions","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.invoices.faceSubmissions.list(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", { limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->faceSubmissions->publicApiV1InvoicesFaceSubmissionsList(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/face-submissions \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"post":{"operationId":"public-api.v1.invoices.face_submissions.submit","description":"Submits an issued invoice to FACe (the Spanish B2G general entry point). Requires the client's three DIR3 codes and an active signing certificate; the FacturaE 3.2.2 XML is signed XAdES-EPES and presented through the FACe web service, returning the registry number. No request body: the invoice travels in the path and the DIR3 codes are read from the client. Test keys (`fact_test_`) simulate the submission (`FACE-SANDBOX-*` registry) without contacting FACe. Errors: 422 (`invoice_not_emittable_for_facturae`, `client_missing_dir3_codes`, `signing_certificate_required`), 409 `face_submission_already_exists` (an active submission already exists for the invoice), 502 `face_transmission_failed` (nothing is persisted when the FACe web service is down).","summary":"Submit invoice to FACe","tags":["FacturaE"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FaceSubmission"}},"required":["data"]},"example":{"data":{"id":"01972f4e-9c2b-7d3a-8e5f-1a2b3c4d5e6f","object":"face_submission","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8d01","status":"submitted","registry_number":"202600123456","dir3_accounting_office":"E04921301","dir3_managing_body":"E04921302","dir3_processing_unit":"E04921303","error_code":null,"error_message":null,"status_updated_at":"2026-06-11T10:30:00+00:00","last_polled_at":null,"created_at":"2026-06-11T10:30:00+00:00"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices.faceSubmissions","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.faceSubmissions.submit(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->faceSubmissions->publicApiV1InvoicesFaceSubmissionsSubmit(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/face-submissions \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/invoices/{invoice}/payments":{"get":{"operationId":"public-api.v1.invoices.payments_list","description":"List the payments registered against an invoice, ordered by payment date. Returns an empty array when no payments have been registered yet.","summary":"List invoice payments","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.paymentsList(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesPaymentsList(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/payments \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"post":{"operationId":"public-api.v1.invoices.payments_create","description":"Register a partial (or full) payment against an invoice. The invoice transitions to `partially_paid` while the cumulative paid amount is below the total, and to `paid` once it reaches it. Returns 422 if the invoice is in a status that does not accept payments.","summary":"Register a payment","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterInvoicePaymentRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.paymentsCreate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesPaymentsCreate(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/payments \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/statuses":{"get":{"operationId":"public-api.v1.invoices.statuses","description":"Lists the closed catalog of invoice statuses with their public `value`, localized `label`, and UI `color`. Use it to populate filters or status pickers instead of hard-coding values.","summary":"List invoice statuses","tags":["Invoices"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceStatusItem"}}},"required":["data"]},"example":{"data":[{"value":"draft","label":"Borrador","color":"gray"},{"value":"sent","label":"Enviado","color":"blue"},{"value":"paid","label":"Pagado","color":"green"},{"value":"cancelled","label":"Cancelado","color":"red"},{"value":"overdue","label":"Vencido","color":"orange"},{"value":"annulled","label":"Anulado","color":"purple"}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.statuses();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesStatuses();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/statuses \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/purchase_invoices/overdue":{"get":{"operationId":"public-api.v1.purchase_invoices.overdue","description":"Return purchase invoices whose due date has passed and are still unpaid.","summary":"List overdue purchase invoices","tags":["Purchase Invoices"],"parameters":[{"name":"per_page","in":"query","schema":{"type":"string","default":"25"}},{"name":"limit","in":"query","description":"Default `'25'` (string) por consistencia OpenAPI: Scramble infiere\n schema.type=string para `request->input()` y el default debe ser\n string (Spectral rechaza `default: 25` int con `type: string`).","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseInvoice"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.overdue();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesOverdue();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/purchase_invoices/overdue \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/payment-methods":{"get":{"operationId":"public-api.v1.payment_methods","description":"Lists the closed catalog of payment methods with their public `value` and localized `label`. Use it to populate the `payment_method` field when registering a payment instead of hard-coding values.","summary":"List payment methods","tags":["Invoices"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea..paymentMethods();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->->publicApiV1PaymentMethods();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/payment-methods \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/purchase_invoices/pending":{"get":{"operationId":"public-api.v1.purchase_invoices.pending","description":"Return purchase invoices in pending payment status, paginated.","summary":"List pending purchase invoices","tags":["Purchase Invoices"],"parameters":[{"name":"per_page","in":"query","schema":{"type":"string","default":"25"}},{"name":"limit","in":"query","description":"Default `'25'` (string) por consistencia OpenAPI/Spectral.","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseInvoice"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.pending();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesPending();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/purchase_invoices/pending \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/proformas/statuses":{"get":{"operationId":"public-api.v1.proformas.statuses","description":"Returns the closed catalog of proforma statuses with their public `value`, localized `label`, and UI `color`. Use it to populate filters or status pickers instead of hard-coding values.","summary":"List proforma statuses","tags":["Proformas"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.statuses();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasStatuses();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/proformas/statuses \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/purchase_invoices/{purchase_invoice}/payments":{"get":{"operationId":"public-api.v1.purchase_invoices.list_payments","description":"List Purchase Invoice Payments.","summary":"List purchase invoice payments","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.listPayments(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesListPayments(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice}/payments \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]},"post":{"operationId":"public-api.v1.purchase_invoices.register_payment","description":"Register Purchase Invoice Payment.","summary":"Register a purchase invoice payment","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterPurchaseInvoicePaymentRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictPurchaseInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.registerPayment(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesRegisterPayment(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice}/payments \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/quarterly/available-quarters":{"get":{"operationId":"public-api.v1.invoices.quarterly.available","description":"Returns the quarters that have at least one invoice, with breakdown by invoice type (F1/F2/F3/R5). Useful to populate \"quarter to export\" selectors.","summary":"List quarters with invoices","tags":["Invoices"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices.quarterly","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.quarterly.available();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->quarterly->publicApiV1InvoicesQuarterlyAvailable();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/quarterly/available-quarters \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/quotes/statuses":{"get":{"operationId":"public-api.v1.quotes.statuses","description":"Returns the canonical list of quote statuses available in the API along with their human-readable label and UI color. Useful for building dropdowns and filters.","summary":"List quote statuses","tags":["Quotes"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.statuses();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesStatuses();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/quotes/statuses \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/recurring_invoices/{recurring_invoice}/activities":{"get":{"operationId":"public-api.v1.recurring_invoices.activities","description":"Return the cursor-paginated activity timeline (domain events: activation, pause, resume, generation, failure, cancellation, etc.) for a recurring invoice. Metadata is sanitized to never expose internal identifiers.","summary":"List recurring invoice activity","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecurringInvoiceActivity"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.activities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesActivities(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice}/activities \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/recurring_invoices/{recurring_invoice}/logs":{"get":{"operationId":"public-api.v1.recurring_invoices.logs","description":"Return paginated history of generations, failures and other events for this recurring template.","summary":"List recurring invoice execution logs","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}},{"name":"per_page","in":"query","schema":{"type":"string","default":"25"}},{"name":"limit","in":"query","description":"Default `'25'` (string) por consistencia OpenAPI/Spectral.","schema":{"type":"string"}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"},"has_more":{"type":"string"},"next_cursor":{"type":["string","null"]}},"required":["data","has_more","next_cursor"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-speakeasy-pagination":{"type":"cursor","inputs":[{"name":"cursor","in":"parameters","type":"cursor"}],"outputs":{"results":"$.data","nextCursor":"$.next_cursor"}},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.logs(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesLogs(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice}/logs \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/tax_reports/history":{"get":{"operationId":"public-api.v1.tax_reports.history","description":"Returns the paginated history of generated tax reports for the company. Optional filters: type, year.","summary":"List tax report history","tags":["Tax Reports"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TaxReport"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxReports","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxReports.history();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxReports->publicApiV1TaxReportsHistory();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/tax_reports/history \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/events":{"get":{"operationId":"public-api.v1.verifactu.events.list","description":"List the VeriFactu SIF events of your company (alta/anulación transmissions, retries, AEAT responses) with cursor-based pagination.","summary":"List VeriFactu events","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VeriFactuEvent"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.events","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.verifactu.events.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->events->publicApiV1VerifactuEventsList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/events \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/records":{"get":{"operationId":"public-api.v1.verifactu.records.list","description":"List the VeriFactu (Spanish AEAT SIF) records of your company with cursor-based pagination. Each record captures the alta/anulación submitted to AEAT, its hash chain (`huella`), `aeat_csv`, and transmission status. Supports filtering by `status`, `type`, `date_from`/`date_to`, and `environment`.","summary":"List VeriFactu records","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/VeriFactuRecord"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.records","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.verifactu.records.list({ limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->records->publicApiV1VerifactuRecordsList();\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/records \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/webhook_endpoints/{webhook_endpoint}/deliveries":{"get":{"operationId":"public-api.v1.webhook_endpoints.deliveries.list","description":"List delivery attempts for a webhook endpoint with cursor-based pagination. Each delivery captures the HTTP response status, body (truncated), duration, and retry schedule.","summary":"List webhook deliveries","tags":["Webhooks"],"parameters":[{"name":"webhook_endpoint","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of objects to return. Integer between 1 and 100. Defaults to 25.","schema":{"type":"integer","default":25,"minimum":1,"maximum":100}},{"name":"starting_after","in":"query","description":"Cursor for forward pagination. Use the `uuid` of the last object on the previous page.","schema":{"type":"string","format":"uuid"}},{"name":"ending_before","in":"query","description":"Cursor for backward pagination. Use the `uuid` of the first object on the current page.","schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"Delivery status (pending, succeeded, failed). Exact match on `status`.","schema":{"type":"string"}},{"name":"status[in]","in":"query","description":"Delivery status (pending, succeeded, failed). Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"event","in":"query","description":"Type of the delivered event. Exact match on `event`.","schema":{"type":"string"}},{"name":"event[in]","in":"query","description":"Type of the delivered event. Comma-separated list. Any of the values matches.","schema":{"type":"string","description":"Comma-separated list of values (CSV)."}},{"name":"created[gte]","in":"query","description":"Delivery creation date (ISO 8601). Greater than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lte]","in":"query","description":"Delivery creation date (ISO 8601). Less than or equal to the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[gt]","in":"query","description":"Delivery creation date (ISO 8601). Strictly greater than the given value.","schema":{"type":"string","format":"date-time"}},{"name":"created[lt]","in":"query","description":"Delivery creation date (ISO 8601). Strictly less than the given value.","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedList"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints.deliveries","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\n// List endpoints return an async-iterable Page (cursors handled for you).\nfor await (const item of await factuarea.webhookEndpoints.deliveries.list(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", { limit: 25 })) {\n  console.log(item.id);\n}"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->deliveries->publicApiV1WebhookEndpointsDeliveriesList(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");\nforeach ($response->paginatedList?->data ?? [] as $item) {\n    echo $item->id, PHP_EOL;\n}"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/webhook_endpoints/{webhook_endpoint}/deliveries \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/delivery_notes/{delivery_note}/mark-delivered":{"post":{"operationId":"public-api.v1.delivery_notes.mark_delivered","description":"Transition a delivery note to the `delivered` state (public `sent`). Canonical REST replacement for the deprecated `POST /change_status`. Returns 409 `invalid_status_transition` if the note cannot transition. Supports `Idempotency-Key` for safe retries.","summary":"Mark delivery note as delivered","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkDeliveredRequest"},"example":{"delivery_date":"2026-01-21T10:00:00Z"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.markDelivered(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesMarkDelivered(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes/{delivery_note}/mark-delivered \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/{invoice}/mark-paid":{"post":{"operationId":"public-api.v1.invoices.mark_paid","description":"Mark an invoice as fully paid. Idempotent: if already paid, returns the invoice unchanged. Returns 422 if the invoice is in a status that cannot transition to `paid`.","summary":"Mark invoice as paid","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkInvoicePaidRequest"},"example":{"paid_on":"2026-06-01","payment_method":"transferencia","notes":"Pago recibido por transferencia bancaria."}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.markPaid(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesMarkPaid(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/mark-paid \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/{invoice}/mark-sent":{"post":{"operationId":"public-api.v1.invoices.mark_sent","description":"Transitions a draft invoice to `sent` without dispatching email. Useful when the document was delivered through an external channel.","summary":"Mark an invoice as sent","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.markSent(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesMarkSent(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/mark-sent \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/purchase_invoices/{purchase_invoice}/mark_paid":{"post":{"operationId":"public-api.v1.purchase_invoices.mark_paid","description":"Record payment of a purchase invoice. Sets `paid_at` to the current timestamp.","summary":"Mark purchase invoice as paid","tags":["Purchase Invoices"],"parameters":[{"name":"purchase_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkPurchaseInvoicePaidRequest"},"example":{"paid_on":"2026-05-10","payment_method":"bank_transfer","notes":"Pagada por transferencia SEPA."}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictPurchaseInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"purchaseInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.purchaseInvoices.markPaid(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->purchaseInvoices->publicApiV1PurchaseInvoicesMarkPaid(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/purchase_invoices/{purchase_invoice}/mark_paid \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/series/{series}/default":{"post":{"operationId":"public-api.v1.series.set_default","description":"Promote a series to default for its document type. If another series was the default for the same type it is demoted atomically. Returns 204 on success.","summary":"Mark a series as default for its type","tags":["Series"],"parameters":[{"name":"series","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.setDefault(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesSetDefault(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/series/{series}/default \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/series/{series}":{"get":{"operationId":"public-api.v1.series.show","description":"Retrieve a series by its `uuid`.\n\nSeries are **immutable** for fiscal compliance (AEAT VeriFactu — legal numbering continuity): `PUT`, `PATCH` and `DELETE` on `/v1/series/{uuid}` return `405 Method Not Allowed` with `error.code = \"series_immutable\"` and header `Allow: GET, POST`. To \"delete\" a series use `POST /v1/series/{uuid}/archive`; to change the numbering, create a new series and mark it as default.","summary":"Retrieve a series","tags":["Series"],"parameters":[{"name":"series","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Series"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","object":"series","code":"F-2026","name":"Facturas 2026","document_type":"invoice","prefix":"F-2026-","number_format":"{code}-{YYYY}-{000}","next_number":46,"current_number":45,"initial_number":1,"year_reset":true,"is_default":true,"is_active":true,"created_at":"2026-01-01T00:00:00Z","updated_at":"2026-01-20T11:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/series/{series} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/recurring_invoices/{recurring_invoice}/pause":{"post":{"operationId":"public-api.v1.recurring_invoices.pause","description":"Pause a recurring invoice. No new invoices will be generated until resumed. Reversible — use `resume`/`activate` to reactivate. For a permanent, irreversible stop use `cancel`.","summary":"Pause recurring invoice","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.pause(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesPause(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice}/pause \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/webhook_endpoints/{webhook_endpoint}/ping":{"post":{"operationId":"public-api.v1.webhook_endpoints.ping","description":"Send a test event (`webhook.ping`) to the endpoint to verify it is reachable and the signature handshake works. The synthetic delivery appears in `GET /webhook_endpoints/{webhook_endpoint}/deliveries`.","summary":"Ping webhook endpoint","tags":["Webhooks"],"parameters":[{"name":"webhook_endpoint","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","example":false,"examples":[false]},"http_status":{"type":["integer","null"],"example":503,"examples":[503]},"response_body":{"type":["string","null"],"example":"<html><body>503 Service Unavailable</body></html>","examples":["<html><body>503 Service Unavailable</body></html>"]},"error_message":{"type":["string","null"],"example":"El endpoint respondió con un código de estado no-2xx (503).","examples":["El endpoint respondió con un código de estado no-2xx (503)."]},"duration_ms":{"type":"integer","example":87,"examples":[87]}},"required":["success","http_status","response_body","error_message","duration_ms"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.webhookEndpoints.ping(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->publicApiV1WebhookEndpointsPing(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/webhook_endpoints/{webhook_endpoint}/ping \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/invoices/{invoice}/reminder-preview":{"post":{"operationId":"public-api.v1.invoices.reminder_preview","description":"Renders the HTML, subject, and resolved recipients of the reminder email without sending it. Same override fields as send-reminder.","summary":"Preview a payment reminder email","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInvoiceReminderV1Request"},"example":{"email":"contacto@cliente.example","subject":"Recordatorio de pago: Factura F-2026-015","message":"Le recordamos que la factura F-2026-015 se encuentra pendiente de pago.","cc":["copia@cliente.example"],"bcc":["registro@cliente.example"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InvoiceReminderPreview"}},"required":["data"]},"example":{"data":{"subject":"Recordatorio de pago - Factura FAC-2026-00042","html":"<p>Estimado cliente, le recordamos que la factura <strong>FAC-2026-00042</strong> por importe de 1210,00 € venció el 14/04/2026 y está pendiente de pago.</p>","from":"facturacion@tuempresa.com","from_name":"Tu Empresa SL","to":"cliente@acme.es","cc":[],"bcc":[],"status":"overdue","invoice_number":"FAC-2026-00042","total":1210,"due_date":"2026-04-14","public_url":"https://app.factuarea.com/d/9f3c1a7e-2b8d-4c6f-9e1a-7d5b3c2e8f04","public_link_active":true,"public_link_expires_at":"2026-09-15T23:59:59Z","reminders_sent":1,"last_reminder_sent_at":"2026-04-20T09:00:00Z","cooldown_active":false}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.reminderPreview(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesReminderPreview(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/reminder-preview \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/{invoice}/payment-receipt":{"get":{"operationId":"public-api.v1.invoices.payment_receipt","description":"Streams the PDF receipt of a paid invoice. Returns 422 if the invoice is not in `paid` status.","summary":"Download payment receipt PDF","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"Content-Length":{"schema":{"type":"string"}},"Content-Disposition":{"schema":{"type":"string"}},"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.paymentReceipt(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesPaymentReceipt(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/invoices/{invoice}/payment-receipt \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/recurring_invoices/{recurring_invoice}/preview":{"get":{"operationId":"public-api.v1.recurring_invoices.preview","description":"Return the next scheduled run dates with their due dates and estimated totals. Defaults to 5 occurrences.","summary":"Preview upcoming recurring invoice dates","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}},{"name":"count","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.preview(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesPreview(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice}/preview \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/tax_reports/preview":{"post":{"operationId":"public-api.v1.tax_reports.preview","description":"Computes the breakdown of a tax report without persisting a generation or writing files. Ideal for interactive UIs that confirm totals before commit.","summary":"Preview a tax report","tags":["Tax Reports"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewTaxReportV1Request"},"example":{"type":"modelo_303","year":2026,"quarter":1}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/TaxReportPreview"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxReports","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxReports.preview({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxReports->publicApiV1TaxReportsPreview($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/tax_reports/preview \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/quarterly/download-zip":{"post":{"operationId":"public-api.v1.invoices.quarterly.download_zip","description":"Builds a ZIP with all invoice PDFs of the given quarter. Returns ZIP metadata (path, processed counts, errors).","summary":"Generate quarterly ZIP archive","tags":["Invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuarterlyDownloadV1Request"},"example":{"year":2026,"quarter":1,"include_index":true}}}},"responses":{"200":{"description":"","content":{"application/zip":{"schema":{"type":"string","format":"binary"}}},"headers":{"Content-Disposition":{"required":true,"schema":{"type":"string"},"example":"attachment"},"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices.quarterly","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.quarterly.downloadZip({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->quarterly->publicApiV1InvoicesQuarterlyDownloadZip($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/quarterly/download-zip \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/quarterly/send-email":{"post":{"operationId":"public-api.v1.invoices.quarterly.send_email","description":"Generates the quarterly ZIP and emails it to the recipient, typically the tax accountant.","summary":"Email quarterly ZIP to accountant","tags":["Invoices"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuarterlyDownloadV1Request"},"example":{"year":2026,"quarter":1,"email":"contable@empresa.example","message":"Adjuntamos el dossier trimestral de facturas Q1 2026."}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"message":{"type":"string","const":"Email trimestral encolado correctamente.","example":"Email trimestral encolado correctamente.","examples":["Email trimestral encolado correctamente."]},"year":{"type":"integer","example":2026,"examples":[2026]},"quarter":{"type":"integer","example":1,"examples":[1]},"recipient":{"example":"contable@empresa.example","examples":["contable@empresa.example"],"anyOf":[{},{"type":"string","enum":[""]}]}},"required":["message","year","quarter","recipient"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices.quarterly","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.quarterly.sendEmail({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->quarterly->publicApiV1InvoicesQuarterlySendEmail($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/quarterly/send-email \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/proformas/{proforma}/reject":{"post":{"operationId":"public-api.v1.proformas.reject","description":"Mark a proforma as rejected by the client. Returns 422 if the proforma is in a status that cannot transition to `rejected`.","summary":"Reject a proforma","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectProformaRequest"},"example":{"reason":"Cliente opta por otro proveedor"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictProforma"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.reject(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasReject(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/proformas/{proforma}/reject \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/quotes/{quote}/reject":{"post":{"operationId":"public-api.v1.quotes.reject","description":"Mark a quote as rejected by the client. Sets `rejected_at` to the current timestamp.","summary":"Reject a quote","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RejectQuoteRequest"},"example":{"reason":"El cliente ha optado por otra propuesta"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictQuote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.reject(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesReject(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/quotes/{quote}/reject \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/webhook_endpoints/{webhook_endpoint}/deliveries/{delivery}/replay":{"post":{"operationId":"public-api.v1.webhook_endpoints.deliveries.replay","description":"Re-queue a webhook delivery. A new delivery attempt is created (with `attempt: 1`) for the same event/endpoint pair.","summary":"Replay webhook delivery","tags":["Webhooks"],"parameters":[{"name":"webhook_endpoint","in":"path","required":true,"schema":{"type":"string"}},{"name":"delivery","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"new_delivery_id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"]},"webhook_endpoint_id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b"]},"status":{"type":"string","const":"queued","example":"queued","examples":["queued"]}},"required":["new_delivery_id","webhook_endpoint_id","status"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints.deliveries","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.webhookEndpoints.deliveries.replay(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->deliveries->publicApiV1WebhookEndpointsDeliveriesReplay(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/webhook_endpoints/{webhook_endpoint}/deliveries/{delivery}/replay \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/recurring_invoices/{recurring_invoice}/resume":{"post":{"operationId":"public-api.v1.recurring_invoices.resume","description":"Resume a paused recurring invoice. This is a semantic alias of `POST /recurring_invoices/{recurring_invoice}/activate` — both map to the same handler and behave identically; neither is deprecated.","summary":"Resume recurring invoice","tags":["Recurring Invoices"],"parameters":[{"name":"recurring_invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"recurringInvoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.recurringInvoices.resume(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->recurringInvoices->publicApiV1RecurringInvoicesResume(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/recurring_invoices/{recurring_invoice}/resume \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/verifactu/events/{event}/retry":{"post":{"operationId":"public-api.v1.verifactu.events.retry","description":"Re-queue the AEAT transmission of a failed VeriFactu event. Returns 404 if the event does not exist, 422 `business_rule_violation` / `event_already_processed` if it was already accepted, and 422 `max_retries_exceeded` once the retry limit is reached.","summary":"Retry a VeriFactu event","tags":["VeriFactu"],"parameters":[{"name":"event","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a21","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a21"]},"message":{"type":"string","const":"Transmisión de evento encolada."}},"required":["id","message"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.events","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.events.retry(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->events->publicApiV1VerifactuEventsRetry(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/verifactu/events/{event}/retry \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/verifactu/records/{record}/retry":{"post":{"operationId":"public-api.v1.verifactu.records.retry","description":"Requeues a failed VeriFactu record for transmission to AEAT. Conflict (409) if already accepted, 422 if retry limit exceeded.","summary":"Retry VeriFactu transmission","tags":["VeriFactu"],"parameters":[{"name":"record","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a11","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a11"]},"message":{"type":"string","const":"Transmisión encolada correctamente."}},"required":["id","message"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.records","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.records.retry(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->records->publicApiV1VerifactuRecordsRetry(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/verifactu/records/{record}/retry \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/verifactu/certificates/{certificate}":{"delete":{"operationId":"public-api.v1.verifactu.certificates.revoke","description":"Revoke (delete) a company certificate so it can no longer sign VeriFactu transmissions. Returns 404 if the certificate does not exist within your company.","summary":"Revoke a company certificate","tags":["VeriFactu"],"parameters":[{"name":"certificate","in":"path","required":true,"schema":{"type":"string"}},{"name":"reason","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.certificates","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.certificates.revoke(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->certificates->publicApiV1VerifactuCertificatesRevoke(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X DELETE https://api.factuarea.com/v1/verifactu/certificates/{certificate} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/webhook_endpoints/{webhook_endpoint}/rotate_secret":{"post":{"operationId":"public-api.v1.webhook_endpoints.rotate_secret","description":"Rotate the signing secret of a webhook endpoint. The new secret is returned **once** in this response. The previous secret remains valid for a 24-hour grace period (see `previous_secret_valid_until`) to allow zero-downtime rotation.","summary":"Rotate webhook secret","tags":["Webhooks"],"parameters":[{"name":"webhook_endpoint","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}},"required":["data"]}}},"headers":{"Warning":{"description":"RFC 7234 warning. Indicates that the response body contains a value (`secret`) that will not be returned in subsequent requests. Store it securely on receipt.","schema":{"type":"string","example":"199 - \"secret is only shown once\""}},"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.webhookEndpoints.rotateSecret(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->publicApiV1WebhookEndpointsRotateSecret(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/webhook_endpoints/{webhook_endpoint}/rotate_secret \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/clients/search":{"get":{"operationId":"public-api.v1.clients.search","description":"Search clients by free-text query against `name`, `tax_id`, `vat_id`, `email`, and `phone`. Returns a flat array (no pagination) capped at 50 results.","summary":"Search clients","tags":["Clients"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Client"}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.search();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsSearch();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/clients/search \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/products/search":{"get":{"operationId":"public-api.v1.products.search","description":"Search products by free-text query against `name` and `sku`. Capped at 50 results.","summary":"Search products","tags":["Products"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.search();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsSearch();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/products/search \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/suppliers/search":{"get":{"operationId":"public-api.v1.suppliers.search","description":"Search suppliers by free-text query against `name`, `tax_id`, `vat_id`, `email`, and `phone`. Capped at 50 results.","summary":"Search suppliers","tags":["Suppliers"],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":120}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Supplier"}}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.search();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersSearch();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/suppliers/search \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/delivery_notes/{delivery_note}/send":{"post":{"operationId":"public-api.v1.delivery_notes.send","description":"Send a delivery note to the client by email. Uses the email on file unless overridden in the payload.","summary":"Send a delivery note","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendDeliveryNoteRequest"},"example":{"email":"cliente@example.com","subject":"Su albarán de entrega","message":"Adjuntamos el albarán de la entrega de hoy.","template_id":3}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object":{"type":"string","const":"delivery_note.send_result","example":"delivery_note.send_result","examples":["delivery_note.send_result"]},"sent":{"type":"boolean","example":true,"examples":[true]},"recipient":{"type":"string","example":"cliente@ejemplo.es","examples":["cliente@ejemplo.es"]}},"required":["object","sent","recipient"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.send(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesSend(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes/{delivery_note}/send \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/{invoice}/send":{"post":{"operationId":"public-api.v1.invoices.send","description":"Send an invoice to the client by email. Uses the email on file unless overridden in the payload.","summary":"Send invoice by email","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInvoiceRequest"},"example":{"to":"contacto@cliente.example","cc":["copia@cliente.example"],"bcc":["registro@cliente.example"],"subject":"Factura F-2026-015 de Factuarea","body":"Adjuntamos la factura correspondiente al servicio prestado."}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.send(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesSend(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/send \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/{invoice}/send-reminder":{"post":{"operationId":"public-api.v1.invoices.send_reminder","description":"Emails a payment reminder to the customer for this invoice. Accepts optional `email`, `subject`, `message`, `cc`, `bcc` overrides.","summary":"Send a payment reminder","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInvoiceReminderV1Request"},"example":{"email":"contacto@cliente.example","subject":"Recordatorio de pago: Factura F-2026-015","message":"Le recordamos que la factura F-2026-015 se encuentra pendiente de pago.","cc":["copia@cliente.example"],"bcc":["registro@cliente.example"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/InvoiceReminderSent"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8d01","message":"Recordatorio enviado correctamente."}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.sendReminder(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesSendReminder(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/send-reminder \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/proformas/{proforma}/send":{"post":{"operationId":"public-api.v1.proformas.send","description":"Send a proforma to the client by email.","summary":"Send proforma by email","tags":["Proformas"],"parameters":[{"name":"proforma","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendProformaRequest"},"example":{"subject":"Su proforma PRO-2026-006","body":"Adjuntamos la proforma solicitada."}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Proforma"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictProforma"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"proformas","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.proformas.send(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->proformas->publicApiV1ProformasSend(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/proformas/{proforma}/send \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/quotes/{quote}/send":{"post":{"operationId":"public-api.v1.quotes.send","description":"Send a quote to the client by email.","summary":"Send quote by email","tags":["Quotes"],"parameters":[{"name":"quote","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendQuoteRequest"},"example":{"to":"contacto@cliente-ejemplo.com","subject":"Presupuesto P-2026 de servicios de consultoria","body":"Adjuntamos el presupuesto solicitado. Quedamos a su disposicion."}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictQuote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"quotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.quotes.send(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->quotes->publicApiV1QuotesSend(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/quotes/{quote}/send \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/taxes/{tax}/set-default":{"post":{"operationId":"public-api.v1.taxes.set_default","description":"Promote a tax to the system-wide default for its category (vat, retention or surcharge). If another tax was the default for the same type it is demoted automatically.","summary":"Mark a tax as the default for its type","tags":["Taxes"],"parameters":[{"name":"tax","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tax"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.setDefault(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesSetDefault(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/taxes/{tax}/set-default \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/taxes/{tax}/set-default/{docType}":{"put":{"operationId":"public-api.v1.taxes.set_default_for_document","description":"Assign a tax as the default for a specific document type (invoice, quote, proforma, delivery_note, purchase_invoice, recurring_invoice).","summary":"Set tax default for a document type","tags":["Taxes"],"parameters":[{"name":"tax","in":"path","required":true,"schema":{"type":"string"}},{"name":"docType","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tax"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.setDefaultForDocument(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesSetDefaultForDocument(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/taxes/{tax}/set-default/{docType} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/verifactu/aeat-access/records/{record}":{"get":{"operationId":"public-api.v1.verifactu.aeat_access.show","description":"Retrieve a single dissociated AEAT access record by its `id` (UUID v7). Returns 404 if the record does not exist or belongs to another company.","summary":"Retrieve an AEAT access record","tags":["VeriFactu"],"parameters":[{"name":"record","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AeatAccessRecord"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.aeatAccess","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.aeatAccess.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->aeatAccess->publicApiV1VerifactuAeatAccessShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/aeat-access/records/{record} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/events/{event}":{"get":{"operationId":"public-api.v1.events.show","description":"Retrieve a single event by its `id` (format `evt_<ulid>`, an opaque identifier). Useful for auditing and replaying webhook payloads. Returns `404 not_found` if the event does not exist or belongs to another company.","summary":"Retrieve an event","tags":["Events"],"parameters":[{"name":"event","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Event"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0d","object":"event","type":"invoice.paid","aggregate_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","correlation_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a99","api_version":"2026-05-22","livemode":true,"data":{"type":"invoice.paid","object":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"},"amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_reference":"TRF-2026-0042"},"created":1774002600}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"events","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.events.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->events->publicApiV1EventsShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/events/{event} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/events/{event}":{"get":{"operationId":"public-api.v1.verifactu.events.show","description":"Retrieve a single VeriFactu SIF event by its `id` (UUID v7). Returns 404 if the event does not exist or belongs to another company.","summary":"Retrieve a VeriFactu event","tags":["VeriFactu"],"parameters":[{"name":"event","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VeriFactuEvent"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.events","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.events.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->events->publicApiV1VerifactuEventsShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/events/{event} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/verifactu/records/{record}":{"get":{"operationId":"public-api.v1.verifactu.records.show","description":"Retrieve a VeriFactu record by its `id` (UUID v7). Returns 404 `verifactu_record_not_found` if the record does not exist or belongs to another company.","summary":"Retrieve a VeriFactu record","tags":["VeriFactu"],"parameters":[{"name":"record","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VeriFactuRecord"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.records","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.records.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->records->publicApiV1VerifactuRecordsShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/records/{record} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/webhook_endpoints/{webhook_endpoint}/deliveries/{delivery}":{"get":{"operationId":"public-api.v1.webhook_endpoints.deliveries.show","description":"Retrieve a single delivery attempt by its `uuid`, including the full event payload that was delivered.","summary":"Retrieve webhook delivery","tags":["Webhooks"],"parameters":[{"name":"webhook_endpoint","in":"path","required":true,"schema":{"type":"string"}},{"name":"delivery","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookDelivery"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"webhookEndpoints.deliveries","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.webhookEndpoints.deliveries.show(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->webhookEndpoints->deliveries->publicApiV1WebhookEndpointsDeliveriesShow(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", \"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/webhook_endpoints/{webhook_endpoint}/deliveries/{delivery} \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/delivery_notes/{delivery_note}/sign":{"post":{"operationId":"public-api.v1.delivery_notes.sign","description":"Record a handwritten signature on a delivery note (typically captured from the recipient on delivery). The signature image must be a base64-encoded **PNG** (≤2 MB) — JPEG/SVG are rejected with 422 `invalid_param_format` (decision D17, PNG-only in v1). On success `signed_at`/`signed_by` are updated; signing records the signature data but does not change the delivery note `status` (it stays `delivered`). The signature audit log retains hashed recipient PII for 5 years to satisfy Spanish LSSI-CE retention obligations; use `POST /v1/delivery_notes/signature-audits/{auditId}/forget` to honor a GDPR Art. 17 erasure request. Supports `Idempotency-Key` for safe retries.","summary":"Sign a delivery note","tags":["Delivery Notes"],"parameters":[{"name":"delivery_note","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignDeliveryNoteRequest"},"example":{"signed_by":"Ana Torres Gil","recipient_dni":"87654321X","signature_image_base64":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==","signed_at":"2026-06-01T10:00:00+02:00"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictDeliveryNote"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"deliveryNotes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.deliveryNotes.sign(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->deliveryNotes->publicApiV1DeliveryNotesSign(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/delivery_notes/{delivery_note}/sign \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/verifactu/records/{record}/subsanar":{"post":{"operationId":"public-api.v1.verifactu.records.subsanar","description":"Corrects (subsana) an AEAT-rejected VeriFactu record: regenerates the correctable content from the source invoice keeping the original `huella`, resets the transmission round, and re-queues the AEAT transmission (202). Returns 404 if the record does not exist, 422 `business_rule_violation` with subcode `record_not_rejected` if the record is not in rejected status, or `requires_annulment` when the correction affects fingerprint fields (annul + new alta required instead).","summary":"Subsanar a rejected VeriFactu record","tags":["VeriFactu"],"parameters":[{"name":"record","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"message":{"type":"string","const":"Subsanación encolada. El registro se reenviará a la AEAT en unos segundos."}},"required":["id","message"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.records","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.records.subsanar(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->records->publicApiV1VerifactuRecordsSubsanar(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/verifactu/records/{record}/subsanar \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/invoices/substitute-simplified":{"post":{"operationId":"public-api.v1.invoices.substitute_simplified","description":"Groups N simplified invoices (F2) under a single substitutive full invoice (F3) with complete recipient data. Marks the originals as substituted.","summary":"Substitute simplified invoices with full invoice","tags":["Invoices"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubstituteSimplifiedV1Request"},"example":{"client_id":"f58fbf7f-333f-499b-affc-c0d396cbd83f","simplified_invoice_ids":["feb47de0-d6ed-40de-a4d4-8825182f5a6d"],"notes":"Sustitución de facturas simplificadas por factura completa."}}}},"responses":{"201":{"description":"Full invoice (F3) created as a replacement for the simplified one. The `Location` header contains the canonical URL of the NEW invoice.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}},"Location":{"description":"Canonical URL (relative to the server) of the newly created resource.","schema":{"type":"string","example":"/v1/invoices/01HKQS5NXR4D7P2K9V3M6BWTLJ"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.substituteSimplified({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesSubstituteSimplified($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/substitute-simplified \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/products/{product}/toggle-active":{"post":{"operationId":"public-api.v1.products.toggle_active","description":"Flip a product between active and inactive. Inactive products are hidden from line-item selectors on new documents.","summary":"Toggle product active state","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.toggleActive(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsToggleActive(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/products/{product}/toggle-active \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/suppliers/{supplier}/toggle-active":{"post":{"operationId":"public-api.v1.suppliers.toggle_active","description":"Flip a supplier between active and inactive. Inactive suppliers are hidden from line-item selectors on new purchase invoices.","summary":"Toggle supplier active state","tags":["Suppliers"],"parameters":[{"name":"supplier","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Supplier"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"suppliers","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.suppliers.toggleActive(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->suppliers->publicApiV1SuppliersToggleActive(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/suppliers/{supplier}/toggle-active \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/taxes/{tax}/toggle":{"post":{"operationId":"public-api.v1.taxes.toggle","description":"Flip a tax between active and inactive. Inactive taxes are hidden from selectors but stay available for already-issued documents.","summary":"Toggle tax active state","tags":["Taxes"],"parameters":[{"name":"tax","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Tax"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"taxes","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.taxes.toggle(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->taxes->publicApiV1TaxesToggle(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/taxes/{tax}/toggle \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/series/{series}/unarchive":{"post":{"operationId":"public-api.v1.series.unarchive","description":"Return an archived series back to the active pool. Does not change the current default of its type. Returns 204 on success.","summary":"Unarchive a series","tags":["Series"],"parameters":[{"name":"series","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"204":{"description":"No content","headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"series","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.series.unarchive(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->series->publicApiV1SeriesUnarchive(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\");"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/series/{series}/unarchive \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/products/{product}/stock":{"put":{"operationId":"public-api.v1.products.update_stock","description":"Replace, increase or decrease the stock quantity of a product. Defaults to set (replace); add and subtract are accepted aliases for increase and decrease. Fails with 422 if the resulting stock would be negative.","summary":"Update product stock","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductStockRequest"},"example":{"stock":999,"operation":"set"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.updateStock(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->publicApiV1ProductsUpdateStock(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/products/{product}/stock \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/verifactu/settings":{"put":{"operationId":"public-api.v1.verifactu.settings.update","description":"Update the VeriFactu settings of your company (e.g. mode/environment). Returns 422 `business_rule_violation` when a transition is locked by AEAT compliance (for example, once VeriFactu mode has been enabled it cannot be silently disabled).","summary":"Update VeriFactu settings","tags":["VeriFactu"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateVeriFactuSettingsV1Request"},"example":{"enabled":true,"mode":"verifactu","auto_transmit":true,"environment":"production","notification_emails":["avisos@empresa.es"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/VeriFactuConfig"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.settings","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.settings.update({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->settings->publicApiV1VerifactuSettingsUpdate($body);"},{"lang":"bash","label":"cURL","source":"curl -X PUT https://api.factuarea.com/v1/verifactu/settings \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/products/{product}/gallery":{"post":{"operationId":"public-api.v1.products.gallery.upload","description":"Attach an image (jpeg, png, jpg, gif or webp; up to 3 MB) to the product gallery. Returns the updated product. Fails with 422 if the gallery limit is exceeded.","summary":"Upload a gallery image to a product","tags":["Products"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadProductGalleryImageRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"object":{"type":"string","const":"product_image"},"index":{"type":"integer","description":"Position (0-based) of the newly uploaded image in the gallery."},"url":{"type":"string","format":"uri","description":"Public URL of the uploaded image."},"content_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp","application/octet-stream"],"description":"MIME type de la imagen."},"gallery_total":{"type":"integer","description":"Total number of images in the gallery after the upload."}},"required":["object","index","url","content_type","gallery_total"]}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"products.gallery","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.products.gallery.upload(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", file);"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->products->gallery->publicApiV1ProductsGalleryUpload(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $file);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/products/{product}/gallery \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -F \"file=@./path/to/file\""}]}},"/verifactu/chain/validate":{"get":{"operationId":"public-api.v1.verifactu.chain.validate","description":"Recompute the VeriFactu hash chain (`huella`) for your company and compare it against the persisted values without mutating data. Returns whether the chain is intact and, if not, the first corrupted record. Rate-limited to 1 request/minute and rejected with 422 `dataset_too_large` for datasets over 50,000 records.","summary":"Validate the VeriFactu hash chain","tags":["VeriFactu"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ChainValidation"}},"required":["data"]}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"verifactu.chain","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.verifactu.chain.validate();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->verifactu->chain->publicApiV1VerifactuChainValidate();"},{"lang":"bash","label":"cURL","source":"curl https://api.factuarea.com/v1/verifactu/chain/validate \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\""}]}},"/account/census-verification":{"post":{"operationId":"public-api.v1.account.verify_census","description":"Check the persisted company name + tax ID pair against the AEAT census (VNifV2) to anticipate VeriFactu 4104 rejections. No request body: the endpoint always verifies the account's persisted fiscal data. Fail-open — if AEAT is unreachable the call returns 200 with `status: unavailable`. Test keys (`fact_test_`) return deterministic statuses per magic NIF without contacting AEAT.","summary":"Verify account against the AEAT census","tags":["Account"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CensusVerification"}},"required":["data"]},"example":{"data":{"object":"census_verification","status":"identified","verified_name":"Acme Soluciones SL","checked_at":"2026-06-11T09:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"account","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.account.verifyCensus();"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->account->publicApiV1AccountVerifyCensus();"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/account/census-verification \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\""}]}},"/clients/census-verification":{"post":{"operationId":"public-api.v1.clients.verify_census","description":"Check a third-party name + tax ID pair (the recipient of an invoice) against the AEAT census (VNifV2) to anticipate VeriFactu 1239 rejections before invoicing. Stateless and informational: nothing is persisted on the client. Fail-open — if AEAT is unreachable the call returns 200 with `status: unavailable`. Test keys (`fact_test_`) return deterministic statuses per magic NIF without contacting AEAT.","summary":"Verify a client against the AEAT census","tags":["Clients"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyClientCensusRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CensusVerification"}},"required":["data"]},"example":{"data":{"object":"census_verification","status":"identified","verified_name":"CONSTRUCCIONES PÉREZ SL","checked_at":"2026-06-11T09:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"clients","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.clients.verifyCensus({\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->clients->publicApiV1ClientsVerifyCensus($body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/clients/census-verification \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}},"/invoices/{invoice}/void":{"post":{"operationId":"public-api.v1.invoices.void","description":"Void an issued invoice. Voiding is irreversible and a `void_reason` is recorded. The operation is rejected if the invoice has already been corrected.","summary":"Void an invoice","tags":["Invoices"],"parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidInvoiceRequest"},"example":{"reason":"Anulada via API v1: factura emitida por error."}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Invoice"}},"required":["data"]},"example":{"data":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Maximum number of requests allowed in the current rate limit window (60 seconds). Omitted when the API key has no cap (unlimited tier).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Number of requests remaining in the current rate limit window before receiving a 429.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix timestamp (seconds) at which the rate limit window resets and the counter returns to its maximum.","schema":{"type":"integer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/ConflictInvoice"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"x-speakeasy-group":"invoices","x-speakeasy-retries":{"strategy":"backoff","backoff":{"initialInterval":500,"maxInterval":60000,"maxElapsedTime":3600000,"exponent":1.5},"statusCodes":["429","5XX"],"retryConnectionErrors":true},"x-codeSamples":[{"lang":"typescript","label":"TypeScript","source":"import { Factuarea } from \"@factuarea/sdk\";\n\nconst factuarea = new Factuarea({ apiKey: process.env.FACTUAREA_API_KEY! });\n\nconst result = await factuarea.invoices.void(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", {\n    // request body — see the schema below\n  });"},{"lang":"php","label":"PHP","source":"<?php\n\nrequire 'vendor/autoload.php';\n\nuse Factuarea\\Sdk\\Custom\\FactuareaClient;\n\n$factuarea = FactuareaClient::create(getenv('FACTUAREA_API_KEY'));\n\n$response = $factuarea->invoices->publicApiV1InvoicesVoid(\"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01\", $body);"},{"lang":"bash","label":"cURL","source":"curl -X POST https://api.factuarea.com/v1/invoices/{invoice}/void \\\n  -H \"Authorization: Bearer $FACTUAREA_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{ }'"}]}}},"components":{"securitySchemes":{"http":{"type":"http","scheme":"bearer"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"fact_live_xxx | fact_test_xxx"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"AcceptProformaRequest":{"type":"object","description":"Public REST API v1 — POST /v1/proformas/{uuid}/accept.\n\nBody opcional: `reason` (string ≤500), `metadata` (objeto ≤50 keys,\n≤500 chars/valor — validado con el VO `Metadata`).","properties":{"reason":{"type":["string","null"],"maxLength":500},"metadata":{"$ref":"#/components/schemas/Metadata"}},"title":"AcceptProformaRequest"},"AcceptQuoteRequest":{"type":"object","description":"Public REST API v1 — POST /v1/quotes/{uuid}/accept.\n\nOptional body: `accepted_on` (date, defaults to today), `notes`.\nThe controller performs the cross-field validation for `quote_expired`\n(`valid_until < today` → 422).","properties":{"accepted_on":{"type":["string","null"],"format":"date"},"notes":{"type":["string","null"],"maxLength":1000}},"title":"AcceptQuoteRequest"},"Account":{"type":"object","description":"Snapshot of the company, plan, developer addon status and metadata of the API key used to make the request. Use this endpoint to introspect credentials and discover limits with a single call.","properties":{"object":{"type":"string","enum":["account"],"example":"account","description":"Stripe-like discriminator. Always `account` for this resource.","examples":["account"]},"company":{"type":"object","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a9b"},"name":{"type":"string","example":"Acme Soluciones SL"},"tax_id":{"type":"string","example":"B12345678","description":"Spanish fiscal identifier (NIF, CIF, NIE)."}},"required":["id","name","tax_id"],"example":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation","tax_id":"B12345678"},"examples":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Corporation","tax_id":"B12345678"}]},"plan":{"type":"object","properties":{"slug":{"type":"string","example":"empresario","description":"Plan identifier (e.g. `emprendedor`, `empresario`, `enterprise`)."},"name":{"type":"string","example":"Empresario"}},"required":["slug","name"],"example":{"slug":"enterprise","name":"Enterprise"},"examples":[{"slug":"enterprise","name":"Enterprise"}]},"addon":{"type":"object","description":"State of the `developer_api` addon for this company.","properties":{"active":{"type":"boolean","example":true,"description":"true when the addon is currently usable (paid or within grace period)."},"in_grace":{"type":"boolean","example":false,"description":"true when the subscription lapsed but the grace period is still open."},"expires_at":{"type":["string","null"],"format":"date-time","example":"2026-08-24T14:15:22Z","description":"Grace period cutoff (ISO 8601) when `in_grace=true`; null otherwise."}},"required":["active","in_grace","expires_at"],"example":{"active":true,"in_grace":false,"expires_at":null},"examples":[{"active":true,"in_grace":false,"expires_at":null}]},"api_key":{"type":"object","description":"Metadata of the API key used to authenticate the request. The secret is never returned (it is only shown once at creation time).","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-4d6e7f8a9b0c"},"name":{"type":"string","example":"Producción","description":"Human-friendly label assigned at creation time."},"prefix":{"type":"string","example":"fact_live_1OSf9KdP","description":"First chars of the key (e.g. `fact_live_1N0Fnyhh`) — safe to log."},"scopes":{"type":"array","items":{"type":"string"},"example":["account:read","series:read","series:write"],"description":"Authorized scopes. `*` means super scope (full access)."},"tier":{"type":"string","example":"scale","description":"Rate-limit tier (e.g. `starter`, `scale`, `enterprise`)."},"created_at":{"type":"string","format":"date-time","example":"2026-01-15T09:30:00Z"},"last_used_at":{"type":["string","null"],"format":"date-time","example":"2026-05-25T18:00:00Z"},"expires_at":{"type":["string","null"],"format":"date-time"}},"required":["id","name","prefix","scopes","tier","created_at","last_used_at","expires_at"],"example":{"id":"019e81ef-e1d4-7208-a51d-94c2c2a54a84","name":"Producción","prefix":"fact_live_1OSf9KdP","scopes":["account:read","series:read","series:write"],"tier":"scale","created_at":"2026-01-15T09:30:00Z","last_used_at":"2026-05-25T18:00:00Z","expires_at":null},"examples":[{"id":"019e81ef-e1d4-7208-a51d-94c2c2a54a84","name":"Producción","prefix":"fact_live_1OSf9KdP","scopes":["account:read","series:read","series:write"],"tier":"scale","created_at":"2026-01-15T09:30:00Z","last_used_at":"2026-05-25T18:00:00Z","expires_at":null}]}},"required":["object","company","plan","addon","api_key"],"title":"Account"},"Address":{"type":"object","properties":{"line1":{"type":["string","null"],"description":"Street / main thoroughfare (address line 1).","example":"Calle Mayor 1","examples":["Calle Mayor 1"]},"line2":{"type":["string","null"],"maxLength":100,"description":"Optional line 2 (e.g. building, residential complex).","example":"Edificio Central","examples":["Edificio Central"]},"number":{"type":["string","null"],"maxLength":100,"description":"Street number.","example":"42","examples":["42"]},"floor":{"type":["string","null"],"maxLength":100,"description":"Piso.","example":"3","examples":["3"]},"door":{"type":["string","null"],"maxLength":100,"description":"Puerta.","example":"B","examples":["B"]},"staircase":{"type":["string","null"],"maxLength":100,"description":"Escalera.","example":"A","examples":["A"]},"postal_code":{"type":["string","null"],"example":"28001","examples":["28001"]},"city":{"type":["string","null"],"example":"Madrid","examples":["Madrid"]},"province":{"type":["string","null"],"example":"Madrid","examples":["Madrid"]},"country":{"type":["string","null"],"description":"ISO 3166-1 alpha-2 country code.","example":"ES","examples":["ES"]}},"required":["line1","postal_code","city","province","country"],"title":"Address"},"AeatAccessRecord":{"type":"object","description":"A dissociated (anonymized) AEAT access record (REQ-VF-132). Third-party tax identifiers, email and IP are never exposed in plain text — only an anonymized hash.","properties":{"id":{"type":["string","null"],"description":"UUID (v7) del billing record subyacente (usado solo para ordenar/cursorear).","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a15","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a15"]},"object":{"type":"string","enum":["verifactu_aeat_access_record"],"example":"verifactu_aeat_access_record","examples":["verifactu_aeat_access_record"]},"accessed_at":{"type":"string","format":"date-time","description":"Timestamp of generation/dissociation of the record.","example":"2026-04-15T10:31:05+02:00","examples":["2026-04-15T10:31:05+02:00"]},"accessor_identifier_hash":{"type":"string","description":"Hash SHA-256 anonimizado del identificador del emisor (no se expone el NIF en claro).","example":"5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8","examples":["5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8"]},"record_count_disclosed":{"type":"integer","description":"Number of dissociated records in this entry.","example":1,"examples":[1]},"disclosure_scope":{"type":"string","description":"Scope of the dissociation (`alta` / `anulacion`).","example":"alta","examples":["alta"]}},"required":["id","object","accessed_at","accessor_identifier_hash","record_count_disclosed","disclosure_scope"],"title":"AeatAccessRecord"},"AlternativeId":{"type":"object","description":"Alternative tax identification for non-Spanish clients. Mutually exclusive with `tax_id` (NIF/CIF/NIE).","properties":{"object":{"type":"string","enum":["alternative_id"],"example":"alternative_id","examples":["alternative_id"]},"type":{"type":"string","enum":["passport","national_id","tax_id_foreign","not_registered"],"description":"Type of identification: passport, foreign ID, foreign tax identification or none.","example":"tax_id_foreign","examples":["tax_id_foreign"]},"value":{"type":"string","minLength":1,"maxLength":50,"description":"Valor del identificador (string libre, 1-50 caracteres).","example":"EU123456789","examples":["EU123456789"]},"country_code":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2 country code in uppercase (other than `ES`).","example":"FR","examples":["FR"]}},"required":["object","type","value","country_code"],"title":"AlternativeId"},"AnnulInvoiceV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/{uuid}/annul.\n\nBody: `reason` (string, required, max. 500). The reason is persisted\non the Invoice aggregate and included in the VeriFactu cancellation record\n(AnulacionRecord) when applicable.","properties":{"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["reason"],"title":"AnnulInvoiceV1Request"},"AttachPurchaseInvoiceFileRequest":{"type":"object","description":"Public REST API v1 — POST /v1/purchase_invoices/{uuid}/attach-file.\n\nMultipart upload: `file` field.\n\nThis FormRequest only validates the basic STRUCTURE (presence, that it is a\nvalid uploaded file and a COARSE safety size cap — 50 MB — to cut off\nabusive uploads before touching the Vault). The canonical domain validation\n— exact MIME allowlist and configurable size\n(`config('document.attachment.max_size_mb')`, 10 MB), filename sanitization\nagainst path traversal — is performed by the Shared VO `AttachmentRef::create()`,\nwhich emits the canonical exception `InvalidAttachmentException`\n(`PublicApiMappable` → HTTP 422 with subcodes `attachment_mime_not_allowed`\n/ `attachment_too_large` / `attachment_invalid_filename`).\n\nNo `mimetypes` rules nor a `max` aligned with the domain limit are declared\nhere: doing so would shadow the error catalog (an invalid MIME/size would\nyield Laravel's generic `invalid_param_value` instead of the canonical VO\nsubcode). The coarse 50 MB cap never collides with the real 10 MB limit, so\nthe VO always gets to emit `attachment_too_large` for files between 10 and\n50 MB while the safety guard still cuts off genuinely abusive uploads.","properties":{"file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","maxLength":51200}},"required":["file"],"title":"AttachPurchaseInvoiceFileRequest"},"BankAccount":{"type":"object","description":"Cuenta bancaria de un cliente. El IBAN es obligatorio; el resto de campos son opcionales.","properties":{"object":{"type":"string","enum":["bank_account"],"example":"bank_account","examples":["bank_account"]},"iban":{"type":"string","description":"International Bank Account Number (IBAN).","example":"ES7621000418401234567891","examples":["ES7621000418401234567891"]},"bic":{"type":["string","null"],"description":"Bank Identifier Code / SWIFT (opcional).","example":"CAIXESBBXXX","examples":["CAIXESBBXXX"]},"is_default":{"type":"boolean","description":"Marca la cuenta como predeterminada para domiciliaciones.","example":true,"examples":[true]}},"required":["object","iban","is_default"],"title":"BankAccount"},"BulkDeleteClientsRequest":{"type":"object","description":"Public REST API v1 — POST /v1/clients/bulk-delete (canónico).\n\nBody: `{ ids: string[] }`. Acepta entre 1 y 200 UUIDs. La validación\nde pertenencia al tenant la realiza el Handler (filtrado por company_id);\nlos UUIDs ajenos se ignoran silenciosamente y aparecerán en `failed`.","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":200}},"required":["ids"],"title":"BulkDeleteClientsRequest"},"BulkDeleteDeliveryNotesRequest":{"type":"object","description":"Public REST API v1 — POST /v1/delivery_notes/bulk-delete.\n\nBody requerido: `ids` (array de UUIDs entre 1 y 100). Los UUIDs deben\nser strings con formato UUID; la pertenencia al tenant se verifica en el\ncontroller (los UUIDs desconocidos o cross-tenant se reportan como\nfallidos en la respuesta, no como 404 global).","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"required":["ids"],"title":"BulkDeleteDeliveryNotesRequest"},"BulkDeleteInvoicesV1Request":{"type":"object","description":"Public REST API v1 — DELETE /v1/invoices/bulk.","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"required":["ids"],"title":"BulkDeleteInvoicesV1Request"},"BulkDeleteProductsRequest":{"type":"object","description":"Public REST API v1 — POST /v1/products/bulk-delete.\n\nBody: `{ ids: string[] }`. Accepts between 1 and 200 IDs (UUID v7). Tenant\nmembership validation is performed by the Handler (filtered by company_id);\nforeign IDs are silently ignored and will appear in `skipped`.","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":200}},"required":["ids"],"title":"BulkDeleteProductsRequest"},"BulkDeleteProformasV1Request":{"type":"object","description":"Public REST API v1 — DELETE /v1/proformas/bulk.","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"required":["ids"],"title":"BulkDeleteProformasV1Request"},"BulkDeletePurchaseInvoicesRequest":{"type":"object","description":"Public REST API v1 — POST /v1/purchase_invoices/bulk-delete (canónico). El\nalias legacy `DELETE /v1/purchase_invoices/bulk` se eliminó en el change\n`public-api-official-sdks` (P0 1.3).\n\nBody requerido: `ids` (array de UUIDs entre 1 y 100). La pertenencia al\ntenant se valida en el controller — UUIDs desconocidos se reportan como\nfallidos.","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"required":["ids"],"title":"BulkDeletePurchaseInvoicesRequest"},"BulkDeleteQuotesV1Request":{"type":"object","description":"Public REST API v1 — DELETE /v1/quotes/bulk.","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"required":["ids"],"title":"BulkDeleteQuotesV1Request"},"BulkDeleteRecurringInvoicesRequest":{"type":"object","description":"Public REST API v1 — POST /v1/recurring_invoices/bulk-delete.\n\nBody requerido: `ids` (array de UUIDs entre 1 y 100). La pertenencia al\ntenant se resuelve en el Handler — UUIDs desconocidos o de otra company se\nreportan en `failed[]` (defense-in-depth contra enumeration cross-tenant).\n\nLa key del payload es `ids` (alineado con PurchaseInvoice/Quote/Supplier y\nel spec `public-api-recurring-invoice-bulk-delete-cqrs`).","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":100}},"required":["ids"],"title":"BulkDeleteRecurringInvoicesRequest"},"BulkDeleteResult":{"type":"object","description":"Result of a bulk-delete operation. Indicates how many resources were deleted successfully and the list of failures (id + reason in Spanish). Shape shared by all `/v1/{resource}/bulk-delete` endpoints of the public API.","properties":{"object":{"type":"string","enum":["bulk_delete_result"],"example":"bulk_delete_result","examples":["bulk_delete_result"]},"deleted":{"type":"integer","description":"Number of resources deleted successfully.","example":42,"examples":[42]},"failed":{"type":"array","description":"Resources that could not be deleted, with the reason in Spanish (internal messages are not exposed).","items":{"type":"object","properties":{"id":{"type":"string","description":"UUID (v7) del recurso que no pudo eliminarse."},"reason":{"type":"string","description":"Reason for the failure, in Spanish."}},"required":["id","reason"]},"example":[{"id":"01928f12-5678-7abc-9def-0123456789ab","reason":"El cliente tiene facturas emitidas y no se puede eliminar."},{"id":"01928f12-90ab-7cde-9012-3456789abcde","reason":"El cliente tiene presupuestos asociados y no se puede eliminar."}],"examples":[[{"id":"01928f12-5678-7abc-9def-0123456789ab","reason":"El cliente tiene facturas emitidas y no se puede eliminar."},{"id":"01928f12-90ab-7cde-9012-3456789abcde","reason":"El cliente tiene presupuestos asociados y no se puede eliminar."}]]}},"required":["object","deleted","failed"],"title":"BulkDeleteResult"},"BulkDeleteSuppliersRequest":{"type":"object","description":"Public REST API v1 — POST /v1/suppliers/bulk-delete (canónico).\n\nBody: `{ ids: string[] }`. Acepta entre 1 y 200 identificadores (valor\nUUID v7). La validación de pertenencia al tenant la realiza el Handler\n(filtrado por company_id); los identificadores ajenos se ignoran\nsilenciosamente y aparecerán en `failed`.","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"maxItems":200}},"required":["ids"],"title":"BulkDeleteSuppliersRequest"},"BulkUpdateProductStockRequest":{"type":"object","description":"Public REST API v1 — POST /v1/products/bulk-update-stock.\n\nBody: `{ updates: [{ product_id: string, stock: int, operation?: 'set'|'add'|'subtract' }] }`.\nAccepts up to 500 updates in a single operation.\n\nWe accept `items` as an alias of the canonical `updates` field for\nforgiveness with integrators following the most common convention. The\ncontroller normalizes it to `updates`.","properties":{"updates":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string","format":"uuid"},"stock":{"type":"integer","minimum":0},"operation":{"type":["string","null"],"enum":["set","increase","decrease","add","subtract"]}},"required":["product_id","stock"]},"minItems":1,"maxItems":500}},"required":["updates"],"title":"BulkUpdateProductStockRequest"},"CalculateTaxRequest":{"type":"object","description":"Public REST API v1 — POST /v1/taxes/calculate.\n\nBody: `{ base: float, taxes_id: string }`. `taxes_id` es la FK a la tabla\nglobal `taxes` (valor UUID v7) — plural (D1), NUNCA `tax_id` (NIF/CIF fiscal).\nDevuelve `{ base, tax_rate, tax_amount, total_amount, tax }`.","properties":{"base":{"type":"number","minimum":0},"taxes_id":{"type":"string","format":"uuid","description":"NOTE: no `exists:taxes,uuid` rule here. Existence is resolved by the\nController via `resolveUuid(TaxModel::class)`, which throws\n`TaxNotFoundException` (404 `tax_not_found`) for a well-formed but\nnon-existent uuid — via `PublicApiNotFoundExceptionRegistry`. With\n`exists` the FormRequest would emit 422 `invalid_param_value` and the\ncanonical 404 would never be reached. The `uuid` rule keeps the 422 for\nmalformed uuids (arbitrary text is not passed to the database lookup)."}},"required":["base","taxes_id"],"title":"CalculateTaxRequest"},"CalculateTotalsRequest":{"type":"object","description":"Public REST API v1 — POST /v1/taxes/calculate-totals.\n\nBody: `{ lines: [{ quantity, unit_price, discount?, vat_rate?,\nretention_rate?, surcharge_rate? }] }`. Returns subtotal, VAT, surcharge,\nwithholding and total.\n\nThe canonical field is `unit_price` (aligned with Invoice/Quote lines).\n`price` is accepted as a legacy alias so as not to break integrators that\nalready send the previous shape; the controller normalizes it to `unit_price`.","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"quantity":{"type":"number"},"unit_price":{"type":"number"},"discount":{"type":["number","null"],"minimum":0,"maximum":100},"vat_rate":{"type":["number","null"],"minimum":0},"retention_rate":{"type":["number","null"]},"surcharge_rate":{"type":["number","null"],"minimum":0}},"required":["quantity","unit_price"]},"minItems":1,"maxItems":500}},"required":["lines"],"title":"CalculateTotalsRequest"},"CanAnnulInvoice":{"type":"object","description":"Result of the pre-cancellation validator of an invoice: whether it can be cancelled, the blocking reasons (when it cannot) and whether the cancellation will create an additional VeriFactu record.","properties":{"can_annul":{"type":"boolean","description":"Indica si la factura puede anularse en su estado actual.","example":false,"examples":[false]},"reasons":{"type":"array","items":{"type":"string"},"description":"Blocking reasons when `can_annul` is `false`. Empty `[]` when the invoice can be cancelled.","example":["La factura está en estado Borrador y no puede ser anulada"],"examples":[["La factura está en estado Borrador y no puede ser anulada"]]},"will_create_verifactu":{"type":"boolean","description":"Indicates whether the cancellation will generate a cancellation record in VeriFactu.","example":false,"examples":[false]},"info":{"type":"array","items":{"type":"string"},"description":"Additional informational messages about the cancellation (non-blocking warnings). Empty `[]` when there are none.","example":["La factura no tiene registro VeriFactu de alta. Se anulará sin registro VeriFactu."],"examples":[["La factura no tiene registro VeriFactu de alta. Se anulará sin registro VeriFactu."]]}},"required":["can_annul","reasons","will_create_verifactu","info"],"title":"CanAnnulInvoice"},"CancelFaceSubmissionV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/face-submissions/{faceSubmission}/cancel.\n\nThe cancellation reason (`reason`) is required: it travels to the FACe\nweb service alongside the cancellation request (code 4200). Same contract\nas the SPA surface (`CancelFaceSubmissionRequest`).","properties":{"reason":{"type":"string","maxLength":255}},"required":["reason"],"title":"CancelFaceSubmissionV1Request"},"CensusVerification":{"type":"object","description":"Result of verifying the account's persisted company name + tax ID pair against the AEAT census (VNifV2). Use it to anticipate VeriFactu 4104 rejections before invoicing. Fail-open: returns `unavailable` when AEAT cannot be reached.","properties":{"object":{"type":"string","enum":["census_verification"],"example":"census_verification","description":"Stripe-like discriminator. Always `census_verification` for this resource."},"status":{"type":"string","enum":["identified","not_identified","not_identified_similar","identified_inactive","identified_revoked","unavailable"],"example":"identified","description":"Census result. `identified`: name + tax ID match an active taxpayer. `not_identified`: the pair is not in the census. `not_identified_similar`: a similar individual exists (natural persons only). `identified_inactive` / `identified_revoked`: the taxpayer is deregistered or revoked. `unavailable`: AEAT could not answer (timeout, fault, no platform certificate) — verification is informational and never blocks."},"verified_name":{"type":["string","null"],"example":"Acme Soluciones SL","description":"The company name that was checked against the census (the persisted account name). `null` when the account has never been verified."},"checked_at":{"type":["string","null"],"format":"date-time","example":"2026-06-11T09:30:00Z","description":"ISO 8601 timestamp of the last verification. `null` when never verified."}},"required":["object","status","verified_name","checked_at"],"title":"CensusVerification"},"ChainValidation":{"type":"object","description":"Result of recomputing and verifying the VeriFactu hash chain (`huella`) of your company without mutating data. Returned by `GET /v1/verifactu/chain/validate`.","properties":{"object":{"type":"string","enum":["verifactu_chain_validation"],"example":"verifactu_chain_validation","examples":["verifactu_chain_validation"]},"is_valid":{"type":"boolean","description":"Indicates whether the hash chain is intact.","example":true,"examples":[true]},"total_records":{"type":"integer","description":"Total number of records considered.","example":1284,"examples":[1284]},"validated_records":{"type":"integer","description":"Number of validated records.","example":1284,"examples":[1284]},"first_invalid_record_id":{"type":["string","null"],"description":"UUID (v7) of the first invalid record, or `null` if the chain is intact.","example":null,"examples":[null]},"validation_year":{"type":"integer","description":"Validated fiscal year.","example":2026,"examples":[2026]},"validated_at":{"type":"string","format":"date-time","description":"When the validation was run.","example":"2026-04-15T10:35:00+02:00","examples":["2026-04-15T10:35:00+02:00"]}},"required":["object","is_valid","total_records","validated_records","first_invalid_record_id","validation_year","validated_at"],"title":"ChainValidation"},"Client":{"type":"object","description":"A customer of your company.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01"]},"object":{"type":"string","enum":["client"]},"name":{"type":"string","example":"Acme Corporation","examples":["Acme Corporation"]},"commercial_name":{"type":["string","null"],"description":"Nombre comercial (DBA) opcional, distinto del nombre fiscal.","example":"Acme SL","examples":["Acme SL"]},"tax_id":{"type":["string","null"],"description":"Spanish fiscal identifier (NIF, CIF, NIE).","example":"B12345678","examples":["B12345678"]},"vat_id":{"type":["string","null"],"description":"EU VAT identifier.","example":"ESB12345678","examples":["ESB12345678"]},"email":{"type":["string","null"],"format":"email","example":"billing@acme.com","examples":["billing@acme.com"]},"phone":{"type":["string","null"],"example":"+34 600 123 456","examples":["+34 600 123 456"]},"fax":{"type":["string","null"],"description":"Fax number (rarely used, legacy).","example":"+34 91 123 45 68","examples":["+34 91 123 45 68"]},"mobile":{"type":["string","null"],"description":"Mobile number.","example":"+34 600 000 000","examples":["+34 600 000 000"]},"website":{"type":["string","null"],"format":"uri","description":"Sitio web del cliente.","example":"https://acme.com","examples":["https://acme.com"]},"contact_person":{"type":["string","null"],"maxLength":200,"description":"B2B contact person.","example":"Juan García","examples":["Juan García"]},"billing_emails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":5,"description":"Additional emails for invoice delivery (administration, accounting). Maximum 5.","example":["facturacion@acme.com","contabilidad@acme.com"],"examples":[["facturacion@acme.com","contabilidad@acme.com"]]},"address":{"$ref":"#/components/schemas/Address"},"coordinates":{"type":["object","null"],"properties":{"latitude":{"type":"number","format":"float","description":"Geographic latitude."},"longitude":{"type":"number","format":"float","description":"Geographic longitude."}},"required":["latitude","longitude"],"description":"Geographic coordinates of the client. `null` when not recorded.","example":{"latitude":39.4699,"longitude":-0.3763},"examples":[{"latitude":39.4699,"longitude":-0.3763}]},"default_discount":{"type":["number","null"],"format":"float","description":"Descuento por defecto aplicable al cliente (porcentaje).","example":5,"examples":[5]},"default_vat_rate":{"type":["number","null"],"format":"float","description":"Tipo de IVA por defecto aplicable al cliente (porcentaje).","example":21,"examples":[21]},"default_retention_rate":{"type":["number","null"],"format":"float","description":"Default IRPF withholding rate (percentage).","example":15,"examples":[15]},"is_surcharge_subject":{"type":"boolean","description":"Indica si al cliente se le aplica recargo de equivalencia.","example":false,"examples":[false]},"bank_accounts":{"type":"array","items":{"$ref":"#/components/schemas/BankAccount"},"description":"Bank accounts associated with the client. Empty `[]` when there are none."},"preferred_operation_regime":{"type":["string","null"],"enum":["general","intracomunitaria","importacion_exportacion","isp",null],"description":"Preferred operation regime of the client for VAT / VeriFactu purposes.","example":"general","examples":["general"]},"accumulate_347":{"type":"boolean","description":"Whether this client accumulates towards the annual Modelo 347 report (operations with third parties above the legal threshold).","example":true,"examples":[true]},"alternative_id":{"anyOf":[{"$ref":"#/components/schemas/AlternativeId"},{"type":"null"}]},"payment_preferences":{"anyOf":[{"$ref":"#/components/schemas/PaymentPreferences"},{"type":"null"}]},"dir3_accounting_office":{"type":["string","null"],"description":"DIR3 code of the public-administration accounting office (Oficina Contable). FACe/Facturae directory code, not a foreign key. `null` for non-AAPP clients.","example":"L01280796","examples":["L01280796"]},"dir3_managing_body":{"type":["string","null"],"description":"DIR3 code of the public-administration managing body (Órgano Gestor). FACe/Facturae directory code, not a foreign key. `null` for non-AAPP clients.","example":"L01280796","examples":["L01280796"]},"dir3_processing_unit":{"type":["string","null"],"description":"DIR3 code of the public-administration processing unit (Unidad Tramitadora). FACe/Facturae directory code, not a foreign key. `null` for non-AAPP clients.","example":"L01280796","examples":["L01280796"]},"external_id":{"type":["string","null"],"maxLength":100,"description":"External integration key (ERP/CRM/e-commerce) mapping this client to a record in a third-party system. Free-format, unique per company, distinct from the fiscal `tax_id`.","example":"CRM-99","examples":["CRM-99"]},"notes":{"type":["string","null"],"example":"Pago al contado.","examples":["Pago al contado."]},"metadata":{"$ref":"#/components/schemas/Metadata"},"is_active":{"type":"boolean","example":true,"examples":[true]},"created_at":{"type":["string","null"],"format":"date-time","example":"2026-01-15T10:30:00Z","examples":["2026-01-15T10:30:00Z"]},"updated_at":{"type":["string","null"],"format":"date-time","example":"2026-01-15T10:30:00Z","examples":["2026-01-15T10:30:00Z"]}},"required":["id","object","name","tax_id","vat_id","email","phone","address","accumulate_347","dir3_accounting_office","dir3_managing_body","dir3_processing_unit","notes","metadata","is_active","created_at","updated_at"],"title":"Client"},"ClientActivity":{"type":"object","description":"Un evento del timeline de actividad de un cliente. Agrupa eventos de dominio originados por cambios sobre el propio cliente y por documentos que lo referencian (facturas, presupuestos, etc.).","properties":{"object":{"type":"string","enum":["activity"],"example":"activity","examples":["activity"]},"event_type":{"type":"string","description":"Tipo de evento de dominio (p. ej. `client.updated`, `invoice.created`).","example":"client.updated","examples":["client.updated"]},"description":{"type":"string","description":"Human-readable description of the event in Spanish.","example":"Se actualizó el correo electrónico del cliente.","examples":["Se actualizó el correo electrónico del cliente."]},"metadata":{"type":"object","additionalProperties":true,"description":"Metadatos del evento. Los identificadores internos (PKs) se eliminan; los `*_uuid` se conservan.","example":{"previous_email":"antiguo@acme.com","new_email":"billing@acme.com"},"examples":[{"previous_email":"antiguo@acme.com","new_email":"billing@acme.com"}]},"performed_by":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"],"description":"Type of actor that originated the event: `user` for a human in the internal app, `api_key` for an action performed through the public v1 API."},"id":{"type":"string","description":"UUID (v7) of the actor: the user when `type=user`, or the API key when `type=api_key`."},"name":{"type":["string","null"],"description":"Nombre del actor en el momento del evento: nombre del usuario o nombre de la API key. `null` si no se pudo resolver."}},"required":["type","id","name"]},{"type":"null"}],"description":"Actor that originated the event. `{type:\"user\",...}` for an internal user, `{type:\"api_key\",...}` when performed via the public v1 API, or `null` when the event is system-generated (scheduler, periodic sweep) with no attributable actor.","example":{"type":"user","id":"01928f12-1234-7abc-9def-0123456789ab","name":"Ana García"},"examples":[{"type":"user","id":"01928f12-1234-7abc-9def-0123456789ab","name":"Ana García"}]},"created_at":{"type":"string","format":"date-time","description":"When the event occurred (ISO 8601).","example":"2026-05-15T10:34:21Z","examples":["2026-05-15T10:34:21Z"]}},"required":["object","event_type","description","metadata","performed_by","created_at"],"title":"ClientActivity"},"ClientRef":{"type":"object","properties":{"id":{"type":["string","null"],"example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01"]},"name":{"type":["string","null"],"example":"Acme Corporation","examples":["Acme Corporation"]}},"required":["id","name"],"title":"ClientRef"},"ClientStats":{"type":"object","description":"Aggregated summary of the client portfolio of the authenticated company: counters, invoiced and pending amounts, and average metrics. Returned by `GET /v1/clients/stats`.","properties":{"object":{"type":"string","enum":["client_stats"],"example":"client_stats","examples":["client_stats"]},"total":{"type":"integer","description":"Total de clientes registrados en la empresa.","example":145,"examples":[145]},"active":{"type":"integer","description":"Clientes marcados como activos.","example":132,"examples":[132]},"with_email":{"type":"integer","description":"Clients with a registered email address.","example":128,"examples":[128]},"with_phone":{"type":"integer","description":"Clients with a registered phone number.","example":119,"examples":[119]},"with_invoices":{"type":"integer","description":"Clientes que tienen al menos una factura emitida.","example":97,"examples":[97]},"total_invoiced":{"type":"number","description":"Importe total facturado a clientes (EUR).","example":85432.1,"examples":[85432.1]},"total_pending":{"type":"number","description":"Importe total pendiente de cobro (EUR).","example":12450.75,"examples":[12450.75]},"with_pending_invoices":{"type":"integer","description":"Clientes con al menos una factura pendiente de cobro.","example":14,"examples":[14]},"pending_invoices_amount":{"type":"number","description":"Importe agregado de facturas pendientes de cobro (EUR).","example":12450.75,"examples":[12450.75]},"new_this_month":{"type":"integer","description":"Clientes nuevos creados durante el mes en curso.","example":6,"examples":[6]},"inactive_clients":{"type":"integer","description":"Clientes marcados como inactivos.","example":13,"examples":[13]},"average_per_client":{"type":"number","description":"Importe medio facturado por cliente (EUR).","example":589.19,"examples":[589.19]}},"required":["object","total","active","with_email","with_phone","with_invoices","total_invoiced","total_pending","with_pending_invoices","pending_invoices_amount","new_this_month","inactive_clients","average_per_client"],"title":"ClientStats"},"CompanyCertificate":{"type":"object","description":"Metadata of an FNMT (PKCS#12) certificate used to sign VeriFactu transmissions. The certificate password and binary are never exposed — only X.509 metadata.","properties":{"id":{"type":"string","description":"UUID (v7) del certificado.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a13","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a13"]},"object":{"type":"string","enum":["verifactu_certificate"],"example":"verifactu_certificate","examples":["verifactu_certificate"]},"subject_nif":{"type":"string","description":"NIF del titular del certificado X.509.","example":"B12345678","examples":["B12345678"]},"subject_name":{"type":"string","description":"Nombre del titular del certificado.","example":"Acme Corporation SL","examples":["Acme Corporation SL"]},"subject_kind":{"type":"string","description":"Type of holder (individual / legal entity / representative).","example":"juridica","examples":["juridica"]},"valid_from":{"type":"string","format":"date-time","description":"Inicio de validez del certificado.","example":"2026-01-01T00:00:00+01:00","examples":["2026-01-01T00:00:00+01:00"]},"valid_to":{"type":"string","format":"date-time","description":"Fin de validez (caducidad) del certificado.","example":"2029-01-01T00:00:00+01:00","examples":["2029-01-01T00:00:00+01:00"]},"is_active":{"type":"boolean","description":"Indica si es el certificado activo para firmar transmisiones.","example":true,"examples":[true]},"revoked_at":{"type":["string","null"],"format":"date-time","description":"Revocation date, or `null` if not revoked.","example":null,"examples":[null]},"created_at":{"type":"string","format":"date-time","description":"Fecha de subida del certificado.","example":"2026-01-10T09:00:00+01:00","examples":["2026-01-10T09:00:00+01:00"]}},"required":["id","object","subject_nif","subject_name","subject_kind","valid_from","valid_to","is_active","revoked_at","created_at"],"title":"CompanyCertificate"},"ConvertDeliveryNoteRequest":{"type":"object","description":"Public REST API v1 — POST /v1/delivery_notes/{uuid}/convert.\n\nRequired body: `target` — only `invoice` is supported. The DeliveryNote\nBC only exposes `ConvertDeliveryNoteToInvoiceCommand`, so the validation\nrejects any other target with a 422 before reaching the controller.\n\nOptional body: `target_series_id` — UUID of a `series` of type `invoice`\nbelonging to the caller's tenant. Directs the numbering of the generated\ninvoice. When omitted, the conversion keeps the default-series behavior.\nThe existence check is scoped to the caller's `company_id` (TenantRule), so\na series of another tenant or a non-invoice series is rejected with 422.","properties":{"target":{"type":"string","enum":["invoice"]},"target_series_id":{"type":["string","null"],"format":"uuid"}},"required":["target"],"title":"ConvertDeliveryNoteRequest"},"ConvertProformaRequest":{"type":"object","description":"Public REST API v1 — POST /v1/proformas/{uuid}/convert.\n\nRequired body: `target` ∈ {invoice}. Only conversion to invoice is\nsupported — other targets (`proforma`, `delivery_note`) do NOT apply\nbecause a proforma can only be converted to an invoice by BC design.","properties":{"target":{"type":"string","enum":["invoice"]}},"required":["target"],"title":"ConvertProformaRequest"},"ConvertQuoteRequest":{"type":"object","description":"Public REST API v1 — POST /v1/quotes/{uuid}/convert.\n\nBody requerido: `target` ∈ {invoice, proforma, delivery_note}.\nBody opcional: `issued_on` (date), `due_on` (date).","properties":{"target":{"type":"string","enum":["invoice","proforma","delivery_note"]},"issued_on":{"type":["string","null"],"format":"date"},"due_on":{"type":["string","null"],"format":"date"}},"required":["target"],"title":"ConvertQuoteRequest"},"CreateClientRequest":{"type":"object","description":"Public REST API v1 — POST /v1/clients.\n\nRequired body: `name`. Optional: `tax_id`, `vat_id`, `email`, `phone`,\n`address` (object with sub-keys `line1`, `line2`, `number`, `floor`,\n`door`, `staircase`, `postal_code`, `city`, `province`, `country`),\n`notes`, `metadata`, `commercial_name`, `contact_person`, `fax`, `mobile`,\n`website`, `billing_emails[]`, `default_discount`, `default_vat_rate`,\n`default_retention_rate`, `is_surcharge_subject`, `accumulate_347`,\n`bank_accounts[]`, `latitude`, `longitude`, `preferred_operation_regime`,\n`payment_method`, `payment_terms_days`,\n`alternative_id` (object `{type, value, country_code}`).\n\nThe validation of `metadata` invariants (≤50 keys, ≤500 chars/value) is\nperformed by the Handler via `Metadata::create()`. The validation of domain\ninvariants (XOR `tax_id`/`alternative_id`, direct_debit ⇒ default bank\naccount, billing_emails without duplicates) is performed by the `Client`\naggregate. The typed exceptions (`MetadataTooManyKeysException`,\n`MetadataValueTooLongException`, `InvalidTaxIdException`,\n`InvalidAlternativeIdException`, `InvalidBillingEmailsException`,\n`InvalidClientStateException`) implement `PublicApiMappable` and propagate\nto the `ExceptionRenderer` with the canonical v1 envelope.\n\n`tax_id` is de facto required unless `alternative_id` is sent. The\nFormRequest leaves it `nullable` and delegates validation to the aggregate,\nwhich throws `InvalidTaxIdException` (422 `tax_id_required`) if both are missing.","properties":{"name":{"type":"string","maxLength":200},"commercial_name":{"type":["string","null"],"maxLength":255},"tax_id":{"type":["string","null"],"maxLength":20},"vat_id":{"type":["string","null"],"maxLength":20},"email":{"type":["string","null"],"format":"email","maxLength":191},"phone":{"type":["string","null"],"maxLength":20},"fax":{"type":["string","null"],"maxLength":20},"mobile":{"type":["string","null"],"maxLength":20},"website":{"type":["string","null"],"format":"uri","maxLength":255},"contact_person":{"type":["string","null"],"maxLength":200},"latitude":{"type":["number","null"],"minimum":-90,"maximum":90},"longitude":{"type":["number","null"],"minimum":-180,"maximum":180},"default_discount":{"type":["number","null"],"minimum":0,"maximum":100},"default_vat_rate":{"type":["number","null"],"minimum":0,"maximum":100},"default_retention_rate":{"type":["number","null"],"minimum":-100,"maximum":0},"is_surcharge_subject":{"type":["boolean","null"]},"accumulate_347":{"type":"boolean"},"preferred_operation_regime":{"type":["string","null"],"enum":["general","intracomunitaria","importacion_exportacion","isp"]},"payment_method":{"type":["string","null"],"enum":["bank_transfer","direct_debit","cash","credit_card","check","paypal","other"]},"payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365},"notes":{"type":["string","null"],"maxLength":1000},"metadata":{"$ref":"#/components/schemas/Metadata"},"dir3_accounting_office":{"type":["string","null"]},"dir3_managing_body":{"type":["string","null"]},"dir3_processing_unit":{"type":["string","null"]},"external_id":{"type":["string","null"],"maxLength":100},"billing_emails":{"type":["array","null"],"items":{"type":"string","format":"email"},"maxItems":5},"alternative_id":{"type":"object","properties":{"type":{"type":"string","enum":["passport","national_id","tax_id_foreign","not_registered"]},"value":{"type":"string","minLength":1,"maxLength":50},"country_code":{"type":"string","pattern":"^[A-Z]{2}$","minLength":2,"maxLength":2}}},"address":{"type":"object","properties":{"line1":{"type":["string","null"],"maxLength":500},"line2":{"type":["string","null"],"maxLength":100},"number":{"type":["string","null"],"maxLength":100},"floor":{"type":["string","null"],"maxLength":100},"door":{"type":["string","null"],"maxLength":100},"staircase":{"type":["string","null"],"maxLength":100},"postal_code":{"type":["string","null"],"maxLength":10},"city":{"type":["string","null"],"maxLength":100},"province":{"type":["string","null"],"maxLength":100},"country":{"type":["string","null"],"minLength":2,"maxLength":2}}},"bank_accounts":{"type":["array","null"],"items":{"type":"object","properties":{"iban":{"type":"string","maxLength":50},"bic":{"type":["string","null"],"maxLength":20},"is_default":{"type":["boolean","null"]},"notes":{"type":["string","null"],"maxLength":255}},"required":["iban"]}}},"required":["name"],"title":"CreateClientRequest"},"CreateCorrectiveInvoiceRequest":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/{uuid}/corrective.\n\nBody:\n - `correction_reason` (canonical slug BR-INV-018) — required field. Maps to\n   a fine-grained VeriFactu code R1..R4 (error_fundado→R1, concurso→R2,\n   incobrable→R3, rest→R4). Replaces the former free-text `reason` that the\n   controller hardcoded to `'otras'` (fiscal bug).\n - `correction_type` (`full` or `partial`) — canonical field.\n - `corrective_type` — deprecated alias kept for backward compatibility.\n   If sent and `correction_type` is absent, it is promoted automatically.\n - `notes` (optional string) — free-text traceability.\n - `lines` (array, required if `correction_type=partial`).","properties":{"correction_reason":{"type":"string","enum":["error_fundado","concurso","incobrable","error_importe","error_cliente","devolucion","descuento","otras"]},"correction_type":{"type":"string","enum":["full","partial"]},"notes":{"type":["string","null"],"maxLength":1000},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number"},"unit_price":{"type":"number","minimum":0},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100}}},"minItems":1}},"required":["correction_reason","correction_type"],"title":"CreateCorrectiveInvoiceRequest"},"CreateDeliveryNoteRequest":{"type":"object","description":"Public REST API v1 — POST /v1/delivery_notes.\n\nRequired body: `client_id`, `lines[]` (min 1). Optional:\n`series_id`, `delivery_date`, `notes`, `internal_notes`,\n`reference_number`, `transport_details`, `delivery_address` &c,\n`metadata` (≤50 keys, ≤500 chars/value — VO `Metadata`), `tags` (lista de\nslugs, ≤40 c/u, ≤30 — VO `DocumentTagCollection`), `custom_fields` (lista\ntipada `[{field,value}]`, `field` ≤60, `value` ≤500, ≤50 — VO `CustomFields`).","properties":{"client_id":{"type":"string","format":"uuid"},"series_id":{"type":["string","null"],"format":"uuid"},"delivery_date":{"type":["string","null"],"format":"date"},"notes":{"type":["string","null"],"maxLength":2000},"internal_notes":{"type":["string","null"],"maxLength":2000},"reference_number":{"type":["string","null"],"maxLength":255},"transport_details":{"type":["string","null"],"maxLength":2000},"delivery_address":{"type":["string","null"],"maxLength":500},"delivery_city":{"type":["string","null"],"maxLength":255},"delivery_postal_code":{"type":["string","null"],"maxLength":20},"delivery_province":{"type":["string","null"],"maxLength":255},"delivery_country":{"type":["string","null"],"maxLength":255},"vehicle_plate":{"type":["string","null"],"description":"Logistics extension (semantic format validated in the Aggregate)","maxLength":20},"driver_name":{"type":["string","null"],"maxLength":120},"driver_tax_id":{"type":["string","null"],"maxLength":20},"tracking_number":{"type":["string","null"],"maxLength":100},"carrier_company":{"type":["string","null"],"maxLength":120},"received_by_name":{"type":["string","null"],"maxLength":120},"received_by_tax_id":{"type":["string","null"],"maxLength":20},"external_id":{"type":["string","null"],"maxLength":100},"currency":{"type":["string","null"],"enum":["EUR"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"billing_emails":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191},"maxItems":5},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate_id":{"type":["string","null"],"format":"uuid"},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate":{"type":["number","null"],"minimum":0,"maximum":100},"surcharge_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate_id":{"type":["string","null"],"format":"uuid"},"surcharge_rate_id":{"type":["string","null"],"format":"uuid"},"product_id":{"type":["string","null"],"format":"uuid"},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100}},"required":["description","quantity","unit_price"]},"minItems":1}},"required":["client_id","lines"],"title":"CreateDeliveryNoteRequest"},"CreateInvoiceRequest":{"type":"object","description":"Public REST API v1 — POST /v1/invoices.\n\nRequired body: `client_id`, `series_id`, `issued_on`, `due_on`,\n`lines[]` (min 1). Optional: `notes`, `metadata` (≤50 keys, ≤500\nchars/value — VO `Metadata`), `tags` (lista de slugs, ≤40 c/u, ≤30 — VO\n`DocumentTagCollection`), `custom_fields` (lista tipada `[{field,value}]`,\n`field` ≤60, `value` ≤500, ≤50 — VO `CustomFields`).","properties":{"client_id":{"type":"string","format":"uuid"},"series_id":{"type":"string","format":"uuid"},"issued_on":{"type":"string","format":"date"},"due_on":{"type":"string","format":"date"},"notes":{"type":["string","null"],"maxLength":1000},"external_id":{"type":["string","null"],"maxLength":100},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate_id":{"type":["string","null"],"format":"uuid"},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"product_id":{"type":["string","null"],"format":"uuid"},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100}},"required":["description","quantity","unit_price"]},"minItems":1}},"required":["client_id","series_id","issued_on","due_on","lines"],"title":"CreateInvoiceRequest"},"CreateProductRequest":{"type":"object","description":"Public REST API v1 — POST /v1/products.\n\nRequired body: `name`, `price`. Optional: `sku`, `description`, `tags`,\n`stock` (initial quantity), `low_stock_threshold` (per-product),\n`currency` (EUR only — Producto is read-only EUR; any other code → 422),\n`tax_rate_id`, `is_active`, `metadata`, `external_id`.\nValidation of `metadata` via VO `Metadata`.","properties":{"name":{"type":"string","maxLength":200},"sku":{"type":["string","null"],"description":"`sku` uniqueness per company is NOT validated here — the Aggregate\nthrows `DuplicateSkuException` and the controller translates it to 409\n`sku_already_exists` (not 422). Validating here would give 422 and break\nthe external-api-products spec contract.","maxLength":100},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,2})?$"},"description":{"type":["string","null"],"description":"Columna `products.description` es `text` → sin `max` artificial."},"stock":{"type":["integer","null"],"description":"Stock inicial (solo en create; la mutación posterior vive en\n`PUT /v1/products/{uuid}/stock`). Ausente → default 0 en el Mapper.","minimum":0},"low_stock_threshold":{"type":["integer","null"],"description":"Umbral per-producto; se persiste en `metadata.low_stock_threshold`.","minimum":0},"currency":{"type":["string","null"],"description":"Producto es read-only EUR: solo se admite `EUR` (o ausencia/null).\nCualquier otra moneda → 422 (antes se aceptaba-y-descartaba).","enum":["EUR"]},"tax_rate_id":{"type":["string","null"],"format":"uuid","description":"`taxes` is a global system catalog (without a `company_id` column).\nDo NOT use TenantRule here — it would add `WHERE company_id = X` against a\ntable without that column and cause a 500 (SQLSTATE 42S22). Global\nvalidation by uuid, like in the rest of the BCs (DeliveryNote V1, etc.)."},"is_active":{"type":["boolean","null"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"external_id":{"type":["string","null"],"description":"Clave de integración ERP/CRM de terceros (ortogonal al `sku`). La\nunicidad por empresa NO se valida aquí: el UPSERT por `external_id`\n(controller) reutiliza el registro existente. Free-format ≤100.","maxLength":100},"tags":{"type":["array","null"],"items":{"type":"string"}}},"required":["name","price"],"title":"CreateProductRequest"},"CreateProformaRequest":{"type":"object","description":"Public REST API v1 — POST /v1/proformas.\n\nRequired body: `client_id`, `issued_on`, `lines[]` (min 1). Optional:\n`series_id`, `valid_until`, `notes`, `terms_and_conditions`, `metadata`\n(≤50 keys, ≤500 chars/value — VO `Metadata`), `tags` (lista de slugs, ≤40\nc/u, ≤30 — VO `DocumentTagCollection`), `custom_fields` (lista tipada\n`[{field,value}]`, `field` ≤60, `value` ≤500, ≤50 — VO `CustomFields`).","properties":{"client_id":{"type":"string","format":"uuid"},"series_id":{"type":["string","null"],"format":"uuid"},"issued_on":{"type":"string","format":"date"},"valid_until":{"type":["string","null"],"format":"date"},"validity_days":{"type":["integer","null"],"minimum":1,"maximum":365},"notes":{"type":["string","null"],"maxLength":1000},"terms_and_conditions":{"type":["string","null"],"maxLength":2000},"reference":{"type":["string","null"],"maxLength":255},"payment_method":{"type":["string","null"],"maxLength":100},"payment_terms":{"type":["integer","null"],"minimum":0,"maximum":365},"shipping_cost":{"type":["number","null"],"minimum":0},"delivery_terms":{"type":["string","null"],"maxLength":255},"estimated_delivery_date":{"type":["string","null"],"format":"date"},"external_id":{"type":["string","null"],"maxLength":100},"currency":{"type":["string","null"],"enum":["EUR"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate_id":{"type":["string","null"],"format":"uuid"},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate":{"type":["number","null"],"minimum":0,"maximum":100},"surcharge_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate_id":{"type":["string","null"],"format":"uuid"},"surcharge_rate_id":{"type":["string","null"],"format":"uuid"},"product_id":{"type":["string","null"],"format":"uuid"},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100}},"required":["description","quantity","unit_price"]},"minItems":1}},"required":["client_id","issued_on","lines"],"title":"CreateProformaRequest"},"CreatePurchaseInvoiceRequest":{"type":"object","description":"Public REST API v1 — POST /v1/purchase_invoices.\n\nRequired body: `supplier_id`, `external_invoice_number`,\n`issued_on`, `lines[]` (min 1). Optional: `due_on`, `received_on`,\n`internal_code`, `notes`, `metadata` (≤50 keys, ≤500 chars/value —\nVO `Metadata`).\n\n`external_invoice_number` is the number the supplier puts on their\ninvoice (it is not one of our series). The combination\n`(company_id, external_invoice_number)` is UNIQUE in the database.\n\nWe accept `supplier_invoice_number` as a deprecated alias of the\ncanonical `external_invoice_number` (more readable for integrators\nused to Stripe/Holded).\n\nConflict (409): if `external_invoice_number` already exists for the\ncaller's company, the create responds `409` with the canonical v1\nenvelope `error.code === \"resource_already_exists\"`,\n`error.subcode === \"purchase_invoice_already_exists\"`,\n`error.param === \"external_invoice_number\"` — never a generic `500`.\nThe conflict is raised by `DuplicatePurchaseInvoiceNumberException`\n(defense-in-depth: pre-check + UNIQUE\n`purchase_invoices_company_real_number_unique`). The same number in a\ndifferent company is NOT a duplicate (`201`).","properties":{"supplier_id":{"type":"string","format":"uuid"},"expense_category_id":{"type":["string","null"],"format":"uuid"},"external_invoice_number":{"type":"string","maxLength":255},"external_id":{"type":["string","null"],"description":"Clave de negocio externa (clave de integración ERP/CRM, change\nexternal-id-documents). Ortogonal a `external_invoice_number` (el\nnúmero fiscal del proveedor): `external_id` es el ID del recurso\nen el sistema del integrador, único por empresa.","maxLength":100},"internal_code":{"type":["string","null"],"maxLength":255},"issued_on":{"type":"string","format":"date"},"received_on":{"type":["string","null"],"format":"date"},"due_on":{"type":["string","null"],"format":"date"},"status":{"type":"string","description":"Optional initial status (BR-PUR-001). 4-state model:\nCREATION allowlist `draft|pending` (`received`/`pending_payment`\nwere merged into `pending`). `paid|cancelled` are lifecycle\ntransitions (mark_paid/change_status), NOT creation states.\nIf omitted, the domain applies the default `draft`.","enum":["draft","pending"]},"notes":{"type":["string","null"],"maxLength":1000},"metadata":{"$ref":"#/components/schemas/Metadata"},"internal_notes":{"type":["string","null"],"description":"Extend fields. Basic SHAPE only; the `payment_method` allowlist,\n`tax_period` format and `tags` cardinality are validated by the\nVO/Aggregate.","maxLength":2000},"payment_method":{"type":["string","null"],"maxLength":30},"payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365},"bank_account_id":{"type":["integer","null"]},"expense_account":{"type":["string","null"],"maxLength":50},"tax_period":{"type":["string","null"],"maxLength":10},"is_reverse_charge":{"type":["boolean","null"]},"deductible_percentage":{"type":["number","null"],"minimum":0,"maximum":100},"operation_class":{"type":["string","null"],"description":"`operation_class` (BR-PUR-018 / BR-TXR-030) SÍ es escribible vía API\nv1 en compras: el integrador clasifica el origen de su gasto a\nefectos del IVA soportado del Modelo 303 (casillas [28]-[39]).\nConjunto cerrado; nullable → default `corriente`.","enum":["corriente","bien_inversion","importacion","intracomunitaria"]},"exclude_347":{"type":"boolean","description":"`exclude_347` (BR-TXR-024) SÍ es escribible vía API v1 en compras:\nel integrador clasifica sus propios gastos. En ventas (Invoice) el\nflag es de solo lectura en v1 y solo se muta desde la SPA interna\n(ver InvoiceV1Resource). Asimetría deliberada por superficie."},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"description":"custom_fields tipados `[{field,value}]` (§10) — VO Shared\n`CustomFields`. `field` ≤60 no vacío, `value` ≤500, ≤50 entradas.","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate":{"type":["number","null"],"description":"Retención IRPF e IVA deducible por línea (BR-PUR-022). `retention_rate`\n= porcentaje practicado al proveedor (0–100); `vat_deductible` marca\nla deducibilidad del IVA (informativo, no altera el total pagado).","minimum":0,"maximum":100},"vat_deductible":{"type":["boolean","null"]}},"required":["description","quantity","unit_price"]},"minItems":1}},"required":["supplier_id","external_invoice_number","issued_on","lines"],"title":"CreatePurchaseInvoiceRequest"},"CreateQuoteRequest":{"type":"object","description":"Public REST API v1 — POST /v1/quotes.\n\nRequired body: `client_id`, `series_id`, `issued_on`, `valid_until`,\n`lines[]` (min 1). Optional: `notes`, `terms`, `metadata` (≤50 keys,\n≤500 chars/value — VO `Metadata`), `tags` (lista de slugs, ≤40 c/u, ≤30 — VO\n`DocumentTagCollection`), `custom_fields` (lista tipada `[{field,value}]`,\n`field` ≤60, `value` ≤500, ≤50 — VO `CustomFields`).","properties":{"client_id":{"type":"string","format":"uuid"},"series_id":{"type":["string","null"],"format":"uuid"},"issued_on":{"type":"string","format":"date"},"valid_until":{"type":"string","format":"date"},"notes":{"type":["string","null"],"maxLength":1000},"terms":{"type":["string","null"],"maxLength":2000},"external_id":{"type":["string","null"],"maxLength":100},"currency":{"type":["string","null"],"enum":["EUR"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate_id":{"type":["string","null"],"format":"uuid"},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate":{"type":["number","null"],"minimum":0,"maximum":100},"surcharge_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate_id":{"type":["string","null"],"format":"uuid"},"surcharge_rate_id":{"type":["string","null"],"format":"uuid"},"product_id":{"type":["string","null"],"format":"uuid"},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100}},"required":["description","quantity","unit_price"]},"minItems":1}},"required":["client_id","issued_on","valid_until","lines"],"title":"CreateQuoteRequest"},"CreateRecurringInvoiceRequest":{"type":"object","description":"Public REST API v1 — POST /v1/recurring_invoices.\n\nRequired body: `client_id`, `series_id`, `frequency`,\n`start_on`, `lines[]` (min 1). Optional: `end_on`, `name`,\n`description`, `notes`, `metadata` (≤50 keys, ≤500 chars/value —\nVO `Metadata`), `holiday_handling`, `days_before_due`,\n`max_occurrences`, `email_to`, `send_automatically`. Each line accepts\n`description`, `quantity`, `unit_price`, `tax_rate`, `retention`,\n`surcharge` (rates 0-100).\n\nFrequency v1 (contractual whitelist):\n`daily|weekly|biweekly|monthly|quarterly|semiannual|yearly`.\n`yearly` is mapped to `annual` (internal RecurringInvoice BC) in the\ncontroller.\n\nBy default the recurrence is born `active` with `frequency_interval=1`.\nThe fields `holiday_handling` (default `same`), `days_before_due`\n(default `30`), `max_occurrences` (default ∞), `email_to` (default none)\nand `send_automatically` (default `true`) ARE configurable in the body;\nif omitted, those defaults apply.\n\n`holiday_handling` accepts `skip|same|before|after`. The value validation\nis performed by the VO `HolidayHandling::create()` in the Handler (throws\n`InvalidHolidayHandlingException` → 422 `invalid_holiday_handling`); it is\nnot duplicated here with an `in:` rule, to preserve the canonical catalog subcode.\n\n`tags` (lista de slugs, ≤40 c/u, ≤30 — VO `DocumentTagCollection`) y\n`custom_fields` (lista tipada `[{field,value}]`, `field` ≤60, `value` ≤500,\n≤50 — VO `CustomFields`) viven a nivel de la RECURRENCIA (cabecera), no de\nlas facturas generadas (change `document-ergonomics-and-tags` §11).","properties":{"client_id":{"type":"string","format":"uuid"},"series_id":{"type":["string","null"],"format":"uuid"},"name":{"type":["string","null"],"maxLength":255},"description":{"type":["string","null"],"maxLength":1000},"frequency":{"type":"string","enum":["daily","weekly","biweekly","monthly","quarterly","semiannual","yearly"]},"start_on":{"type":"string","format":"date"},"end_on":{"type":["string","null"],"format":"date"},"notes":{"type":["string","null"],"maxLength":1000},"metadata":{"$ref":"#/components/schemas/Metadata"},"external_id":{"type":["string","null"],"maxLength":100},"holiday_handling":{"type":"string"},"days_before_due":{"type":["integer","null"],"minimum":0},"max_occurrences":{"type":["integer","null"],"minimum":1},"email_to":{"type":["string","null"],"format":"email"},"send_automatically":{"type":"boolean"},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention":{"type":["number","null"],"minimum":0,"maximum":100},"surcharge":{"type":["number","null"],"minimum":0,"maximum":100}},"required":["description","quantity","unit_price"]},"minItems":1}},"required":["client_id","frequency","start_on","lines"],"title":"CreateRecurringInvoiceRequest"},"CreateSeriesRequest":{"type":"object","description":"Public REST API v1 — POST /v1/series.\n\nRequired body: `code` (string, max 10 — invariant of the VO `SeriesCode`),\n`document_type` (internal enum whitelist `SeriesType`). Optional: `name`,\n`prefix`, `year_reset` (boolean), `number_format` (canonical mask string),\n`initial_number` (integer >= 1).\n\n`code`, `name` and `year_reset` are honored and materialized by the `Series`\naggregate (enables multi-series with distinct codes per type). `prefix`\nis an OUTPUT alias of `code` in the Resource — it is not mapped to the Command.\n\nThe `max:10` limit of `code` must match the invariant of\n`SeriesCode::create()` (throws if empty or > 10 chars). Without this\nalignment, an 11+ char code would pass validation and blow up in the VO\nwith an HTTP 500 instead of the expected 422.\n\n`number_format` accepts the canonical mask (e.g. `{code}-{YYYY}-{000}`) and\nis validated against the closed grammar of the `NumberFormat` VO via\n`withValidator()`: the VO itself is the authority (padding `1..10`, year\ntoken `{YYYY, YY, NONE}`, separator `{-, /, ., _}`). A malformed mask yields\n`422` with the Spanish message of `InvalidNumberFormatException` — NEVER a\n`500` from the VO blowing up downstream. If omitted, the BC applies the\ncanonical default (`{code}-{YYYY}-{000}`, padding 3).\n\n`initial_number` (`nullable|integer|min:1`) lets an integrator continue an\nexisting numbering when migrating (the domain already supports it\nend-to-end via `YearCounter::create(initialNumber)`; this request just\nwires the v1 surface that previously ignored it). If omitted, the counter\nstarts at `1`.\n\nPublic `document_type` whitelist: `invoice, quote, delivery_note,\nproforma`. The `contract` type is outside the public v1 surface\n(it is not a billable document exposed to integrators) even though the\ndomain VO `SeriesType` still supports it for the SPA. `purchase_invoice`\nand `recurring_invoice` are not yet supported by the internal BC and are\nrejected in validation — they will be added additively when the domain supports them.\n\nUnknown input fields are SILENTLY IGNORED (current contract, not hardened\nin this change): the controller reads only the named fields above via\n`$request->input(...)`, and any body key absent from `rules()` is dropped\nby Laravel's `validated()` — it never reaches the `Series` aggregate.\nIntegrators must stick to the documented fields; extra keys are no-ops, not\n422 errors.","properties":{"code":{"type":"string","maxLength":10},"name":{"type":["string","null"],"maxLength":255},"document_type":{"type":"string","enum":["invoice","quote","delivery_note","proforma"]},"prefix":{"type":["string","null"],"maxLength":20},"year_reset":{"type":["boolean","null"]},"number_format":{"type":["string","null"],"maxLength":32},"initial_number":{"type":["integer","null"],"minimum":1}},"required":["code","document_type"],"title":"CreateSeriesRequest"},"CreateSupplierRequest":{"type":"object","description":"Public REST API v1 — POST /v1/suppliers.\n\nRequired body: `name`. Optional: `tax_id`, `vat_id`, `email`, `phone`,\n`address` (object with sub-keys `line1`, `line2`, `number`, `floor`,\n`door`, `staircase`, `postal_code`, `city`, `province`, `country`),\n`notes`, `metadata`, `business_name`, `commercial_name`, `contact_person`,\n`fax`, `mobile`, `website`, `billing_emails[]`, `default_discount`,\n`default_vat_rate`, `default_retention_rate`, `is_surcharge_subject`,\n`accumulate_347`, `bank_accounts[]`, `iban` (flat legacy alias),\n`coordinates`, `preferred_operation_regime`, `payment_method`,\n`payment_terms_days`, `alternative_id` (object `{type, value, country_code}`),\n`default_taxes_id`.\n\nThe validation of `metadata` invariants (≤50 keys, ≤500 chars/value) is\nperformed by the Handler via `Metadata::create()`. The validation of domain\ninvariants (XOR `tax_id`/`alternative_id`, direct_debit ⇒ default bank\naccount, billing_emails without duplicates, IBAN format) is performed by the\n`Supplier` aggregate and the VOs (`Metadata`, `BankAccount`). The typed\nexceptions (`MetadataTooManyKeysException`, `MetadataValueTooLongException`,\n`InvalidTaxIdException`, `InvalidAlternativeIdException`,\n`InvalidBillingEmailsException`, `InvalidBankAccountException`) implement\n`PublicApiMappable` and propagate to the `ExceptionRenderer` with the\ncanonical v1 envelope.\n\n`tax_id` is relaxed to `nullable` on this endpoint; the aggregate requires\n`tax_id XOR alternative_id`.","properties":{"name":{"type":"string","maxLength":200},"business_name":{"type":["string","null"],"maxLength":200},"commercial_name":{"type":["string","null"],"maxLength":200},"tax_id":{"type":["string","null"],"maxLength":50},"vat_id":{"type":["string","null"],"maxLength":20},"email":{"type":["string","null"],"format":"email","maxLength":191},"phone":{"type":["string","null"],"maxLength":20},"fax":{"type":["string","null"],"maxLength":20},"mobile":{"type":["string","null"],"maxLength":20},"website":{"type":["string","null"],"format":"uri","maxLength":255},"contact_person":{"type":["string","null"],"maxLength":200},"latitude":{"type":["number","null"],"minimum":-90,"maximum":90},"longitude":{"type":["number","null"],"minimum":-180,"maximum":180},"default_discount":{"type":["number","null"],"minimum":0,"maximum":100},"default_vat_rate":{"type":["number","null"],"minimum":0,"maximum":100},"default_retention_rate":{"type":["number","null"],"minimum":0,"maximum":100},"is_surcharge_subject":{"type":["boolean","null"]},"accumulate_347":{"type":"boolean"},"iban":{"type":["string","null"],"maxLength":34},"default_taxes_id":{"type":["string","null"],"format":"uuid"},"preferred_operation_regime":{"type":["string","null"],"enum":["general","intracomunitaria","importacion_exportacion","isp"]},"payment_method":{"type":["string","null"],"enum":["bank_transfer","direct_debit","cash","credit_card","check","paypal","other"]},"payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365},"notes":{"type":["string","null"],"maxLength":1000},"metadata":{"$ref":"#/components/schemas/Metadata"},"external_id":{"type":["string","null"],"maxLength":100},"billing_emails":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191},"maxItems":5},"coordinates":{"type":"object","properties":{"latitude":{"type":["number","null"],"minimum":-90,"maximum":90},"longitude":{"type":["number","null"],"minimum":-180,"maximum":180}}},"alternative_id":{"type":"object","properties":{"type":{"type":"string","enum":["passport","national_id","tax_id_foreign","not_registered"]},"value":{"type":"string","minLength":1,"maxLength":50},"country_code":{"type":"string","pattern":"^[A-Z]{2}$","minLength":2,"maxLength":2}}},"address":{"type":"object","properties":{"line1":{"type":["string","null"],"maxLength":500},"line2":{"type":["string","null"],"maxLength":100},"number":{"type":["string","null"],"maxLength":100},"floor":{"type":["string","null"],"maxLength":100},"door":{"type":["string","null"],"maxLength":100},"staircase":{"type":["string","null"],"maxLength":100},"postal_code":{"type":["string","null"],"maxLength":10},"city":{"type":["string","null"],"maxLength":100},"province":{"type":["string","null"],"maxLength":100},"country":{"type":["string","null"],"minLength":2,"maxLength":2}}},"bank_accounts":{"type":["array","null"],"items":{"type":"object","properties":{"iban":{"type":"string","maxLength":50},"bic":{"type":["string","null"],"maxLength":20},"is_default":{"type":["boolean","null"]},"notes":{"type":["string","null"],"maxLength":255}},"required":["iban"]}}},"required":["name"],"title":"CreateSupplierRequest"},"CreateTaxRequest":{"type":"object","description":"Public REST API v1 — POST /v1/taxes.\n\nCreates a custom tax with name, unique code, type\n(`vat|retention|surcharge|other`), rate and scope\n(`sale|purchase|both`). The ISO-2 country code (`country`) is\nrequired.\n\nAccepts the 7 optional AEAT/B2B extend fields\n(`customer_visible_label`, `external_reference`, `valid_from`,\n`valid_until`, `reverse_charge`, `country_aeat_zone`, `metadata`)\nand the consolidated map `default_for_documents`. The uniqueness\nvalidation of `code` is delegated to the aggregate via\n`DuplicateTaxCodeException` (409).","properties":{"name":{"type":"string","maxLength":255},"code":{"type":"string","maxLength":50},"type":{"type":"string","enum":["vat","retention","surcharge","other"]},"rate":{"type":"number"},"applies_to":{"type":"string","enum":["sale","purchase","both"]},"is_active":{"type":"boolean"},"country":{"type":"string","minLength":2,"maxLength":2},"description":{"type":["string","null"],"maxLength":1000},"customer_visible_label":{"type":["string","null"],"description":"===== EXTEND AEAT/B2B =====\nNOTE: no `max:200` rule here. The 200-char limit is enforced by the\nVO `CustomerVisibleLabel::create()` via\n`InvalidCustomerVisibleLabelException::tooLong(200)` with the canonical\nsubcode `invalid_customer_visible_label` (spec error catalog §24).\nWith `max:200` the FormRequest would emit `invalid_param_value` and the\ndomain subcode would never materialize."},"external_reference":{"type":["string","null"],"maxLength":10},"valid_from":{"type":["string","null"],"format":"date"},"valid_until":{"type":["string","null"],"format":"date","description":"NOTE: no `after_or_equal:valid_from` rule here. The invariant\n`valid_until >= valid_from` is enforced by the Aggregate via\n`InvalidValidityWindowException::endBeforeStart()` with the canonical\nsubcode `invalid_validity_window` (spec error catalog §6)."},"reverse_charge":{"type":"boolean"},"country_aeat_zone":{"type":["string","null"],"enum":["peninsula","canarias","ceuta","melilla"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"default_for_documents":{"type":"object","description":"===== DEFAULTS CONSOLIDADO =====","properties":{"invoice":{"type":"boolean"},"quote":{"type":"boolean"},"delivery_note":{"type":"boolean"},"proforma":{"type":"boolean"},"purchase_invoice":{"type":"boolean"},"recurring_invoice":{"type":"boolean"}}}},"required":["name","code","type","rate","applies_to","country"],"title":"CreateTaxRequest"},"CreateWebhookEndpointRequest":{"type":"object","description":"POST /v1/webhook_endpoints\n\nBody:\n  - `url`            required, HTTPS, max 2048\n  - `enabled_events` required, non-empty array. Only `available` events are\n                     subscribable: each element must belong to the closed\n                     active catalog `EventName::CATALOG` (its `count()` is the\n                     single source of truth for the public total — see the\n                     roadmap in `docs/api/events.md`). Events in\n                     `EventName::RESERVED` (status `coming_soon`, currently\n                     empty) are LISTED in `GET /v1/event-catalog` but are NOT\n                     yet emitted, so they are NOT subscribable: sending one in\n                     `enabled_events` yields 422 (`enabled_events.N`). For\n                     compatibility, the alias `events` is also accepted: if\n                     the client sends `events` and does not send\n                     `enabled_events`, we promote it in `prepareForValidation`.\n  - `description`    optional, max 255\n  - `ip_allowlist`   optional, array of strings (plain IP or CIDR)\n  - `api_version`    optional, `YYYY-MM-DD` format and a supported value\n  - `timeout_seconds` optional, integer between 1 and 30 (default 10)","properties":{"url":{"type":"string","pattern":"^https:\\/\\/","maxLength":2048},"description":{"type":["string","null"],"maxLength":255},"api_version":{"type":["string","null"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"timeout_seconds":{"type":["integer","null"]},"enabled_events":{"type":"array","items":{"type":"string","enum":["invoice.created","invoice.updated","invoice.sent","invoice.paid","invoice.cancelled","invoice.annulled","invoice.overdue","invoice.deleted","invoice.number_assigned","invoice.rectified","invoice.email_sent","invoice.email_failed","invoice.payment_reminder_sent","invoice.simplified_created","invoice.simplified_substituted","invoice.substituted_by_complete","invoice.verifactu_submitted","invoice.verifactu_failed","invoice.metadata_changed","quote.created","quote.updated","quote.deleted","quote.approved","quote.rejected","quote.converted","quote.expired","quote.marked_as_pending","quote.cancelled","quote.number_assigned","quote.metadata_changed","quote.email_sent","quote.email_failed","proforma.created","proforma.updated","proforma.deleted","proforma.accepted","proforma.rejected","proforma.cancelled","proforma.expired","proforma.converted_to_invoice","proforma.number_assigned","proforma.metadata_changed","proforma.email_sent","proforma.email_failed","delivery_note.created","delivery_note.updated","delivery_note.status_changed","delivery_note.signed","delivery_note.converted","delivery_note.email_sent","delivery_note.email_failed","purchase_invoice.created","purchase_invoice.updated","purchase_invoice.paid","purchase_invoice.cancelled","purchase_invoice.metadata_changed","purchase_invoice.payment_registered","recurring_invoice.created","recurring_invoice.activated","recurring_invoice.paused","recurring_invoice.updated","recurring_invoice.deleted","recurring_invoice.completed","recurring_invoice.executed","recurring_invoice.failed","recurring_invoice.metadata_changed","recurring_invoice.cancelled","client.created","client.updated","client.deleted","client.metadata_changed","product.created","product.updated","payment.received","tax.metadata_changed","tax.validity_changed","tax.external_reference_changed","series.created","series.updated","series.deleted","series.archived","series.unarchived","series.marked_as_default","series.demoted_from_default","series.year_reset","series.number_consumed","facturae.face_submitted","facturae.face_status_changed","facturae.face_cancellation_requested"]},"minItems":1},"ip_allowlist":{"type":["array","null"],"items":{"type":"string","maxLength":43}},"custom_headers":{"$ref":"#/components/schemas/CustomHeaders"}},"required":["url","enabled_events"],"title":"CreateWebhookEndpointRequest"},"CustomField":{"type":"object","description":"A typed custom field as an ordered `{field, value}` pair. Distinct from `metadata` (a free key→value map): use `custom_fields` for structured, display-oriented integration metadata.","properties":{"field":{"type":"string","minLength":1,"maxLength":60,"description":"Field key (non-empty, ≤ 60 chars)."},"value":{"type":"string","maxLength":500,"description":"Field value (≤ 500 chars)."}},"required":["field","value"],"title":"CustomField"},"CustomHeaders":{"type":"object","description":"Custom HTTP headers (string → string) added to every delivery request for a webhook endpoint. Max 20 entries, each value ≤ 1024 chars. Header names are normalized to Title-Case. Reserved names (`Host`, `Content-Type`, `Factuarea-Signature`, `X-Forwarded-*`, …) are rejected. Empty object when none are set. Never put secrets here — values are returned verbatim by the API.","additionalProperties":{"type":"string","maxLength":1024},"maxProperties":20,"example":{"Authorization":"Bearer integration-token","X-Custom-Auth":"tenant-a"},"title":"CustomHeaders"},"DeclaracionResponsable":{"type":"object","description":"The producer-level VeriFactu Declaración Responsable (SIF compliance declaration issued by the system producer, Factuarea). Global per `version`, read-only — not per-company.","properties":{"id":{"type":"string","description":"UUID (v7) of the declaration.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a14","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a14"]},"object":{"type":"string","enum":["verifactu_declaracion_responsable"],"example":"verifactu_declaracion_responsable","examples":["verifactu_declaracion_responsable"]},"version":{"type":"string","description":"Version of the declaration (global key).","example":"1.0.0","examples":["1.0.0"]},"system_id":{"type":"string","description":"Identifier of the invoicing software system (SIF).","example":"FACTUAREA-SIF","examples":["FACTUAREA-SIF"]},"system_name":{"type":"string","description":"Name of the invoicing software system.","example":"Factuarea","examples":["Factuarea"]},"producer_tax_id":{"type":"string","description":"NIF del productor del SIF.","example":"B12345678","examples":["B12345678"]},"producer_name":{"type":"string","description":"Nombre del productor del SIF.","example":"Factuarea SL","examples":["Factuarea SL"]},"verifactu_only":{"type":"boolean","description":"Indicates whether the system operates only in VeriFactu mode (tipo_uso = \"S\").","example":true,"examples":[true]},"multi_ot":{"type":"boolean","description":"Indicator of multiple taxpayers.","example":false,"examples":[false]},"declared_at":{"type":"string","format":"date-time","description":"Date of the declaration.","example":"2026-01-01T00:00:00+01:00","examples":["2026-01-01T00:00:00+01:00"]},"signing_place":{"type":"string","description":"Place where the declaration is signed.","example":"Madrid","examples":["Madrid"]},"content_hash":{"type":"string","description":"SHA-256 hash of the declaration content for integrity verification (the full content is not exposed).","example":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","examples":["e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"]},"created_at":{"type":"string","format":"date-time","example":"2026-01-01T00:00:00+01:00","examples":["2026-01-01T00:00:00+01:00"]}},"required":["id","object","version","system_id","system_name","producer_tax_id","producer_name","verifactu_only","multi_ot","declared_at","signing_place","content_hash","created_at"],"title":"DeclaracionResponsable"},"DeliveryNote":{"type":"object","description":"A delivery note tracking goods delivered to a customer.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06"]},"object":{"type":"string","enum":["delivery_note"],"example":"delivery_note","examples":["delivery_note"]},"number":{"type":"string","example":"A-2026-00031","examples":["A-2026-00031"]},"series":{"$ref":"#/components/schemas/SeriesRef"},"client":{"$ref":"#/components/schemas/ClientRef"},"status":{"type":"string","enum":["draft","sent","signed","invoiced","cancelled"],"example":"signed","description":"Delivery note lifecycle status exposed by the public API: `draft` (created, editable), `sent` (goods marked as delivered, no signature recorded yet), `signed` (delivered AND a recipient signature has been recorded), `invoiced` (converted into an invoice, terminal), `cancelled` (terminal). Note: the internal `delivered` state is surfaced as `sent` (without signature) or `signed` (with signature) — there is no `delivered` value in the public API. Recording a signature on a `sent` note moves it to `signed` (it does not introduce a brand-new lifecycle stage; the signature presence is the only difference).","examples":["signed"]},"issued_on":{"type":["string","null"],"format":"date","example":"2026-01-19","examples":["2026-01-19"]},"delivery_date":{"type":["string","null"],"format":"date","example":"2026-01-21","examples":["2026-01-21"]},"signed_at":{"type":["string","null"],"format":"date-time","example":"2026-01-21T14:50:00Z","examples":["2026-01-21T14:50:00Z"]},"signed_by":{"type":["string","null"],"example":"María García López","examples":["María García López"]},"signature_image_url":{"type":["string","null"],"format":"uri","example":"https://files.factuarea.com/signatures/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06.png","examples":["https://files.factuarea.com/signatures/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a06.png"]},"vehicle_plate":{"type":["string","null"],"description":"License plate of the delivery vehicle.","example":"5678JKL","examples":["5678JKL"]},"driver":{"type":["object","null"],"properties":{"name":{"type":["string","null"],"description":"Nombre del conductor."},"tax_id":{"type":["string","null"],"description":"Identificador fiscal (NIF/CIF/NIE) del conductor."}},"required":["name","tax_id"],"description":"Delivery driver data. `null` when no sub-field is provided.","example":{"name":"Pedro Sánchez Ruiz","tax_id":"12345678Z"},"examples":[{"name":"Pedro Sánchez Ruiz","tax_id":"12345678Z"}]},"tracking":{"type":["object","null"],"properties":{"number":{"type":["string","null"],"description":"Shipment tracking number."},"carrier":{"type":["string","null"],"description":"Transport / courier company."}},"required":["number","carrier"],"description":"Shipment tracking data. `null` when no sub-field is provided.","example":{"number":"TRK-2026-0099","carrier":"SEUR"},"examples":[{"number":"TRK-2026-0099","carrier":"SEUR"}]},"received_by":{"type":["object","null"],"properties":{"name":{"type":["string","null"],"description":"Name of the person who received the goods."},"tax_id":{"type":["string","null"],"description":"Identificador fiscal (NIF/CIF/NIE) del receptor."}},"required":["name","tax_id"],"description":"Goods recipient data. `null` when no sub-field is provided.","example":{"name":"María García López","tax_id":"87654321X"},"examples":[{"name":"María García López","tax_id":"87654321X"}]},"billing_emails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":5,"description":"Additional emails for delivery note dispatch (administration, accounting). Maximum 5. Empty `[]` when there are none.","example":["administracion@cliente.com"],"examples":[["administracion@cliente.com"]]},"subtotal":{"type":"number","example":800,"examples":[800]},"taxes_total":{"type":"number","example":168,"examples":[168]},"total":{"type":"number","example":968,"examples":[968]},"currency":{"type":"string","example":"EUR","examples":["EUR"]},"notes":{"type":["string","null"],"example":"Entregado en almacén central.","examples":["Entregado en almacén central."]},"external_id":{"type":["string","null"],"maxLength":100,"description":"External integration key (ERP/CRM/e-commerce) mapping this document to a record in a third-party system. Free-format, unique per company, filterable via `?external_id=`. `null` when not set. Persistent synchronization key, independent of the request-level `Idempotency-Key`.","example":"ERP-ALB-2026-0031","examples":["ERP-ALB-2026-0031"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/DeliveryNoteLine"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":30,"description":"Free classification tags (lowercase slugs `[a-z0-9-]`, ≤ 40 chars each, ≤ 30 tags). Filterable via `?tags[in]=tag1,tag2` (JSON_CONTAINS, OR semantics). Empty `[]` when there are none.","example":["logistica","almacen-central"],"examples":[["logistica","almacen-central"]]},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"},"maxItems":50,"description":"Ordered list of typed custom fields `[{field, value}]` (≤ 50). Distinct from `metadata` (a free key→value map): use `custom_fields` for structured, display-oriented integration metadata. Empty `[]` when there are none.","example":[{"field":"muelle_carga","value":"Muelle 3"}],"examples":[[{"field":"muelle_carga","value":"Muelle 3"}]]},"converted_to_id":{"type":["string","null"],"description":"UUID (v7) of the invoice this delivery note was converted into.","example":null,"examples":[null]},"created_at":{"type":["string","null"],"format":"date-time","example":"2026-01-19T08:00:00Z","examples":["2026-01-19T08:00:00Z"]},"updated_at":{"type":["string","null"],"format":"date-time","example":"2026-01-21T14:50:00Z","examples":["2026-01-21T14:50:00Z"]}},"required":["id","object","number","series","client","status","issued_on","delivery_date","signed_at","signed_by","signature_image_url","vehicle_plate","driver","tracking","received_by","billing_emails","subtotal","taxes_total","total","currency","notes","external_id","lines","metadata","tags","custom_fields","converted_to_id","created_at","updated_at"],"title":"DeliveryNote"},"DeliveryNoteLine":{"type":"object","description":"A line item on a delivery note.","properties":{"object":{"type":"string","enum":["delivery_note_line"]},"description":{"type":["string","null"],"example":"Cajas de material A4 (500u)","examples":["Cajas de material A4 (500u)"]},"product":{"anyOf":[{"$ref":"#/components/schemas/ProductRef"},{"type":"null"}]},"quantity":{"type":"number","example":2,"examples":[2]},"unit_price":{"type":"number","example":400,"examples":[400]},"tax_rate":{"type":"number","example":21,"examples":[21]},"retention_rate":{"type":"number","description":"IRPF withholding percentage applied to the line (0–100). Default 0. Its amount is already aggregated into `taxes`.","example":0,"examples":[0]},"surcharge_rate":{"type":"number","description":"Equivalence surcharge (recargo de equivalencia) percentage applied to the line (0–100). Default 0. Its amount is already aggregated into `taxes`.","example":0,"examples":[0]},"discount_percent":{"type":"number","example":0,"examples":[0]},"subtotal":{"type":"number","example":800,"examples":[800]},"taxes":{"type":"number","example":168,"examples":[168]},"total":{"type":"number","example":968,"examples":[968]}},"required":["object","description","product","quantity","unit_price","tax_rate","retention_rate","surcharge_rate","discount_percent","subtotal","taxes","total"],"title":"DeliveryNoteLine"},"DeliveryNoteStats":{"type":"object","description":"Resumen agregado de los albaranes de la empresa autenticada: total, importe acumulado, desglose por estado interno, pendientes de firma y convertidos a factura este mes. Devuelto por `GET /v1/delivery_notes/stats`.","properties":{"total_count":{"type":"integer","description":"Total number of recorded delivery notes.","example":87,"examples":[87]},"total_amount":{"type":"number","description":"Importe acumulado de los albaranes (EUR).","example":64210.5,"examples":[64210.5]},"by_status":{"type":"object","description":"Breakdown by internal delivery note state. The key is the internal state (`draft`, `delivered`, `invoiced`, `cancelled`); the value is an object with `status`, `count` and `total` (accumulated amount in EUR). States with no delivery notes do not appear.","additionalProperties":{"type":"object","properties":{"status":{"type":"string","description":"Internal state of the delivery note."},"count":{"type":"integer","description":"Number of delivery notes in that state."},"total":{"type":"number","description":"Importe acumulado de los albaranes en ese estado (EUR)."}},"required":["status","count","total"]},"example":{"draft":{"status":"draft","count":12,"total":8400},"delivered":{"status":"delivered","count":58,"total":41250.5},"invoiced":{"status":"invoiced","count":14,"total":13560},"cancelled":{"status":"cancelled","count":3,"total":1000}},"examples":[{"draft":{"status":"draft","count":12,"total":8400},"delivered":{"status":"delivered","count":58,"total":41250.5},"invoiced":{"status":"invoiced","count":14,"total":13560},"cancelled":{"status":"cancelled","count":3,"total":1000}}]},"pending_signature":{"type":"integer","description":"Delivered delivery notes (`delivered`) that do not yet have a recorded signature.","example":21,"examples":[21]},"converted_this_month":{"type":"integer","description":"Albaranes convertidos a factura (`invoiced`) durante el mes en curso.","example":6,"examples":[6]}},"required":["total_count","total_amount","by_status","pending_signature","converted_this_month"],"title":"DeliveryNoteStats"},"DeliveryNoteStatusItem":{"type":"object","description":"Delivery note status from the closed catalog with its label and color for UI.","properties":{"value":{"type":"string","enum":["draft","delivered","invoiced","cancelled"],"example":"delivered","description":"Identificador interno del estado."},"label":{"type":"string","example":"Entregado","description":"Human-readable status label (Spanish)."},"color":{"type":"string","example":"green","description":"Color sugerido para pintar el estado en UI."}},"required":["value","label","color"],"title":"DeliveryNoteStatusItem"},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","description":"Machine-readable category of the error.","enum":["api_error","authentication_error","authorization_error","conflict_error","idempotency_error","invalid_request_error","not_found_error","permission_error","rate_limit_error","service_unavailable_error"],"example":"authentication_error","examples":["authentication_error"]},"code":{"type":"string","description":"Stable error code, e.g. missing_api_key, insufficient_scope, parameter_invalid, invalid_status_transition.","example":"missing_api_key","examples":["missing_api_key"]},"subcode":{"type":["string","null"],"description":"Sub-code detailing the subtype within `code`. Only present on some 409 errors — e.g. `code=resource_already_exists`, `subcode=tax_id_already_exists` to indicate exactly which duplicate key triggered the conflict.","example":"tax_id_already_exists","examples":["tax_id_already_exists"]},"message":{"type":"string","description":"Human-readable description in Spanish.","example":"No se ha proporcionado una API key válida en el header Authorization.","examples":["No se ha proporcionado una API key válida en el header Authorization."]},"param":{"type":["string","null"],"description":"Field that caused the error (for parameter_invalid and similar invalid_request_error codes)."},"doc_url":{"type":["string","null"],"format":"uri","description":"Link to error reference in docs.","example":"https://docs.factuarea.com/guides/errors#missing_api_key","examples":["https://docs.factuarea.com/guides/errors#missing_api_key"]},"request_id":{"type":["string","null"],"description":"Request ID for support/debugging.","example":"req_01HKQS5N8VR7QXJ9K3T6BWPMZA","examples":["req_01HKQS5N8VR7QXJ9K3T6BWPMZA"]}},"required":["type","code","message"]}},"required":["error"],"title":"Error"},"Event":{"type":"object","description":"A read-only record of something that happened in your account. The same object is delivered to your webhook endpoints.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event, a UUID v7 (e.g. `01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a9b`). Consistent with the `id` field of every other v1 resource.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0d","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0d"]},"object":{"type":"string","enum":["event"],"description":"Always `event`.","example":"event","examples":["event"]},"type":{"type":"string","description":"Event type in `<category>.<action>` form (e.g. `invoice.paid`, `quote.approved`). See `GET /event-catalog` for the full list.","example":"invoice.paid","examples":["invoice.paid"]},"aggregate_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 of the resource that produced this event (e.g. the invoice for `invoice.paid`). `null` for events without backfill. Distinct from `id`, which identifies the event itself.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42"]},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context (e.g. born from scheduler sweeps). The key is always present.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a99","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a99"]},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed.","example":"2026-05-22","examples":["2026-05-22"]},"livemode":{"type":"boolean","description":"`true` for events generated in production (live keys, `fact_live_`); `false` for events generated in test mode (sandbox company, test keys `fact_test_`).","example":true,"examples":[true]},"data":{"$ref":"#/components/schemas/EventData"},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created.","example":1774002600,"examples":[1774002600]}},"required":["id","object","type","aggregate_id","correlation_id","api_version","livemode","data","created"],"title":"Event"},"EventData":{"description":"The payload embedded when the event was emitted, discriminated by `type`. Carries the full snapshot of the affected resource under `object` — identical to `GET /v1/<resource>/{id}` at emission time — plus event-specific keys, e.g. `{ \"type\": \"invoice.paid\", \"object\": { ...invoice... }, \"amount\": 1210.0 }`. The snapshot is frozen: later changes to the resource do not rewrite past events.","oneOf":[{"$ref":"#/components/schemas/EventDataInvoiceCreated"},{"$ref":"#/components/schemas/EventDataInvoiceUpdated"},{"$ref":"#/components/schemas/EventDataInvoiceSent"},{"$ref":"#/components/schemas/EventDataInvoicePaid"},{"$ref":"#/components/schemas/EventDataInvoiceCancelled"},{"$ref":"#/components/schemas/EventDataInvoiceAnnulled"},{"$ref":"#/components/schemas/EventDataInvoiceOverdue"},{"$ref":"#/components/schemas/EventDataInvoiceDeleted"},{"$ref":"#/components/schemas/EventDataInvoiceNumberAssigned"},{"$ref":"#/components/schemas/EventDataInvoiceRectified"},{"$ref":"#/components/schemas/EventDataInvoiceEmailSent"},{"$ref":"#/components/schemas/EventDataInvoiceEmailFailed"},{"$ref":"#/components/schemas/EventDataInvoicePaymentReminderSent"},{"$ref":"#/components/schemas/EventDataInvoiceSimplifiedCreated"},{"$ref":"#/components/schemas/EventDataInvoiceSimplifiedSubstituted"},{"$ref":"#/components/schemas/EventDataInvoiceSubstitutedByComplete"},{"$ref":"#/components/schemas/EventDataInvoiceVerifactuSubmitted"},{"$ref":"#/components/schemas/EventDataInvoiceVerifactuFailed"},{"$ref":"#/components/schemas/EventDataInvoiceMetadataChanged"},{"$ref":"#/components/schemas/EventDataQuoteCreated"},{"$ref":"#/components/schemas/EventDataQuoteUpdated"},{"$ref":"#/components/schemas/EventDataQuoteDeleted"},{"$ref":"#/components/schemas/EventDataQuoteApproved"},{"$ref":"#/components/schemas/EventDataQuoteRejected"},{"$ref":"#/components/schemas/EventDataQuoteConverted"},{"$ref":"#/components/schemas/EventDataQuoteExpired"},{"$ref":"#/components/schemas/EventDataQuoteMarkedAsPending"},{"$ref":"#/components/schemas/EventDataQuoteCancelled"},{"$ref":"#/components/schemas/EventDataQuoteNumberAssigned"},{"$ref":"#/components/schemas/EventDataQuoteMetadataChanged"},{"$ref":"#/components/schemas/EventDataQuoteEmailSent"},{"$ref":"#/components/schemas/EventDataQuoteEmailFailed"},{"$ref":"#/components/schemas/EventDataProformaCreated"},{"$ref":"#/components/schemas/EventDataProformaUpdated"},{"$ref":"#/components/schemas/EventDataProformaDeleted"},{"$ref":"#/components/schemas/EventDataProformaAccepted"},{"$ref":"#/components/schemas/EventDataProformaRejected"},{"$ref":"#/components/schemas/EventDataProformaCancelled"},{"$ref":"#/components/schemas/EventDataProformaExpired"},{"$ref":"#/components/schemas/EventDataProformaConvertedToInvoice"},{"$ref":"#/components/schemas/EventDataProformaNumberAssigned"},{"$ref":"#/components/schemas/EventDataProformaMetadataChanged"},{"$ref":"#/components/schemas/EventDataProformaEmailSent"},{"$ref":"#/components/schemas/EventDataProformaEmailFailed"},{"$ref":"#/components/schemas/EventDataDeliveryNoteCreated"},{"$ref":"#/components/schemas/EventDataDeliveryNoteUpdated"},{"$ref":"#/components/schemas/EventDataDeliveryNoteStatusChanged"},{"$ref":"#/components/schemas/EventDataDeliveryNoteSigned"},{"$ref":"#/components/schemas/EventDataDeliveryNoteConverted"},{"$ref":"#/components/schemas/EventDataDeliveryNoteEmailSent"},{"$ref":"#/components/schemas/EventDataDeliveryNoteEmailFailed"},{"$ref":"#/components/schemas/EventDataPurchaseInvoiceCreated"},{"$ref":"#/components/schemas/EventDataPurchaseInvoiceUpdated"},{"$ref":"#/components/schemas/EventDataPurchaseInvoicePaid"},{"$ref":"#/components/schemas/EventDataPurchaseInvoiceCancelled"},{"$ref":"#/components/schemas/EventDataPurchaseInvoiceMetadataChanged"},{"$ref":"#/components/schemas/EventDataPurchaseInvoicePaymentRegistered"},{"$ref":"#/components/schemas/EventDataRecurringInvoiceCreated"},{"$ref":"#/components/schemas/EventDataRecurringInvoiceActivated"},{"$ref":"#/components/schemas/EventDataRecurringInvoicePaused"},{"$ref":"#/components/schemas/EventDataRecurringInvoiceUpdated"},{"$ref":"#/components/schemas/EventDataRecurringInvoiceDeleted"},{"$ref":"#/components/schemas/EventDataRecurringInvoiceCompleted"},{"$ref":"#/components/schemas/EventDataRecurringInvoiceExecuted"},{"$ref":"#/components/schemas/EventDataRecurringInvoiceFailed"},{"$ref":"#/components/schemas/EventDataRecurringInvoiceMetadataChanged"},{"$ref":"#/components/schemas/EventDataRecurringInvoiceCancelled"},{"$ref":"#/components/schemas/EventDataClientCreated"},{"$ref":"#/components/schemas/EventDataClientUpdated"},{"$ref":"#/components/schemas/EventDataClientDeleted"},{"$ref":"#/components/schemas/EventDataClientMetadataChanged"},{"$ref":"#/components/schemas/EventDataProductCreated"},{"$ref":"#/components/schemas/EventDataProductUpdated"},{"$ref":"#/components/schemas/EventDataPaymentReceived"},{"$ref":"#/components/schemas/EventDataTaxMetadataChanged"},{"$ref":"#/components/schemas/EventDataTaxValidityChanged"},{"$ref":"#/components/schemas/EventDataTaxExternalReferenceChanged"},{"$ref":"#/components/schemas/EventDataSeriesCreated"},{"$ref":"#/components/schemas/EventDataSeriesUpdated"},{"$ref":"#/components/schemas/EventDataSeriesDeleted"},{"$ref":"#/components/schemas/EventDataSeriesArchived"},{"$ref":"#/components/schemas/EventDataSeriesUnarchived"},{"$ref":"#/components/schemas/EventDataSeriesMarkedAsDefault"},{"$ref":"#/components/schemas/EventDataSeriesDemotedFromDefault"},{"$ref":"#/components/schemas/EventDataSeriesYearReset"},{"$ref":"#/components/schemas/EventDataSeriesNumberConsumed"},{"$ref":"#/components/schemas/EventDataFacturaeFaceSubmitted"},{"$ref":"#/components/schemas/EventDataFacturaeFaceStatusChanged"},{"$ref":"#/components/schemas/EventDataFacturaeFaceCancellationRequested"}],"discriminator":{"propertyName":"type","mapping":{"invoice.created":"#/components/schemas/EventDataInvoiceCreated","invoice.updated":"#/components/schemas/EventDataInvoiceUpdated","invoice.sent":"#/components/schemas/EventDataInvoiceSent","invoice.paid":"#/components/schemas/EventDataInvoicePaid","invoice.cancelled":"#/components/schemas/EventDataInvoiceCancelled","invoice.annulled":"#/components/schemas/EventDataInvoiceAnnulled","invoice.overdue":"#/components/schemas/EventDataInvoiceOverdue","invoice.deleted":"#/components/schemas/EventDataInvoiceDeleted","invoice.number_assigned":"#/components/schemas/EventDataInvoiceNumberAssigned","invoice.rectified":"#/components/schemas/EventDataInvoiceRectified","invoice.email_sent":"#/components/schemas/EventDataInvoiceEmailSent","invoice.email_failed":"#/components/schemas/EventDataInvoiceEmailFailed","invoice.payment_reminder_sent":"#/components/schemas/EventDataInvoicePaymentReminderSent","invoice.simplified_created":"#/components/schemas/EventDataInvoiceSimplifiedCreated","invoice.simplified_substituted":"#/components/schemas/EventDataInvoiceSimplifiedSubstituted","invoice.substituted_by_complete":"#/components/schemas/EventDataInvoiceSubstitutedByComplete","invoice.verifactu_submitted":"#/components/schemas/EventDataInvoiceVerifactuSubmitted","invoice.verifactu_failed":"#/components/schemas/EventDataInvoiceVerifactuFailed","invoice.metadata_changed":"#/components/schemas/EventDataInvoiceMetadataChanged","quote.created":"#/components/schemas/EventDataQuoteCreated","quote.updated":"#/components/schemas/EventDataQuoteUpdated","quote.deleted":"#/components/schemas/EventDataQuoteDeleted","quote.approved":"#/components/schemas/EventDataQuoteApproved","quote.rejected":"#/components/schemas/EventDataQuoteRejected","quote.converted":"#/components/schemas/EventDataQuoteConverted","quote.expired":"#/components/schemas/EventDataQuoteExpired","quote.marked_as_pending":"#/components/schemas/EventDataQuoteMarkedAsPending","quote.cancelled":"#/components/schemas/EventDataQuoteCancelled","quote.number_assigned":"#/components/schemas/EventDataQuoteNumberAssigned","quote.metadata_changed":"#/components/schemas/EventDataQuoteMetadataChanged","quote.email_sent":"#/components/schemas/EventDataQuoteEmailSent","quote.email_failed":"#/components/schemas/EventDataQuoteEmailFailed","proforma.created":"#/components/schemas/EventDataProformaCreated","proforma.updated":"#/components/schemas/EventDataProformaUpdated","proforma.deleted":"#/components/schemas/EventDataProformaDeleted","proforma.accepted":"#/components/schemas/EventDataProformaAccepted","proforma.rejected":"#/components/schemas/EventDataProformaRejected","proforma.cancelled":"#/components/schemas/EventDataProformaCancelled","proforma.expired":"#/components/schemas/EventDataProformaExpired","proforma.converted_to_invoice":"#/components/schemas/EventDataProformaConvertedToInvoice","proforma.number_assigned":"#/components/schemas/EventDataProformaNumberAssigned","proforma.metadata_changed":"#/components/schemas/EventDataProformaMetadataChanged","proforma.email_sent":"#/components/schemas/EventDataProformaEmailSent","proforma.email_failed":"#/components/schemas/EventDataProformaEmailFailed","delivery_note.created":"#/components/schemas/EventDataDeliveryNoteCreated","delivery_note.updated":"#/components/schemas/EventDataDeliveryNoteUpdated","delivery_note.status_changed":"#/components/schemas/EventDataDeliveryNoteStatusChanged","delivery_note.signed":"#/components/schemas/EventDataDeliveryNoteSigned","delivery_note.converted":"#/components/schemas/EventDataDeliveryNoteConverted","delivery_note.email_sent":"#/components/schemas/EventDataDeliveryNoteEmailSent","delivery_note.email_failed":"#/components/schemas/EventDataDeliveryNoteEmailFailed","purchase_invoice.created":"#/components/schemas/EventDataPurchaseInvoiceCreated","purchase_invoice.updated":"#/components/schemas/EventDataPurchaseInvoiceUpdated","purchase_invoice.paid":"#/components/schemas/EventDataPurchaseInvoicePaid","purchase_invoice.cancelled":"#/components/schemas/EventDataPurchaseInvoiceCancelled","purchase_invoice.metadata_changed":"#/components/schemas/EventDataPurchaseInvoiceMetadataChanged","purchase_invoice.payment_registered":"#/components/schemas/EventDataPurchaseInvoicePaymentRegistered","recurring_invoice.created":"#/components/schemas/EventDataRecurringInvoiceCreated","recurring_invoice.activated":"#/components/schemas/EventDataRecurringInvoiceActivated","recurring_invoice.paused":"#/components/schemas/EventDataRecurringInvoicePaused","recurring_invoice.updated":"#/components/schemas/EventDataRecurringInvoiceUpdated","recurring_invoice.deleted":"#/components/schemas/EventDataRecurringInvoiceDeleted","recurring_invoice.completed":"#/components/schemas/EventDataRecurringInvoiceCompleted","recurring_invoice.executed":"#/components/schemas/EventDataRecurringInvoiceExecuted","recurring_invoice.failed":"#/components/schemas/EventDataRecurringInvoiceFailed","recurring_invoice.metadata_changed":"#/components/schemas/EventDataRecurringInvoiceMetadataChanged","recurring_invoice.cancelled":"#/components/schemas/EventDataRecurringInvoiceCancelled","client.created":"#/components/schemas/EventDataClientCreated","client.updated":"#/components/schemas/EventDataClientUpdated","client.deleted":"#/components/schemas/EventDataClientDeleted","client.metadata_changed":"#/components/schemas/EventDataClientMetadataChanged","product.created":"#/components/schemas/EventDataProductCreated","product.updated":"#/components/schemas/EventDataProductUpdated","payment.received":"#/components/schemas/EventDataPaymentReceived","tax.metadata_changed":"#/components/schemas/EventDataTaxMetadataChanged","tax.validity_changed":"#/components/schemas/EventDataTaxValidityChanged","tax.external_reference_changed":"#/components/schemas/EventDataTaxExternalReferenceChanged","series.created":"#/components/schemas/EventDataSeriesCreated","series.updated":"#/components/schemas/EventDataSeriesUpdated","series.deleted":"#/components/schemas/EventDataSeriesDeleted","series.archived":"#/components/schemas/EventDataSeriesArchived","series.unarchived":"#/components/schemas/EventDataSeriesUnarchived","series.marked_as_default":"#/components/schemas/EventDataSeriesMarkedAsDefault","series.demoted_from_default":"#/components/schemas/EventDataSeriesDemotedFromDefault","series.year_reset":"#/components/schemas/EventDataSeriesYearReset","series.number_consumed":"#/components/schemas/EventDataSeriesNumberConsumed","facturae.face_submitted":"#/components/schemas/EventDataFacturaeFaceSubmitted","facturae.face_status_changed":"#/components/schemas/EventDataFacturaeFaceStatusChanged","facturae.face_cancellation_requested":"#/components/schemas/EventDataFacturaeFaceCancellationRequested"}},"title":"EventData"},"EventDataClientCreated":{"type":"object","description":"Payload (`data`) emitted with the `client.created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"client.created"},"object":{"$ref":"#/components/schemas/Client"}},"required":["type","object"],"title":"EventDataClientCreated"},"EventDataClientDeleted":{"type":"object","description":"Payload (`data`) emitted with the `client.deleted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"client.deleted"},"object":{"oneOf":[{"$ref":"#/components/schemas/Client"},{"$ref":"#/components/schemas/EventDeletedObject"}],"description":"Snapshot of the resource at emission time. When the resource is still recoverable the full snapshot is emitted with an additional `deleted: true` key; otherwise it degrades to `{ id, deleted: true }`."},"name":{"type":["string","null"]}},"required":["type","object","name"],"title":"EventDataClientDeleted"},"EventDataClientMetadataChanged":{"type":"object","description":"Payload (`data`) emitted with the `client.metadata_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"client.metadata_changed"},"object":{"$ref":"#/components/schemas/Client"},"previous_keys":{"type":"array","items":{"type":"string"}},"new_keys":{"type":"array","items":{"type":"string"}}},"required":["type","object","previous_keys","new_keys"],"title":"EventDataClientMetadataChanged"},"EventDataClientUpdated":{"type":"object","description":"Payload (`data`) emitted with the `client.updated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"client.updated"},"object":{"$ref":"#/components/schemas/Client"}},"required":["type","object"],"title":"EventDataClientUpdated"},"EventDataDeliveryNoteConverted":{"type":"object","description":"Payload (`data`) emitted with the `delivery_note.converted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"delivery_note.converted"},"object":{"$ref":"#/components/schemas/DeliveryNote"},"target":{"type":"string","enum":["invoice"]}},"required":["type","object","target"],"title":"EventDataDeliveryNoteConverted"},"EventDataDeliveryNoteCreated":{"type":"object","description":"Payload (`data`) emitted with the `delivery_note.created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"delivery_note.created"},"object":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["type","object"],"title":"EventDataDeliveryNoteCreated"},"EventDataDeliveryNoteEmailFailed":{"type":"object","description":"Payload (`data`) emitted with the `delivery_note.email_failed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"delivery_note.email_failed"},"object":{"$ref":"#/components/schemas/DeliveryNote"},"recipient_email":{"type":["string","null"],"format":"email"},"error_message":{"type":["string","null"]},"error_class":{"type":["string","null"]},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}}},"required":["type","object","recipient_email","error_message","error_class","cc","bcc"],"title":"EventDataDeliveryNoteEmailFailed"},"EventDataDeliveryNoteEmailSent":{"type":"object","description":"Payload (`data`) emitted with the `delivery_note.email_sent` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"delivery_note.email_sent"},"object":{"$ref":"#/components/schemas/DeliveryNote"},"recipient_email":{"type":["string","null"],"format":"email"},"delivery_note_number":{"type":["string","null"]},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}}},"required":["type","object","recipient_email","delivery_note_number","cc","bcc"],"title":"EventDataDeliveryNoteEmailSent"},"EventDataDeliveryNoteSigned":{"type":"object","description":"Payload (`data`) emitted with the `delivery_note.signed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"delivery_note.signed"},"object":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["type","object"],"title":"EventDataDeliveryNoteSigned"},"EventDataDeliveryNoteStatusChanged":{"type":"object","description":"Payload (`data`) emitted with the `delivery_note.status_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"delivery_note.status_changed"},"object":{"$ref":"#/components/schemas/DeliveryNote"},"from_status":{"type":["string","null"]},"to_status":{"type":"string","enum":["delivered"]},"delivery_date":{"type":["string","null"],"format":"date"}},"required":["type","object","from_status","to_status","delivery_date"],"title":"EventDataDeliveryNoteStatusChanged"},"EventDataDeliveryNoteUpdated":{"type":"object","description":"Payload (`data`) emitted with the `delivery_note.updated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"delivery_note.updated"},"object":{"$ref":"#/components/schemas/DeliveryNote"}},"required":["type","object"],"title":"EventDataDeliveryNoteUpdated"},"EventDataFacturaeFaceCancellationRequested":{"type":"object","description":"Payload (`data`) emitted with the `facturae.face_cancellation_requested` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"facturae.face_cancellation_requested"},"object":{"$ref":"#/components/schemas/Invoice"},"face_submission_id":{"type":["string","null"],"format":"uuid"},"reason":{"type":"string"}},"required":["type","object","face_submission_id","reason"],"title":"EventDataFacturaeFaceCancellationRequested"},"EventDataFacturaeFaceStatusChanged":{"type":"object","description":"Payload (`data`) emitted with the `facturae.face_status_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"facturae.face_status_changed"},"object":{"$ref":"#/components/schemas/Invoice"},"face_submission_id":{"type":["string","null"],"format":"uuid"},"from_status":{"type":"string"},"to_status":{"type":"string"}},"required":["type","object","face_submission_id","from_status","to_status"],"title":"EventDataFacturaeFaceStatusChanged"},"EventDataFacturaeFaceSubmitted":{"type":"object","description":"Payload (`data`) emitted with the `facturae.face_submitted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"facturae.face_submitted"},"object":{"$ref":"#/components/schemas/Invoice"},"face_submission_id":{"type":["string","null"],"format":"uuid"},"face_registry_number":{"type":"string"}},"required":["type","object","face_submission_id","face_registry_number"],"title":"EventDataFacturaeFaceSubmitted"},"EventDataInvoiceAnnulled":{"type":"object","description":"Payload (`data`) emitted with the `invoice.annulled` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.annulled"},"object":{"$ref":"#/components/schemas/Invoice"},"annulled_at":{"type":["string","null"],"format":"date-time"},"reason":{"type":["string","null"]}},"required":["type","object","annulled_at","reason"],"title":"EventDataInvoiceAnnulled"},"EventDataInvoiceCancelled":{"type":"object","description":"Payload (`data`) emitted with the `invoice.cancelled` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.cancelled"},"object":{"$ref":"#/components/schemas/Invoice"},"cancelled_at":{"type":["string","null"],"format":"date-time"}},"required":["type","object","cancelled_at"],"title":"EventDataInvoiceCancelled"},"EventDataInvoiceCreated":{"type":"object","description":"Payload (`data`) emitted with the `invoice.created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.created"},"object":{"$ref":"#/components/schemas/Invoice"}},"required":["type","object"],"title":"EventDataInvoiceCreated"},"EventDataInvoiceDeleted":{"type":"object","description":"Payload (`data`) emitted with the `invoice.deleted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.deleted"},"object":{"oneOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/EventDeletedObject"}],"description":"Snapshot of the resource at emission time. When the resource is still recoverable the full snapshot is emitted with an additional `deleted: true` key; otherwise it degrades to `{ id, deleted: true }`."}},"required":["type","object"],"title":"EventDataInvoiceDeleted"},"EventDataInvoiceEmailFailed":{"type":"object","description":"Payload (`data`) emitted with the `invoice.email_failed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.email_failed"},"object":{"$ref":"#/components/schemas/Invoice"},"recipient_email":{"type":["string","null"],"format":"email"},"error_message":{"type":["string","null"]},"error_class":{"type":["string","null"]},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}}},"required":["type","object","recipient_email","error_message","error_class","cc","bcc"],"title":"EventDataInvoiceEmailFailed"},"EventDataInvoiceEmailSent":{"type":"object","description":"Payload (`data`) emitted with the `invoice.email_sent` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.email_sent"},"object":{"$ref":"#/components/schemas/Invoice"},"recipient_email":{"type":["string","null"],"format":"email"},"invoice_number":{"type":["string","null"]},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}}},"required":["type","object","recipient_email","invoice_number","cc","bcc"],"title":"EventDataInvoiceEmailSent"},"EventDataInvoiceMetadataChanged":{"type":"object","description":"Payload (`data`) emitted with the `invoice.metadata_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.metadata_changed"},"object":{"$ref":"#/components/schemas/Invoice"},"previous_keys":{"type":"array","items":{"type":"string"}},"new_keys":{"type":"array","items":{"type":"string"}}},"required":["type","object","previous_keys","new_keys"],"title":"EventDataInvoiceMetadataChanged"},"EventDataInvoiceNumberAssigned":{"type":"object","description":"Payload (`data`) emitted with the `invoice.number_assigned` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.number_assigned"},"object":{"$ref":"#/components/schemas/Invoice"},"previous_number":{"type":["string","null"]},"new_number":{"type":["string","null"]}},"required":["type","object","previous_number","new_number"],"title":"EventDataInvoiceNumberAssigned"},"EventDataInvoiceOverdue":{"type":"object","description":"Payload (`data`) emitted with the `invoice.overdue` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.overdue"},"object":{"$ref":"#/components/schemas/Invoice"},"due_date":{"type":["string","null"],"format":"date"},"days_overdue":{"type":"integer"}},"required":["type","object","due_date","days_overdue"],"title":"EventDataInvoiceOverdue"},"EventDataInvoicePaid":{"type":"object","description":"Payload (`data`) emitted with the `invoice.paid` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.paid"},"object":{"$ref":"#/components/schemas/Invoice"},"amount":{"type":"number","format":"float"},"payment_date":{"type":["string","null"],"format":"date"},"payment_method":{"type":["string","null"]},"payment_reference":{"type":["string","null"]}},"required":["type","object","amount","payment_date","payment_method","payment_reference"],"title":"EventDataInvoicePaid"},"EventDataInvoicePaymentReminderSent":{"type":"object","description":"Payload (`data`) emitted with the `invoice.payment_reminder_sent` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.payment_reminder_sent"},"object":{"$ref":"#/components/schemas/Invoice"},"recipient_email":{"type":["string","null"],"format":"email"},"invoice_number":{"type":["string","null"]}},"required":["type","object","recipient_email","invoice_number"],"title":"EventDataInvoicePaymentReminderSent"},"EventDataInvoiceRectified":{"type":"object","description":"Payload (`data`) emitted with the `invoice.rectified` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.rectified"},"object":{"$ref":"#/components/schemas/Invoice"},"corrective_invoice_id":{"type":["string","null"],"format":"uuid"},"corrective_invoice_number":{"type":["string","null"]}},"required":["type","object","corrective_invoice_id","corrective_invoice_number"],"title":"EventDataInvoiceRectified"},"EventDataInvoiceSent":{"type":"object","description":"Payload (`data`) emitted with the `invoice.sent` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.sent"},"object":{"$ref":"#/components/schemas/Invoice"}},"required":["type","object"],"title":"EventDataInvoiceSent"},"EventDataInvoiceSimplifiedCreated":{"type":"object","description":"Payload (`data`) emitted with the `invoice.simplified_created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.simplified_created"},"object":{"$ref":"#/components/schemas/Invoice"},"invoice_number":{"type":["string","null"]}},"required":["type","object","invoice_number"],"title":"EventDataInvoiceSimplifiedCreated"},"EventDataInvoiceSimplifiedSubstituted":{"type":"object","description":"Payload (`data`) emitted with the `invoice.simplified_substituted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.simplified_substituted"},"object":{"$ref":"#/components/schemas/Invoice"},"substituted_invoice_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["type","object","substituted_invoice_ids"],"title":"EventDataInvoiceSimplifiedSubstituted"},"EventDataInvoiceSubstitutedByComplete":{"type":"object","description":"Payload (`data`) emitted with the `invoice.substituted_by_complete` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.substituted_by_complete"},"object":{"$ref":"#/components/schemas/Invoice"},"substitute_invoice_id":{"type":["string","null"],"format":"uuid"},"substitute_invoice_number":{"type":["string","null"]}},"required":["type","object","substitute_invoice_id","substitute_invoice_number"],"title":"EventDataInvoiceSubstitutedByComplete"},"EventDataInvoiceUpdated":{"type":"object","description":"Payload (`data`) emitted with the `invoice.updated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.updated"},"object":{"$ref":"#/components/schemas/Invoice"}},"required":["type","object"],"title":"EventDataInvoiceUpdated"},"EventDataInvoiceVerifactuFailed":{"type":"object","description":"Payload (`data`) emitted with the `invoice.verifactu_failed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.verifactu_failed"},"object":{"$ref":"#/components/schemas/Invoice"},"verifactu_record_id":{"type":["string","null"],"format":"uuid"},"error_code":{"type":["string","null"]},"error_message":{"type":["string","null"]}},"required":["type","object","verifactu_record_id","error_code","error_message"],"title":"EventDataInvoiceVerifactuFailed"},"EventDataInvoiceVerifactuSubmitted":{"type":"object","description":"Payload (`data`) emitted with the `invoice.verifactu_submitted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"invoice.verifactu_submitted"},"object":{"$ref":"#/components/schemas/Invoice"},"verifactu_record_id":{"type":["string","null"],"format":"uuid"},"huella":{"type":["string","null"]}},"required":["type","object","verifactu_record_id","huella"],"title":"EventDataInvoiceVerifactuSubmitted"},"EventDataPaymentReceived":{"type":"object","description":"Payload (`data`) emitted with the `payment.received` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"payment.received"},"object":{"$ref":"#/components/schemas/EventPaymentSnapshot"}},"required":["type","object"],"title":"EventDataPaymentReceived"},"EventDataProductCreated":{"type":"object","description":"Payload (`data`) emitted with the `product.created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"product.created"},"object":{"$ref":"#/components/schemas/Product"}},"required":["type","object"],"title":"EventDataProductCreated"},"EventDataProductUpdated":{"type":"object","description":"Payload (`data`) emitted with the `product.updated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"product.updated"},"object":{"$ref":"#/components/schemas/Product"}},"required":["type","object"],"title":"EventDataProductUpdated"},"EventDataProformaAccepted":{"type":"object","description":"Payload (`data`) emitted with the `proforma.accepted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.accepted"},"object":{"$ref":"#/components/schemas/Proforma"}},"required":["type","object"],"title":"EventDataProformaAccepted"},"EventDataProformaCancelled":{"type":"object","description":"Payload (`data`) emitted with the `proforma.cancelled` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.cancelled"},"object":{"$ref":"#/components/schemas/Proforma"}},"required":["type","object"],"title":"EventDataProformaCancelled"},"EventDataProformaConvertedToInvoice":{"type":"object","description":"Payload (`data`) emitted with the `proforma.converted_to_invoice` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.converted_to_invoice"},"object":{"$ref":"#/components/schemas/Proforma"},"target":{"type":"string","enum":["invoice"]}},"required":["type","object","target"],"title":"EventDataProformaConvertedToInvoice"},"EventDataProformaCreated":{"type":"object","description":"Payload (`data`) emitted with the `proforma.created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.created"},"object":{"$ref":"#/components/schemas/Proforma"}},"required":["type","object"],"title":"EventDataProformaCreated"},"EventDataProformaDeleted":{"type":"object","description":"Payload (`data`) emitted with the `proforma.deleted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.deleted"},"object":{"oneOf":[{"$ref":"#/components/schemas/Proforma"},{"$ref":"#/components/schemas/EventDeletedObject"}],"description":"Snapshot of the resource at emission time. When the resource is still recoverable the full snapshot is emitted with an additional `deleted: true` key; otherwise it degrades to `{ id, deleted: true }`."}},"required":["type","object"],"title":"EventDataProformaDeleted"},"EventDataProformaEmailFailed":{"type":"object","description":"Payload (`data`) emitted with the `proforma.email_failed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.email_failed"},"object":{"$ref":"#/components/schemas/Proforma"},"recipient_email":{"type":["string","null"],"format":"email"},"error_message":{"type":["string","null"]},"error_class":{"type":["string","null"]},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}}},"required":["type","object","recipient_email","error_message","error_class","cc","bcc"],"title":"EventDataProformaEmailFailed"},"EventDataProformaEmailSent":{"type":"object","description":"Payload (`data`) emitted with the `proforma.email_sent` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.email_sent"},"object":{"$ref":"#/components/schemas/Proforma"},"recipient_email":{"type":["string","null"],"format":"email"},"proforma_number":{"type":["string","null"]},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}}},"required":["type","object","recipient_email","proforma_number","cc","bcc"],"title":"EventDataProformaEmailSent"},"EventDataProformaExpired":{"type":"object","description":"Payload (`data`) emitted with the `proforma.expired` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.expired"},"object":{"$ref":"#/components/schemas/Proforma"}},"required":["type","object"],"title":"EventDataProformaExpired"},"EventDataProformaMetadataChanged":{"type":"object","description":"Payload (`data`) emitted with the `proforma.metadata_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.metadata_changed"},"object":{"$ref":"#/components/schemas/Proforma"}},"required":["type","object"],"title":"EventDataProformaMetadataChanged"},"EventDataProformaNumberAssigned":{"type":"object","description":"Payload (`data`) emitted with the `proforma.number_assigned` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.number_assigned"},"object":{"$ref":"#/components/schemas/Proforma"}},"required":["type","object"],"title":"EventDataProformaNumberAssigned"},"EventDataProformaRejected":{"type":"object","description":"Payload (`data`) emitted with the `proforma.rejected` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.rejected"},"object":{"$ref":"#/components/schemas/Proforma"}},"required":["type","object"],"title":"EventDataProformaRejected"},"EventDataProformaUpdated":{"type":"object","description":"Payload (`data`) emitted with the `proforma.updated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"proforma.updated"},"object":{"$ref":"#/components/schemas/Proforma"}},"required":["type","object"],"title":"EventDataProformaUpdated"},"EventDataPurchaseInvoiceCancelled":{"type":"object","description":"Payload (`data`) emitted with the `purchase_invoice.cancelled` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"purchase_invoice.cancelled"},"object":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["type","object"],"title":"EventDataPurchaseInvoiceCancelled"},"EventDataPurchaseInvoiceCreated":{"type":"object","description":"Payload (`data`) emitted with the `purchase_invoice.created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"purchase_invoice.created"},"object":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["type","object"],"title":"EventDataPurchaseInvoiceCreated"},"EventDataPurchaseInvoiceMetadataChanged":{"type":"object","description":"Payload (`data`) emitted with the `purchase_invoice.metadata_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"purchase_invoice.metadata_changed"},"object":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["type","object"],"title":"EventDataPurchaseInvoiceMetadataChanged"},"EventDataPurchaseInvoicePaid":{"type":"object","description":"Payload (`data`) emitted with the `purchase_invoice.paid` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"purchase_invoice.paid"},"object":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["type","object"],"title":"EventDataPurchaseInvoicePaid"},"EventDataPurchaseInvoicePaymentRegistered":{"type":"object","description":"Payload (`data`) emitted with the `purchase_invoice.payment_registered` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"purchase_invoice.payment_registered"},"object":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["type","object"],"title":"EventDataPurchaseInvoicePaymentRegistered"},"EventDataPurchaseInvoiceUpdated":{"type":"object","description":"Payload (`data`) emitted with the `purchase_invoice.updated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"purchase_invoice.updated"},"object":{"$ref":"#/components/schemas/PurchaseInvoice"}},"required":["type","object"],"title":"EventDataPurchaseInvoiceUpdated"},"EventDataQuoteApproved":{"type":"object","description":"Payload (`data`) emitted with the `quote.approved` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.approved"},"object":{"$ref":"#/components/schemas/Quote"}},"required":["type","object"],"title":"EventDataQuoteApproved"},"EventDataQuoteCancelled":{"type":"object","description":"Payload (`data`) emitted with the `quote.cancelled` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.cancelled"},"object":{"$ref":"#/components/schemas/Quote"}},"required":["type","object"],"title":"EventDataQuoteCancelled"},"EventDataQuoteConverted":{"type":"object","description":"Payload (`data`) emitted with the `quote.converted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.converted"},"object":{"$ref":"#/components/schemas/Quote"},"target":{"type":"string","enum":["invoice"]},"target_id":{"type":"string","format":"uuid"}},"required":["type","object","target","target_id"],"title":"EventDataQuoteConverted"},"EventDataQuoteCreated":{"type":"object","description":"Payload (`data`) emitted with the `quote.created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.created"},"object":{"$ref":"#/components/schemas/Quote"}},"required":["type","object"],"title":"EventDataQuoteCreated"},"EventDataQuoteDeleted":{"type":"object","description":"Payload (`data`) emitted with the `quote.deleted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.deleted"},"object":{"oneOf":[{"$ref":"#/components/schemas/Quote"},{"$ref":"#/components/schemas/EventDeletedObject"}],"description":"Snapshot of the resource at emission time. When the resource is still recoverable the full snapshot is emitted with an additional `deleted: true` key; otherwise it degrades to `{ id, deleted: true }`."}},"required":["type","object"],"title":"EventDataQuoteDeleted"},"EventDataQuoteEmailFailed":{"type":"object","description":"Payload (`data`) emitted with the `quote.email_failed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.email_failed"},"object":{"$ref":"#/components/schemas/Quote"},"recipient_email":{"type":["string","null"],"format":"email"},"error_message":{"type":["string","null"]},"error_class":{"type":["string","null"]},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}}},"required":["type","object","recipient_email","error_message","error_class","cc","bcc"],"title":"EventDataQuoteEmailFailed"},"EventDataQuoteEmailSent":{"type":"object","description":"Payload (`data`) emitted with the `quote.email_sent` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.email_sent"},"object":{"$ref":"#/components/schemas/Quote"},"recipient_email":{"type":["string","null"],"format":"email"},"quote_number":{"type":["string","null"]},"cc":{"type":"array","items":{"type":"string","format":"email"}},"bcc":{"type":"array","items":{"type":"string","format":"email"}}},"required":["type","object","recipient_email","quote_number","cc","bcc"],"title":"EventDataQuoteEmailSent"},"EventDataQuoteExpired":{"type":"object","description":"Payload (`data`) emitted with the `quote.expired` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.expired"},"object":{"$ref":"#/components/schemas/Quote"}},"required":["type","object"],"title":"EventDataQuoteExpired"},"EventDataQuoteMarkedAsPending":{"type":"object","description":"Payload (`data`) emitted with the `quote.marked_as_pending` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.marked_as_pending"},"object":{"$ref":"#/components/schemas/Quote"}},"required":["type","object"],"title":"EventDataQuoteMarkedAsPending"},"EventDataQuoteMetadataChanged":{"type":"object","description":"Payload (`data`) emitted with the `quote.metadata_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.metadata_changed"},"object":{"$ref":"#/components/schemas/Quote"}},"required":["type","object"],"title":"EventDataQuoteMetadataChanged"},"EventDataQuoteNumberAssigned":{"type":"object","description":"Payload (`data`) emitted with the `quote.number_assigned` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.number_assigned"},"object":{"$ref":"#/components/schemas/Quote"}},"required":["type","object"],"title":"EventDataQuoteNumberAssigned"},"EventDataQuoteRejected":{"type":"object","description":"Payload (`data`) emitted with the `quote.rejected` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.rejected"},"object":{"$ref":"#/components/schemas/Quote"}},"required":["type","object"],"title":"EventDataQuoteRejected"},"EventDataQuoteUpdated":{"type":"object","description":"Payload (`data`) emitted with the `quote.updated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"quote.updated"},"object":{"$ref":"#/components/schemas/Quote"}},"required":["type","object"],"title":"EventDataQuoteUpdated"},"EventDataRecurringInvoiceActivated":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.activated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.activated"},"object":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["type","object"],"title":"EventDataRecurringInvoiceActivated"},"EventDataRecurringInvoiceCancelled":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.cancelled` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.cancelled"},"object":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["type","object"],"title":"EventDataRecurringInvoiceCancelled"},"EventDataRecurringInvoiceCompleted":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.completed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.completed"},"object":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["type","object"],"title":"EventDataRecurringInvoiceCompleted"},"EventDataRecurringInvoiceCreated":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.created"},"object":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["type","object"],"title":"EventDataRecurringInvoiceCreated"},"EventDataRecurringInvoiceDeleted":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.deleted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.deleted"},"object":{"oneOf":[{"$ref":"#/components/schemas/RecurringInvoice"},{"$ref":"#/components/schemas/EventDeletedObject"}],"description":"Snapshot of the resource at emission time. When the resource is still recoverable the full snapshot is emitted with an additional `deleted: true` key; otherwise it degrades to `{ id, deleted: true }`."}},"required":["type","object"],"title":"EventDataRecurringInvoiceDeleted"},"EventDataRecurringInvoiceExecuted":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.executed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.executed"},"object":{"$ref":"#/components/schemas/RecurringInvoice"},"invoice_id":{"type":"string","format":"uuid"},"invoice_number":{"type":["string","null"]},"occurrence_number":{"type":"integer"},"next_run_date":{"type":["string","null"],"format":"date"}},"required":["type","object","invoice_id","invoice_number","occurrence_number","next_run_date"],"title":"EventDataRecurringInvoiceExecuted"},"EventDataRecurringInvoiceFailed":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.failed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.failed"},"object":{"$ref":"#/components/schemas/RecurringInvoice"},"error_message":{"type":["string","null"]},"attempt_number":{"type":"integer"}},"required":["type","object","error_message","attempt_number"],"title":"EventDataRecurringInvoiceFailed"},"EventDataRecurringInvoiceMetadataChanged":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.metadata_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.metadata_changed"},"object":{"$ref":"#/components/schemas/RecurringInvoice"},"previous_keys":{"type":"array","items":{"type":"string"}},"new_keys":{"type":"array","items":{"type":"string"}}},"required":["type","object","previous_keys","new_keys"],"title":"EventDataRecurringInvoiceMetadataChanged"},"EventDataRecurringInvoicePaused":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.paused` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.paused"},"object":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["type","object"],"title":"EventDataRecurringInvoicePaused"},"EventDataRecurringInvoiceUpdated":{"type":"object","description":"Payload (`data`) emitted with the `recurring_invoice.updated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"recurring_invoice.updated"},"object":{"$ref":"#/components/schemas/RecurringInvoice"}},"required":["type","object"],"title":"EventDataRecurringInvoiceUpdated"},"EventDataSeriesArchived":{"type":"object","description":"Payload (`data`) emitted with the `series.archived` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"series.archived"},"object":{"$ref":"#/components/schemas/Series"}},"required":["type","object"],"title":"EventDataSeriesArchived"},"EventDataSeriesCreated":{"type":"object","description":"Payload (`data`) emitted with the `series.created` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"series.created"},"object":{"$ref":"#/components/schemas/Series"}},"required":["type","object"],"title":"EventDataSeriesCreated"},"EventDataSeriesDeleted":{"type":"object","description":"Payload (`data`) emitted with the `series.deleted` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"series.deleted"},"object":{"oneOf":[{"$ref":"#/components/schemas/Series"},{"$ref":"#/components/schemas/EventDeletedObject"}],"description":"Snapshot of the resource at emission time. When the resource is still recoverable the full snapshot is emitted with an additional `deleted: true` key; otherwise it degrades to `{ id, deleted: true }`."}},"required":["type","object"],"title":"EventDataSeriesDeleted"},"EventDataSeriesDemotedFromDefault":{"type":"object","description":"Payload (`data`) emitted with the `series.demoted_from_default` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"series.demoted_from_default"},"object":{"$ref":"#/components/schemas/Series"}},"required":["type","object"],"title":"EventDataSeriesDemotedFromDefault"},"EventDataSeriesMarkedAsDefault":{"type":"object","description":"Payload (`data`) emitted with the `series.marked_as_default` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"series.marked_as_default"},"object":{"$ref":"#/components/schemas/Series"}},"required":["type","object"],"title":"EventDataSeriesMarkedAsDefault"},"EventDataSeriesNumberConsumed":{"type":"object","description":"Payload (`data`) emitted with the `series.number_consumed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"series.number_consumed"},"object":{"$ref":"#/components/schemas/Series"},"number":{"type":["integer","null"]}},"required":["type","object","number"],"title":"EventDataSeriesNumberConsumed"},"EventDataSeriesUnarchived":{"type":"object","description":"Payload (`data`) emitted with the `series.unarchived` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"series.unarchived"},"object":{"$ref":"#/components/schemas/Series"}},"required":["type","object"],"title":"EventDataSeriesUnarchived"},"EventDataSeriesUpdated":{"type":"object","description":"Payload (`data`) emitted with the `series.updated` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"series.updated"},"object":{"$ref":"#/components/schemas/Series"}},"required":["type","object"],"title":"EventDataSeriesUpdated"},"EventDataSeriesYearReset":{"type":"object","description":"Payload (`data`) emitted with the `series.year_reset` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"series.year_reset"},"object":{"$ref":"#/components/schemas/Series"},"old_year":{"type":["integer","null"]},"new_year":{"type":["integer","null"]}},"required":["type","object","old_year","new_year"],"title":"EventDataSeriesYearReset"},"EventDataTaxExternalReferenceChanged":{"type":"object","description":"Payload (`data`) emitted with the `tax.external_reference_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"tax.external_reference_changed"},"object":{"$ref":"#/components/schemas/Tax"},"previous_code":{"type":["string","null"]},"new_code":{"type":["string","null"]}},"required":["type","object","previous_code","new_code"],"title":"EventDataTaxExternalReferenceChanged"},"EventDataTaxMetadataChanged":{"type":"object","description":"Payload (`data`) emitted with the `tax.metadata_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"tax.metadata_changed"},"object":{"$ref":"#/components/schemas/Tax"},"previous_keys":{"type":"array","items":{"type":"string"}},"new_keys":{"type":"array","items":{"type":"string"}}},"required":["type","object","previous_keys","new_keys"],"title":"EventDataTaxMetadataChanged"},"EventDataTaxValidityChanged":{"type":"object","description":"Payload (`data`) emitted with the `tax.validity_changed` event: the full resource snapshot captured at emission time under `object`, plus event-specific keys.","properties":{"type":{"type":"string","const":"tax.validity_changed"},"object":{"$ref":"#/components/schemas/Tax"},"previous_valid_from":{"type":["string","null"],"format":"date"},"previous_valid_until":{"type":["string","null"],"format":"date"},"new_valid_from":{"type":["string","null"],"format":"date"},"new_valid_until":{"type":["string","null"],"format":"date"}},"required":["type","object","previous_valid_from","previous_valid_until","new_valid_from","new_valid_until"],"title":"EventDataTaxValidityChanged"},"EventDeletedObject":{"type":"object","description":"Degraded snapshot emitted with `*.deleted` events when the resource could no longer be recovered at emission time.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier (UUID v7) of the deleted resource."},"deleted":{"type":"boolean","const":true,"description":"Always `true`."}},"required":["id","deleted"],"additionalProperties":false,"title":"EventDeletedObject"},"EventPaymentSnapshot":{"type":"object","description":"Snapshot of a received payment captured at emission time. Payments have no dedicated v1 endpoint; this shape only appears inside `payment.*` events.","properties":{"id":{"type":"string","format":"uuid"},"object":{"type":"string","enum":["payment"]},"invoice_id":{"type":"string","format":"uuid","description":"Identifier of the invoice the payment was applied to."},"invoice_number":{"type":["string","null"]},"amount":{"type":"number","format":"float"},"payment_date":{"type":"string","format":"date"},"payment_method":{"type":"string"},"reference":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","object","invoice_id","invoice_number","amount","payment_date","payment_method","reference","created_at"],"title":"EventPaymentSnapshot"},"FaceSubmission":{"type":"object","description":"A submission of an invoice to FACe (the Spanish B2G general entry point). Tracks the FACe registry number and the processing status reported by the FACe web service.","properties":{"id":{"type":"string","description":"UUID (v7) of the FACe submission."},"object":{"type":"string","enum":["face_submission"]},"invoice_id":{"type":"string","description":"UUID (v7) of the submitted invoice."},"status":{"type":"string","description":"FACe processing status (`submitted`, `registered_rcf`, `accounted`, `paid`, `rejected`, `cancellation_requested`, `cancelled`, `error`). Kept up to date by the system polling — there is no refresh endpoint in v1."},"registry_number":{"type":["string","null"],"description":"Registry number assigned by FACe on presentation. Synthetic `FACE-SANDBOX-*` for sandbox (test key) submissions."},"dir3_accounting_office":{"type":"string","description":"DIR3 code of the accounting office (oficina contable, role 01) snapshotted at submission time."},"dir3_managing_body":{"type":"string","description":"DIR3 code of the managing body (órgano gestor, role 02) snapshotted at submission time."},"dir3_processing_unit":{"type":"string","description":"DIR3 code of the processing unit (unidad tramitadora, role 03) snapshotted at submission time."},"error_code":{"type":["string","null"],"description":"Local transmission error code, `null` unless the submission is in `error` state."},"error_message":{"type":["string","null"],"description":"Human-readable transmission error message (in Spanish), `null` unless the submission is in `error` state."},"status_updated_at":{"type":"string","format":"date-time","description":"When the processing status last changed (ISO 8601)."},"last_polled_at":{"type":["string","null"],"format":"date-time","description":"When the system last polled FACe for this submission, or `null` if never polled yet."},"created_at":{"type":"string","format":"date-time"}},"required":["id","object","invoice_id","status","registry_number","dir3_accounting_office","dir3_managing_body","dir3_processing_unit","error_code","error_message","status_updated_at","last_polled_at","created_at"],"title":"FaceSubmission"},"FindClientByExternalIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/clients/find-by-external-id.\n\nBusca un cliente por su `external_id` (clave de integración ERP/CRM) dentro\nde la company autenticada.","properties":{"external_id":{"type":"string","maxLength":100}},"required":["external_id"],"title":"FindClientByExternalIdRequest"},"FindClientByTaxIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/clients/find-by-tax-id.\n\nBusca un cliente por su identificador fiscal (NIF/CIF/NIE) dentro de la\ncompany autenticada.","properties":{"tax_id":{"type":"string","maxLength":50}},"required":["tax_id"],"title":"FindClientByTaxIdRequest"},"FindDeliveryNoteByExternalIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/delivery_notes/find-by-external-id.\n\nBusca un albarán por su `external_id` (clave de integración ERP/CRM)\ndentro de la company autenticada.","properties":{"external_id":{"type":"string","maxLength":100}},"required":["external_id"],"title":"FindDeliveryNoteByExternalIdRequest"},"FindInvoiceByExternalIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/find-by-external-id.\n\nBusca una factura por su `external_id` (clave de integración ERP/CRM) dentro\nde la company autenticada.","properties":{"external_id":{"type":"string","maxLength":100}},"required":["external_id"],"title":"FindInvoiceByExternalIdRequest"},"FindInvoiceByNumberRequest":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/find-by-number.\n\nBody: `number` (invoice number, required), `year` optional to\ndisambiguate when the number repeats across fiscal years. Aligned with\nSupplier's `find-by-tax-id`.","properties":{"number":{"type":"string","maxLength":80},"year":{"type":["integer","null"],"minimum":2000,"maximum":2100}},"required":["number"],"title":"FindInvoiceByNumberRequest"},"FindProductByExternalIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/products/find-by-external-id.\n\nBusca un producto por su `external_id` (clave de integración ERP/CRM de\nterceros) dentro de la company autenticada. El `external_id` viaja en el body\n(no en la URL) — paralelo a `find-by-sku` — porque una clave externa puede\ncontener caracteres `.` y `/` válidos que romperían el path, y para no\nexponerla en logs/URLs. Ortogonal a `find-by-sku`.","properties":{"external_id":{"type":"string","maxLength":100}},"required":["external_id"],"title":"FindProductByExternalIdRequest"},"FindProductBySkuRequest":{"type":"object","description":"Public REST API v1 — POST /v1/products/find-by-sku.\n\nLooks up a product by its `sku` within the authenticated company. The `sku`\ntravels in the body (not in the URL) so as not to expose SKUs in logs/URLs\nand because a SKU may contain valid `.` and `/` characters that would break\nthe path.","properties":{"sku":{"type":"string","maxLength":100}},"required":["sku"],"title":"FindProductBySkuRequest"},"FindProformaByExternalIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/proformas/find-by-external-id.\n\nBusca una proforma por su `external_id` (clave de integración ERP/CRM)\ndentro de la company autenticada.","properties":{"external_id":{"type":"string","maxLength":100}},"required":["external_id"],"title":"FindProformaByExternalIdRequest"},"FindPurchaseInvoiceByExternalIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/purchase_invoices/find-by-external-id.\n\nBusca una factura de compra por su `external_id` (clave de integración\nERP/CRM) dentro de la company autenticada. Ortogonal a\n`external_invoice_number` (el número fiscal del proveedor).","properties":{"external_id":{"type":"string","maxLength":100}},"required":["external_id"],"title":"FindPurchaseInvoiceByExternalIdRequest"},"FindQuoteByExternalIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/quotes/find-by-external-id.\n\nBusca un presupuesto por su `external_id` (clave de integración ERP/CRM)\ndentro de la company autenticada.","properties":{"external_id":{"type":"string","maxLength":100}},"required":["external_id"],"title":"FindQuoteByExternalIdRequest"},"FindRecordByAeatCsvV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/verifactu/records/find-by-csv.\n\nBody `{\"aeat_csv\": \"X-Y-Z\"}`. Canonical V1 validation (NEVER a generic\n`validation_error`/422):\n - `aeat_csv` missing            → 400 `parameter_missing` (param `aeat_csv`).\n - mutually exclusive fields     → 400 `parameter_unknown` (subcode\n   `mutually_exclusive_query_params`).\n\nThe handler normalizes (`str_replace('-', '', strtoupper($csv))`) before the\nquery (BR-VFC-016). The 404 is emitted via `RecordNotFoundException::withAeatCsv()`.","title":"FindRecordByAeatCsvV1Request"},"FindRecordByHuellaV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/verifactu/records/find-by-huella.\n\nBody `{\"huella\": \"<64-char-hex>\"}`. Canonical V1 validation (NEVER a generic\n`validation_error`/422):\n - `huella` missing              → 400 `parameter_missing` (param `huella`).\n - mutually exclusive fields     → 400 `parameter_unknown` (subcode\n   `mutually_exclusive_query_params`) if `aeat_csv`, `series` or `number`\n   appear together with `huella`.\n - invalid huella format         → 422 `business_rule_violation`\n   (`InvalidHuellaException`, VO invariant; param `huella`).\n\nThe 404 (huella not found, multi-tenant) is emitted by the handler via\n`RecordNotFoundException::withHuella()` (param `huella`).","title":"FindRecordByHuellaV1Request"},"FindRecordByInvoiceNumberV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/verifactu/records/find-by-invoice-number.\n\nBody `{\"series\": \"F\", \"number\": \"2026-019\"}`. Canonical V1 validation\n(NEVER a generic `validation_error`/422):\n - `series` or `number` missing  → 400 `parameter_missing`.\n - mutually exclusive fields     → 400 `parameter_unknown` (subcode\n   `mutually_exclusive_query_params`) if `huella` or `aeat_csv` are present.\n\nThe 404 is emitted by the handler via `RecordNotFoundException::withInvoiceNumber()`.","title":"FindRecordByInvoiceNumberV1Request"},"FindRecurringInvoiceByExternalIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/recurring_invoices/find-by-external-id.\n\nBusca una factura recurrente por su `external_id` (clave de integración\nERP/CRM) dentro de la company autenticada. `external_id` es ortogonal al\nciclo de recurrencia (activa/pausada/cancelada/completada).","properties":{"external_id":{"type":"string","maxLength":100}},"required":["external_id"],"title":"FindRecurringInvoiceByExternalIdRequest"},"FindSeriesByCodeRequest":{"type":"object","description":"Public REST API v1 — POST /v1/series/find-by-code.\n\nLooks up a series by its `code` (normalized to uppercase in the handler)\nwithin the authenticated company. The `code` travels in the JSON body (not in\nquery params) because it is a private attribute that should not end up in\nproxy logs. `document_type` is optional and disambiguates matches when the\nsame `code` is associated with several types.","properties":{"code":{"type":"string","maxLength":10},"document_type":{"type":"string","enum":["invoice","quote","delivery_note","proforma"]}},"required":["code"],"title":"FindSeriesByCodeRequest"},"FindSupplierByExternalIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/suppliers/find-by-external-id.\n\nBusca un proveedor por su `external_id` (clave de integración ERP/CRM) dentro\nde la company autenticada.","properties":{"external_id":{"type":"string","maxLength":100}},"required":["external_id"],"title":"FindSupplierByExternalIdRequest"},"FindSupplierByTaxIdRequest":{"type":"object","description":"Public REST API v1 — POST /v1/suppliers/find-by-tax-id.\n\nBusca un proveedor por su identificador fiscal (NIF/CIF/NIE/VAT) dentro\nde la company autenticada.","properties":{"tax_id":{"type":"string","maxLength":50}},"required":["tax_id"],"title":"FindSupplierByTaxIdRequest"},"FindTaxReportByPeriodV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/tax_reports/find-by-period.\n\nResolves the MOST RECENT generation of a period (latest-wins). The\nFormRequest validates ONLY the parseable shape (`year` integer, `quarter`\ninteger 1-4, `type` enum) and delegates the period business rules to the\nDomain (consistent with the 303/347 generation endpoints):\n - year range (`TaxPeriod::guardYear` via the Query handler) → 422\n   `invalid_period.year_out_of_range` (param `year`),\n - cross-field BR-TXR-001 \"303 requires quarter\" / \"347 does not allow quarter\"\n   (`TaxReportType::assertPeriodMatches()`) → 422\n   `invalid_period.quarter_required_for_303` /\n   `invalid_period.quarter_not_allowed_for_347`.\n\nWe accept `303` / `347` as aliases of the canonical values\n`modelo_303` / `modelo_347` (consistent with the paths\n`POST /v1/tax_reports/303` and `POST /v1/tax_reports/347`).\n`prepareForValidation` normalizes the alias before validating the enum.","properties":{"type":{"type":"string","enum":["modelo_303","modelo_347","modelo_130"]},"year":{"type":"integer"},"quarter":{"type":["integer","null"],"minimum":1,"maximum":4}},"required":["type","year"],"title":"FindTaxReportByPeriodV1Request"},"GenerateModelo130V1Request":{"type":"object","description":"Public REST API v1 — POST /v1/tax_reports/130.\n\nModelo 130 (IRPF, pago fraccionado, estimación directa). `format` defaults\nto `pdf` when omitted (consistent with the 303 endpoint, F-078). Allowed\nvalues: `txt_aeat`, `pdf`, `excel`. Only `txt_aeat` is directly submittable\non the AEAT portal.\n\nThe FormRequest validates ONLY the parseable shape of `year` / `quarter`\n(integers) and delegates the period business rules to the Domain:\n - year range (`TaxPeriod::guardYear`) → 422 `invalid_period.year_out_of_range`,\n - quarter range (`TaxPeriod::guardQuarter`) → 422 `invalid_period.quarter_out_of_range`,\n - cross-field \"130 requires quarter\" (`TaxReportType::assertPeriodMatches`)\n   → 422 `invalid_period.quarter_required_for_130`.\n\n`quarter` is `nullable` here so the Controller can distinguish \"not provided\"\n(null) from \"out of range\" — `$request->integer()` would collapse both to 0.\n\n`format` IS validated here with `in:` because `ReportFormat::from()` throws\na native `\\ValueError` (not `PublicApiMappable`) on a non-enumerable value\nlike `docx`: intercepting it in the FormRequest guarantees a 422\n`invalid_request_error` (param `format`) instead of a 500.","properties":{"year":{"type":"integer"},"quarter":{"type":["integer","null"]},"format":{"type":"string","enum":["txt_aeat","pdf","excel"]},"deduccion_vivienda_centimos":{"type":["integer","null"],"description":"[16] / [18] / override [05] — inputs opcionales del periodo (céntimos).","minimum":0},"resultado_complementaria_centimos":{"type":["integer","null"],"minimum":0},"pagos_fraccionados_anteriores_override_centimos":{"type":["integer","null"],"minimum":0}},"required":["year","format"],"title":"GenerateModelo130V1Request"},"GenerateModelo303V1Request":{"type":"object","description":"Public REST API v1 — POST /v1/tax_reports/303.\n\nF-078: `format` now defaults to `pdf` when omitted. Previously it was\nrequired without being documented and returned 422, confusing integrators.\nAllowed values: `txt_aeat`, `pdf`, `excel`. Only `txt_aeat` is\ndirectly submittable on the AEAT portal.\n\nThe FormRequest validates ONLY the parseable shape of `year` / `quarter`\n(integers) and delegates the period business rules to the Domain:\n - year range (`TaxPeriod::guardYear`) → 422 `invalid_period.year_out_of_range`,\n - quarter range (`TaxPeriod::guardQuarter`) → 422 `invalid_period.quarter_out_of_range`,\n - cross-field BR-TXR-001 \"303 requires quarter\"\n   (`TaxReportType::assertPeriodMatches`) → 422\n   `invalid_period.quarter_required_for_303`.\n\n`format` IS validated here with `in:` because `ReportFormat::from()` throws\na native `\\ValueError` (not `PublicApiMappable`) on a non-enumerable value\nlike `docx`: intercepting it in the FormRequest guarantees a 422\n`invalid_request_error` (param `format`) instead of a 500.","properties":{"year":{"type":"integer"},"quarter":{"type":["integer","null"]},"format":{"type":"string","enum":["txt_aeat","pdf","excel"]}},"required":["year","format"],"title":"GenerateModelo303V1Request"},"GenerateModelo347V1Request":{"type":"object","description":"Public REST API v1 — POST /v1/tax_reports/347.\n\nF-078: `format` now defaults to `pdf` when omitted.\nAllowed values: `txt_aeat`, `pdf`, `excel`.\n\nThe FormRequest validates ONLY the parseable shape of `year` / `quarter`\n(integers) and delegates the period business rules to the Domain:\n - year range (`TaxPeriod::guardYear`) → 422 `invalid_period.year_out_of_range`,\n - cross-field BR-TXR-001 \"347 does not allow quarter\"\n   (`TaxReportType::assertPeriodMatches`) → 422\n   `invalid_period.quarter_not_allowed_for_347`.\n\nWe accept `quarter` as a nullable integer so that, if the integrator\nsends it by mistake, the Domain emits the canonical code instead of\nsilently ignoring it. `format` IS validated here with `in:` (as in /303)\nso that a non-enumerable value like `docx` yields 422 and not a 500 from\nthe `\\ValueError` of `ReportFormat::from()`.","properties":{"year":{"type":"integer"},"quarter":{"type":["integer","null"]},"format":{"type":"string","enum":["txt_aeat","pdf","excel"]}},"required":["year","format"],"title":"GenerateModelo347V1Request"},"Invoice":{"type":"object","description":"A sales invoice (compliant with Spanish AEAT VeriFactu).","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42"]},"object":{"type":"string","enum":["invoice"],"example":"invoice","examples":["invoice"]},"number":{"type":["string","null"],"description":"Definitive invoice number, or `null` for drafts (where `is_number_assigned` is `false`).","example":"FAC-2026-00042","examples":["FAC-2026-00042"]},"is_number_assigned":{"type":"boolean","description":"Whether the invoice has a definitive number assigned. `false` for drafts (where `number` is `null`); becomes `true` after `POST /v1/invoices/{uuid}/assign-real-number`, or automatically on send/payment.","example":true,"examples":[true]},"type":{"type":"string","description":"AEAT invoice type code: `F1` (ordinaria), `F2` (simplificada), `F3` (sustitutiva de simplificadas), `R1`–`R5` (rectificativa).","example":"F1","examples":["F1"]},"series":{"$ref":"#/components/schemas/SeriesRef"},"client":{"$ref":"#/components/schemas/ClientRef"},"status":{"type":"string","description":"Invoice lifecycle status.","example":"paid","examples":["paid"]},"issued_on":{"type":"string","format":"date","example":"2026-03-15","examples":["2026-03-15"]},"due_on":{"type":["string","null"],"format":"date","example":"2026-04-14","examples":["2026-04-14"]},"subtotal":{"type":"number","example":1000,"examples":[1000]},"taxes_total":{"type":"number","example":210,"examples":[210]},"total":{"type":"number","example":1210,"examples":[1210]},"currency":{"type":"string","description":"ISO 4217 currency code (always \"EUR\" in v1).","example":"EUR","examples":["EUR"]},"notes":{"type":["string","null"],"example":"Servicios profesionales marzo 2026.","examples":["Servicios profesionales marzo 2026."]},"external_id":{"type":["string","null"],"maxLength":100,"description":"External integration key (ERP/CRM/e-commerce) mapping this document to a record in a third-party system. Free-format, unique per company, filterable via `?external_id=`. `null` when not set. Persistent synchronization key, independent of the request-level `Idempotency-Key`.","example":"ERP-2026-0042","examples":["ERP-2026-0042"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLine"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":30,"description":"Free classification tags (lowercase slugs `[a-z0-9-]`, ≤ 40 chars each, ≤ 30 tags). Filterable via `?tags[in]=tag1,tag2` (JSON_CONTAINS, OR semantics). Empty `[]` when there are none.","example":["consultoria","cliente-vip"],"examples":[["consultoria","cliente-vip"]]},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"},"maxItems":50,"description":"Ordered list of typed custom fields `[{field, value}]` (≤ 50). Distinct from `metadata` (a free key→value map): use `custom_fields` for structured, display-oriented integration metadata. Empty `[]` when there are none.","example":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"examples":[[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}]]},"operation_regime":{"type":"string","description":"AEAT VAT operation regime (`general`, `recargo_equivalencia`, `exenta`, etc.).","example":"general","examples":["general"]},"exclude_347":{"type":"boolean","description":"Read-only flag (BR-TXR-024): whether this invoice is excluded from the annual Modelo 347 report. The public API cannot mutate it (the create/update FormRequest does not accept it); managing the flag is exclusive to the internal app.","example":false,"examples":[false]},"verifactu_status":{"type":"string","description":"Status of the AEAT VeriFactu submission.","example":"submitted","examples":["submitted"]},"paid_amount":{"type":"number","description":"Amount already collected for this invoice (derived from the payment ledger). Satisfies the invariant `paid_amount + pending_amount === total`.","example":1210,"examples":[1210]},"pending_amount":{"type":"number","description":"Outstanding balance pending collection for this invoice (derived from the payment ledger).","example":0,"examples":[0]},"payments":{"type":"object","description":"Payment ledger summary, ALWAYS present (never `null`). `total` mirrors `paid_amount`, `pending` mirrors `pending_amount`. `detail` lists the individual payments and is materialized ONLY on the show endpoint (`GET /v1/invoices/{id}`); in list responses `detail` is `[]` (by cost) while `total`/`pending` stay populated. The detail is also available via `GET /v1/invoices/{id}/payments`.","properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePaymentDetail"},"description":"List of individual payments. Empty `[]` in list responses or when there are no payments yet."},"total":{"type":"number","description":"Total amount collected (mirrors `paid_amount`)."},"pending":{"type":"number","description":"Outstanding balance pending collection (mirrors `pending_amount`)."}},"required":["detail","total","pending"]},"is_corrective":{"type":"boolean","description":"Whether this invoice is a corrective (rectificativa) of another invoice.","example":false,"examples":[false]},"corrective":{"anyOf":[{"$ref":"#/components/schemas/InvoiceCorrective"},{"type":"null"}]},"payment":{"anyOf":[{"$ref":"#/components/schemas/InvoicePayment"},{"type":"null"}]},"public_link":{"anyOf":[{"$ref":"#/components/schemas/PublicLink"},{"type":"null"}]},"substituted_by":{"anyOf":[{"$ref":"#/components/schemas/InvoiceSubstitutedBy"},{"type":"null"}]},"recurring":{"anyOf":[{"$ref":"#/components/schemas/InvoiceRecurring"},{"type":"null"}]},"paid_at":{"type":["string","null"],"format":"date-time","example":"2026-03-20T10:30:00Z","examples":["2026-03-20T10:30:00Z"]},"paid_on":{"type":["string","null"],"format":"date","example":"2026-03-20","examples":["2026-03-20"]},"sent_at":{"type":["string","null"],"format":"date-time","example":"2026-03-15T11:45:00Z","examples":["2026-03-15T11:45:00Z"]},"voided_at":{"type":["string","null"],"format":"date-time","example":null,"examples":[null]},"void_reason":{"type":["string","null"],"example":null,"examples":[null]},"created_at":{"type":"string","format":"date-time","example":"2026-03-15T11:30:00Z","examples":["2026-03-15T11:30:00Z"]},"updated_at":{"type":"string","format":"date-time","example":"2026-03-20T10:30:00Z","examples":["2026-03-20T10:30:00Z"]}},"required":["id","object","number","is_number_assigned","type","series","client","status","issued_on","due_on","subtotal","taxes_total","total","currency","notes","external_id","lines","metadata","tags","custom_fields","operation_regime","exclude_347","verifactu_status","paid_amount","pending_amount","payments","is_corrective","corrective","payment","public_link","substituted_by","recurring","paid_at","paid_on","sent_at","voided_at","void_reason","created_at","updated_at"],"example":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","object":"invoice","number":"FAC-2026-00042","is_number_assigned":true,"type":"F1","series":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b02","code":"FAC-2026"},"client":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a01","name":"Acme Soluciones SL"},"status":"paid","issued_on":"2026-03-15","due_on":"2026-04-14","subtotal":1000,"taxes_total":210,"total":1210,"currency":"EUR","notes":"Servicios profesionales marzo 2026.","external_id":"ERP-2026-0042","lines":[{"object":"invoice_line","description":"Consultoría técnica (10 h)","product":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8b03","name":"Consultoría técnica (hora)"},"quantity":10,"unit_price":100,"tax_rate":21,"discount_percent":0,"subtotal":1000,"taxes":210,"total":1210}],"metadata":{"order_id":"PO-2026-0042"},"tags":["consultoria","cliente-vip"],"custom_fields":[{"field":"centro_coste","value":"CC-2026-001"},{"field":"numero_pedido","value":"PO-2026-0042"}],"operation_regime":"general","exclude_347":false,"verifactu_status":"accepted","paid_amount":1210,"pending_amount":0,"payments":{"detail":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","object":"payment","invoice_id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","amount":1210,"payment_date":"2026-03-20","payment_method":"bank_transfer","payment_method_text":"Transferencia bancaria","reference":"TRF-2026-0042","notes":null,"created_at":"2026-03-20T10:30:00Z","updated_at":"2026-03-20T10:30:00Z"}],"total":1210,"pending":0},"is_corrective":false,"corrective":null,"payment":{"method":"bank_transfer","reference":"TRF-2026-0042","date":"2026-03-20"},"public_link":{"object":"public_link","url":"https://app.factuarea.com/d/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","enabled":true,"expires_at":"2026-09-15T23:59:59Z","max_days":120},"substituted_by":null,"recurring":null,"paid_at":"2026-03-20T10:30:00Z","paid_on":"2026-03-20","sent_at":"2026-03-15T11:45:00Z","voided_at":null,"void_reason":null,"created_at":"2026-03-15T11:30:00Z","updated_at":"2026-03-20T10:30:00Z"},"title":"Invoice"},"InvoiceActivity":{"type":"object","description":"An event in the activity timeline of an invoice. Groups domain events originated by changes to the invoice itself (creation, sending, payment, correction, etc.).","properties":{"object":{"type":"string","enum":["activity"],"example":"activity","examples":["activity"]},"event_type":{"type":"string","description":"Tipo de evento de dominio (p. ej. `invoice.created`, `invoice.paid`).","example":"invoice.paid","examples":["invoice.paid"]},"description":{"type":"string","description":"Human-readable description of the event in Spanish.","example":"La factura se marcó como cobrada por transferencia bancaria.","examples":["La factura se marcó como cobrada por transferencia bancaria."]},"metadata":{"type":"object","additionalProperties":true,"description":"Metadatos del evento. Los identificadores internos (PKs) se eliminan; los `*_uuid` se conservan.","example":{"payment_method":"bank_transfer","paid_amount":"1210.00"},"examples":[{"payment_method":"bank_transfer","paid_amount":"1210.00"}]},"performed_by":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"],"description":"Type of actor that originated the event: `user` for a human in the internal app, `api_key` for an action performed through the public v1 API."},"id":{"type":"string","description":"UUID (v7) of the actor: the user when `type=user`, or the API key when `type=api_key`."},"name":{"type":["string","null"],"description":"Nombre del actor en el momento del evento: nombre del usuario o nombre de la API key. `null` si no se pudo resolver."}},"required":["type","id","name"]},{"type":"null"}],"description":"Actor that originated the event. `{type:\"user\",...}` for an internal user, `{type:\"api_key\",...}` when performed via the public v1 API, or `null` when the event is system-generated (scheduler, periodic sweep) with no attributable actor.","example":{"type":"user","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c01","name":"Ana García"},"examples":[{"type":"user","id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c01","name":"Ana García"}]},"created_at":{"type":"string","format":"date-time","description":"When the event occurred (ISO 8601).","example":"2026-03-20T10:30:00Z","examples":["2026-03-20T10:30:00Z"]}},"required":["object","event_type","description","metadata","performed_by","created_at"],"title":"InvoiceActivity"},"InvoiceCorrective":{"type":"object","description":"Correction data of a corrective invoice. Present (object) when `is_corrective=true`, `null` on ordinary invoices.","properties":{"original_id":{"type":["string","null"],"example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a10","description":"UUID (v7) de la factura original rectificada."},"original_number":{"type":["string","null"],"example":"FAC-2026-00010","description":"Human-readable number of the original corrected invoice."},"original_date":{"type":["string","null"],"format":"date","example":"2026-02-01","description":"Issue date of the original invoice (YYYY-MM-DD)."},"correction_reason":{"type":["string","null"],"example":"R1","description":"Reason for the correction (AEAT code R1–R5)."},"correction_type":{"type":["string","null"],"example":"por_sustitucion","description":"Type of correction (`por_diferencias` / `por_sustitucion`)."},"correction_nature":{"type":["string","null"],"example":"S","description":"Nature of the correction (`S` substitutive / `I` by differences)."},"base_rectificada":{"type":["number","null"],"example":-500,"description":"Base imponible rectificada."},"cuota_rectificada":{"type":["number","null"],"example":-105,"description":"Cuota (IVA) rectificada."},"correction_aeat_type":{"type":["string","null"],"enum":["R1","R2","R3","R4","R5",null],"example":"R1","description":"AEAT corrective invoice type code (`R1`–`R5`) frozen at issuance from the VeriFactu record. `null` if not resolved."}},"required":["original_id","original_number","original_date","correction_reason","correction_type","correction_nature","base_rectificada","cuota_rectificada","correction_aeat_type"],"title":"InvoiceCorrective"},"InvoiceLine":{"type":"object","description":"A line item on an invoice.","properties":{"object":{"type":"string","enum":["invoice_line"]},"description":{"type":["string","null"],"example":"Servicio de consultoría enero 2026","examples":["Servicio de consultoría enero 2026"]},"product":{"anyOf":[{"$ref":"#/components/schemas/ProductRef"},{"type":"null"}]},"quantity":{"type":"number","example":10,"examples":[10]},"unit_price":{"type":"number","example":100,"examples":[100]},"tax_rate":{"type":"number","example":21,"examples":[21]},"discount_percent":{"type":"number","example":0,"examples":[0]},"subtotal":{"type":"number","example":1000,"examples":[1000]},"taxes":{"type":"number","example":210,"examples":[210]},"total":{"type":"number","example":1210,"examples":[1210]}},"required":["object","description","product","quantity","unit_price","tax_rate","discount_percent","subtotal","taxes","total"],"title":"InvoiceLine"},"InvoicePayment":{"type":"object","description":"Datos del cobro de la factura. Presente (objeto) cuando `status` es `paid`, `null` en otro caso.","properties":{"method":{"type":["string","null"],"example":"bank_transfer","description":"Payment method (backing value of the Shared enum `PaymentMethod`, e.g. `bank_transfer`)."},"reference":{"type":["string","null"],"example":"TRF-2026-0042","description":"Referencia del cobro (e.g. nº de transferencia)."},"date":{"type":["string","null"],"format":"date","example":"2026-03-20","description":"Fecha del cobro (YYYY-MM-DD)."}},"required":["method","reference","date"],"title":"InvoicePayment"},"InvoicePaymentDetail":{"type":"object","description":"A single payment recorded against an invoice (partial payment ledger entry). Listed in `payments.detail[]` (materialized only on the show endpoint) and in the standalone sub-resource `GET /v1/invoices/{id}/payments`.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a90","description":"UUID (v7) opaco del pago."},"object":{"type":"string","enum":["payment"],"description":"String que identifica el tipo de objeto. Siempre `payment`."},"invoice_id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a42","description":"UUID (v7) of the invoice this payment belongs to."},"amount":{"type":"number","example":605,"description":"Importe del pago."},"payment_date":{"type":"string","format":"date","example":"2026-03-20","description":"Fecha del pago (YYYY-MM-DD)."},"payment_method":{"type":"string","example":"bank_transfer","description":"Payment method (backing value of the Shared enum `PaymentMethod`, e.g. `bank_transfer`)."},"payment_method_text":{"type":"string","example":"Transferencia bancaria","description":"Human-readable label of the payment method (Spanish)."},"reference":{"type":["string","null"],"example":"TRF-2026-0042","description":"Referencia/número de operación del pago. `null` si no se informó."},"notes":{"type":["string","null"],"example":"Pago parcial primer plazo.","description":"Notas internas del pago. `null` si no se informaron."},"created_at":{"type":["string","null"],"format":"date-time","description":"When the payment was recorded (ISO 8601), or `null`."},"updated_at":{"type":["string","null"],"format":"date-time","description":"When the payment was last updated (ISO 8601), or `null`."}},"required":["id","object","invoice_id","amount","payment_date","payment_method","payment_method_text","reference","notes","created_at","updated_at"],"title":"InvoicePaymentDetail"},"InvoiceRecurring":{"type":"object","description":"Reference to the recurring invoice (template) that generated this invoice. `null` when the invoice does not come from a recurrence.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08","description":"UUID (v7) de la factura recurrente parent."}},"required":["id"],"title":"InvoiceRecurring"},"InvoiceReminderPreview":{"type":"object","description":"Preview of the payment reminder email (subject + HTML + resolved recipients) without sending it. Useful to show exactly what would be sent before triggering `POST .../send-reminder`.","properties":{"subject":{"type":"string","description":"Asunto del email de recordatorio.","example":"Recordatorio de pago: Factura F-2026-015","examples":["Recordatorio de pago: Factura F-2026-015"]},"html":{"type":"string","description":"Cuerpo HTML renderizado del email.","example":"<!DOCTYPE html><html lang=\"es\"><head>...</head><body>... Recordatorio de pago. Factura F-2026-015 ... Importe total 1.802,90 € ... Fecha de vencimiento 03/05/2026 ...</body></html>","examples":["<!DOCTYPE html><html lang=\"es\"><head>...</head><body>... Recordatorio de pago. Factura F-2026-015 ... Importe total 1.802,90 € ... Fecha de vencimiento 03/05/2026 ...</body></html>"]},"from":{"type":"string","format":"email","description":"Sender address.","example":"customer@example.com","examples":["customer@example.com"]},"from_name":{"type":"string","description":"Nombre legible del remitente.","example":"Factuarea","examples":["Factuarea"]},"to":{"type":"string","format":"email","description":"Destinatario principal resuelto.","example":"contacto@cliente.example","examples":["contacto@cliente.example"]},"cc":{"type":"array","items":{"type":"string","format":"email"},"description":"Carbon copy addresses. Empty `[]` when there are none.","example":["copia@cliente.example"],"examples":[["copia@cliente.example"]]},"bcc":{"type":"array","items":{"type":"string","format":"email"},"description":"Blind carbon copy addresses. Empty `[]` when there are none.","example":["registro@cliente.example"],"examples":[["registro@cliente.example"]]},"status":{"type":"string","description":"Estado actual de la factura (p. ej. `sent`, `overdue`).","example":"overdue","examples":["overdue"]},"invoice_number":{"type":"string","description":"Invoice number.","example":"F-2026-015","examples":["F-2026-015"]},"total":{"type":"number","description":"Importe total de la factura.","example":1802.9,"examples":[1802.9]},"due_date":{"type":["string","null"],"format":"date","description":"Fecha de vencimiento (YYYY-MM-DD), o `null` si no aplica.","example":"2026-05-03","examples":["2026-05-03"]},"public_url":{"type":["string","null"],"format":"uri","description":"Public link to the invoice, or `null` if the link is not active.","example":"http://localhost:3000/d/feb47de0-d6ed-40de-a4d4-8825182f5a6d","examples":["http://localhost:3000/d/feb47de0-d6ed-40de-a4d4-8825182f5a6d"]},"public_link_active":{"type":"boolean","description":"Indicates whether the public link is active.","example":true,"examples":[true]},"public_link_expires_at":{"type":["string","null"],"format":"date-time","description":"When the public link expires (ISO 8601), or `null`.","example":"2026-07-02T17:46:46+02:00","examples":["2026-07-02T17:46:46+02:00"]},"reminders_sent":{"type":"integer","description":"Number of reminders already sent for this invoice.","example":0,"examples":[0]},"last_reminder_sent_at":{"type":["string","null"],"format":"date-time","description":"When the last reminder was sent (ISO 8601), or `null` if none has been sent.","example":null,"examples":[null]},"cooldown_active":{"type":"boolean","description":"Indicates whether there is an active cooldown period that prevents sending another reminder yet.","example":false,"examples":[false]}},"required":["subject","html","from","from_name","to","cc","bcc","status","invoice_number","total","due_date","public_url","public_link_active","public_link_expires_at","reminders_sent","last_reminder_sent_at","cooldown_active"],"title":"InvoiceReminderPreview"},"InvoiceReminderSent":{"type":"object","description":"Acknowledgement of sending a payment reminder.","properties":{"id":{"type":"string","description":"UUID (v7) of the invoice the reminder was sent to.","example":"feb47de0-d6ed-40de-a4d4-8825182f5a6d","examples":["feb47de0-d6ed-40de-a4d4-8825182f5a6d"]},"message":{"type":"string","const":"Recordatorio enviado correctamente.","description":"Confirmation message.","example":"Recordatorio enviado correctamente.","examples":["Recordatorio enviado correctamente."]}},"required":["id","message"],"title":"InvoiceReminderSent"},"InvoiceStats":{"type":"object","description":"Aggregated invoicing metrics (KPIs) for the queried period.","properties":{"object":{"type":"string","enum":["invoice_stats"],"example":"invoice_stats","examples":["invoice_stats"]},"total_count":{"type":"integer","description":"Total number of invoices in the period.","example":184,"examples":[184]},"by_status":{"type":"object","additionalProperties":{"type":"integer"},"description":"Invoice count by status (key = status, value = number of invoices).","example":{"draft":12,"issued":31,"sent":24,"paid":108,"overdue":6,"cancelled":3},"examples":[{"draft":12,"issued":31,"sent":24,"paid":108,"overdue":6,"cancelled":3}]},"revenue_total":{"type":"number","description":"Total amount invoiced in the period.","example":248750.45,"examples":[248750.45]},"pending_amount":{"type":"number","description":"Importe total pendiente de cobro.","example":18420,"examples":[18420]},"overdue_count":{"type":"integer","description":"Number of overdue and unpaid invoices.","example":6,"examples":[6]},"overdue_amount":{"type":"number","description":"Importe total vencido e impagado.","example":7260,"examples":[7260]},"average_payment_days":{"type":["number","null"],"description":"Average number of days until payment of paid invoices. `null` if there are no paid invoices in the period.","example":23.5,"examples":[23.5]},"corrective_count":{"type":"integer","description":"Number of corrective invoices issued in the period.","example":4,"examples":[4]},"period":{"type":"object","properties":{"from":{"type":["string","null"],"format":"date","description":"Start of the period (YYYY-MM-DD), or `null` if not filtered."},"to":{"type":["string","null"],"format":"date","description":"End of the period (YYYY-MM-DD), or `null` if not filtered."}},"required":["from","to"],"description":"Period covered by the metrics.","example":{"from":"2026-01-01","to":"2026-03-31"},"examples":[{"from":"2026-01-01","to":"2026-03-31"}]}},"required":["object","total_count","by_status","revenue_total","pending_amount","overdue_count","overdue_amount","average_payment_days","corrective_count","period"],"title":"InvoiceStats"},"InvoiceStatusItem":{"type":"object","description":"Invoice status from the closed catalog with its label and color for UI.","properties":{"value":{"type":"string","enum":["draft","sent","paid","cancelled","overdue","annulled"],"example":"paid","description":"Identificador interno del estado."},"label":{"type":"string","example":"Pagado","description":"Human-readable status label (Spanish)."},"color":{"type":"string","example":"green","description":"Color sugerido para pintar el estado en UI."}},"required":["value","label","color"],"title":"InvoiceStatusItem"},"InvoiceSubstitutedBy":{"type":"object","description":"Reference to the full invoice (F3) that replaced this simplified invoice (F2). `null` when not applicable.","properties":{"id":{"type":["string","null"],"example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a50","description":"UUID (v7) de la factura completa sustituta."},"number":{"type":["string","null"],"example":"FAC-2026-00050","description":"Human-readable number of the replacement full invoice."}},"required":["id","number"],"title":"InvoiceSubstitutedBy"},"MarkDeliveredRequest":{"type":"object","description":"Public REST API v1 — POST /v1/delivery_notes/{uuid}/mark-delivered.\n\nREST sub-resource that transitions the delivery note `draft → delivered`. Optional\nbody: `delivery_date` (ISO 8601 `YYYY-MM-DD`). If omitted, the BC uses\nthe delivery date already recorded or, failing that, the current date.","properties":{"delivery_date":{"type":["string","null"],"format":"date-time"}},"title":"MarkDeliveredRequest"},"MarkInvoicePaidRequest":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/{uuid}/mark_paid.\n\nBody opcional: `paid_on` (date, default hoy), `payment_method`,\n`payment_reference`, `notes`.","properties":{"paid_on":{"type":["string","null"],"format":"date"},"payment_method":{"type":["string","null"],"maxLength":100},"payment_reference":{"type":["string","null"],"maxLength":191},"notes":{"type":["string","null"],"maxLength":1000}},"title":"MarkInvoicePaidRequest"},"MarkPurchaseInvoicePaidRequest":{"type":"object","description":"Public REST API v1 — POST /v1/purchase_invoices/{uuid}/mark_paid.\n\nBody opcional: `paid_on` (date, default hoy), `payment_method`,\n`notes`.","properties":{"paid_on":{"type":["string","null"],"format":"date"},"payment_method":{"type":["string","null"],"enum":["bank_transfer","direct_debit","cash","credit_card","check","paypal","other"]},"notes":{"type":["string","null"],"maxLength":1000}},"title":"MarkPurchaseInvoicePaidRequest"},"Metadata":{"type":["object","null"],"description":"A free map of up to 50 key→value pairs for storing arbitrary structured data (values are strings up to 500 characters). This is DISTINCT from `custom_fields`: `metadata` is an UNORDERED key→value map for opaque integration data, while `custom_fields` (on the six document resources) is an ORDERED list of typed `{field, value}` pairs with display semantics. A document may carry both. The master resources (Client, Supplier) have no typed `custom_fields`: use their `metadata` as the untyped custom-fields store.","example":{"erp_code":"IVA-GEN","ledger_account":"477000"},"examples":[{"erp_code":"IVA-GEN","ledger_account":"477000"}],"additionalProperties":{"type":"string","maxLength":500},"maxProperties":50,"title":"Metadata"},"Money":{"type":"string","pattern":"^\\d+\\.\\d{2}$","example":"1234.56","description":"Monetary amount as a string with two decimal places (Stripe-style). NOTE: some legacy resources currently emit floats; see harden-public-api-v1-pre-ga.","title":"Money"},"PaginatedList":{"type":"object","description":"Cursor-paginated list envelope shared by every v1 listing endpoint. `data` holds the page items; `has_more` signals whether another page exists; `next_cursor` is the opaque cursor (UUID v7) to pass as `?cursor=` for the following page. The cursor is opaque — clients MUST NOT interpret it. Concrete listings narrow `data` to their resource type via `allOf`.","properties":{"data":{"type":"array","items":{"type":"object"},"description":"Items on the current page."},"has_more":{"type":"boolean","description":"Whether more pages are available after this one.","example":true,"examples":[true]},"next_cursor":{"type":["string","null"],"description":"Opaque cursor for the next page (UUID v7), or `null` when `has_more` is `false`.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"]}},"required":["data","has_more","next_cursor"],"title":"PaginatedList"},"PaymentPreferences":{"type":"object","description":"Client payment preferences: preferred method and payment term in days.","properties":{"object":{"type":"string","enum":["payment_preferences"],"example":"payment_preferences","examples":["payment_preferences"]},"method":{"type":["string","null"],"enum":["bank_transfer","direct_debit","cash","credit_card","check","paypal","other",null],"description":"Preferred payment method. If `direct_debit`, the client must have at least one bank account marked as default.","example":"bank_transfer","examples":["bank_transfer"]},"terms_days":{"type":["integer","null"],"minimum":0,"maximum":365,"description":"Payment term in days (Net X). Valid range: 0-365.","example":30,"examples":[30]}},"required":["object","method","terms_days"],"title":"PaymentPreferences"},"PreviewTaxReportV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/tax_reports/preview.\n\nComputes the report breakdown without persisting any generation or file.\nUseful for showing the user what they are about to declare before confirming.\n\nWe accept `303` / `347` as aliases of the canonical values\n`modelo_303` / `modelo_347`, keeping consistency with the paths\n`POST /v1/tax_reports/303` and `POST /v1/tax_reports/347`. The handler\nnormalizes the value before instantiating the VO `TaxReportType`.","properties":{"type":{"type":"string","enum":["modelo_303","modelo_347","modelo_130"]},"year":{"type":"integer","minimum":2024,"maximum":2027},"quarter":{"type":["integer","null"],"minimum":1,"maximum":4}},"required":["type","year"],"title":"PreviewTaxReportV1Request"},"Product":{"type":"object","description":"A product in your catalog.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09"]},"object":{"type":"string","enum":["product"],"example":"product","examples":["product"]},"name":{"type":"string","example":"Teclado mecánico RGB","examples":["Teclado mecánico RGB"]},"sku":{"type":["string","null"],"example":"KEY-RGB-01","examples":["KEY-RGB-01"]},"price":{"$ref":"#/components/schemas/Money"},"currency":{"type":"string","example":"EUR","examples":["EUR"]},"tax_rate":{"anyOf":[{"$ref":"#/components/schemas/TaxRateRef"},{"type":"null"}],"example":{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","rate":21},"examples":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","rate":21}]},"stock":{"type":"integer","description":"Cantidad disponible en stock.","example":120,"examples":[120]},"gallery":{"type":"array","description":"Product gallery images.","items":{"type":"object","properties":{"index":{"type":"integer","description":"Position of the image in the gallery (0-based)."},"url":{"type":"string","format":"uri","description":"Public URL of the image."},"content_type":{"type":"string","description":"MIME type de la imagen (e.g. `image/jpeg`)."}},"required":["index","url","content_type"]},"example":[{"index":0,"url":"https://files.factuarea.com/products/key-rgb-01-front.jpg","content_type":"image/jpeg"}],"examples":[[{"index":0,"url":"https://files.factuarea.com/products/key-rgb-01-front.jpg","content_type":"image/jpeg"}]]},"video":{"anyOf":[{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public URL of the video."},"content_type":{"type":"string","description":"MIME type of the video (e.g. `video/mp4`)."}},"required":["url","content_type"]},{"type":"null"}],"description":"Product attached video, or `null` if there is none.","example":{"url":"https://files.factuarea.com/products/key-rgb-01-demo.mp4","content_type":"video/mp4"},"examples":[{"url":"https://files.factuarea.com/products/key-rgb-01-demo.mp4","content_type":"video/mp4"}]},"is_active":{"type":"boolean","example":true,"examples":[true]},"description":{"type":["string","null"],"description":"Free-text description of the product.","example":"Teclado mecánico retroiluminado RGB con switches Cherry MX Red y carcasa de aluminio.","examples":["Teclado mecánico retroiluminado RGB con switches Cherry MX Red y carcasa de aluminio."]},"tags":{"type":"array","items":{"type":"string"},"description":"Product classification tags.","example":["periféricos","gaming"],"examples":[["periféricos","gaming"]]},"low_stock_threshold":{"type":["integer","null"],"description":"Umbral a partir del cual el stock se considera bajo, o `null` si no configurado.","example":10,"examples":[10]},"is_low_stock":{"type":"boolean","description":"Indicates whether the current stock is below the configured threshold.","example":false,"examples":[false]},"is_in_stock":{"type":"boolean","description":"Indica si hay stock disponible (> 0).","example":true,"examples":[true]},"specifications":{"type":"object","additionalProperties":true,"description":"Structured technical specifications of the product (free key-value pairs). Empty object `{}` when there are no specifications.","example":{"switch":"Cherry MX Red","layout":"ES","conexion":"USB-C"},"examples":[{"switch":"Cherry MX Red","layout":"ES","conexion":"USB-C"}]},"metadata":{"$ref":"#/components/schemas/Metadata"},"external_id":{"type":["string","null"],"maxLength":100,"description":"External integration key (ERP/CRM/e-commerce) mapping this product to a record in a third-party system. Free-format, unique per company, orthogonal to the catalog `sku` (a product may have both, neither, or either).","example":"SHOP-42","examples":["SHOP-42"]},"created_at":{"type":["string","null"],"format":"date-time","example":"2026-01-02T08:30:00Z","examples":["2026-01-02T08:30:00Z"]},"updated_at":{"type":["string","null"],"format":"date-time","example":"2026-01-02T08:30:00Z","examples":["2026-01-02T08:30:00Z"]}},"required":["id","object","name","sku","price","currency","tax_rate","stock","gallery","video","is_active","description","tags","low_stock_threshold","is_low_stock","is_in_stock","specifications","metadata","created_at","updated_at"],"title":"Product"},"ProductActivity":{"type":"object","description":"An event in the activity timeline of a product. Groups domain events originated by changes to the product itself and by documents whose lines reference it (invoices, quotes, etc.).","properties":{"event_type":{"type":"string","description":"Tipo de evento de dominio (p. ej. `product.updated`, `invoice.created`).","example":"product.updated","examples":["product.updated"]},"description":{"type":"string","description":"Human-readable description of the event in Spanish.","example":"Se actualizó el precio base del producto.","examples":["Se actualizó el precio base del producto."]},"metadata":{"type":"object","additionalProperties":true,"description":"Metadatos del evento. Los identificadores internos (PKs) se eliminan; los `*_uuid` se conservan.","example":{"previous_price":"45.00","new_price":"49.90"},"examples":[{"previous_price":"45.00","new_price":"49.90"}]},"performed_by":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"],"description":"Type of actor that originated the event: `user` for a human in the internal app, `api_key` for an action performed through the public v1 API."},"id":{"type":"string","description":"UUID (v7) of the actor: the user when `type=user`, or the API key when `type=api_key`."},"name":{"type":["string","null"],"description":"Nombre del actor en el momento del evento: nombre del usuario o nombre de la API key. `null` si no se pudo resolver."}},"required":["type","id","name"]},{"type":"null"}],"description":"Actor that originated the event. `{type:\"user\",...}` for an internal user, `{type:\"api_key\",...}` when performed via the public v1 API, or `null` when the event is system-generated (scheduler, periodic sweep) with no attributable actor.","example":{"type":"user","id":"01928f12-1234-7abc-9def-0123456789ab","name":"Ana García"},"examples":[{"type":"user","id":"01928f12-1234-7abc-9def-0123456789ab","name":"Ana García"}]},"created_at":{"type":"string","format":"date-time","description":"When the event occurred (ISO 8601).","example":"2026-05-15T10:34:21Z","examples":["2026-05-15T10:34:21Z"]}},"required":["event_type","description","metadata","performed_by","created_at"],"title":"ProductActivity"},"ProductRef":{"type":"object","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09"]},"name":{"type":["string","null"],"example":"Consultoría hora estándar","examples":["Consultoría hora estándar"]}},"required":["id","name"],"title":"ProductRef"},"ProductStats":{"type":"object","description":"Aggregated summary of the product catalog of the authenticated company: total, active, out of stock and low stock. Returned by `GET /v1/products/stats`.","properties":{"total_products":{"type":"integer","description":"Total number of products registered in the company.","example":248,"examples":[248]},"active_products":{"type":"integer","description":"Productos marcados como activos.","example":231,"examples":[231]},"out_of_stock_count":{"type":"integer","description":"Productos sin stock disponible (stock = 0).","example":12,"examples":[12]},"low_stock_count":{"type":"integer","description":"Products whose stock is below the configured threshold.","example":18,"examples":[18]}},"required":["total_products","active_products","out_of_stock_count","low_stock_count"],"title":"ProductStats"},"Proforma":{"type":"object","description":"A proforma invoice that can be converted to a final invoice.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a05","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a05"]},"object":{"type":"string","enum":["proforma"],"example":"proforma","examples":["proforma"]},"number":{"type":"string","example":"PRO-2026-00007","examples":["PRO-2026-00007"]},"series":{"$ref":"#/components/schemas/SeriesRef"},"client":{"$ref":"#/components/schemas/ClientRef"},"status":{"type":"string","description":"Proforma lifecycle status (draft, accepted, rejected, cancelled, expired, converted).","example":"draft","examples":["draft"]},"issued_on":{"type":"string","format":"date","example":"2026-01-22","examples":["2026-01-22"]},"valid_until":{"type":["string","null"],"format":"date","example":"2026-02-21","examples":["2026-02-21"]},"validity_days":{"type":["integer","null"],"description":"Number of validity days of the proforma since its issuance. `null` if not applicable.","example":30,"examples":[30]},"reference":{"type":["string","null"],"description":"Free reference of the document (e.g. the customer order number).","example":"REF-API-2026-001","examples":["REF-API-2026-001"]},"converted_to_id":{"type":["string","null"],"description":"UUID (v7) of the invoice this proforma was converted into, if applicable.","example":null,"examples":[null]},"converted_invoice_number":{"type":["string","null"],"description":"Human-readable number of the invoice this proforma was converted into (e.g. \"F-2026-00042\"). `null` if not converted.","example":"F-2025-003","examples":["F-2025-003"]},"subtotal":{"type":"number","example":1500,"examples":[1500]},"taxes_total":{"type":"number","description":"Importe de impuestos agregado (= total_vat + total_surcharge − total_retention). Usa total_vat/total_retention/total_surcharge para el desglose.","example":315,"examples":[315]},"total_vat":{"type":"number","description":"Sum of the VAT of all lines.","example":315,"examples":[315]},"total_retention":{"type":"number","description":"Sum of the withholding (IRPF) of all lines.","example":0,"examples":[0]},"total_surcharge":{"type":"number","description":"Sum of the equivalence surcharge of all lines.","example":0,"examples":[0]},"total":{"type":"number","example":1815,"examples":[1815]},"shipping_cost":{"type":"number","description":"Additional shipping cost added to the total.","example":15.5,"examples":[15.5]},"total_with_shipping":{"type":"number","description":"Final total including the shipping cost (= total + shipping_cost).","example":1830.5,"examples":[1830.5]},"currency":{"type":"string","example":"EUR","examples":["EUR"]},"payment_method":{"type":["string","null"],"description":"Preferred payment method (backing value of the Shared enum `PaymentMethod`, e.g. `bank_transfer`).","example":"bank_transfer","examples":["bank_transfer"]},"payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365,"description":"Payment term in days (Net X). Valid range: 0-365.","example":30,"examples":[30]},"delivery_terms":{"type":["string","null"],"description":"Condiciones de entrega en formato libre.","example":"Entrega en 5 dias habiles, portes incluidos","examples":["Entrega en 5 dias habiles, portes incluidos"]},"estimated_delivery_date":{"type":["string","null"],"format":"date","description":"Fecha estimada de entrega (YYYY-MM-DD).","example":"2026-06-10","examples":["2026-06-10"]},"notes":{"type":["string","null"],"example":"Proforma pendiente de validación.","examples":["Proforma pendiente de validación."]},"terms_and_conditions":{"type":["string","null"],"description":"Terms and conditions rendered in the proforma PDF.","example":"Validez 30 dias. Proforma sin valor fiscal hasta su conversion en factura.","examples":["Validez 30 dias. Proforma sin valor fiscal hasta su conversion en factura."]},"external_id":{"type":["string","null"],"maxLength":100,"description":"External integration key (ERP/CRM/e-commerce) mapping this document to a record in a third-party system. Free-format, unique per company, filterable via `?external_id=`. `null` when not set. Persistent synchronization key, independent of the request-level `Idempotency-Key`.","example":"ERP-PRO-2026-0007","examples":["ERP-PRO-2026-0007"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ProformaLine"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":30,"description":"Free classification tags (lowercase slugs `[a-z0-9-]`, ≤ 40 chars each, ≤ 30 tags). Filterable via `?tags[in]=tag1,tag2` (JSON_CONTAINS, OR semantics). Empty `[]` when there are none.","example":["exportacion","pendiente-validar"],"examples":[["exportacion","pendiente-validar"]]},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"},"maxItems":50,"description":"Ordered list of typed custom fields `[{field, value}]` (≤ 50). Distinct from `metadata` (a free key→value map): use `custom_fields` for structured, display-oriented integration metadata. Empty `[]` when there are none.","example":[{"field":"incoterm","value":"EXW"}],"examples":[[{"field":"incoterm","value":"EXW"}]]},"link_expires_at":{"type":["string","null"],"format":"date-time","description":"Expiration date of the shareable public link, or `null` if unlimited.","example":"2026-07-01T09:53:23+02:00","examples":["2026-07-01T09:53:23+02:00"]},"link_is_active":{"type":"boolean","description":"Indicates whether the shareable public link is currently active.","example":true,"examples":[true]},"created_at":{"type":"string","format":"date-time","example":"2026-01-22T09:10:00Z","examples":["2026-01-22T09:10:00Z"]},"updated_at":{"type":"string","format":"date-time","example":"2026-01-22T09:10:00Z","examples":["2026-01-22T09:10:00Z"]}},"required":["id","object","number","series","client","status","issued_on","valid_until","validity_days","reference","converted_to_id","converted_invoice_number","subtotal","taxes_total","total_vat","total_retention","total_surcharge","total","shipping_cost","total_with_shipping","currency","payment_method","payment_terms_days","delivery_terms","estimated_delivery_date","notes","terms_and_conditions","external_id","lines","metadata","tags","custom_fields","link_expires_at","link_is_active","created_at","updated_at"],"title":"Proforma"},"ProformaLine":{"type":"object","description":"A line item on a proforma.","properties":{"object":{"type":"string","enum":["proforma_line"]},"description":{"type":["string","null"],"example":"Setup inicial","examples":["Setup inicial"]},"product":{"anyOf":[{"$ref":"#/components/schemas/ProductRef"},{"type":"null"}]},"quantity":{"type":"number","example":1,"examples":[1]},"unit_price":{"type":"number","example":1500,"examples":[1500]},"tax_rate":{"type":"number","example":21,"examples":[21]},"retention_rate":{"type":"number","description":"IRPF withholding percentage applied to the line (0–100). Default 0. Its amount is already aggregated into `taxes`.","example":0,"examples":[0]},"surcharge_rate":{"type":"number","description":"Equivalence surcharge (recargo de equivalencia) percentage applied to the line (0–100). Default 0. Its amount is already aggregated into `taxes`.","example":0,"examples":[0]},"discount_percent":{"type":"number","example":0,"examples":[0]},"subtotal":{"type":"number","example":1500,"examples":[1500]},"taxes":{"type":"number","example":315,"examples":[315]},"total":{"type":"number","example":1815,"examples":[1815]}},"required":["object","description","product","quantity","unit_price","tax_rate","retention_rate","surcharge_rate","discount_percent","subtotal","taxes","total"],"title":"ProformaLine"},"ProformaStats":{"type":"object","description":"Aggregated summary of the proformas of the authenticated company: total, accumulated amount, breakdown by status (with count and amount), conversion-to-invoice ratio, those about to expire and average value. Returned by `GET /v1/proformas/stats`.","properties":{"total_count":{"type":"integer","description":"Total number of recorded proformas.","example":8,"examples":[8]},"total_amount":{"type":"number","description":"Importe acumulado de las proformas (EUR).","example":110003.7,"examples":[110003.7]},"by_status":{"type":"object","additionalProperties":{"type":"object","properties":{"count":{"type":"integer","description":"Number of proformas in this state."},"total":{"type":"number","description":"Importe acumulado de las proformas en este estado (EUR)."}},"required":["count","total"]},"description":"Desglose por estado. Claves: `draft`, `accepted`, `rejected`, `cancelled`, `expired`, `converted`."},"conversion_rate":{"type":"number","description":"Conversion-to-invoice ratio (converted proformas / total), as a fraction.","example":12.5,"examples":[12.5]},"expiring_soon":{"type":"integer","description":"Proformas whose `valid_until` date expires in the coming days.","example":0,"examples":[0]},"average_value":{"type":"number","description":"Valor medio de las proformas (EUR).","example":13750.46,"examples":[13750.46]}},"required":["total_count","total_amount","by_status","conversion_rate","expiring_soon","average_value"],"title":"ProformaStats"},"PublicLink":{"type":"object","description":"Represents the state of the shareable public link of a document (quote/invoice/proforma/delivery_note). `url` is the absolute URL ready to send to the client; `enabled` indicates whether it is active; `expires_at` the deadline (`null` = unlimited); `max_days` the maximum allowed when extending it.","properties":{"object":{"type":"string","enum":["public_link"],"example":"public_link","examples":["public_link"]},"url":{"type":"string","format":"uri","description":"Absolute URL of the public link to share with the client.","example":"https://app.factuarea.com/p/quotes/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04","examples":["https://app.factuarea.com/p/quotes/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04"]},"id":{"type":"string","description":"UUID (v7) del documento al que apunta el enlace.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04"]},"enabled":{"type":"boolean","description":"Indicates whether the public link is currently active.","example":true,"examples":[true]},"expires_at":{"type":["string","null"],"format":"date-time","description":"Expiration date/time of the link, or `null` if it does not expire.","example":"2026-04-15T23:59:59Z","examples":["2026-04-15T23:59:59Z"]},"max_days":{"type":"integer","description":"Maximum number of days allowed when extending the link validity (business limit).","example":180,"examples":[180]}},"required":["object","url","id","enabled","expires_at","max_days"],"title":"PublicLink"},"PurchaseInvoice":{"type":"object","description":"An invoice received from a supplier.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a07","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a07"]},"object":{"type":"string","enum":["purchase_invoice"]},"external_invoice_number":{"type":"string","description":"The number assigned by the supplier on their invoice.","example":"INV-2026-001-DI","examples":["INV-2026-001-DI"]},"external_id":{"type":["string","null"],"maxLength":100,"description":"External integration key (ERP/CRM/e-commerce) mapping this document to a record in a third-party system. Free-format, unique per company, filterable via `?external_id=`. `null` when not set. Persistent synchronization key, independent of the request-level `Idempotency-Key`.","example":"ERP-COMPRA-2026-0007","examples":["ERP-COMPRA-2026-0007"]},"internal_code":{"type":["string","null"],"description":"Optional internal code assigned by the company for its own classification.","example":"GASTO-2026-0007","examples":["GASTO-2026-0007"]},"supplier":{"$ref":"#/components/schemas/SupplierRef"},"status":{"type":"string","example":"paid","examples":["paid"]},"issued_on":{"type":"string","format":"date","example":"2026-01-05","examples":["2026-01-05"]},"received_on":{"type":["string","null"],"format":"date","description":"Reception date of the invoice, or `null`.","example":"2026-04-18","examples":["2026-04-18"]},"due_on":{"type":["string","null"],"format":"date","example":"2026-02-04","examples":["2026-02-04"]},"subtotal":{"type":"number","example":350,"examples":[350]},"taxes_total":{"type":"number","example":73.5,"examples":[73.5]},"total_retention":{"type":"number","description":"Aggregated IRPF withholding of the lines (Σ retention_amount). Header invariant: `total === subtotal + taxes_total − total_retention`.","example":0,"examples":[0]},"total":{"type":"number","example":423.5,"examples":[423.5]},"currency":{"type":"string","example":"EUR","examples":["EUR"]},"paid_amount":{"type":"number","description":"Amount already paid against this purchase invoice (derived from the payment ledger, BR-PUR-019). Satisfies the invariant `paid_amount + pending_amount === total`.","example":423.5,"examples":[423.5]},"pending_amount":{"type":"number","description":"Outstanding balance pending payment for this purchase invoice (derived from the payment ledger).","example":0,"examples":[0]},"payment_status":{"type":"string","enum":["pending","partially_paid","paid","overdue"],"description":"Derived payment status (BR-PUR-020), NOT a persisted domain state (the model keeps 4 statuses). `overdue` derives from `pending` + `due_date < today` and prevails in presentation.","example":"paid","examples":["paid"]},"paid_at":{"type":["string","null"],"format":"date","example":"2026-01-10","examples":["2026-01-10"]},"payment_method":{"type":["string","null"],"example":"transferencia","examples":["transferencia"]},"payment_terms_days":{"type":["integer","null"],"description":"Payment term days agreed with the supplier, or `null`.","example":30,"examples":[30]},"bank_account":{"type":"null","description":"Supplier bank account. Always `null` in this version (accounts live embedded as JSON in `suppliers` without a stable identity). Follow-up `bridge-bank-account-cross-bc-supplier` will expose it as an object once Supplier promotes a read port."},"expense_account":{"type":["string","null"],"description":"Cuenta contable de gasto asociada, o `null`.","example":"6280001","examples":["6280001"]},"expense_category_id":{"type":["string","null"],"description":"UUID (v7) of the associated expense category, or `null`.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c01","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c01"]},"deductible_percentage":{"type":["number","null"],"format":"float","description":"Deductible percentage of the input VAT (0–100), or `null` when not set.","example":100,"examples":[100]},"operation_class":{"type":"string","enum":["corriente","bien_inversion","importacion","intracomunitaria"],"description":"Operation class for the input VAT of Modelo 303 (BR-PUR-018 / BR-TXR-030). Defaults to `corriente`.","example":"corriente","examples":["corriente"]},"exclude_347":{"type":"boolean","description":"Declarative per-document flag (BR-TXR-024): whether this purchase invoice is excluded from the annual Modelo 347 report.","example":false,"examples":[false]},"tax_period":{"type":["string","null"],"description":"Fiscal allocation period (format `YYYY-MM` or `YYYY-QN`), or `null`.","example":"2026-Q2","examples":["2026-Q2"]},"is_reverse_charge":{"type":"boolean","description":"Indicates whether the invoice is subject to reverse charge.","example":false,"examples":[false]},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":30,"description":"Free classification tags (lowercase slugs `[a-z0-9-]`, ≤ 40 chars each, ≤ 30 tags). Filterable via `?tags[in]=tag1,tag2` (JSON_CONTAINS, OR semantics). Empty `[]` when there are none.","example":["suministros","oficina"],"examples":[["suministros","oficina"]]},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"},"maxItems":50,"description":"Ordered list of typed custom fields `[{field, value}]` (≤ 50). Distinct from `metadata` (a free key→value map): use `custom_fields` for structured, display-oriented integration metadata. Empty `[]` when there are none.","example":[{"field":"centro_coste","value":"CC-OFICINA"}],"examples":[[{"field":"centro_coste","value":"CC-OFICINA"}]]},"internal_notes":{"type":["string","null"],"description":"Notas internas no visibles para el proveedor, o `null`.","example":"Revisar con contabilidad antes del cierre trimestral.","examples":["Revisar con contabilidad antes del cierre trimestral."]},"attachment":{"anyOf":[{"$ref":"#/components/schemas/PurchaseInvoiceAttachment"},{"type":"null"}]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseInvoiceLine"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"notes":{"type":["string","null"],"example":"Pedido material oficina Q1.","examples":["Pedido material oficina Q1."]},"created_at":{"type":"string","format":"date-time","example":"2026-01-08T10:00:00Z","examples":["2026-01-08T10:00:00Z"]},"updated_at":{"type":"string","format":"date-time","example":"2026-01-10T12:00:00Z","examples":["2026-01-10T12:00:00Z"]}},"required":["id","object","external_invoice_number","external_id","internal_code","supplier","status","issued_on","received_on","due_on","subtotal","taxes_total","total_retention","total","currency","paid_amount","pending_amount","payment_status","paid_at","payment_method","payment_terms_days","bank_account","expense_account","expense_category_id","deductible_percentage","operation_class","exclude_347","tax_period","is_reverse_charge","tags","custom_fields","internal_notes","attachment","lines","metadata","notes","created_at","updated_at"],"title":"PurchaseInvoice"},"PurchaseInvoiceAttachment":{"type":"object","description":"Fichero adjunto (PDF/imagen) de la factura de compra. `null` cuando no hay adjunto.","properties":{"filename":{"type":"string","description":"Nombre original del fichero subido.","example":"factura-suministros-abril-2026.pdf","examples":["factura-suministros-abril-2026.pdf"]},"mime_type":{"type":"string","description":"MIME type del fichero (e.g. `application/pdf`).","example":"application/pdf","examples":["application/pdf"]},"size_bytes":{"type":"integer","description":"File size in bytes.","example":241,"examples":[241]},"download_url":{"type":"string","description":"URL relativa de descarga del adjunto (`/v1/purchase_invoices/{id}/file`).","example":"/v1/purchase_invoices/019e822c-555a-709d-99d7-2cfeac9fc920/file","examples":["/v1/purchase_invoices/019e822c-555a-709d-99d7-2cfeac9fc920/file"]}},"required":["filename","mime_type","size_bytes","download_url"],"title":"PurchaseInvoiceAttachment"},"PurchaseInvoiceLine":{"type":"object","description":"A line item on a purchase invoice.","properties":{"object":{"type":"string","enum":["purchase_invoice_line"],"example":"purchase_invoice_line","examples":["purchase_invoice_line"]},"description":{"type":["string","null"],"example":"Material oficina pedido Q1","examples":["Material oficina pedido Q1"]},"quantity":{"type":"number","example":1,"examples":[1]},"unit_price":{"type":"number","example":350,"examples":[350]},"tax_rate":{"type":"number","example":21,"examples":[21]},"retention_rate":{"type":"number","description":"IRPF withholding percentage applied to the supplier (0–100). Default 0.","example":0,"examples":[0]},"subtotal":{"type":"number","example":350,"examples":[350]},"taxes":{"type":"number","example":73.5,"examples":[73.5]},"retention_amount":{"type":"number","description":"Withholding amount of the line (`subtotal * retention_rate / 100`). The line total follows `subtotal + taxes − retention_amount`.","example":0,"examples":[0]},"vat_deductible":{"type":"boolean","description":"Whether the line VAT is deductible. Informational: it does not change the amount paid.","example":true,"examples":[true]},"total":{"type":"number","example":423.5,"examples":[423.5]}},"required":["object","description","quantity","unit_price","tax_rate","retention_rate","subtotal","taxes","retention_amount","vat_deductible","total"],"title":"PurchaseInvoiceLine"},"PurchaseInvoiceStats":{"type":"object","description":"Aggregated metrics (KPIs) of the purchase invoices of the authenticated company: total, count by status and accumulated amounts. `overdue` is a derived condition (`pending` + past due date), not a persisted status.","properties":{"object":{"type":"string","enum":["purchase_invoice_stats"],"example":"purchase_invoice_stats","examples":["purchase_invoice_stats"]},"total_invoices":{"type":"integer","description":"Total number of purchase invoices.","example":12,"examples":[12]},"by_status":{"type":"object","additionalProperties":{"type":"integer"},"description":"Invoice count by status (key = status, value = number of invoices). Keys: `draft`, `pending`, `paid`, `cancelled` (persisted statuses) plus `overdue` (derived KPI: overdue subset of `pending`).","example":{"draft":2,"pending":5,"paid":5,"cancelled":0,"overdue":2},"examples":[{"draft":2,"pending":5,"paid":5,"cancelled":0,"overdue":2}]},"pending":{"type":"integer","description":"Number of invoices pending payment.","example":5,"examples":[5]},"draft":{"type":"integer","description":"Number of draft invoices.","example":2,"examples":[2]},"paid":{"type":"integer","description":"Number of paid invoices.","example":5,"examples":[5]},"cancelled":{"type":"integer","description":"Number of cancelled invoices.","example":0,"examples":[0]},"overdue":{"type":"integer","description":"Number of overdue and unpaid invoices (subset of `pending` with a past due date).","example":2,"examples":[2]},"total_amount":{"type":"number","description":"Importe total acumulado de todas las facturas de compra.","example":5558.36,"examples":[5558.36]},"pending_amount":{"type":"number","description":"Importe total pendiente de pago.","example":2506.35,"examples":[2506.35]},"paid_amount":{"type":"number","description":"Importe total ya pagado.","example":2944.32,"examples":[2944.32]}},"required":["object","total_invoices","by_status","pending","draft","paid","cancelled","overdue","total_amount","pending_amount","paid_amount"],"title":"PurchaseInvoiceStats"},"QuarterlyDownloadV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/quarterly/download-zip\nand POST /v1/invoices/quarterly/send-email (shared fields).\n\nThe canonical recipient field is `email`. We accept\n`to_email` as a deprecated alias for compatibility with older clients.","properties":{"year":{"type":"integer","minimum":2000,"maximum":2027},"quarter":{"type":"integer","minimum":1,"maximum":4},"include_index":{"type":["boolean","null"]},"email":{"type":["string","null"],"format":"email"},"message":{"type":["string","null"],"maxLength":5000}},"required":["year","quarter"],"title":"QuarterlyDownloadV1Request"},"Quote":{"type":"object","description":"A sales quote that can be converted to an invoice.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a04"]},"object":{"type":"string","enum":["quote"]},"number":{"type":"string","example":"P-2026-00012","examples":["P-2026-00012"]},"series":{"$ref":"#/components/schemas/SeriesRef"},"client":{"$ref":"#/components/schemas/ClientRef"},"status":{"type":"string","description":"Quote lifecycle status (draft, sent, accepted, rejected, expired, converted, cancelled).","example":"sent","examples":["sent"]},"issued_on":{"type":"string","format":"date","example":"2026-01-18","examples":["2026-01-18"]},"valid_until":{"type":["string","null"],"format":"date","example":"2026-02-17","examples":["2026-02-17"]},"accepted_at":{"type":["string","null"],"format":"date-time","example":null,"examples":[null]},"rejected_at":{"type":["string","null"],"format":"date-time","example":null,"examples":[null]},"converted_to_id":{"type":["string","null"],"description":"UUID (v7) of the invoice this quote was converted into, if any.","example":null,"examples":[null]},"converted_invoice_number":{"type":["string","null"],"description":"Human-readable number of the invoice this quote was converted into (e.g. \"F-2026-00042\"). null if not converted.","example":"F-2025-001","examples":["F-2025-001"]},"subtotal":{"type":"number","example":500,"examples":[500]},"taxes_total":{"type":"number","description":"Aggregated tax amount. Use total_vat/total_retention/total_surcharge for breakdown.","example":105,"examples":[105]},"total_vat":{"type":"number","description":"Sum of VAT (IVA) across all lines.","example":105,"examples":[105]},"total_retention":{"type":"number","description":"Sum of withholding (IRPF/retention) across all lines.","example":0,"examples":[0]},"total_surcharge":{"type":"number","description":"Sum of equivalence surcharge (recargo de equivalencia) across all lines.","example":0,"examples":[0]},"total":{"type":"number","example":605,"examples":[605]},"currency":{"type":"string","example":"EUR","examples":["EUR"]},"notes":{"type":["string","null"],"example":"Presupuesto válido 30 días.","examples":["Presupuesto válido 30 días."]},"terms":{"type":["string","null"],"description":"Free-text terms and conditions rendered on the quote PDF.","example":"Presupuesto valido durante 30 dias desde la fecha de emision.","examples":["Presupuesto valido durante 30 dias desde la fecha de emision."]},"external_id":{"type":["string","null"],"maxLength":100,"description":"External integration key (ERP/CRM/e-commerce) mapping this document to a record in a third-party system. Free-format, unique per company, filterable via `?external_id=`. `null` when not set. Persistent synchronization key, independent of the request-level `Idempotency-Key`.","example":"CRM-PRES-2026-0012","examples":["CRM-PRES-2026-0012"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/QuoteLine"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":30,"description":"Free classification tags (lowercase slugs `[a-z0-9-]`, ≤ 40 chars each, ≤ 30 tags). Filterable via `?tags[in]=tag1,tag2` (JSON_CONTAINS, OR semantics). Empty `[]` when there are none.","example":["comercial","q1-2026"],"examples":[["comercial","q1-2026"]]},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"},"maxItems":50,"description":"Ordered list of typed custom fields `[{field, value}]` (≤ 50). Distinct from `metadata` (a free key→value map): use `custom_fields` for structured, display-oriented integration metadata. Empty `[]` when there are none.","example":[{"field":"campania","value":"Promo primavera"}],"examples":[[{"field":"campania","value":"Promo primavera"}]]},"link_expires_at":{"type":["string","null"],"format":"date-time","description":"Expiry date of the public share link, or null if unlimited.","example":"2026-07-01T09:53:57+02:00","examples":["2026-07-01T09:53:57+02:00"]},"link_is_active":{"type":"boolean","description":"Whether the public share link is currently active.","example":true,"examples":[true]},"created_at":{"type":"string","format":"date-time","example":"2026-01-18T16:20:00Z","examples":["2026-01-18T16:20:00Z"]},"updated_at":{"type":"string","format":"date-time","example":"2026-01-18T16:25:00Z","examples":["2026-01-18T16:25:00Z"]}},"required":["id","object","number","series","client","status","issued_on","valid_until","accepted_at","rejected_at","converted_to_id","converted_invoice_number","subtotal","taxes_total","total_vat","total_retention","total_surcharge","total","currency","notes","terms","external_id","lines","metadata","tags","custom_fields","link_expires_at","link_is_active","created_at","updated_at"],"title":"Quote"},"QuoteLine":{"type":"object","description":"A line item on a quote.","properties":{"object":{"type":"string","enum":["quote_line"]},"description":{"type":["string","null"],"example":"Auditoría inicial","examples":["Auditoría inicial"]},"product":{"anyOf":[{"$ref":"#/components/schemas/ProductRef"},{"type":"null"}]},"quantity":{"type":"number","example":5,"examples":[5]},"unit_price":{"type":"number","example":100,"examples":[100]},"tax_rate":{"type":"number","example":21,"examples":[21]},"retention_rate":{"type":"number","description":"IRPF withholding percentage applied to the line (0–100). Default 0. Its amount is already aggregated into `taxes`.","example":0,"examples":[0]},"surcharge_rate":{"type":"number","description":"Equivalence surcharge (recargo de equivalencia) percentage applied to the line (0–100). Default 0. Its amount is already aggregated into `taxes`.","example":0,"examples":[0]},"discount_percent":{"type":"number","example":0,"examples":[0]},"subtotal":{"type":"number","example":500,"examples":[500]},"taxes":{"type":"number","example":105,"examples":[105]},"total":{"type":"number","example":605,"examples":[605]}},"required":["object","description","product","quantity","unit_price","tax_rate","retention_rate","surcharge_rate","discount_percent","subtotal","taxes","total"],"title":"QuoteLine"},"QuoteStats":{"type":"object","description":"Resumen agregado de los presupuestos de la empresa autenticada: total, importe acumulado, conteo por estado, expirados y convertidos a factura. Devuelto por `GET /v1/quotes/stats`.","properties":{"total_count":{"type":"integer","description":"Total number of recorded quotes.","example":142,"examples":[142]},"total_amount":{"type":"number","description":"Importe acumulado de los presupuestos (EUR).","example":248750.45,"examples":[248750.45]},"count_by_status":{"type":"object","additionalProperties":{"type":"integer"},"description":"Recuento de presupuestos por estado. Claves: `draft`, `sent`, `accepted`, `rejected`, `expired`, `converted`, `cancelled`.","example":{"draft":23,"sent":41,"accepted":38,"rejected":12,"expired":14,"converted":11,"cancelled":3},"examples":[{"draft":23,"sent":41,"accepted":38,"rejected":12,"expired":14,"converted":11,"cancelled":3}]},"expired_count":{"type":"integer","description":"Quotes whose `valid_until` date has already passed.","example":14,"examples":[14]},"converted_count":{"type":"integer","description":"Presupuestos convertidos a factura.","example":11,"examples":[11]}},"required":["total_count","total_amount","count_by_status","expired_count","converted_count"],"title":"QuoteStats"},"RecurringInvoice":{"type":"object","description":"A recurring invoice template that auto-generates invoices on a fixed cadence.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08"]},"object":{"type":"string","enum":["recurring_invoice"],"example":"recurring_invoice","examples":["recurring_invoice"]},"client":{"$ref":"#/components/schemas/ClientRef"},"series":{"$ref":"#/components/schemas/SeriesRef"},"status":{"type":"string","description":"Recurring schedule status (active, paused, completed, cancelled).","example":"active","examples":["active"]},"frequency":{"type":"string","description":"Cadence (weekly, monthly, quarterly, yearly, etc.).","example":"monthly","examples":["monthly"]},"name":{"type":"string","description":"Nombre descriptivo de la recurrencia.","example":"Cuota mantenimiento mensual Acme","examples":["Cuota mantenimiento mensual Acme"]},"description":{"type":["string","null"],"description":"Free-text description of the recurrence.","example":"Contrato de soporte y mantenimiento Plan Pro","examples":["Contrato de soporte y mantenimiento Plan Pro"]},"notes":{"type":["string","null"],"description":"Notas internas que se trasladan a las facturas generadas.","example":"Renovación automática. Facturar el día 1 de cada mes.","examples":["Renovación automática. Facturar el día 1 de cada mes."]},"email_to":{"type":["string","null"],"format":"email","description":"Recipient of the automatic dispatch of generated invoices. `null` if not configured.","example":"facturacion@acme.example","examples":["facturacion@acme.example"]},"send_automatically":{"type":"boolean","description":"If `true`, the generated invoices are automatically emailed to `email_to`.","example":true,"examples":[true]},"days_before_due":{"type":"integer","description":"Payment term days (Net X) applied to the due date of each generated invoice.","example":30,"examples":[30]},"max_occurrences":{"type":["integer","null"],"description":"Maximum number of invoices to generate before completing the recurrence. `null` = no limit.","example":12,"examples":[12]},"occurrences_count":{"type":"integer","description":"Number of invoices already generated by this recurrence.","example":3,"examples":[3]},"remaining_occurrences":{"type":["integer","null"],"description":"Invoices remaining until `max_occurrences` is reached. `null` when there is no limit.","example":9,"examples":[9]},"holiday_handling":{"type":"string","description":"Adjustment policy when the run date falls on a holiday/weekend (e.g. `none`, `next_business_day`, `previous_business_day`).","example":"next_business_day","examples":["next_business_day"]},"start_on":{"type":"string","format":"date","example":"2026-01-01","examples":["2026-01-01"]},"end_on":{"type":["string","null"],"format":"date","example":"2026-12-31","examples":["2026-12-31"]},"next_run_at":{"type":"string","description":"When the next invoice will be generated.","example":"2026-02-01T09:00:00Z","examples":["2026-02-01T09:00:00Z"]},"last_run_at":{"type":["string","null"],"description":"When the last invoice was generated, if any.","example":"2026-01-01T09:00:00Z","examples":["2026-01-01T09:00:00Z"]},"cancelled_at":{"type":["string","null"],"format":"date-time","description":"When the recurrence was cancelled (irreversible terminal state). `null` if not cancelled.","example":null,"examples":[null]},"subtotal":{"type":"number","example":200,"examples":[200]},"taxes_total":{"type":"number","example":42,"examples":[42]},"total":{"type":"number","example":242,"examples":[242]},"currency":{"type":"string","example":"EUR","examples":["EUR"]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/RecurringInvoiceLine"}},"metadata":{"$ref":"#/components/schemas/Metadata"},"external_id":{"type":["string","null"],"maxLength":100,"description":"External integration key (ERP/CRM/e-commerce) mapping this document to a record in a third-party system. Free-format, unique per company, filterable via `?external_id=`. `null` when not set. Persistent synchronization key, independent of the request-level `Idempotency-Key`.","example":"ERP-REC-2026-0008","examples":["ERP-REC-2026-0008"]},"tags":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":30,"description":"Free classification tags (lowercase slugs `[a-z0-9-]`, ≤ 40 chars each, ≤ 30 tags). Filterable via `?tags[in]=tag1,tag2` (JSON_CONTAINS, OR semantics). Empty `[]` when there are none.","example":["suscripcion","mantenimiento"],"examples":[["suscripcion","mantenimiento"]]},"custom_fields":{"type":"array","items":{"$ref":"#/components/schemas/CustomField"},"maxItems":50,"description":"Ordered list of typed custom fields `[{field, value}]` (≤ 50). Distinct from `metadata` (a free key→value map): use `custom_fields` for structured, display-oriented integration metadata. Empty `[]` when there are none.","example":[{"field":"contrato","value":"CTR-2026-0007"}],"examples":[[{"field":"contrato","value":"CTR-2026-0007"}]]},"created_at":{"type":"string","format":"date-time","example":"2025-12-20T15:00:00Z","examples":["2025-12-20T15:00:00Z"]},"updated_at":{"type":"string","format":"date-time","example":"2026-01-01T09:05:00Z","examples":["2026-01-01T09:05:00Z"]}},"required":["id","object","client","series","status","frequency","name","description","notes","email_to","send_automatically","days_before_due","max_occurrences","occurrences_count","remaining_occurrences","holiday_handling","start_on","end_on","next_run_at","last_run_at","cancelled_at","subtotal","taxes_total","total","currency","lines","metadata","external_id","tags","custom_fields","created_at","updated_at"],"title":"RecurringInvoice"},"RecurringInvoiceActivity":{"type":"object","description":"An event in the activity timeline of a recurring invoice. Groups domain events originated by changes to the recurrence itself (creation, activation, pause, resume, execution, failure, cancellation) and by the invoices it generates.","properties":{"object":{"type":"string","enum":["activity"],"example":"activity","examples":["activity"]},"event_type":{"type":"string","description":"Tipo de evento de dominio (p. ej. `recurring_invoice.activated`, `recurring_invoice.executed`, `recurring_invoice.cancelled`).","example":"recurring_invoice.executed","examples":["recurring_invoice.executed"]},"description":{"type":"string","description":"Human-readable description of the event in Spanish.","example":"Se generó la factura F-2026-0042 a partir de la recurrencia.","examples":["Se generó la factura F-2026-0042 a partir de la recurrencia."]},"metadata":{"type":"object","additionalProperties":true,"description":"Metadatos del evento. Los identificadores internos (PKs) se eliminan; los `*_uuid` se conservan.","example":{"invoice_uuid":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a11","invoice_number":"F-2026-0042"},"examples":[{"invoice_uuid":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a11","invoice_number":"F-2026-0042"}]},"performed_by":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"],"description":"Type of actor that originated the event: `user` for a human in the internal app, `api_key` for an action performed through the public v1 API."},"id":{"type":"string","description":"UUID (v7) of the actor: the user when `type=user`, or the API key when `type=api_key`."},"name":{"type":["string","null"],"description":"Nombre del actor en el momento del evento: nombre del usuario o nombre de la API key. `null` si no se pudo resolver."}},"required":["type","id","name"]},{"type":"null"}],"description":"Actor that originated the event. `{type:\"user\",...}` for an internal user, `{type:\"api_key\",...}` when performed via the public v1 API, or `null` when the event is system-generated (scheduler, periodic sweep) with no attributable actor.","example":{"type":"user","id":"019e5584-7a6d-736a-9f62-03f731ccae3a","name":"Administrador"},"examples":[{"type":"user","id":"019e5584-7a6d-736a-9f62-03f731ccae3a","name":"Administrador"}]},"created_at":{"type":"string","format":"date-time","description":"When the event occurred (ISO 8601).","example":"2026-02-01T09:00:05Z","examples":["2026-02-01T09:00:05Z"]}},"required":["object","event_type","description","metadata","performed_by","created_at"],"title":"RecurringInvoiceActivity"},"RecurringInvoiceLine":{"type":"object","description":"A line item on a recurring invoice template.","properties":{"object":{"type":"string","enum":["recurring_invoice_line"],"example":"recurring_invoice_line","examples":["recurring_invoice_line"]},"description":{"type":["string","null"],"example":"Cuota soporte mensual","examples":["Cuota soporte mensual"]},"quantity":{"type":"number","example":1,"examples":[1]},"unit_price":{"type":"number","example":200,"examples":[200]},"tax_rate":{"type":"number","example":21,"examples":[21]},"retention":{"type":"number","description":"IRPF withholding percentage applied to the line (0–100). Default 0. Its amount is already aggregated into `taxes`.","example":0,"examples":[0]},"surcharge":{"type":"number","description":"Equivalence surcharge (recargo de equivalencia) percentage applied to the line (0–100). Default 0. Its amount is already aggregated into `taxes`.","example":0,"examples":[0]},"subtotal":{"type":"number","example":200,"examples":[200]},"taxes":{"type":"number","example":42,"examples":[42]},"total":{"type":"number","example":242,"examples":[242]}},"required":["object","description","quantity","unit_price","tax_rate","retention","surcharge","subtotal","taxes","total"],"title":"RecurringInvoiceLine"},"RecurringInvoiceStats":{"type":"object","description":"Aggregated summary of the recurring invoices of the authenticated company: counters by status, upcoming due dates, current-month generation/failures, breakdown by frequency, upcoming runs and estimated revenue. Returned by `GET /v1/recurring_invoices/stats`.","properties":{"object":{"type":"string","enum":["recurring_invoice_stats"],"example":"recurring_invoice_stats","examples":["recurring_invoice_stats"]},"total":{"type":"integer","description":"Total de recurrencias registradas.","example":24,"examples":[24]},"active":{"type":"integer","description":"Recurrencias activas (generando facturas).","example":18,"examples":[18]},"paused":{"type":"integer","description":"Recurrencias pausadas (reanudables).","example":3,"examples":[3]},"cancelled":{"type":"integer","description":"Recurrencias canceladas (estado terminal irreversible).","example":2,"examples":[2]},"completed":{"type":"integer","description":"Recurrencias completadas (alcanzaron `max_occurrences`). Reportado como `0` hasta que el repositorio provea el conteo dedicado.","example":1,"examples":[1]},"due_today":{"type":"integer","description":"Recurrences whose next run is today.","example":1,"examples":[1]},"due_this_week":{"type":"integer","description":"Recurrences whose next run falls in the current week.","example":4,"examples":[4]},"generated_this_month":{"type":"integer","description":"Facturas generadas por recurrencias durante el mes en curso.","example":11,"examples":[11]},"failed_this_month":{"type":"integer","description":"Ejecuciones de recurrencia fallidas durante el mes en curso.","example":0,"examples":[0]},"frequency_breakdown":{"type":"object","additionalProperties":{"type":"integer"},"description":"Recuento de recurrencias por frecuencia. Claves: `weekly`, `monthly`, `quarterly`, `yearly`, etc.","example":{"monthly":15,"quarterly":5,"yearly":4},"examples":[{"monthly":15,"quarterly":5,"yearly":4}]},"next_scheduled":{"type":"array","description":"Upcoming recurrences to run, ordered by run date ascending.","items":{"type":"object","properties":{"id":{"type":["string","null"],"description":"UUID (v7) de la recurrencia."},"name":{"type":["string","null"],"description":"Nombre de la recurrencia."},"next_run_date":{"type":["string","null"],"format":"date","description":"Date of the next run (ISO 8601)."}},"required":["id","name","next_run_date"]},"example":[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08","name":"Cuota mantenimiento mensual Acme","next_run_date":"2026-02-01"}],"examples":[[{"id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a08","name":"Cuota mantenimiento mensual Acme","next_run_date":"2026-02-01"}]]},"estimated_revenue_this_month":{"type":"number","description":"Ingresos estimados por recurrencias durante el mes en curso (EUR).","example":5324,"examples":[5324]}},"required":["object","total","active","paused","cancelled","completed","due_today","due_this_week","generated_this_month","failed_this_month","frequency_breakdown","next_scheduled","estimated_revenue_this_month"],"title":"RecurringInvoiceStats"},"RegisterInvoicePaymentRequest":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/{uuid}/payments.\n\nRegistra un pago parcial de una factura de venta reutilizando\n`CreatePaymentCommand` del BC Payment. Body:\n - `amount` (numérico > 0, requerido)\n - `paid_on` (fecha, requerido) → mapea al `date` del comando\n - `payment_method` (string del catálogo cerrado `PaymentMethod`, requerido)\n   → mapea al `method` del comando\n - `reference` (string, opcional)\n - `notes` (string, opcional)\n\nEl `in:` de `payment_method` deriva de `PaymentMethod::cases()` (7 casos:\n`bank_transfer`, `direct_debit`, `cash`, `credit_card`, `check`, `paypal`,\n`other`) — NO se hardcodea la lista para no divergir del catálogo (la lista\nde 6 del `CreatePaymentRequest` SPA omite `direct_debit`).","properties":{"amount":{"type":"number","minimum":0.01},"paid_on":{"type":"string","format":"date"},"payment_method":{"type":"string","enum":["bank_transfer","direct_debit","cash","credit_card","check","paypal","other"]},"reference":{"type":["string","null"],"maxLength":255},"notes":{"type":["string","null"],"maxLength":1000}},"required":["amount","paid_on","payment_method"],"title":"RegisterInvoicePaymentRequest"},"RegisterPurchaseInvoicePaymentRequest":{"type":"object","description":"Public REST API v1 — POST /v1/purchase_invoices/{uuid}/payments.\n\nRegistra un pago parcial (o total) en el ledger de una factura de compra\n(BR-PUR-019), reutilizando `RegisterPurchaseInvoicePaymentCommand` del BC\nPurchaseInvoice. Body:\n - `amount` (numérico > 0, requerido)\n - `paid_on` (fecha, requerido) → mapea al `paidOn` del comando\n - `payment_method` (string del catálogo `PaymentMethod`, requerido) → `method`\n - `bank_account_id` (entero, opcional)\n - `reference` (string, opcional)\n - `notes` (string, opcional)\n\nLas invariantes de dominio (`0 < amount ≤ pending`, `emisión ≤ paid_on ≤ hoy`,\nno sobre `cancelled`) las valida el Aggregate (`registerPayment()`) y se\nexponen como 422 vía `InvalidPurchaseInvoicePaymentException` (PublicApiMappable).","properties":{"amount":{"type":"number"},"paid_on":{"type":"string","format":"date"},"payment_method":{"type":"string","maxLength":30},"bank_account_id":{"type":["integer","null"]},"reference":{"type":["string","null"],"maxLength":255},"notes":{"type":["string","null"],"maxLength":1000}},"required":["amount","paid_on","payment_method"],"title":"RegisterPurchaseInvoicePaymentRequest"},"RejectProformaRequest":{"type":"object","description":"Public REST API v1 — POST /v1/proformas/{uuid}/reject.\n\nBody opcional: `reason` (string ≤500), `metadata` (objeto ≤50 keys,\n≤500 chars/valor — validado con el VO `Metadata`).","properties":{"reason":{"type":["string","null"],"maxLength":500},"metadata":{"$ref":"#/components/schemas/Metadata"}},"title":"RejectProformaRequest"},"RejectQuoteRequest":{"type":"object","description":"Public REST API v1 — POST /v1/quotes/{uuid}/reject.\n\nBody opcional: `reason` (string).","properties":{"reason":{"type":["string","null"],"maxLength":500}},"title":"RejectQuoteRequest"},"SendDeliveryNoteRequest":{"type":"object","description":"Public REST API v1 — POST /v1/delivery_notes/{uuid}/send.\n\nRequired body: `email`. Optional: `subject`, `message` (max 2000 chars),\n`template_id` (catalog id of the email template).\n\n`template_id` is the integer identifier of the global system table\n`templates` (shared catalog, without `company_id` or `uuid` column). It is\nvalidated against the PK `id`, like the internal SPA endpoint. That is why\nit does NOT follow the public UUID convention of the other FKs.","properties":{"email":{"type":"string","format":"email"},"subject":{"type":["string","null"],"maxLength":255},"message":{"type":["string","null"],"maxLength":2000},"template_id":{"type":["integer","null"],"description":"uuid-audit-allow: global system catalog (`templates` table without\ncompany_id or uuid column; integer catalog PK, like the internal SPA)."}},"required":["email"],"title":"SendDeliveryNoteRequest"},"SendInvoiceReminderV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/{uuid}/send-reminder\nand POST /v1/invoices/{uuid}/reminder-preview (same fields).\n\nAll fields are optional — without overrides the handler uses the\ncanonical payment reminder template.","properties":{"email":{"type":["string","null"],"format":"email"},"subject":{"type":["string","null"],"maxLength":200},"message":{"type":["string","null"],"maxLength":5000},"cc":{"type":["array","null"],"items":{"type":"string","format":"email"}},"bcc":{"type":["array","null"],"items":{"type":"string","format":"email"}}},"title":"SendInvoiceReminderV1Request"},"SendInvoiceRequest":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/{uuid}/send.\n\nOptional body: `to` (string), `cc[]`, `bcc[]` (arrays of emails),\n`subject` (max 200), `body` (string). The controller performs the\ncross-field validation: if the client has no email and `to` is\nabsent, it returns 422 `missing_required_param`.","properties":{"to":{"type":["string","null"],"format":"email","maxLength":191},"subject":{"type":["string","null"],"maxLength":200},"body":{"type":["string","null"],"maxLength":5000},"cc":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191}},"bcc":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191}}},"title":"SendInvoiceRequest"},"SendProformaRequest":{"type":"object","description":"Public REST API v1 — POST /v1/proformas/{uuid}/send.\n\nOptional body: `to` (string), `cc[]`, `bcc[]` (arrays of emails),\n`subject` (max 200), `body` (string). The controller performs the\ncross-field validation: if the client has no email and `to` is\nabsent, it returns 422 `missing_required_param`.","properties":{"to":{"type":["string","null"],"format":"email","maxLength":191},"subject":{"type":["string","null"],"maxLength":200},"body":{"type":["string","null"],"maxLength":5000},"cc":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191}},"bcc":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191}}},"title":"SendProformaRequest"},"SendQuoteRequest":{"type":"object","description":"Public REST API v1 — POST /v1/quotes/{uuid}/send.\n\nOptional body: `to` (string), `cc[]`, `bcc[]` (arrays of emails),\n`subject` (max 200), `body` (string). The controller performs the\ncross-field validation: if the client has no email and `to` is\nabsent, it returns 422 `missing_required_param`.","properties":{"to":{"type":["string","null"],"format":"email","maxLength":191},"subject":{"type":["string","null"],"maxLength":200},"body":{"type":["string","null"],"maxLength":5000},"cc":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191}},"bcc":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191}}},"title":"SendQuoteRequest"},"Series":{"type":"object","description":"A document numbering series. Immutable per AEAT compliance.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e"]},"object":{"type":"string","enum":["series"]},"code":{"type":"string","example":"F-2026","examples":["F-2026"]},"name":{"type":"string","example":"Facturas 2026","examples":["Facturas 2026"]},"document_type":{"type":"string","description":"invoice, quote, proforma, delivery_note, etc.","example":"invoice","examples":["invoice"]},"prefix":{"type":"string","description":"Legacy alias for code. Use code field. Will be removed in v2.","example":"F-2026-","examples":["F-2026-"]},"number_format":{"type":"string","description":"Canonical numbering mask describing how the document number is rendered: padding (the block of zeros), year token (`{YYYY}` 4 digits / `{YY}` 2 digits / omitted for no year) and separator. Example: `{code}-{YYYY}-{000}` (default) or `{code}-{YYYY}-{00000}` for 5-digit padding. Set on creation and immutable afterwards. Mirrors Holded's `format`.","example":"{code}-{YYYY}-{000}","examples":["{code}-{YYYY}-{000}"]},"next_number":{"type":"integer","description":"Next correlative that will be assigned on the next real emission.","example":46,"examples":[46]},"current_number":{"type":"integer","description":"Last correlative actually emitted in the current fiscal year (0 for a brand-new series).","example":45,"examples":[45]},"initial_number":{"type":"integer","description":"Number the counter starts from. Set on creation to continue an existing numbering when migrating (e.g. 235). Defaults to 1.","example":1,"examples":[1]},"year_reset":{"type":"boolean","example":true,"examples":[true]},"is_default":{"type":"boolean","example":true,"examples":[true]},"is_active":{"type":"boolean","example":true,"examples":[true]},"created_at":{"type":["string","null"],"format":"date-time","example":"2026-01-01T00:00:00Z","examples":["2026-01-01T00:00:00Z"]},"updated_at":{"type":["string","null"],"format":"date-time","example":"2026-01-20T11:30:00Z","examples":["2026-01-20T11:30:00Z"]}},"required":["id","object","code","name","document_type","prefix","number_format","next_number","current_number","initial_number","year_reset","is_default","is_active","created_at","updated_at"],"title":"Series"},"SeriesActivity":{"type":"object","description":"An event in the activity timeline of a numbering series. Groups domain events originated by changes to the series itself (creation, archive/unarchive, marked as default, number consumption).","properties":{"object":{"type":"string","enum":["activity"],"example":"activity","examples":["activity"]},"event_type":{"type":"string","description":"Tipo de evento de dominio (p. ej. `series.created`, `series.archived`, `series.number_consumed`).","example":"series.created","examples":["series.created"]},"description":{"type":"string","description":"Human-readable description of the event in Spanish.","example":"Serie creada","examples":["Serie creada"]},"metadata":{"type":"object","additionalProperties":true,"description":"Metadatos del evento. Los identificadores internos (PKs) se eliminan; los `*_uuid` se conservan."},"performed_by":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"],"description":"Type of actor that originated the event: `user` for a human in the internal app, `api_key` for an action performed through the public v1 API."},"id":{"type":"string","description":"UUID (v7) of the actor: the user when `type=user`, or the API key when `type=api_key`."},"name":{"type":["string","null"],"description":"Nombre del actor en el momento del evento: nombre del usuario o nombre de la API key. `null` si no se pudo resolver."}},"required":["type","id","name"]},{"type":"null"}],"description":"Actor that originated the event. `{type:\"user\",...}` for an internal user, `{type:\"api_key\",...}` when performed via the public v1 API, or `null` when the event is system-generated (scheduler, periodic sweep) with no attributable actor.","example":{"type":"user","id":"019e5584-7a6d-736a-9f62-03f731ccae3a","name":"Administrador"},"examples":[{"type":"user","id":"019e5584-7a6d-736a-9f62-03f731ccae3a","name":"Administrador"}]},"created_at":{"type":"string","format":"date-time","description":"When the event occurred (ISO 8601).","example":"2026-06-01T10:00:46+02:00","examples":["2026-06-01T10:00:46+02:00"]}},"required":["object","event_type","description","metadata","performed_by","created_at"],"title":"SeriesActivity"},"SeriesRef":{"type":"object","properties":{"id":{"type":["string","null"],"example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0e"]},"code":{"type":["string","null"],"example":"F-2026","examples":["F-2026"]}},"required":["id","code"],"title":"SeriesRef"},"SignDeliveryNoteRequest":{"type":"object","description":"Public REST API v1 — POST /v1/delivery_notes/{uuid}/sign.\n\nOptional body: `signed_by` (alias of `recipient_name`, BC invariant),\n`recipient_dni` (BC invariant — Spanish DNI/NIE, required by\n`SignatureData`), `signature_image_base64` (raw base64 PNG; decode +\nsize + magic bytes are validated by the controller to respond 422\n`payload_too_large`/`invalid_param_format`), `signed_at` (ISO 8601\noptional, default now).\n\nThe controller converts `signed_by` → `recipient_name` and prefixes the\nbase64 with `data:image/png;base64,` before dispatching to the BC.","properties":{"signed_by":{"type":"string","maxLength":255},"recipient_dni":{"type":"string","maxLength":20},"signature_image_base64":{"type":"string"},"signed_at":{"type":["string","null"],"format":"date-time"}},"required":["signed_by","recipient_dni","signature_image_base64"],"title":"SignDeliveryNoteRequest"},"SimplifiedInvoiceEligibility":{"type":"object","description":"Result of checking whether an invoice can be issued as simplified (F2) under RD 1619/2012 art. 4.","properties":{"can_be_simplified":{"type":"boolean","description":"Indica si la factura puede emitirse como simplificada (F2).","example":false,"examples":[false]},"must_be_complete":{"type":"boolean","description":"Indica si la factura debe emitirse como completa (F1). Es el complemento de `can_be_simplified`.","example":true,"examples":[true]},"reason_code":{"type":"string","description":"Code of the blocking reason when it cannot be simplified (`intra_community`, `reverse_charge`, `export_operation`, `client_deduction_required`, `over_absolute_limit`). Empty string `\"\"` when it can be simplified.","example":"over_absolute_limit","examples":["over_absolute_limit"]},"reason_message":{"type":"string","description":"Human-readable (Spanish) message of the blocking reason. Empty string `\"\"` when it can be simplified.","example":"El importe 5.000,00 EUR supera el límite de 3.000,00 EUR para una factura simplificada.","examples":["El importe 5.000,00 EUR supera el límite de 3.000,00 EUR para una factura simplificada."]},"sector_limit":{"type":"number","description":"Absolute legal limit (EUR) above which a simplified invoice is not allowed.","example":3000,"examples":[3000]}},"required":["can_be_simplified","must_be_complete","reason_code","reason_message","sector_limit"],"title":"SimplifiedInvoiceEligibility"},"SimplifiedInvoiceEligibilityV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/simplified-eligibility.\n\nChecks whether an invoice with a given `total` amount (and, optionally,\nclient data) can be issued as simplified (F2) or must be issued as a\nfull invoice (F1) under Royal Decree 1619/2012 (art. 4).","properties":{"total":{"type":"number","minimum":0},"client_id":{"type":["string","null"],"format":"uuid"},"client_country":{"type":["string","null"],"minLength":2,"maxLength":2},"is_intra_community":{"type":["boolean","null"]},"is_reverse_charge":{"type":["boolean","null"]},"client_requires_deductible":{"type":["boolean","null"]}},"required":["total"],"title":"SimplifiedInvoiceEligibilityV1Request"},"SubstituteSimplifiedV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/substitute-simplified.\n\nBody: `client_id` (cliente destinatario), `simplified_invoice_ids`\n(array de ids de facturas F2 a sustituir), `notes` opcional.","properties":{"client_id":{"type":"string","format":"uuid"},"notes":{"type":["string","null"],"maxLength":2000},"simplified_invoice_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}},"required":["client_id","simplified_invoice_ids"],"title":"SubstituteSimplifiedV1Request"},"Supplier":{"type":"object","description":"A supplier or vendor of your company.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02"]},"object":{"type":"string","enum":["supplier"]},"name":{"type":"string","example":"Distribuciones Ibéricas, S.L.","examples":["Distribuciones Ibéricas, S.L."]},"business_name":{"type":["string","null"],"description":"Legal/business name / full fiscal name of the supplier (may match `name`).","example":"Distribuciones Ibéricas Sociedad Limitada","examples":["Distribuciones Ibéricas Sociedad Limitada"]},"commercial_name":{"type":["string","null"],"description":"Nombre comercial (DBA) opcional, distinto del nombre fiscal.","example":"Distribuciones IB","examples":["Distribuciones IB"]},"tax_id":{"type":["string","null"],"description":"Spanish fiscal identifier (NIF, CIF, NIE). Mutuamente excluyente con `alternative_id`.","example":"B87654321","examples":["B87654321"]},"vat_id":{"type":["string","null"],"description":"EU VAT identifier.","example":"ESB87654321","examples":["ESB87654321"]},"email":{"type":["string","null"],"format":"email","example":"facturacion@distribibericas.com","examples":["facturacion@distribibericas.com"]},"phone":{"type":["string","null"],"example":"+34 911 234 567","examples":["+34 911 234 567"]},"fax":{"type":["string","null"],"description":"Fax number (rarely used, legacy).","example":"+34 911 234 568","examples":["+34 911 234 568"]},"mobile":{"type":["string","null"],"description":"Mobile number.","example":"+34 600 234 567","examples":["+34 600 234 567"]},"website":{"type":["string","null"],"format":"uri","description":"Sitio web del proveedor.","example":"https://distribibericas.com","examples":["https://distribibericas.com"]},"contact_person":{"type":["string","null"],"maxLength":200,"description":"B2B contact person.","example":"María López","examples":["María López"]},"billing_emails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":5,"description":"Additional emails for invoice delivery (administration, accounting). Maximum 5.","example":["facturas@distribibericas.com","contabilidad@distribibericas.com"],"examples":[["facturas@distribibericas.com","contabilidad@distribibericas.com"]]},"address":{"$ref":"#/components/schemas/Address"},"coordinates":{"type":["object","null"],"properties":{"latitude":{"type":"number","format":"float","description":"Geographic latitude."},"longitude":{"type":"number","format":"float","description":"Geographic longitude."}},"required":["latitude","longitude"],"description":"Geographic coordinates of the supplier. `null` when not recorded.","example":{"latitude":36.6954,"longitude":-4.4564},"examples":[{"latitude":36.6954,"longitude":-4.4564}]},"iban":{"type":["string","null"],"description":"Legacy alias for bank_accounts[].iban where is_default=true. Se conserva por compatibilidad con integradores existentes; preferir leer `bank_accounts[]` para consumidores nuevos.","example":"ES9121000418450200051332","examples":["ES9121000418450200051332"]},"bank_accounts":{"type":"array","items":{"$ref":"#/components/schemas/BankAccount"},"description":"Bank accounts associated with the supplier. Empty `[]` when there are none."},"default_taxes_id":{"type":["string","null"],"description":"UUID (v7) del impuesto por defecto aplicable al proveedor.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f"]},"default_discount":{"type":["number","null"],"format":"float","description":"Descuento por defecto aplicable al proveedor (porcentaje).","example":3,"examples":[3]},"default_vat_rate":{"type":["number","null"],"format":"float","description":"Tipo de IVA por defecto aplicable al proveedor (porcentaje).","example":21,"examples":[21]},"default_retention_rate":{"type":["number","null"],"format":"float","description":"Default IRPF withholding rate (percentage).","example":0,"examples":[0]},"is_surcharge_subject":{"type":"boolean","description":"Indica si al proveedor se le aplica recargo de equivalencia.","example":false,"examples":[false]},"preferred_operation_regime":{"type":["string","null"],"enum":["general","intracomunitaria","importacion_exportacion","isp",null],"description":"Preferred operation regime of the supplier for VAT / VeriFactu purposes.","example":"general","examples":["general"]},"accumulate_347":{"type":"boolean","description":"Whether this supplier accumulates towards the annual Modelo 347 report (operations with third parties above the legal threshold).","example":true,"examples":[true]},"alternative_id":{"anyOf":[{"$ref":"#/components/schemas/AlternativeId"},{"type":"null"}]},"payment_preferences":{"anyOf":[{"$ref":"#/components/schemas/PaymentPreferences"},{"type":"null"}]},"external_id":{"type":["string","null"],"maxLength":100,"description":"External integration key (ERP/CRM/e-commerce) mapping this supplier to a record in a third-party system. Free-format, unique per company, distinct from the fiscal `tax_id`. Persistent ERP synchronization key, independent of the request-level `Idempotency-Key`.","example":"SUP-1","examples":["SUP-1"]},"notes":{"type":["string","null"],"example":"Proveedor preferente de material de oficina.","examples":["Proveedor preferente de material de oficina."]},"metadata":{"$ref":"#/components/schemas/Metadata"},"is_active":{"type":"boolean","example":true,"examples":[true]},"created_at":{"type":["string","null"],"format":"date-time","example":"2026-01-10T09:00:00Z","examples":["2026-01-10T09:00:00Z"]},"updated_at":{"type":["string","null"],"format":"date-time","example":"2026-01-10T09:00:00Z","examples":["2026-01-10T09:00:00Z"]}},"required":["id","object","name","tax_id","vat_id","email","phone","address","iban","accumulate_347","notes","metadata","is_active","created_at","updated_at"],"title":"Supplier"},"SupplierActivity":{"type":"object","description":"Un evento del timeline de actividad de un proveedor. Agrupa eventos de dominio originados por cambios sobre el propio proveedor y por documentos que lo referencian (facturas de compra, contratos, etc.).","properties":{"object":{"type":"string","enum":["activity"],"example":"activity","examples":["activity"]},"event_type":{"type":"string","description":"Tipo de evento de dominio (p. ej. `supplier.updated`, `purchase_invoice.created`).","example":"supplier.updated","examples":["supplier.updated"]},"description":{"type":"string","description":"Human-readable description of the event in Spanish.","example":"Se actualizaron las preferencias de pago del proveedor.","examples":["Se actualizaron las preferencias de pago del proveedor."]},"metadata":{"type":"object","additionalProperties":true,"description":"Metadatos del evento. Los identificadores internos (PKs) se eliminan; los `*_uuid` se conservan.","example":{"previous_payment_method":"bank_transfer","new_payment_method":"direct_debit"},"examples":[{"previous_payment_method":"bank_transfer","new_payment_method":"direct_debit"}]},"performed_by":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"],"description":"Type of actor that originated the event: `user` for a human in the internal app, `api_key` for an action performed through the public v1 API."},"id":{"type":"string","description":"UUID (v7) of the actor: the user when `type=user`, or the API key when `type=api_key`."},"name":{"type":["string","null"],"description":"Nombre del actor en el momento del evento: nombre del usuario o nombre de la API key. `null` si no se pudo resolver."}},"required":["type","id","name"]},{"type":"null"}],"description":"Actor that originated the event. `{type:\"user\",...}` for an internal user, `{type:\"api_key\",...}` when performed via the public v1 API, or `null` when the event is system-generated (scheduler, periodic sweep) with no attributable actor.","example":{"type":"api_key","id":"01928f12-9abc-7def-8123-456789abcdef","name":"Integración ERP (producción)"},"examples":[{"type":"api_key","id":"01928f12-9abc-7def-8123-456789abcdef","name":"Integración ERP (producción)"}]},"created_at":{"type":"string","format":"date-time","description":"When the event occurred (ISO 8601).","example":"2026-05-15T10:34:21Z","examples":["2026-05-15T10:34:21Z"]}},"required":["object","event_type","description","metadata","performed_by","created_at"],"title":"SupplierActivity"},"SupplierRef":{"type":"object","properties":{"id":{"type":["string","null"],"example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a02"]},"name":{"type":["string","null"],"example":"Distribuciones Ibéricas, S.L.","examples":["Distribuciones Ibéricas, S.L."]}},"required":["id","name"],"title":"SupplierRef"},"SupplierStats":{"type":"object","description":"Resumen agregado de la cartera de proveedores de la empresa autenticada: contadores y proveedores con facturas de compra. Devuelto por `GET /v1/suppliers/stats`.","properties":{"object":{"type":"string","enum":["supplier_stats"],"example":"supplier_stats","examples":["supplier_stats"]},"total":{"type":"integer","description":"Total de proveedores registrados en la empresa.","example":87,"examples":[87]},"active":{"type":"integer","description":"Proveedores marcados como activos.","example":79,"examples":[79]},"inactive":{"type":"integer","description":"Proveedores marcados como inactivos.","example":8,"examples":[8]},"with_purchase_invoices":{"type":"integer","description":"Proveedores con al menos una factura de compra registrada.","example":64,"examples":[64]}},"required":["object","total","active","inactive","with_purchase_invoices"],"title":"SupplierStats"},"Tax":{"type":"object","description":"A tax rate configuration. Catalog partially global (`is_system=true` for system taxes, without `company_id`) and partially custom per company.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f"]},"object":{"type":"string","enum":["tax"],"example":"tax","examples":["tax"]},"name":{"type":"string","maxLength":255,"description":"Nombre legible del impuesto (ej. \"IVA 21%\").","example":"IVA general 21%","examples":["IVA general 21%"]},"code":{"type":"string","description":"Short tax code (e.g. \"IVA21\").","example":"IVA21","examples":["IVA21"]},"rate":{"type":"number","format":"float","description":"Tipo impositivo aplicado, ej. `21` para IVA 21%.","example":21,"examples":[21]},"type":{"type":"string","enum":["vat","retention","surcharge","other"],"description":"Tax category: `vat` (VAT), `retention` (IRPF withholding), `surcharge` (equivalence surcharge), `other`.","example":"vat","examples":["vat"]},"applies_to":{"type":"string","enum":["sales","purchases","both"],"description":"Scope where it applies: `sales` (sales only), `purchases` (purchases only), `both` (both).","example":"both","examples":["both"]},"country":{"type":["string","null"],"description":"ISO 3166-1 alpha-2 country code (e.g. `ES`).","example":"ES","examples":["ES"]},"is_default":{"type":"boolean","description":"true si es el tax default para su `type` (independiente del map `default_for_documents`).","example":true,"examples":[true]},"is_active":{"type":"boolean","description":"Indicates whether the tax is enabled for use on new documents.","example":true,"examples":[true]},"is_system":{"type":"boolean","description":"true if the tax is from the global system catalog (not editable, without `company_id`).","example":true,"examples":[true]},"description":{"type":["string","null"],"maxLength":1000,"description":"Free-text description of the tax.","example":"IVA general aplicable en territorio peninsular y Baleares.","examples":["IVA general aplicable en territorio peninsular y Baleares."]},"default_for_documents":{"type":"object","description":"Map `DocumentType -> bool` indicating for which document types this tax is default. Replaces the 5 legacy booleans `is_default_invoice/quote/delivery_note/proforma/purchase_invoice`.","properties":{"invoice":{"type":"boolean"},"quote":{"type":"boolean"},"delivery_note":{"type":"boolean"},"proforma":{"type":"boolean"},"purchase_invoice":{"type":"boolean"},"recurring_invoice":{"type":"boolean"}},"required":["invoice","quote","delivery_note","proforma","purchase_invoice","recurring_invoice"],"example":{"invoice":true,"quote":true,"delivery_note":true,"proforma":true,"purchase_invoice":true,"recurring_invoice":true},"examples":[{"invoice":true,"quote":true,"delivery_note":true,"proforma":true,"purchase_invoice":true,"recurring_invoice":true}]},"customer_visible_label":{"type":["string","null"],"maxLength":200,"description":"Etiqueta del impuesto mostrada al cliente final en documentos (PDF, public link, email).","example":"IVA 21%","examples":["IVA 21%"]},"external_reference":{"type":["string","null"],"enum":["S1","S2","S3","E1","E2","E3","E4","E5","E6","N1","N2",null],"description":"AEAT-SII / VeriFactu key (closed catalog: S1..S3 subject, E1..E6 exempt, N1..N2 not subject).","example":"S1","examples":["S1"]},"valid_from":{"type":["string","null"],"format":"date","description":"Fecha de inicio de vigencia legal del tipo (BOE). Formato `YYYY-MM-DD`.","example":"2012-09-01","examples":["2012-09-01"]},"valid_until":{"type":["string","null"],"format":"date","description":"Fecha de fin de vigencia legal del tipo. Invariante: `valid_until >= valid_from` cuando ambos no-null.","example":null,"examples":[null]},"reverse_charge":{"type":"boolean","description":"Reverse charge (Art. 84.Uno.2º LIVA). Default `false`.","example":false,"examples":[false]},"country_aeat_zone":{"type":["string","null"],"enum":["peninsula","canarias","ceuta","melilla",null],"description":"Zona AEAT a efectos fiscales: `peninsula` + Baleares, `canarias` (IGIC), `ceuta` (IPSI), `melilla` (IPSI).","example":"peninsula","examples":["peninsula"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"created_at":{"type":["string","null"],"format":"date-time","example":"2024-01-01T00:00:00Z","examples":["2024-01-01T00:00:00Z"]},"updated_at":{"type":["string","null"],"format":"date-time","example":"2024-01-01T00:00:00Z","examples":["2024-01-01T00:00:00Z"]}},"required":["id","object","name","code","rate","type","applies_to","country","is_default","is_active","is_system","description","default_for_documents","customer_visible_label","external_reference","valid_from","valid_until","reverse_charge","country_aeat_zone","metadata","created_at","updated_at"],"title":"Tax"},"TaxCalculation":{"type":"object","description":"Resultado de aplicar un tax a un importe base. Devuelto por `POST /v1/taxes/calculate`.","properties":{"base":{"type":"number","description":"Importe base sobre el que se aplica el tax (EUR).","example":100,"examples":[100]},"tax_rate":{"type":"number","description":"Tipo impositivo aplicado, ej. `21` para IVA 21%.","example":21,"examples":[21]},"tax_amount":{"type":"number","description":"Cuota del impuesto (base × tax_rate / 100).","example":21,"examples":[21]},"total_amount":{"type":"number","description":"Importe total resultante (base + tax_amount).","example":121,"examples":[121]},"tax":{"$ref":"#/components/schemas/Tax"}},"required":["base","tax_rate","tax_amount","total_amount","tax"],"title":"TaxCalculation"},"TaxDefaultsForDocuments":{"type":"object","description":"Defaults grouped by tax category for a given document type. Each key contains the (possibly empty) list of taxes marked as default for that `docType` within its `type`.","properties":{"vat":{"type":"array","items":{"$ref":"#/components/schemas/Tax"},"description":"Taxes con `type=vat` que son default para el docType consultado.","example":[],"examples":[[]]},"retention":{"type":"array","items":{"$ref":"#/components/schemas/Tax"},"example":[],"examples":[[]]},"surcharge":{"type":"array","items":{"$ref":"#/components/schemas/Tax"},"example":[],"examples":[[]]},"other":{"type":"array","items":{"$ref":"#/components/schemas/Tax"},"example":[],"examples":[[]]}},"required":["vat","retention","surcharge","other"],"title":"TaxDefaultsForDocuments"},"TaxRateRef":{"type":"object","properties":{"id":{"type":["string","null"],"example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f"]},"rate":{"type":["number","null"],"example":21,"examples":[21]}},"required":["id","rate"],"title":"TaxRateRef"},"TaxReport":{"type":"object","description":"A generated Spanish tax declaration (Modelo 303 quarterly VAT, or Modelo 347 yearly informational). Downloadable via `GET /v1/tax_reports/{uuid}/download`.","properties":{"id":{"type":"string","description":"UUID (v7) opaco del informe generado.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a10","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a10"]},"object":{"type":"string","enum":["tax_report"],"example":"tax_report","examples":["tax_report"]},"type":{"type":"string","enum":["modelo_303","modelo_347"],"description":"Declaration type.","example":"modelo_303","examples":["modelo_303"]},"period_year":{"type":"integer","description":"Fiscal year covered by the declaration (backward compat, also available in `period.year`).","example":2026,"examples":[2026]},"period_quarter":{"type":["integer","null"],"minimum":1,"maximum":4,"description":"Quarter (1-4) for Modelo 303; null for Modelo 347 (yearly). Backward compat, also available in `period.quarter`.","example":2,"examples":[2]},"period":{"type":"object","description":"Fiscal period covered by the declaration (nested form).","properties":{"year":{"type":"integer","description":"Fiscal year."},"quarter":{"type":["integer","null"],"minimum":1,"maximum":4,"description":"Trimestre (1-4) o `null` para declaraciones anuales (347)."},"label":{"type":"string","description":"Human-readable period label (e.g. `2026 Q1` or `2026`)."}},"required":["year","quarter","label"],"example":{"year":2026,"quarter":2,"label":"2026 Q2"},"examples":[{"year":2026,"quarter":2,"label":"2026 Q2"}]},"format":{"type":"string","enum":["txt_aeat","pdf","excel"],"description":"Output format. `txt_aeat` is the official format accepted by the AEAT submission portal.","example":"txt_aeat","examples":["txt_aeat"]},"hash":{"type":"string","description":"SHA-256 of the generated file (audit trail).","example":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","examples":["e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"]},"size_bytes":{"type":"integer","example":2048,"examples":[2048]},"generated_at":{"type":"string","format":"date-time","example":"2026-07-10T09:15:42Z","examples":["2026-07-10T09:15:42Z"]},"generated_by_id":{"type":"string","description":"UUID (v7) of the user who generated the declaration (audit trail).","example":"01928f12-1234-7abc-9def-0123456789ab","examples":["01928f12-1234-7abc-9def-0123456789ab"]},"download_url":{"type":"string","description":"URL relativa de descarga del recurso generado (`/v1/tax_reports/{uuid}/download`).","example":"/v1/tax_reports/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a10/download","examples":["/v1/tax_reports/01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a10/download"]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-blocking warnings emitted during generation (e.g. invoices with incomplete data).","example":[],"examples":[[]]}},"required":["id","object","type","period_year","period_quarter","period","format","hash","size_bytes","generated_at","generated_by_id","download_url","warnings"],"title":"TaxReport"},"TaxReportActivity":{"type":"object","description":"An event in the activity timeline of a tax report generation (creation, download, etc.). The `metadata` is sanitized (internal PKs removed) before being exposed.","properties":{"object":{"type":"string","enum":["activity"],"example":"activity","examples":["activity"]},"event_type":{"type":"string","description":"Tipo de evento de dominio (p. ej. `tax_report.generated`).","example":"tax_report.generated","examples":["tax_report.generated"]},"description":{"type":"string","description":"Human-readable description of the event in Spanish.","example":"Se generó la declaración Modelo 303 del segundo trimestre de 2026.","examples":["Se generó la declaración Modelo 303 del segundo trimestre de 2026."]},"metadata":{"type":"object","additionalProperties":true,"description":"Metadatos del evento. Los identificadores internos (PKs) se eliminan; los `*_uuid` se conservan.","example":{"type":"modelo_303","period_year":2026,"period_quarter":2,"format":"txt_aeat"},"examples":[{"type":"modelo_303","period_year":2026,"period_quarter":2,"format":"txt_aeat"}]},"performed_by":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"],"description":"Type of actor that originated the event: `user` for a human in the internal app, `api_key` for an action performed through the public v1 API."},"id":{"type":"string","description":"UUID (v7) of the actor: the user when `type=user`, or the API key when `type=api_key`."},"name":{"type":["string","null"],"description":"Nombre del actor en el momento del evento: nombre del usuario o nombre de la API key. `null` si no se pudo resolver."}},"required":["type","id","name"]},{"type":"null"}],"description":"Actor that originated the event. `{type:\"user\",...}` for an internal user, `{type:\"api_key\",...}` when performed via the public v1 API, or `null` when the event is system-generated (scheduler, periodic sweep) with no attributable actor.","example":{"type":"user","id":"01928f12-1234-7abc-9def-0123456789ab","name":"María García"},"examples":[{"type":"user","id":"01928f12-1234-7abc-9def-0123456789ab","name":"María García"}]},"created_at":{"type":"string","format":"date-time","description":"When the event occurred (ISO 8601).","example":"2026-07-10T09:15:42Z","examples":["2026-07-10T09:15:42Z"]}},"required":["object","event_type","description","metadata","performed_by","created_at"],"title":"TaxReportActivity"},"TaxReportPreview":{"type":"object","description":"Preview (dry-run computation, without persisting any file) of a Modelo 303/347 for a period. Lets the integrator validate the amounts before generating the final report. Amounts are expressed in euro cents (integers).","properties":{"object":{"type":"string","enum":["tax_report_preview"],"example":"tax_report_preview","examples":["tax_report_preview"]},"type":{"type":"string","enum":["modelo_303","modelo_347"],"description":"Type of previewed report.","example":"modelo_303","examples":["modelo_303"]},"period":{"type":"object","description":"Previewed fiscal period.","properties":{"year":{"type":"integer","description":"Fiscal year."},"quarter":{"type":["integer","null"],"minimum":1,"maximum":4,"description":"Trimestre (1-4) o `null` para declaraciones anuales (347)."},"label":{"type":"string","description":"Human-readable period label (e.g. `2026 Q1`)."}},"required":["year","quarter","label"],"example":{"year":2026,"quarter":2,"label":"2026 Q2"},"examples":[{"year":2026,"quarter":2,"label":"2026 Q2"}]},"breakdown_303":{"type":"object","additionalProperties":{"type":"object","properties":{"base":{"type":"integer","description":"Accumulated taxable base for that VAT rate, in cents."},"cuota":{"type":"integer","description":"Accumulated VAT amount for that rate, in cents."}}},"description":"Breakdown by VAT rate (Modelo 303 only). Map indexed by tax rate → `{base, cuota}` in cents. Empty for Modelo 347.","example":{"4":{"base":50000,"cuota":2000},"10":{"base":250000,"cuota":25000},"21":{"base":1000000,"cuota":210000}},"examples":[{"4":{"base":50000,"cuota":2000},"10":{"base":250000,"cuota":25000},"21":{"base":1000000,"cuota":210000}}]},"totals":{"type":"object","additionalProperties":{"type":"integer"},"description":"Aggregated totals of the declaration (amounts in cents).","example":{"baseDevengada":1300000,"cuotaDevengada":237000,"baseSoportado":400000,"cuotaSoportado":84000,"resultadoLiquidacion":153000},"examples":[{"baseDevengada":1300000,"cuotaDevengada":237000,"baseSoportado":400000,"cuotaSoportado":84000,"resultadoLiquidacion":153000}]},"clients_347":{"type":"array","description":"Operations with clients that exceed the Modelo 347 threshold (Modelo 347 only). Empty for Modelo 303.","items":{"type":"object","properties":{"taxId":{"type":["string","null"],"description":"NIF/CIF del cliente."},"partyName":{"type":["string","null"],"description":"Name or legal/business name of the client."},"base":{"type":"integer","description":"Total annual amount of operations, in cents."},"quarters":{"type":"object","additionalProperties":{"type":"integer"},"description":"Amount per quarter (quarter key → amount in cents)."}}},"example":[],"examples":[[]]},"suppliers_347":{"type":"array","description":"Operations with suppliers that exceed the Modelo 347 threshold (Modelo 347 only). Empty for Modelo 303.","items":{"type":"object","properties":{"taxId":{"type":["string","null"],"description":"NIF/CIF del proveedor."},"partyName":{"type":["string","null"],"description":"Name or legal/business name of the supplier."},"base":{"type":"integer","description":"Total annual amount of operations, in cents."},"quarters":{"type":"object","additionalProperties":{"type":"integer"},"description":"Amount per quarter (quarter key → amount in cents)."}}},"example":[],"examples":[[]]},"invoice_count":{"type":"integer","description":"Number of issued invoices considered in the period.","example":42,"examples":[42]},"purchase_invoice_count":{"type":"integer","description":"Number of purchase invoices considered in the period.","example":18,"examples":[18]},"warnings":{"type":"array","items":{"type":"string"},"description":"Non-blocking warnings detected during the computation (e.g. invoices with incomplete data).","example":[],"examples":[[]]}},"required":["object","type","period","breakdown_303","totals","clients_347","suppliers_347","invoice_count","purchase_invoice_count","warnings"],"title":"TaxReportPreview"},"TaxReportStats":{"type":"object","description":"Aggregated summary of the history of tax reports generated by the authenticated company: totals by type, by format, accumulated size and current fiscal period. Returned by `GET /v1/tax_reports/stats`.","properties":{"object":{"type":"string","enum":["tax_report_stats"],"example":"tax_report_stats","examples":["tax_report_stats"]},"total_reports":{"type":"integer","description":"Total number of generated reports.","example":12,"examples":[12]},"by_type":{"type":"object","description":"Recuento de declaraciones por tipo.","properties":{"modelo_303":{"type":"integer","description":"Declaraciones Modelo 303 generadas."},"modelo_347":{"type":"integer","description":"Declaraciones Modelo 347 generadas."}},"required":["modelo_303","modelo_347"],"example":{"modelo_303":8,"modelo_347":4},"examples":[{"modelo_303":8,"modelo_347":4}]},"by_format":{"type":"object","description":"Recuento de declaraciones por formato de salida.","properties":{"txt_aeat":{"type":"integer","description":"Ficheros en formato oficial AEAT."},"pdf":{"type":"integer","description":"Ficheros PDF."},"excel":{"type":"integer","description":"Ficheros Excel."}},"required":["txt_aeat","pdf","excel"],"example":{"txt_aeat":6,"pdf":4,"excel":2},"examples":[{"txt_aeat":6,"pdf":4,"excel":2}]},"total_size_bytes":{"type":"integer","description":"Accumulated size (bytes) of all generated files.","example":24576,"examples":[24576]},"current_quarter":{"type":"object","description":"Trimestre fiscal en curso (UTC).","properties":{"year":{"type":"integer"},"quarter":{"type":"integer","minimum":1,"maximum":4}},"required":["year","quarter"],"example":{"year":2026,"quarter":2},"examples":[{"year":2026,"quarter":2}]},"current_year":{"type":"integer","description":"Current fiscal year (UTC).","example":2026,"examples":[2026]}},"required":["object","total_reports","by_type","by_format","total_size_bytes","current_quarter","current_year"],"title":"TaxReportStats"},"TaxStats":{"type":"object","description":"Aggregated KPIs over the company tax catalog (includes global system taxes). Breakdown por `type` y por `external_reference` AEAT.","properties":{"object":{"type":"string","enum":["tax_stats"],"example":"tax_stats","examples":["tax_stats"]},"total":{"type":"integer","minimum":0,"description":"Total de taxes visibles para la empresa (system + custom).","example":12,"examples":[12]},"active":{"type":"integer","minimum":0,"description":"Taxes con `is_active=true`.","example":10,"examples":[10]},"inactive":{"type":"integer","minimum":0,"description":"Taxes con `is_active=false`.","example":2,"examples":[2]},"system_count":{"type":"integer","minimum":0,"description":"Taxes from the global system catalog (`is_system=true`).","example":7,"examples":[7]},"custom_count":{"type":"integer","minimum":0,"description":"Company-specific taxes (`is_system=false`).","example":5,"examples":[5]},"by_type":{"type":"object","description":"Conteo de taxes por `type`.","properties":{"vat":{"type":"integer","minimum":0},"retention":{"type":"integer","minimum":0},"surcharge":{"type":"integer","minimum":0},"other":{"type":"integer","minimum":0}},"required":["vat","retention","surcharge","other"],"example":{"vat":6,"retention":4,"surcharge":2,"other":0},"examples":[{"vat":6,"retention":4,"surcharge":2,"other":0}]},"by_aeat_code":{"type":"object","description":"Tax count by AEAT `external_reference`. The `\"(null)\"` key groups taxes without an assigned AEAT code.","additionalProperties":{"type":"integer","minimum":0},"example":{"S1":4,"E1":1,"N1":1,"(null)":6},"examples":[{"S1":4,"E1":1,"N1":1,"(null)":6}]}},"required":["object","total","active","inactive","system_count","custom_count","by_type","by_aeat_code"],"title":"TaxStats"},"TaxTotals":{"type":"object","description":"Aggregated totals of a set of lines. Returned by `POST /v1/taxes/calculate-totals`. Total formula: `subtotal + total_vat + total_surcharge − total_retention`.","properties":{"subtotal":{"type":"number","description":"Sum of the taxable bases of all lines (EUR).","example":250,"examples":[250]},"total_vat":{"type":"number","description":"Sum of the VAT of all lines.","example":52.5,"examples":[52.5]},"total_surcharge":{"type":"number","description":"Sum of the equivalence surcharge of all lines.","example":0,"examples":[0]},"total_retention":{"type":"number","description":"Sum of the withholding (IRPF) of all lines.","example":15,"examples":[15]},"total":{"type":"number","description":"Total general.","example":287.5,"examples":[287.5]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/TaxTotalsLine"},"description":"Calculated breakdown for each received line, in the same order."}},"required":["subtotal","total_vat","total_surcharge","total_retention","total","lines"],"title":"TaxTotals"},"TaxTotalsLine":{"type":"object","description":"Calculated breakdown of a single line within `POST /v1/taxes/calculate-totals`.","properties":{"subtotal":{"type":"number","description":"Taxable base of the line (quantity × price − discount).","example":100,"examples":[100]},"vat_amount":{"type":"number","description":"VAT amount of the line.","example":21,"examples":[21]},"surcharge_amount":{"type":"number","description":"Equivalence surcharge amount of the line.","example":0,"examples":[0]},"retention_amount":{"type":"number","description":"Withholding (IRPF) amount of the line.","example":0,"examples":[0]},"total":{"type":"number","description":"Total of the line (subtotal + vat + surcharge − retention).","example":121,"examples":[121]}},"required":["subtotal","vat_amount","surcharge_amount","retention_amount","total"],"title":"TaxTotalsLine"},"TaxUsage":{"type":"object","description":"Desglose del uso de un tax across bounded contexts. Permite decidir si es seguro borrar o desactivar un tax (`in_use=false` ⇒ delete seguro).","properties":{"object":{"type":"string","enum":["tax_usage"],"example":"tax_usage","examples":["tax_usage"]},"taxes_id":{"type":"string","description":"UUID (v7) del tax consultado.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0f"]},"in_use":{"type":"boolean","description":"true si `total_count > 0`.","example":true,"examples":[true]},"total_count":{"type":"integer","minimum":0,"description":"Suma agregada de las 6 keys de `used_by`.","example":7,"examples":[7]},"used_by":{"type":"object","description":"Count by consumer BC. Excludes `purchase_invoice_lines` (no FK) and `recurring_invoices` (JSON lines).","properties":{"products":{"type":"integer","minimum":0,"description":"`products.tax_id` referencias."},"suppliers":{"type":"integer","minimum":0,"description":"`suppliers.default_tax_id` referencias."},"invoice_lines":{"type":"integer","minimum":0,"description":"`invoice_lines.{vat_id,retention_id,surcharge_id,tax_id}` referencias."},"quote_lines":{"type":"integer","minimum":0},"proforma_lines":{"type":"integer","minimum":0},"delivery_note_lines":{"type":"integer","minimum":0}},"required":["products","suppliers","invoice_lines","quote_lines","proforma_lines","delivery_note_lines"],"example":{"products":3,"suppliers":1,"invoice_lines":2,"quote_lines":1,"proforma_lines":0,"delivery_note_lines":0},"examples":[{"products":3,"suppliers":1,"invoice_lines":2,"quote_lines":1,"proforma_lines":0,"delivery_note_lines":0}]}},"required":["object","taxes_id","in_use","total_count","used_by"],"title":"TaxUsage"},"UpdateClientRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/clients/{uuid}.\n\nPartial PUT update: all fields are `sometimes`. If not sent, the handler\nkeeps the current value. If sent as `null`, the field is cleared\n(when the domain allows it).\n\nAccepts the same fields as `CreateClientRequest` V1 (see docblock there).\nThe validation of domain invariants (XOR `tax_id`/`alternative_id`,\ndirect_debit ⇒ default bank account, billing_emails without duplicates) is\nperformed by the `Client` aggregate. The typed exceptions propagate to the\n`ExceptionRenderer` with the canonical v1 envelope.","properties":{"name":{"type":"string","maxLength":200},"commercial_name":{"type":["string","null"],"maxLength":255},"tax_id":{"type":["string","null"],"maxLength":20},"vat_id":{"type":["string","null"],"maxLength":20},"email":{"type":["string","null"],"format":"email","maxLength":191},"phone":{"type":["string","null"],"maxLength":20},"fax":{"type":["string","null"],"maxLength":20},"mobile":{"type":["string","null"],"maxLength":20},"website":{"type":["string","null"],"format":"uri","maxLength":255},"contact_person":{"type":["string","null"],"maxLength":200},"latitude":{"type":["number","null"],"minimum":-90,"maximum":90},"longitude":{"type":["number","null"],"minimum":-180,"maximum":180},"default_discount":{"type":["number","null"],"minimum":0,"maximum":100},"default_vat_rate":{"type":["number","null"],"minimum":0,"maximum":100},"default_retention_rate":{"type":["number","null"],"minimum":-100,"maximum":0},"is_surcharge_subject":{"type":["boolean","null"]},"accumulate_347":{"type":"boolean"},"preferred_operation_regime":{"type":["string","null"],"enum":["general","intracomunitaria","importacion_exportacion","isp"]},"payment_method":{"type":["string","null"],"enum":["bank_transfer","direct_debit","cash","credit_card","check","paypal","other"]},"payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365},"notes":{"type":["string","null"],"maxLength":1000},"metadata":{"$ref":"#/components/schemas/Metadata"},"dir3_accounting_office":{"type":["string","null"]},"dir3_managing_body":{"type":["string","null"]},"dir3_processing_unit":{"type":["string","null"]},"external_id":{"type":["string","null"],"maxLength":100},"billing_emails":{"type":["array","null"],"items":{"type":"string","format":"email"},"maxItems":5},"alternative_id":{"type":"object","properties":{"type":{"type":"string","enum":["passport","national_id","tax_id_foreign","not_registered"]},"value":{"type":"string","minLength":1,"maxLength":50},"country_code":{"type":"string","pattern":"^[A-Z]{2}$","minLength":2,"maxLength":2}}},"address":{"type":"object","properties":{"line1":{"type":["string","null"],"maxLength":500},"line2":{"type":["string","null"],"maxLength":100},"number":{"type":["string","null"],"maxLength":100},"floor":{"type":["string","null"],"maxLength":100},"door":{"type":["string","null"],"maxLength":100},"staircase":{"type":["string","null"],"maxLength":100},"postal_code":{"type":["string","null"],"maxLength":10},"city":{"type":["string","null"],"maxLength":100},"province":{"type":["string","null"],"maxLength":100},"country":{"type":["string","null"],"minLength":2,"maxLength":2}}},"bank_accounts":{"type":["array","null"],"items":{"type":"object","properties":{"iban":{"type":"string","maxLength":50},"bic":{"type":["string","null"],"maxLength":20},"is_default":{"type":["boolean","null"]},"notes":{"type":["string","null"],"maxLength":255}},"required":["iban"]}}},"title":"UpdateClientRequest"},"UpdateDeliveryNotePublicLinkRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/delivery_notes/{uuid}/public-link.\n\nRequired body: `action` ∈ {revoke, activate, extend, reset}. `extend_days`\nis required when `action=extend`.","properties":{"action":{"type":"string","enum":["revoke","activate","extend","reset"]},"extend_days":{"type":"integer","minimum":1,"maximum":36500}},"required":["action"],"title":"UpdateDeliveryNotePublicLinkRequest"},"UpdateDeliveryNoteRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/delivery_notes/{uuid}.\n\nPartial update: omitted fields are kept. Only allowed when\nthe delivery note is in `draft` status (the controller maps the\ntransition exception to 422 `invalid_status_transition`).","properties":{"client_id":{"type":"string","format":"uuid"},"delivery_date":{"type":["string","null"],"format":"date"},"notes":{"type":["string","null"],"maxLength":2000},"internal_notes":{"type":["string","null"],"maxLength":2000},"reference_number":{"type":["string","null"],"maxLength":255},"transport_details":{"type":["string","null"],"maxLength":2000},"delivery_address":{"type":["string","null"],"maxLength":500},"delivery_city":{"type":["string","null"],"maxLength":255},"delivery_postal_code":{"type":["string","null"],"maxLength":20},"delivery_province":{"type":["string","null"],"maxLength":255},"delivery_country":{"type":["string","null"],"maxLength":255},"vehicle_plate":{"type":["string","null"],"description":"Logistics extension (semantic format validated in the Aggregate)\nThe `required_with` pairing of each duo (driver/carrier/received_by)\nis NOT declared here: under `sometimes` the rule is dead when the\ndependent field is omitted (Laravel skips ALL its rules). It is applied\nin `withValidator()` so that the partial PUT still allows omitting\nboth fields of the pair, but requires the second when the first is sent.","maxLength":20},"driver_name":{"type":["string","null"],"maxLength":120},"driver_tax_id":{"type":["string","null"],"maxLength":20},"tracking_number":{"type":["string","null"],"maxLength":100},"carrier_company":{"type":["string","null"],"maxLength":120},"received_by_name":{"type":["string","null"],"maxLength":120},"received_by_tax_id":{"type":["string","null"],"maxLength":20},"external_id":{"type":["string","null"],"maxLength":100},"metadata":{"$ref":"#/components/schemas/Metadata"},"billing_emails":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191},"maxItems":5},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate_id":{"type":["string","null"],"format":"uuid"},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate":{"type":["number","null"],"minimum":0,"maximum":100},"surcharge_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate_id":{"type":["string","null"],"format":"uuid"},"surcharge_rate_id":{"type":["string","null"],"format":"uuid"},"product_id":{"type":["string","null"],"format":"uuid"},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100}}},"minItems":1}},"title":"UpdateDeliveryNoteRequest"},"UpdateInvoicePublicLinkRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/invoices/{uuid}/public-link.\n\n`SchemaName` sets a unique, clean OpenAPI schema name\n(`UpdateInvoicePublicLinkRequest`), consistent with Quote/Proforma/DeliveryNote\nfor the same operation, without renaming the class.","properties":{"action":{"type":"string","enum":["revoke","activate","extend","reset"]},"extend_days":{"type":"integer","minimum":1,"maximum":36500}},"required":["action"],"title":"UpdateInvoicePublicLinkRequest"},"UpdateInvoiceRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/invoices/{uuid}.\n\nPartial update: omitted fields are kept. Only allowed when\nthe invoice is in `draft` status (the controller maps the\ntransition exception to 422 `invalid_status_transition`).","properties":{"client_id":{"type":"string","format":"uuid"},"issued_on":{"type":"string","format":"date"},"due_on":{"type":"string","format":"date"},"notes":{"type":["string","null"],"maxLength":1000},"external_id":{"type":["string","null"],"maxLength":100},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate_id":{"type":["string","null"],"format":"uuid"},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"product_id":{"type":["string","null"],"format":"uuid"},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100}}},"minItems":1}},"title":"UpdateInvoiceRequest"},"UpdateProductRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/products/{uuid}.\n\nFull update (PUT). All fields `sometimes`: if not sent, the\nhandler keeps the current value. `sku` unique scoped to the company,\nignoring the product itself. Writable: `name`, `sku`, `price`,\n`description`, `tags`, `low_stock_threshold` (per-product),\n`currency` (EUR only — Producto is read-only EUR; any other code → 422),\n`tax_rate_id`, `is_active`, `metadata`, `external_id`. `stock` is NOT\nwritable here (D1): stock mutation lives only in\n`PUT /v1/products/{uuid}/stock` with its `set`/`increase`/`decrease`\nsemantics. Validation of `metadata` via VO `Metadata`.","properties":{"name":{"type":"string","maxLength":200},"sku":{"type":["string","null"],"maxLength":100},"price":{"type":"string","pattern":"^-?\\d+(\\.\\d{1,2})?$"},"description":{"type":["string","null"],"description":"Columna `products.description` es `text` → sin `max` artificial."},"low_stock_threshold":{"type":["integer","null"],"description":"Umbral per-producto; se persiste en `metadata.low_stock_threshold`.","minimum":0},"currency":{"type":["string","null"],"description":"`stock` NO es escribible en el update general (D1): la mutación de\nstock vive solo en `PUT /v1/products/{uuid}/stock` (set/increase/\ndecrease). Exponerlo aquí crearía dos caminos de mutación con\nsemánticas distintas (replace vs delta) → ambigüedad/doble-conteo.\nProducto es read-only EUR: solo se admite `EUR` (o ausencia/null).","enum":["EUR"]},"tax_rate_id":{"type":["string","null"],"format":"uuid","description":"`taxes` is a global system catalog (without a `company_id` column).\nDo NOT use TenantRule here — it would add `WHERE company_id = X` against a\ntable without that column and cause a 500 (SQLSTATE 42S22). Global\nvalidation by uuid, like in the rest of the BCs (DeliveryNote V1, etc.)."},"is_active":{"type":"boolean"},"metadata":{"$ref":"#/components/schemas/Metadata"},"external_id":{"type":["string","null"],"description":"PUT parcial: `sometimes` (ausente = preservar). La unicidad por\nempresa la guarda el controller (409 `external_id_already_exists`)\n+ el índice `UNIQUE(company_id, external_id)`. Free-format ≤100.","maxLength":100},"tags":{"type":["array","null"],"items":{"type":"string"}}},"title":"UpdateProductRequest"},"UpdateProductStockRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/products/{uuid}/stock.\n\nBody: `{ stock: int, operation?: 'set'|'increase'|'decrease' }`.\n`operation` defaults to `set` (replace). Accepts also `add` / `subtract`\nas aliases for `increase` / `decrease` for ergonomics.","properties":{"stock":{"type":"integer","minimum":0},"operation":{"type":["string","null"],"enum":["set","increase","decrease","add","subtract"]}},"required":["stock"],"title":"UpdateProductStockRequest"},"UpdateProformaPublicLinkRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/proformas/{uuid}/public-link.\n\n`SchemaName` disambiguates the OpenAPI schema: Quote and Proforma declare\nstructurally identical request bodies, so without a unique name they would\ncollide in `components.schemas`.","properties":{"action":{"type":"string","enum":["revoke","activate","extend","reset"]},"extend_days":{"type":"integer","minimum":1,"maximum":36500}},"required":["action"],"title":"UpdateProformaPublicLinkRequest"},"UpdateProformaRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/proformas/{uuid}.\n\nPartial update: omitted fields are kept. Only allowed when\nthe proforma is in `draft` status (the controller maps the\ntransition exception to 422 `invalid_status_transition`).","properties":{"client_id":{"type":"string","format":"uuid"},"issued_on":{"type":"string","format":"date"},"valid_until":{"type":["string","null"],"format":"date"},"validity_days":{"type":["integer","null"],"minimum":1,"maximum":365},"notes":{"type":["string","null"],"maxLength":1000},"terms_and_conditions":{"type":["string","null"],"maxLength":2000},"reference":{"type":["string","null"],"maxLength":255},"payment_method":{"type":["string","null"],"maxLength":100},"payment_terms":{"type":["integer","null"],"minimum":0,"maximum":365},"shipping_cost":{"type":["number","null"],"minimum":0},"delivery_terms":{"type":["string","null"],"maxLength":255},"estimated_delivery_date":{"type":["string","null"],"format":"date"},"operation_regime":{"type":["string","null"],"enum":["general","intracomunitaria","importacion_exportacion","isp"]},"external_id":{"type":["string","null"],"maxLength":100},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate_id":{"type":["string","null"],"format":"uuid"},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate":{"type":["number","null"],"minimum":0,"maximum":100},"surcharge_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate_id":{"type":["string","null"],"format":"uuid"},"surcharge_rate_id":{"type":["string","null"],"format":"uuid"},"product_id":{"type":["string","null"],"format":"uuid"},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100}}},"minItems":1}},"title":"UpdateProformaRequest"},"UpdatePurchaseInvoiceRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/purchase_invoices/{uuid}.\n\nPartial update: omitted fields are kept. Only allowed when the purchase\ninvoice is in `draft` status. Updating in any later status\n(`received`, `pending_payment`, `paid`, `cancelled`) raises\n`PurchaseInvoiceCannotBeEditedException` (`PublicApiMappable`), which the\ncontroller lets propagate to the renderer → HTTP **422**\n`business_rule_violation` subcode `purchase_invoice_not_editable_in_current_state`\n(NOT 409, NOT `invalid_status_transition`: editing outside `draft` is a\nbusiness-rule violation, not a state-machine transition).","properties":{"supplier_id":{"type":"string","format":"uuid"},"expense_category_id":{"type":["string","null"],"format":"uuid"},"external_invoice_number":{"type":"string","maxLength":255},"external_id":{"type":["string","null"],"description":"Clave de negocio externa (clave de integración ERP/CRM, change\nexternal-id-documents). Partial PUT: `external_id: null` explícito\nborra la clave. Ortogonal a `external_invoice_number`.","maxLength":100},"internal_code":{"type":["string","null"],"maxLength":255},"issued_on":{"type":"string","format":"date"},"received_on":{"type":["string","null"],"format":"date"},"due_on":{"type":["string","null"],"format":"date"},"notes":{"type":["string","null"],"maxLength":1000},"metadata":{"$ref":"#/components/schemas/Metadata"},"internal_notes":{"type":["string","null"],"description":"Extend fields. Basic SHAPE only; the `payment_method` allowlist,\n`tax_period` format and `tags` cardinality are validated by the\nVO/Aggregate.","maxLength":2000},"payment_method":{"type":["string","null"],"maxLength":30},"payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365},"bank_account_id":{"type":["integer","null"]},"expense_account":{"type":["string","null"],"maxLength":50},"tax_period":{"type":["string","null"],"maxLength":10},"is_reverse_charge":{"type":["boolean","null"]},"deductible_percentage":{"type":["number","null"],"minimum":0,"maximum":100},"operation_class":{"type":["string","null"],"enum":["corriente","bien_inversion","importacion","intracomunitaria"]},"exclude_347":{"type":"boolean"},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"description":"custom_fields tipados `[{field,value}]` (§10) — partial PUT con\n`sometimes`. `custom_fields: null` explícito vacía la colección.","items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate":{"type":["number","null"],"description":"Retención IRPF e IVA deducible por línea (BR-PUR-022). Mismas reglas\nde forma que el create (el cálculo lo hace el VO Shared `Line`).","minimum":0,"maximum":100},"vat_deductible":{"type":["boolean","null"]}}},"minItems":1}},"title":"UpdatePurchaseInvoiceRequest"},"UpdateQuotePublicLinkRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/quotes/{uuid}/public-link.\n\n`SchemaName` disambiguates the OpenAPI schema: Quote and Proforma declare\nstructurally identical request bodies, so without a unique name they would\ncollide in `components.schemas`.","properties":{"action":{"type":"string","enum":["revoke","activate","extend","reset"]},"extend_days":{"type":"integer","minimum":1,"maximum":36500}},"required":["action"],"title":"UpdateQuotePublicLinkRequest"},"UpdateQuoteRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/quotes/{uuid}.\n\nPartial update: omitted fields are kept. Only allowed when\nthe quote is in `draft` status (the controller maps the\ntransition exception to 422 `invalid_status_transition`).","properties":{"client_id":{"type":"string","format":"uuid"},"issued_on":{"type":"string","format":"date"},"valid_until":{"type":"string","format":"date"},"notes":{"type":["string","null"],"maxLength":1000},"terms":{"type":["string","null"],"maxLength":2000},"external_id":{"type":["string","null"],"maxLength":100},"metadata":{"$ref":"#/components/schemas/Metadata"},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate_id":{"type":["string","null"],"format":"uuid"},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate":{"type":["number","null"],"minimum":0,"maximum":100},"surcharge_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention_rate_id":{"type":["string","null"],"format":"uuid"},"surcharge_rate_id":{"type":["string","null"],"format":"uuid"},"product_id":{"type":["string","null"],"format":"uuid"},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100}}},"minItems":1}},"title":"UpdateQuoteRequest"},"UpdateRecurringInvoiceRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/recurring_invoices/{uuid}.\n\nPartial update. All fields are optional — those that are\nsent overwrite the current value, omitted ones are preserved.\n\nConfigurable write fields (parity with create): `client_id`, `series_id`,\n`name`, `description`, `frequency`, `holiday_handling`, `start_on`, `end_on`,\n`notes`, `metadata`, `days_before_due`, `max_occurrences`, `email_to`,\n`send_automatically` and `lines[]` (each line: `description`, `quantity`,\n`unit_price`, `tax_rate`, `retention`, `surcharge`).\n\n`frequency` accepts `daily|weekly|biweekly|monthly|quarterly|semiannual|yearly`\n(v1 whitelist). `yearly` is mapped to `annual` (internal RecurringInvoice BC)\nin the controller.\n\n`holiday_handling` accepts `skip|same|before|after`. The value validation\nis performed by the VO `HolidayHandling::create()` in the Handler (throws\n`InvalidHolidayHandlingException` → 422 `invalid_holiday_handling`); it is\nnot duplicated here with an `in:` rule, to preserve the canonical catalog subcode.","properties":{"client_id":{"type":"string","format":"uuid"},"series_id":{"type":["string","null"],"format":"uuid"},"name":{"type":["string","null"],"maxLength":255},"description":{"type":["string","null"],"maxLength":1000},"frequency":{"type":"string","enum":["daily","weekly","biweekly","monthly","quarterly","semiannual","yearly"]},"holiday_handling":{"type":"string"},"start_on":{"type":"string","format":"date"},"end_on":{"type":["string","null"],"format":"date"},"notes":{"type":["string","null"],"maxLength":1000},"metadata":{"$ref":"#/components/schemas/Metadata"},"external_id":{"type":["string","null"],"maxLength":100},"days_before_due":{"type":["integer","null"],"minimum":0},"max_occurrences":{"type":["integer","null"],"minimum":1},"email_to":{"type":["string","null"],"format":"email"},"send_automatically":{"type":"boolean"},"tags":{"type":["array","null"],"items":{"type":"string","maxLength":40},"maxItems":30},"custom_fields":{"type":["array","null"],"items":{"type":"object","properties":{"field":{"type":"string","minLength":1,"maxLength":60},"value":{"type":"string","maxLength":500}},"required":["field","value"]},"maxItems":50},"lines":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":255},"quantity":{"type":"number","minimum":0.01},"unit_price":{"type":"number","minimum":0},"tax_rate":{"type":["number","null"],"minimum":0,"maximum":100},"retention":{"type":["number","null"],"minimum":0,"maximum":100},"surcharge":{"type":["number","null"],"minimum":0,"maximum":100}}},"minItems":1}},"title":"UpdateRecurringInvoiceRequest"},"UpdateSupplierRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/suppliers/{uuid}.\n\nPartial PUT update: all fields are `sometimes`. If not sent, the\nhandler keeps the current value. If sent as `null`, the field is\ncleared (when the domain allows it).\n\nAccepts the same fields as `CreateSupplierRequest` V1 (see docblock there).\nThe validation of domain invariants (XOR `tax_id`/`alternative_id`,\ndirect_debit ⇒ default bank account, billing_emails without duplicates,\nIBAN format, metadata limits) is performed by the `Supplier` aggregate and\nthe VOs. The typed exceptions propagate to the `ExceptionRenderer` with the\ncanonical v1 envelope.","properties":{"name":{"type":"string","maxLength":200},"business_name":{"type":["string","null"],"maxLength":200},"commercial_name":{"type":["string","null"],"maxLength":200},"tax_id":{"type":["string","null"],"maxLength":50},"vat_id":{"type":["string","null"],"maxLength":20},"email":{"type":["string","null"],"format":"email","maxLength":191},"phone":{"type":["string","null"],"maxLength":20},"fax":{"type":["string","null"],"maxLength":20},"mobile":{"type":["string","null"],"maxLength":20},"website":{"type":["string","null"],"format":"uri","maxLength":255},"contact_person":{"type":["string","null"],"maxLength":200},"latitude":{"type":["number","null"],"minimum":-90,"maximum":90},"longitude":{"type":["number","null"],"minimum":-180,"maximum":180},"default_discount":{"type":["number","null"],"minimum":0,"maximum":100},"default_vat_rate":{"type":["number","null"],"minimum":0,"maximum":100},"default_retention_rate":{"type":["number","null"],"minimum":0,"maximum":100},"is_surcharge_subject":{"type":["boolean","null"]},"accumulate_347":{"type":"boolean"},"is_active":{"type":"boolean"},"iban":{"type":["string","null"],"maxLength":34},"default_taxes_id":{"type":["string","null"],"format":"uuid"},"preferred_operation_regime":{"type":["string","null"],"enum":["general","intracomunitaria","importacion_exportacion","isp"]},"payment_method":{"type":["string","null"],"enum":["bank_transfer","direct_debit","cash","credit_card","check","paypal","other"]},"payment_terms_days":{"type":["integer","null"],"minimum":0,"maximum":365},"notes":{"type":["string","null"],"maxLength":1000},"metadata":{"$ref":"#/components/schemas/Metadata"},"external_id":{"type":["string","null"],"maxLength":100},"billing_emails":{"type":["array","null"],"items":{"type":"string","format":"email","maxLength":191},"maxItems":5},"coordinates":{"type":"object","properties":{"latitude":{"type":["number","null"],"minimum":-90,"maximum":90},"longitude":{"type":["number","null"],"minimum":-180,"maximum":180}}},"alternative_id":{"type":"object","properties":{"type":{"type":"string","enum":["passport","national_id","tax_id_foreign","not_registered"]},"value":{"type":"string","minLength":1,"maxLength":50},"country_code":{"type":"string","pattern":"^[A-Z]{2}$","minLength":2,"maxLength":2}}},"address":{"type":"object","properties":{"line1":{"type":["string","null"],"maxLength":500},"line2":{"type":["string","null"],"maxLength":100},"number":{"type":["string","null"],"maxLength":100},"floor":{"type":["string","null"],"maxLength":100},"door":{"type":["string","null"],"maxLength":100},"staircase":{"type":["string","null"],"maxLength":100},"postal_code":{"type":["string","null"],"maxLength":10},"city":{"type":["string","null"],"maxLength":100},"province":{"type":["string","null"],"maxLength":100},"country":{"type":["string","null"],"minLength":2,"maxLength":2}}},"bank_accounts":{"type":["array","null"],"items":{"type":"object","properties":{"iban":{"type":"string","maxLength":50},"bic":{"type":["string","null"],"maxLength":20},"is_default":{"type":["boolean","null"]},"notes":{"type":["string","null"],"maxLength":255}},"required":["iban"]}}},"title":"UpdateSupplierRequest"},"UpdateTaxRequest":{"type":"object","description":"Public REST API v1 — PUT /v1/taxes/{uuid}.\n\nPartial update (PATCH semantics controlled by `*Provided` flags\nin the Mapper). Any omitted field is kept; if `null` is sent\nexplicitly, the value is cleared in the database.\n\nThe uniqueness validation of `code` is delegated to the aggregate\n(`DuplicateTaxCodeException` → 409). For system taxes,\nthe non-allowlist fields (`is_active`, `default_for_documents`) throw\n`SystemTaxCannotBeMutatedException::forField()` → 422 with\n`subcode='system_tax_immutable_field'`.","properties":{"name":{"type":"string","maxLength":255},"code":{"type":"string","maxLength":50},"rate":{"type":"number"},"applies_to":{"type":"string","enum":["sale","purchase","both"]},"country":{"type":["string","null"],"minLength":2,"maxLength":2},"description":{"type":["string","null"],"maxLength":1000},"is_active":{"type":"boolean"},"customer_visible_label":{"type":["string","null"],"description":"===== EXTEND AEAT/B2B =====\nNOTE: no `max:200` rule here. The 200-char limit is enforced by the\nVO `CustomerVisibleLabel::create()` via\n`InvalidCustomerVisibleLabelException::tooLong(200)` with the canonical\nsubcode `invalid_customer_visible_label` (spec error catalog §24)."},"external_reference":{"type":["string","null"],"maxLength":10},"valid_from":{"type":["string","null"],"format":"date"},"valid_until":{"type":["string","null"],"format":"date","description":"NOTE: no `after_or_equal:valid_from` rule here. The invariant\n`valid_until >= valid_from` is enforced by the Aggregate via\n`InvalidValidityWindowException::endBeforeStart()` with the canonical\nsubcode `invalid_validity_window` (spec error catalog §6)."},"reverse_charge":{"type":"boolean"},"country_aeat_zone":{"type":["string","null"],"enum":["peninsula","canarias","ceuta","melilla"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"default_for_documents":{"type":"object","description":"===== DEFAULTS CONSOLIDADO =====","properties":{"invoice":{"type":"boolean"},"quote":{"type":"boolean"},"delivery_note":{"type":"boolean"},"proforma":{"type":"boolean"},"purchase_invoice":{"type":"boolean"},"recurring_invoice":{"type":"boolean"}}}},"title":"UpdateTaxRequest"},"UpdateVeriFactuSettingsV1Request":{"type":"object","description":"Public REST API v1 — PUT /v1/verifactu/settings.\n\nPARTIAL update of the company's VeriFactu configuration: each field is\noptional and is only applied if present in the body (`*Provided` pattern\nof `UpdateVeriFactuSettingsV1Command`). The controller resolves\nthe `*Provided` flag via `$this->has('field')`.\n\nPer-field validation:\n - `enabled: boolean`\n - `mode: in:verifactu,no_verifactu`\n - `auto_transmit: boolean`\n - `environment: in:sandbox,production`\n - `notification_emails: array|max:5`, `notification_emails.*: email`","properties":{"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["verifactu","no_verifactu"]},"auto_transmit":{"type":"boolean"},"environment":{"type":"string","enum":["sandbox","production"]},"notification_emails":{"type":"array","items":{"type":"string","format":"email"},"maxItems":5}},"title":"UpdateVeriFactuSettingsV1Request"},"UpdateWebhookEndpointRequest":{"type":"object","description":"PUT /v1/webhook_endpoints/{uuid}\n\nPartial — all fields optional (`sometimes`). Only the fields present in the\nbody are updated; absent ones are preserved. To clear an optional field send\nan explicit `null` (`{field}Provided=true` + `value=null` semantics).\n\nWhen present, `enabled_events` follows the same contract as on create: only\n`available` events are subscribable, i.e. each element must belong to the\nclosed active catalog `EventName::CATALOG`. Events in `EventName::RESERVED`\n(status `coming_soon`) are listed in `GET /v1/event-catalog` but are NOT yet\nemitted, so they are NOT subscribable — sending one yields 422.","properties":{"url":{"type":["string","null"],"pattern":"^https:\\/\\/","maxLength":2048},"description":{"type":["string","null"],"maxLength":255},"api_version":{"type":["string","null"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"timeout_seconds":{"type":["integer","null"]},"enabled_events":{"type":"array","items":{"type":"string","enum":["invoice.created","invoice.updated","invoice.sent","invoice.paid","invoice.cancelled","invoice.annulled","invoice.overdue","invoice.deleted","invoice.number_assigned","invoice.rectified","invoice.email_sent","invoice.email_failed","invoice.payment_reminder_sent","invoice.simplified_created","invoice.simplified_substituted","invoice.substituted_by_complete","invoice.verifactu_submitted","invoice.verifactu_failed","invoice.metadata_changed","quote.created","quote.updated","quote.deleted","quote.approved","quote.rejected","quote.converted","quote.expired","quote.marked_as_pending","quote.cancelled","quote.number_assigned","quote.metadata_changed","quote.email_sent","quote.email_failed","proforma.created","proforma.updated","proforma.deleted","proforma.accepted","proforma.rejected","proforma.cancelled","proforma.expired","proforma.converted_to_invoice","proforma.number_assigned","proforma.metadata_changed","proforma.email_sent","proforma.email_failed","delivery_note.created","delivery_note.updated","delivery_note.status_changed","delivery_note.signed","delivery_note.converted","delivery_note.email_sent","delivery_note.email_failed","purchase_invoice.created","purchase_invoice.updated","purchase_invoice.paid","purchase_invoice.cancelled","purchase_invoice.metadata_changed","purchase_invoice.payment_registered","recurring_invoice.created","recurring_invoice.activated","recurring_invoice.paused","recurring_invoice.updated","recurring_invoice.deleted","recurring_invoice.completed","recurring_invoice.executed","recurring_invoice.failed","recurring_invoice.metadata_changed","recurring_invoice.cancelled","client.created","client.updated","client.deleted","client.metadata_changed","product.created","product.updated","payment.received","tax.metadata_changed","tax.validity_changed","tax.external_reference_changed","series.created","series.updated","series.deleted","series.archived","series.unarchived","series.marked_as_default","series.demoted_from_default","series.year_reset","series.number_consumed","facturae.face_submitted","facturae.face_status_changed","facturae.face_cancellation_requested"]},"minItems":1},"ip_allowlist":{"type":["array","null"],"items":{"type":"string","maxLength":43}},"custom_headers":{"$ref":"#/components/schemas/CustomHeaders"}},"title":"UpdateWebhookEndpointRequest"},"UploadCompanyCertificateV1Request":{"type":"object","description":"Public REST API v1 — POST /v1/verifactu/certificates.\n\nUploads an FNMT certificate (PKCS#12) multipart for the authenticated company.\nFields: `certificate_file` (file) + `certificate_password` (string).\n\nGenuinely new hardening compared to the SPA upload:\n - Extension `.p12`/`.pfx` (`mimes`).\n - Size ≤ 102400 bytes (100 KB) — explicit guard in bytes,\n   a generous upper bound for a real FNMT PKCS#12 (typically 4-15 KB).\n - ASN.1 DER/BER magic bytes via the reusable rule\n   {@see Pkcs12MagicBytes}: the first 2 bytes MUST be `0x30 0x82`\n   or `0x30 0x80`. Defense-in-depth against files that lie about their MIME.\n\nA magic-bytes / size failure throws `InvalidCertificateFormatException`\n(Mappable → 422 `business_rule_violation` / `invalid_certificate_format`),\nNOT a generic `ValidationException`, so that the canonical V1 envelope is\npreserved (subcode `certificate_too_large` for the size limit).","properties":{"certificate_file":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","description":"`extensions:` validates the extension declared by the client (p12/pfx) —\n`mimes:` fails because the Symfony guesser does not map PKCS#12 from\nthe content. The real format defense (ASN.1 DER magic bytes) and the\nsize limit are applied in `withValidator()`, throwing the Mappable\n`InvalidCertificateFormatException` to preserve the canonical envelope\n(`business_rule_violation`), instead of the generic `invalid_param_value`\nthat a `$fail()` would produce."},"certificate_password":{"type":"string","minLength":1,"maxLength":255}},"required":["certificate_file","certificate_password"],"title":"UploadCompanyCertificateV1Request"},"UploadProductGalleryImageRequest":{"type":"object","description":"Public REST API v1 — POST /v1/products/{uuid}/gallery.\n\nMultipart upload: `photo` or `image` (alias) field — jpeg/png/jpg/gif/webp,\nmax 3 MB.\n\nWe accept `image` as an alias of the canonical `photo` field for\nforgiveness with integrators that send it following the more intuitive\nconvention. The controller normalizes it to `photo`.","properties":{"image":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","maxLength":3072}},"required":["image"],"title":"UploadProductGalleryImageRequest"},"UploadProductVideoRequest":{"type":"object","description":"Public REST API v1 — POST /v1/products/{uuid}/video.\n\nMultipart upload: campo `video` (mp4/mov/avi/webm, max 50 MB).","properties":{"video":{"type":"string","format":"binary","contentMediaType":"application/octet-stream","maxLength":51200}},"required":["video"],"title":"UploadProductVideoRequest"},"VeriFactuActivity":{"type":"object","description":"An event in the activity timeline of a VeriFactu record (creation, transmission attempts, AEAT acceptance/rejection).","properties":{"object":{"type":"string","enum":["verifactu_activity"],"example":"verifactu_activity","examples":["verifactu_activity"]},"event_type":{"type":"string","description":"Tipo de evento de dominio (p. ej. `verifactu.record_created`, `verifactu.transmission_accepted`).","example":"verifactu.transmission_accepted","examples":["verifactu.transmission_accepted"]},"description":{"type":"string","description":"Human-readable description of the event in Spanish.","example":"AEAT aceptó la transmisión del registro de alta.","examples":["AEAT aceptó la transmisión del registro de alta."]},"metadata":{"type":"object","additionalProperties":true,"description":"Metadatos del evento. Los identificadores internos (PKs), `huella` y secretos de certificado se eliminan; los `*_uuid` se conservan.","example":{"aeat_csv":"ABC123DEF456GHI789","invoice_number":"FAC-2026-00042"},"examples":[{"aeat_csv":"ABC123DEF456GHI789","invoice_number":"FAC-2026-00042"}]},"performed_by":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key"],"description":"Type of actor that originated the event: `user` for a human in the internal app, `api_key` for an action performed through the public v1 API."},"id":{"type":"string","description":"UUID (v7) of the actor: the user when `type=user`, or the API key when `type=api_key`."},"name":{"type":["string","null"],"description":"Nombre del actor en el momento del evento: nombre del usuario o nombre de la API key. `null` si no se pudo resolver."}},"required":["type","id","name"]},{"type":"null"}],"description":"Actor that originated the event. `{type:\"user\",...}` for an internal user, `{type:\"api_key\",...}` when performed via the public v1 API, or `null` when the event is system-generated (scheduler, periodic sweep) with no attributable actor.","example":{"type":"user","id":"01928f12-1234-7abc-9def-0123456789ab","name":"Ana García"},"examples":[{"type":"user","id":"01928f12-1234-7abc-9def-0123456789ab","name":"Ana García"}]},"created_at":{"type":"string","format":"date-time","description":"When the event occurred (ISO 8601).","example":"2026-04-15T10:31:05+02:00","examples":["2026-04-15T10:31:05+02:00"]}},"required":["object","event_type","description","metadata","performed_by","created_at"],"title":"VeriFactuActivity"},"VeriFactuConfig":{"type":"object","description":"VeriFactu configuration of your company (mode, environment, enrollment). Returned by `GET /v1/verifactu/config` and `PUT /v1/verifactu/settings`. The certificate password is never exposed.","properties":{"object":{"type":"string","enum":["verifactu_config"],"example":"verifactu_config","examples":["verifactu_config"]},"enabled":{"type":"boolean","description":"Indicates whether VeriFactu is enabled for the company.","example":true,"examples":[true]},"mode":{"type":"string","description":"VeriFactu operation mode.","example":"verifactu","examples":["verifactu"]},"auto_transmit":{"type":"boolean","description":"Indicates whether transmissions to AEAT are sent automatically.","example":true,"examples":[true]},"environment":{"type":"string","description":"Entorno AEAT (`sandbox` / `production`).","example":"production","examples":["production"]},"notification_emails":{"type":"array","items":{"type":"string","format":"email"},"description":"Notification emails for VeriFactu events.","example":["avisos@empresa.es"],"examples":[["avisos@empresa.es"]]},"is_locked_until":{"type":["string","null"],"format":"date-time","description":"Date until which the mode change is locked (BR-VFC-001), or `null` if not locked.","example":"2026-12-31T23:59:59+01:00","examples":["2026-12-31T23:59:59+01:00"]},"has_active_certificate":{"type":"boolean","description":"Indica si hay un certificado activo configurado.","example":true,"examples":[true]},"active_certificate_id":{"type":["string","null"],"description":"UUID (v7) del certificado activo, o `null` si no hay ninguno.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a13","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a13"]},"updated_at":{"type":["string","null"],"format":"date-time","example":"2026-04-15T10:30:00+02:00","examples":["2026-04-15T10:30:00+02:00"]}},"required":["object","enabled","mode","auto_transmit","environment","notification_emails","is_locked_until","has_active_certificate","active_certificate_id","updated_at"],"title":"VeriFactuConfig"},"VeriFactuEvent":{"type":"object","description":"A VeriFactu SIF event (Art. 8.1.b): a transmission/retry/AEAT-response entry of the system. The hash chain is never exposed here.","properties":{"id":{"type":"string","description":"UUID (v7) del evento.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a12","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a12"]},"object":{"type":"string","enum":["verifactu_event"],"example":"verifactu_event","examples":["verifactu_event"]},"event_type":{"type":"string","description":"Tipo de evento del SIF.","example":"registro_alta","examples":["registro_alta"]},"event_data":{"type":"object","additionalProperties":true,"description":"Non-PII descriptive data of the event (label, description, CSV, error code/message). Empty object `{}` when there is no data. Sanitized via MetadataSanitizer.","example":{"event_type_label":"Registro de alta","description":"Transmisión de alta aceptada por AEAT.","csv":"ABC123DEF456GHI789"},"examples":[{"event_type_label":"Registro de alta","description":"Transmisión de alta aceptada por AEAT.","csv":"ABC123DEF456GHI789"}]},"status":{"type":"string","description":"Estado AEAT del evento.","example":"accepted","examples":["accepted"]},"occurred_at":{"type":"string","format":"date-time","description":"When the event was generated.","example":"2026-04-15T10:31:05+02:00","examples":["2026-04-15T10:31:05+02:00"]},"created_at":{"type":"string","format":"date-time","example":"2026-04-15T10:31:05+02:00","examples":["2026-04-15T10:31:05+02:00"]},"retry_count":{"type":"integer","description":"Number of transmission attempts made.","example":0,"examples":[0]},"max_retries":{"type":"integer","description":"Maximum number of retries configured.","example":10,"examples":[10]}},"required":["id","object","event_type","event_data","status","occurred_at","created_at","retry_count","max_retries"],"title":"VeriFactuEvent"},"VeriFactuEventSummary":{"type":"object","description":"Resumen agregado de los eventos del SIF de la empresa: total y desglose por tipo y por estado. Devuelto por `GET /v1/verifactu/events/summary`.","properties":{"object":{"type":"string","enum":["verifactu_event_summary"],"example":"verifactu_event_summary","examples":["verifactu_event_summary"]},"total_events":{"type":"integer","description":"Total de eventos registrados.","example":1342,"examples":[1342]},"events_by_type":{"type":"object","additionalProperties":{"type":"integer"},"description":"Recuento de eventos por tipo.","example":{"registro_alta":1230,"registro_anulacion":54,"reintento":58},"examples":[{"registro_alta":1230,"registro_anulacion":54,"reintento":58}]},"events_by_status":{"type":"object","additionalProperties":{"type":"integer"},"description":"Recuento de eventos por estado AEAT.","example":{"accepted":1280,"pending":30,"rejected":32},"examples":[{"accepted":1280,"pending":30,"rejected":32}]},"last_event_at":{"type":["string","null"],"format":"date-time","description":"Date of the last event, or `null` if there is none.","example":"2026-04-15T10:31:05+02:00","examples":["2026-04-15T10:31:05+02:00"]}},"required":["object","total_events","events_by_type","events_by_status","last_event_at"],"title":"VeriFactuEventSummary"},"VeriFactuRecord":{"type":"object","description":"A VeriFactu (Spanish AEAT SIF) record (alta/anulación) associated with an invoice. Includes the hash chain (`huella`), AEAT CSV and transmission status for reconciliation.","properties":{"id":{"type":"string","description":"UUID (v7) del registro VeriFactu.","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a11","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a11"]},"object":{"type":"string","enum":["verifactu_record"],"example":"verifactu_record","examples":["verifactu_record"]},"type":{"type":"string","description":"Tipo de registro (`alta` / `anulacion`).","example":"alta","examples":["alta"]},"invoice_type":{"type":"string","description":"Tipo de factura AEAT (F1, F2, F3, R1-R5, …).","example":"F1","examples":["F1"]},"invoice_number":{"type":"string","description":"Number of the associated invoice.","example":"FAC-2026-00042","examples":["FAC-2026-00042"]},"date":{"type":"string","description":"Fecha del registro.","example":"2026-04-15","examples":["2026-04-15"]},"amount":{"type":"number","description":"Importe total de la factura asociada.","example":1234.56,"examples":[1234.56]},"status":{"type":"string","description":"Transmission status (pending, submitted, accepted, rejected, error).","example":"accepted","examples":["accepted"]},"huella":{"type":"string","description":"Huella SHA-256 encadenada del registro (fingerprint VeriFactu).","example":"3C8F1A2B9D4E5F6071829304A5B6C7D8E9F0A1B2C3D4E5F60718293041526378","examples":["3C8F1A2B9D4E5F6071829304A5B6C7D8E9F0A1B2C3D4E5F60718293041526378"]},"aeat_submission_id":{"type":["string","null"],"description":"Submission identifier assigned by AEAT (column `aeat_submission_id`). `null` until AEAT returns it. Never the internal PK of the record.","example":"AEAT-2026-000048217","examples":["AEAT-2026-000048217"]},"aeat_csv":{"type":["string","null"],"description":"Secure Verification Code (Código Seguro de Verificación) returned by AEAT on acceptance. `null` until AEAT assigns it.","example":"ABC123DEF456GHI789","examples":["ABC123DEF456GHI789"]},"environment":{"type":"string","description":"Entorno AEAT (`sandbox` / `production`).","example":"production","examples":["production"]},"transmitted_at":{"type":["string","null"],"format":"date-time","description":"ISO 8601 date of the last transmission that reached AEAT. `null` in PENDING/REJECTED/ERROR states.","example":"2026-04-15T10:31:05+02:00","examples":["2026-04-15T10:31:05+02:00"]},"is_simplificada":{"type":"boolean","description":"Indica si la factura es simplificada (F2).","example":false,"examples":[false]},"is_substitute_for_simplified":{"type":"boolean","description":"Indica si sustituye a una o varias facturas simplificadas (F3).","example":false,"examples":[false]},"created_at":{"type":"string","format":"date-time","example":"2026-04-15T10:30:00+02:00","examples":["2026-04-15T10:30:00+02:00"]}},"required":["id","object","type","invoice_type","invoice_number","date","amount","status","huella","aeat_submission_id","aeat_csv","environment","transmitted_at","is_simplificada","is_substitute_for_simplified","created_at"],"title":"VeriFactuRecord"},"VeriFactuStats":{"type":"object","description":"Resumen agregado de los registros VeriFactu de la empresa autenticada: conteos por estado y desglose por tipo. Devuelto por `GET /v1/verifactu/stats`.","properties":{"object":{"type":"string","enum":["verifactu_stats"],"example":"verifactu_stats","examples":["verifactu_stats"]},"total_records":{"type":"integer","description":"Total de registros VeriFactu.","example":1284,"examples":[1284]},"pending":{"type":"integer","description":"Records pending transmission.","example":12,"examples":[12]},"submitted":{"type":"integer","description":"Records submitted to AEAT (without a final response yet).","example":18,"examples":[18]},"accepted":{"type":"integer","description":"Registros aceptados por AEAT.","example":1250,"examples":[1250]},"rejected":{"type":"integer","description":"Registros rechazados por AEAT.","example":3,"examples":[3]},"error":{"type":"integer","description":"Registros en estado de error.","example":1,"examples":[1]},"by_record_type":{"type":"object","additionalProperties":{"type":"integer"},"description":"Recuento por tipo de registro (alta/anulacion).","example":{"alta":1230,"anulacion":54},"examples":[{"alta":1230,"anulacion":54}]},"by_invoice_type":{"type":"object","additionalProperties":{"type":"integer"},"description":"Recuento por tipo de factura AEAT (F1, F2, F3, …).","example":{"F1":1100,"F2":130,"R1":54},"examples":[{"F1":1100,"F2":130,"R1":54}]},"last_transmission_at":{"type":["string","null"],"format":"date-time","description":"Date of the last transmission to AEAT, or `null` if there is none.","example":"2026-04-15T10:31:05+02:00","examples":["2026-04-15T10:31:05+02:00"]}},"required":["object","total_records","pending","submitted","accepted","rejected","error","by_record_type","by_invoice_type","last_transmission_at"],"title":"VeriFactuStats"},"VerifyClientCensusRequest":{"type":"object","description":"Public REST API v1 — POST /v1/clients/census-verification.\n\nVerifies a THIRD PARTY's name + tax_id pair (invoice recipient) against\nthe AEAT census (VNifV2). Max lengths mirror the Company BC value objects\nconsumed by the bridge (`TaxIdentifier` ≤ 20, `CompanyName` ≤ 100).","properties":{"tax_id":{"type":"string","description":"Spanish tax identifier (NIF/CIF/NIE) of the third party to check against the AEAT census","maxLength":20},"name":{"type":"string","description":"Name or business name of the third party (the name + tax ID pair is verified together)","maxLength":100}},"required":["tax_id","name"],"title":"VerifyClientCensusRequest"},"VoidInvoiceRequest":{"type":"object","description":"Public REST API v1 — POST /v1/invoices/{uuid}/void.\n\nOptional body: `reason` (string). If the API client does not send a\nreason, a placeholder is persisted (\"Anulada via API v1.\").","properties":{"reason":{"type":["string","null"],"maxLength":500}},"title":"VoidInvoiceRequest"},"WebhookDelivery":{"type":"object","description":"A single attempt to deliver an event to a webhook endpoint.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0c"]},"object":{"type":"string","enum":["webhook_delivery"],"example":"webhook_delivery","examples":["webhook_delivery"]},"webhook_endpoint_id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b"]},"event_id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0d","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0d"]},"event_name":{"type":"string","example":"invoice.paid","examples":["invoice.paid"]},"status":{"type":"string","enum":["pending","delivered","failed","failed_permanently","cancelled"],"description":"Delivery status. `pending` (queued / in-flight), `delivered` (2xx received), `failed` (recoverable failure, will retry), `failed_permanently` (all attempts exhausted), `cancelled` (delivery aborted, terminal).","example":"delivered","examples":["delivered"]},"attempt":{"type":"integer","example":1,"examples":[1]},"next_retry_at":{"type":["string","null"],"format":"date-time","example":"2026-01-25T18:05:00Z","examples":["2026-01-25T18:05:00Z"]},"response_status":{"type":["integer","null"],"description":"HTTP status from the endpoint.","example":200,"examples":[200]},"response_body_truncated":{"type":["string","null"],"example":"{\"received\":true}","examples":["{\"received\":true}"]},"duration_ms":{"type":["integer","null"],"example":142,"examples":[142]},"signature":{"type":["string","null"],"description":"HMAC SHA-256 signature header value (`t=...,v1=...`) sent with this delivery, for debugging signature verification. `null` for deliveries created before signing or not yet attempted.","example":"t=1737830400,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd","examples":["t=1737830400,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"]},"request_headers":{"type":"object","additionalProperties":{"type":"string"},"description":"HTTP headers sent with this delivery attempt (debug). Empty object when no headers were captured.","example":{"Content-Type":"application/json","Factuarea-Event-Id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0d"},"examples":[{"Content-Type":"application/json","Factuarea-Event-Id":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0d"}]},"completed_at":{"type":["string","null"],"format":"date-time","example":"2026-01-25T18:00:01Z","examples":["2026-01-25T18:00:01Z"]},"created_at":{"type":"string","format":"date-time","example":"2026-01-25T18:00:00Z","examples":["2026-01-25T18:00:00Z"]},"payload":{"$ref":"#/components/schemas/WebhookEventPayload"}},"required":["id","object","webhook_endpoint_id","event_id","event_name","status","attempt","next_retry_at","response_status","response_body_truncated","duration_ms","signature","request_headers","completed_at","created_at","payload"],"title":"WebhookDelivery"},"WebhookEndpoint":{"type":"object","description":"An HTTPS endpoint that receives webhook events. The secret is never exposed in this representation.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b"]},"object":{"type":"string","enum":["webhook_endpoint"],"example":"webhook_endpoint","examples":["webhook_endpoint"]},"url":{"type":"string","format":"uri","description":"HTTPS callback URL.","example":"https://example.com/webhooks/factuarea","examples":["https://example.com/webhooks/factuarea"]},"description":{"type":["string","null"],"example":"Webhook principal de producción.","examples":["Webhook principal de producción."]},"enabled_events":{"type":"array","items":{"type":"string"},"description":"List of event types this endpoint subscribes to.","example":["invoice.created","invoice.paid","quote.approved"],"examples":[["invoice.created","invoice.paid","quote.approved"]]},"status":{"type":"string","description":"enabled, disabled, or paused.","example":"enabled","examples":["enabled"]},"ip_allowlist":{"type":["array","null"],"items":{"type":"string"},"description":"List of allowed source IPs.","example":["203.0.113.10","198.51.100.0/24"],"examples":[["203.0.113.10","198.51.100.0/24"]]},"delivery_success_rate_24h":{"type":["number","null"],"example":99.5,"examples":[99.5]},"last_delivery_at":{"type":["string","null"],"format":"date-time","example":"2026-01-25T18:00:00Z","examples":["2026-01-25T18:00:00Z"]},"last_failure_at":{"type":["string","null"],"format":"date-time","example":"2026-01-20T09:14:33Z","examples":["2026-01-20T09:14:33Z"]},"previous_secret_valid_until":{"type":["string","null"],"format":"date-time","example":"2026-01-26T18:00:00Z","examples":["2026-01-26T18:00:00Z"]},"created_at":{"type":"string","format":"date-time","example":"2025-12-15T12:00:00Z","examples":["2025-12-15T12:00:00Z"]},"updated_at":{"type":"string","format":"date-time","example":"2026-01-25T18:00:00Z","examples":["2026-01-25T18:00:00Z"]},"api_version":{"type":["string","null"],"description":"API version (date-based, e.g. `2026-05-01`) pinned for the payloads delivered to this endpoint. `null` means the account default applies.","example":"2026-05-01","examples":["2026-05-01"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"custom_headers":{"$ref":"#/components/schemas/CustomHeaders"},"timeout_seconds":{"type":["integer","null"],"description":"HTTP request timeout in seconds applied when delivering to this endpoint (1–30). `null` means the system default applies.","example":10,"examples":[10]},"degraded_since":{"type":["string","null"],"format":"date-time","description":"Timestamp since which the endpoint is considered degraded (sustained delivery failures). `null` when healthy.","example":"2026-01-24T07:30:00Z","examples":["2026-01-24T07:30:00Z"]}},"required":["id","object","url","description","enabled_events","status","ip_allowlist","delivery_success_rate_24h","last_delivery_at","last_failure_at","previous_secret_valid_until","created_at","updated_at","api_version","metadata","custom_headers","timeout_seconds","degraded_since"],"title":"WebhookEndpoint"},"WebhookEndpointWithSecret":{"type":"object","description":"A WebhookEndpoint returned once at creation or after secret rotation. Includes the plain-text signing secret.","properties":{"id":{"type":"string","example":"01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b","examples":["01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a0b"]},"object":{"type":"string","enum":["webhook_endpoint"],"example":"webhook_endpoint","examples":["webhook_endpoint"]},"url":{"type":"string","format":"uri","description":"HTTPS callback URL.","example":"https://example.com/webhooks/factuarea","examples":["https://example.com/webhooks/factuarea"]},"description":{"type":["string","null"],"example":"Webhook principal de producción.","examples":["Webhook principal de producción."]},"enabled_events":{"type":"array","items":{"type":"string"},"description":"List of event types this endpoint subscribes to.","example":["invoice.created","invoice.paid","quote.approved"],"examples":[["invoice.created","invoice.paid","quote.approved"]]},"status":{"type":"string","description":"enabled, disabled, or paused.","example":"enabled","examples":["enabled"]},"ip_allowlist":{"type":["array","null"],"items":{"type":"string"},"description":"List of allowed source IPs.","example":["203.0.113.10","198.51.100.0/24"],"examples":[["203.0.113.10","198.51.100.0/24"]]},"delivery_success_rate_24h":{"type":["number","null"],"example":99.5,"examples":[99.5]},"last_delivery_at":{"type":["string","null"],"format":"date-time","example":"2026-01-25T18:00:00Z","examples":["2026-01-25T18:00:00Z"]},"last_failure_at":{"type":["string","null"],"format":"date-time","example":"2026-01-20T09:14:33Z","examples":["2026-01-20T09:14:33Z"]},"previous_secret_valid_until":{"type":["string","null"],"format":"date-time","example":"2026-01-26T18:00:00Z","examples":["2026-01-26T18:00:00Z"]},"created_at":{"type":"string","format":"date-time","example":"2025-12-15T12:00:00Z","examples":["2025-12-15T12:00:00Z"]},"updated_at":{"type":"string","format":"date-time","example":"2026-01-25T18:00:00Z","examples":["2026-01-25T18:00:00Z"]},"api_version":{"type":["string","null"],"description":"API version (date-based, e.g. `2026-05-01`) pinned for the payloads delivered to this endpoint. `null` means the account default applies.","example":"2026-05-01","examples":["2026-05-01"]},"metadata":{"$ref":"#/components/schemas/Metadata"},"custom_headers":{"$ref":"#/components/schemas/CustomHeaders"},"timeout_seconds":{"type":["integer","null"],"description":"HTTP request timeout in seconds applied when delivering to this endpoint (1–30). `null` means the system default applies.","example":10,"examples":[10]},"degraded_since":{"type":["string","null"],"format":"date-time","description":"Timestamp since which the endpoint is considered degraded (sustained delivery failures). `null` when healthy.","example":"2026-01-24T07:30:00Z","examples":["2026-01-24T07:30:00Z"]},"secret":{"type":"string","description":"Signing secret. Returned only at creation or after rotation.","example":"whsec_01HKQS5N8VR7QXJ9K3T6BWPMZA9876543210ABCDEF","examples":["whsec_01HKQS5N8VR7QXJ9K3T6BWPMZA9876543210ABCDEF"]}},"required":["id","object","url","description","enabled_events","status","ip_allowlist","delivery_success_rate_24h","last_delivery_at","last_failure_at","previous_secret_valid_until","created_at","updated_at","api_version","metadata","custom_headers","timeout_seconds","degraded_since","secret"],"title":"WebhookEndpointWithSecret"},"WebhookEventPayload":{"description":"The event envelope delivered to a webhook endpoint, discriminated by `type`. Each variant carries the typed `data` payload for its event type.","oneOf":[{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceUpdated"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceSent"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoicePaid"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceCancelled"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceAnnulled"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceOverdue"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceDeleted"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceNumberAssigned"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceRectified"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceEmailSent"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceEmailFailed"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoicePaymentReminderSent"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceSimplifiedCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceSimplifiedSubstituted"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceSubstitutedByComplete"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceVerifactuSubmitted"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceVerifactuFailed"},{"$ref":"#/components/schemas/WebhookEventPayloadInvoiceMetadataChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteUpdated"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteDeleted"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteApproved"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteRejected"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteConverted"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteExpired"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteMarkedAsPending"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteCancelled"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteNumberAssigned"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteMetadataChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteEmailSent"},{"$ref":"#/components/schemas/WebhookEventPayloadQuoteEmailFailed"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaUpdated"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaDeleted"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaAccepted"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaRejected"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaCancelled"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaExpired"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaConvertedToInvoice"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaNumberAssigned"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaMetadataChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaEmailSent"},{"$ref":"#/components/schemas/WebhookEventPayloadProformaEmailFailed"},{"$ref":"#/components/schemas/WebhookEventPayloadDeliveryNoteCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadDeliveryNoteUpdated"},{"$ref":"#/components/schemas/WebhookEventPayloadDeliveryNoteStatusChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadDeliveryNoteSigned"},{"$ref":"#/components/schemas/WebhookEventPayloadDeliveryNoteConverted"},{"$ref":"#/components/schemas/WebhookEventPayloadDeliveryNoteEmailSent"},{"$ref":"#/components/schemas/WebhookEventPayloadDeliveryNoteEmailFailed"},{"$ref":"#/components/schemas/WebhookEventPayloadPurchaseInvoiceCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadPurchaseInvoiceUpdated"},{"$ref":"#/components/schemas/WebhookEventPayloadPurchaseInvoicePaid"},{"$ref":"#/components/schemas/WebhookEventPayloadPurchaseInvoiceCancelled"},{"$ref":"#/components/schemas/WebhookEventPayloadPurchaseInvoiceMetadataChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadPurchaseInvoicePaymentRegistered"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoiceCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoiceActivated"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoicePaused"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoiceUpdated"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoiceDeleted"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoiceCompleted"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoiceExecuted"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoiceFailed"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoiceMetadataChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadRecurringInvoiceCancelled"},{"$ref":"#/components/schemas/WebhookEventPayloadClientCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadClientUpdated"},{"$ref":"#/components/schemas/WebhookEventPayloadClientDeleted"},{"$ref":"#/components/schemas/WebhookEventPayloadClientMetadataChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadProductCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadProductUpdated"},{"$ref":"#/components/schemas/WebhookEventPayloadPaymentReceived"},{"$ref":"#/components/schemas/WebhookEventPayloadTaxMetadataChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadTaxValidityChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadTaxExternalReferenceChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadSeriesCreated"},{"$ref":"#/components/schemas/WebhookEventPayloadSeriesUpdated"},{"$ref":"#/components/schemas/WebhookEventPayloadSeriesDeleted"},{"$ref":"#/components/schemas/WebhookEventPayloadSeriesArchived"},{"$ref":"#/components/schemas/WebhookEventPayloadSeriesUnarchived"},{"$ref":"#/components/schemas/WebhookEventPayloadSeriesMarkedAsDefault"},{"$ref":"#/components/schemas/WebhookEventPayloadSeriesDemotedFromDefault"},{"$ref":"#/components/schemas/WebhookEventPayloadSeriesYearReset"},{"$ref":"#/components/schemas/WebhookEventPayloadSeriesNumberConsumed"},{"$ref":"#/components/schemas/WebhookEventPayloadFacturaeFaceSubmitted"},{"$ref":"#/components/schemas/WebhookEventPayloadFacturaeFaceStatusChanged"},{"$ref":"#/components/schemas/WebhookEventPayloadFacturaeFaceCancellationRequested"}],"discriminator":{"propertyName":"type","mapping":{"invoice.created":"#/components/schemas/WebhookEventPayloadInvoiceCreated","invoice.updated":"#/components/schemas/WebhookEventPayloadInvoiceUpdated","invoice.sent":"#/components/schemas/WebhookEventPayloadInvoiceSent","invoice.paid":"#/components/schemas/WebhookEventPayloadInvoicePaid","invoice.cancelled":"#/components/schemas/WebhookEventPayloadInvoiceCancelled","invoice.annulled":"#/components/schemas/WebhookEventPayloadInvoiceAnnulled","invoice.overdue":"#/components/schemas/WebhookEventPayloadInvoiceOverdue","invoice.deleted":"#/components/schemas/WebhookEventPayloadInvoiceDeleted","invoice.number_assigned":"#/components/schemas/WebhookEventPayloadInvoiceNumberAssigned","invoice.rectified":"#/components/schemas/WebhookEventPayloadInvoiceRectified","invoice.email_sent":"#/components/schemas/WebhookEventPayloadInvoiceEmailSent","invoice.email_failed":"#/components/schemas/WebhookEventPayloadInvoiceEmailFailed","invoice.payment_reminder_sent":"#/components/schemas/WebhookEventPayloadInvoicePaymentReminderSent","invoice.simplified_created":"#/components/schemas/WebhookEventPayloadInvoiceSimplifiedCreated","invoice.simplified_substituted":"#/components/schemas/WebhookEventPayloadInvoiceSimplifiedSubstituted","invoice.substituted_by_complete":"#/components/schemas/WebhookEventPayloadInvoiceSubstitutedByComplete","invoice.verifactu_submitted":"#/components/schemas/WebhookEventPayloadInvoiceVerifactuSubmitted","invoice.verifactu_failed":"#/components/schemas/WebhookEventPayloadInvoiceVerifactuFailed","invoice.metadata_changed":"#/components/schemas/WebhookEventPayloadInvoiceMetadataChanged","quote.created":"#/components/schemas/WebhookEventPayloadQuoteCreated","quote.updated":"#/components/schemas/WebhookEventPayloadQuoteUpdated","quote.deleted":"#/components/schemas/WebhookEventPayloadQuoteDeleted","quote.approved":"#/components/schemas/WebhookEventPayloadQuoteApproved","quote.rejected":"#/components/schemas/WebhookEventPayloadQuoteRejected","quote.converted":"#/components/schemas/WebhookEventPayloadQuoteConverted","quote.expired":"#/components/schemas/WebhookEventPayloadQuoteExpired","quote.marked_as_pending":"#/components/schemas/WebhookEventPayloadQuoteMarkedAsPending","quote.cancelled":"#/components/schemas/WebhookEventPayloadQuoteCancelled","quote.number_assigned":"#/components/schemas/WebhookEventPayloadQuoteNumberAssigned","quote.metadata_changed":"#/components/schemas/WebhookEventPayloadQuoteMetadataChanged","quote.email_sent":"#/components/schemas/WebhookEventPayloadQuoteEmailSent","quote.email_failed":"#/components/schemas/WebhookEventPayloadQuoteEmailFailed","proforma.created":"#/components/schemas/WebhookEventPayloadProformaCreated","proforma.updated":"#/components/schemas/WebhookEventPayloadProformaUpdated","proforma.deleted":"#/components/schemas/WebhookEventPayloadProformaDeleted","proforma.accepted":"#/components/schemas/WebhookEventPayloadProformaAccepted","proforma.rejected":"#/components/schemas/WebhookEventPayloadProformaRejected","proforma.cancelled":"#/components/schemas/WebhookEventPayloadProformaCancelled","proforma.expired":"#/components/schemas/WebhookEventPayloadProformaExpired","proforma.converted_to_invoice":"#/components/schemas/WebhookEventPayloadProformaConvertedToInvoice","proforma.number_assigned":"#/components/schemas/WebhookEventPayloadProformaNumberAssigned","proforma.metadata_changed":"#/components/schemas/WebhookEventPayloadProformaMetadataChanged","proforma.email_sent":"#/components/schemas/WebhookEventPayloadProformaEmailSent","proforma.email_failed":"#/components/schemas/WebhookEventPayloadProformaEmailFailed","delivery_note.created":"#/components/schemas/WebhookEventPayloadDeliveryNoteCreated","delivery_note.updated":"#/components/schemas/WebhookEventPayloadDeliveryNoteUpdated","delivery_note.status_changed":"#/components/schemas/WebhookEventPayloadDeliveryNoteStatusChanged","delivery_note.signed":"#/components/schemas/WebhookEventPayloadDeliveryNoteSigned","delivery_note.converted":"#/components/schemas/WebhookEventPayloadDeliveryNoteConverted","delivery_note.email_sent":"#/components/schemas/WebhookEventPayloadDeliveryNoteEmailSent","delivery_note.email_failed":"#/components/schemas/WebhookEventPayloadDeliveryNoteEmailFailed","purchase_invoice.created":"#/components/schemas/WebhookEventPayloadPurchaseInvoiceCreated","purchase_invoice.updated":"#/components/schemas/WebhookEventPayloadPurchaseInvoiceUpdated","purchase_invoice.paid":"#/components/schemas/WebhookEventPayloadPurchaseInvoicePaid","purchase_invoice.cancelled":"#/components/schemas/WebhookEventPayloadPurchaseInvoiceCancelled","purchase_invoice.metadata_changed":"#/components/schemas/WebhookEventPayloadPurchaseInvoiceMetadataChanged","purchase_invoice.payment_registered":"#/components/schemas/WebhookEventPayloadPurchaseInvoicePaymentRegistered","recurring_invoice.created":"#/components/schemas/WebhookEventPayloadRecurringInvoiceCreated","recurring_invoice.activated":"#/components/schemas/WebhookEventPayloadRecurringInvoiceActivated","recurring_invoice.paused":"#/components/schemas/WebhookEventPayloadRecurringInvoicePaused","recurring_invoice.updated":"#/components/schemas/WebhookEventPayloadRecurringInvoiceUpdated","recurring_invoice.deleted":"#/components/schemas/WebhookEventPayloadRecurringInvoiceDeleted","recurring_invoice.completed":"#/components/schemas/WebhookEventPayloadRecurringInvoiceCompleted","recurring_invoice.executed":"#/components/schemas/WebhookEventPayloadRecurringInvoiceExecuted","recurring_invoice.failed":"#/components/schemas/WebhookEventPayloadRecurringInvoiceFailed","recurring_invoice.metadata_changed":"#/components/schemas/WebhookEventPayloadRecurringInvoiceMetadataChanged","recurring_invoice.cancelled":"#/components/schemas/WebhookEventPayloadRecurringInvoiceCancelled","client.created":"#/components/schemas/WebhookEventPayloadClientCreated","client.updated":"#/components/schemas/WebhookEventPayloadClientUpdated","client.deleted":"#/components/schemas/WebhookEventPayloadClientDeleted","client.metadata_changed":"#/components/schemas/WebhookEventPayloadClientMetadataChanged","product.created":"#/components/schemas/WebhookEventPayloadProductCreated","product.updated":"#/components/schemas/WebhookEventPayloadProductUpdated","payment.received":"#/components/schemas/WebhookEventPayloadPaymentReceived","tax.metadata_changed":"#/components/schemas/WebhookEventPayloadTaxMetadataChanged","tax.validity_changed":"#/components/schemas/WebhookEventPayloadTaxValidityChanged","tax.external_reference_changed":"#/components/schemas/WebhookEventPayloadTaxExternalReferenceChanged","series.created":"#/components/schemas/WebhookEventPayloadSeriesCreated","series.updated":"#/components/schemas/WebhookEventPayloadSeriesUpdated","series.deleted":"#/components/schemas/WebhookEventPayloadSeriesDeleted","series.archived":"#/components/schemas/WebhookEventPayloadSeriesArchived","series.unarchived":"#/components/schemas/WebhookEventPayloadSeriesUnarchived","series.marked_as_default":"#/components/schemas/WebhookEventPayloadSeriesMarkedAsDefault","series.demoted_from_default":"#/components/schemas/WebhookEventPayloadSeriesDemotedFromDefault","series.year_reset":"#/components/schemas/WebhookEventPayloadSeriesYearReset","series.number_consumed":"#/components/schemas/WebhookEventPayloadSeriesNumberConsumed","facturae.face_submitted":"#/components/schemas/WebhookEventPayloadFacturaeFaceSubmitted","facturae.face_status_changed":"#/components/schemas/WebhookEventPayloadFacturaeFaceStatusChanged","facturae.face_cancellation_requested":"#/components/schemas/WebhookEventPayloadFacturaeFaceCancellationRequested"}},"title":"WebhookEventPayload"},"WebhookEventPayloadClientCreated":{"type":"object","description":"Webhook delivery body for the `client.created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"client.created","description":"Event type. Always `client.created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataClientCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadClientCreated"},"WebhookEventPayloadClientDeleted":{"type":"object","description":"Webhook delivery body for the `client.deleted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"client.deleted","description":"Event type. Always `client.deleted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataClientDeleted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadClientDeleted"},"WebhookEventPayloadClientMetadataChanged":{"type":"object","description":"Webhook delivery body for the `client.metadata_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"client.metadata_changed","description":"Event type. Always `client.metadata_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataClientMetadataChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadClientMetadataChanged"},"WebhookEventPayloadClientUpdated":{"type":"object","description":"Webhook delivery body for the `client.updated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"client.updated","description":"Event type. Always `client.updated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataClientUpdated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadClientUpdated"},"WebhookEventPayloadDeliveryNoteConverted":{"type":"object","description":"Webhook delivery body for the `delivery_note.converted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"delivery_note.converted","description":"Event type. Always `delivery_note.converted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataDeliveryNoteConverted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadDeliveryNoteConverted"},"WebhookEventPayloadDeliveryNoteCreated":{"type":"object","description":"Webhook delivery body for the `delivery_note.created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"delivery_note.created","description":"Event type. Always `delivery_note.created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataDeliveryNoteCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadDeliveryNoteCreated"},"WebhookEventPayloadDeliveryNoteEmailFailed":{"type":"object","description":"Webhook delivery body for the `delivery_note.email_failed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"delivery_note.email_failed","description":"Event type. Always `delivery_note.email_failed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataDeliveryNoteEmailFailed"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadDeliveryNoteEmailFailed"},"WebhookEventPayloadDeliveryNoteEmailSent":{"type":"object","description":"Webhook delivery body for the `delivery_note.email_sent` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"delivery_note.email_sent","description":"Event type. Always `delivery_note.email_sent`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataDeliveryNoteEmailSent"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadDeliveryNoteEmailSent"},"WebhookEventPayloadDeliveryNoteSigned":{"type":"object","description":"Webhook delivery body for the `delivery_note.signed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"delivery_note.signed","description":"Event type. Always `delivery_note.signed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataDeliveryNoteSigned"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadDeliveryNoteSigned"},"WebhookEventPayloadDeliveryNoteStatusChanged":{"type":"object","description":"Webhook delivery body for the `delivery_note.status_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"delivery_note.status_changed","description":"Event type. Always `delivery_note.status_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataDeliveryNoteStatusChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadDeliveryNoteStatusChanged"},"WebhookEventPayloadDeliveryNoteUpdated":{"type":"object","description":"Webhook delivery body for the `delivery_note.updated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"delivery_note.updated","description":"Event type. Always `delivery_note.updated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataDeliveryNoteUpdated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadDeliveryNoteUpdated"},"WebhookEventPayloadFacturaeFaceCancellationRequested":{"type":"object","description":"Webhook delivery body for the `facturae.face_cancellation_requested` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"facturae.face_cancellation_requested","description":"Event type. Always `facturae.face_cancellation_requested`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataFacturaeFaceCancellationRequested"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadFacturaeFaceCancellationRequested"},"WebhookEventPayloadFacturaeFaceStatusChanged":{"type":"object","description":"Webhook delivery body for the `facturae.face_status_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"facturae.face_status_changed","description":"Event type. Always `facturae.face_status_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataFacturaeFaceStatusChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadFacturaeFaceStatusChanged"},"WebhookEventPayloadFacturaeFaceSubmitted":{"type":"object","description":"Webhook delivery body for the `facturae.face_submitted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"facturae.face_submitted","description":"Event type. Always `facturae.face_submitted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataFacturaeFaceSubmitted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadFacturaeFaceSubmitted"},"WebhookEventPayloadInvoiceAnnulled":{"type":"object","description":"Webhook delivery body for the `invoice.annulled` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.annulled","description":"Event type. Always `invoice.annulled`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceAnnulled"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceAnnulled"},"WebhookEventPayloadInvoiceCancelled":{"type":"object","description":"Webhook delivery body for the `invoice.cancelled` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.cancelled","description":"Event type. Always `invoice.cancelled`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceCancelled"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceCancelled"},"WebhookEventPayloadInvoiceCreated":{"type":"object","description":"Webhook delivery body for the `invoice.created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.created","description":"Event type. Always `invoice.created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceCreated"},"WebhookEventPayloadInvoiceDeleted":{"type":"object","description":"Webhook delivery body for the `invoice.deleted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.deleted","description":"Event type. Always `invoice.deleted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceDeleted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceDeleted"},"WebhookEventPayloadInvoiceEmailFailed":{"type":"object","description":"Webhook delivery body for the `invoice.email_failed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.email_failed","description":"Event type. Always `invoice.email_failed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceEmailFailed"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceEmailFailed"},"WebhookEventPayloadInvoiceEmailSent":{"type":"object","description":"Webhook delivery body for the `invoice.email_sent` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.email_sent","description":"Event type. Always `invoice.email_sent`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceEmailSent"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceEmailSent"},"WebhookEventPayloadInvoiceMetadataChanged":{"type":"object","description":"Webhook delivery body for the `invoice.metadata_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.metadata_changed","description":"Event type. Always `invoice.metadata_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceMetadataChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceMetadataChanged"},"WebhookEventPayloadInvoiceNumberAssigned":{"type":"object","description":"Webhook delivery body for the `invoice.number_assigned` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.number_assigned","description":"Event type. Always `invoice.number_assigned`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceNumberAssigned"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceNumberAssigned"},"WebhookEventPayloadInvoiceOverdue":{"type":"object","description":"Webhook delivery body for the `invoice.overdue` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.overdue","description":"Event type. Always `invoice.overdue`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceOverdue"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceOverdue"},"WebhookEventPayloadInvoicePaid":{"type":"object","description":"Webhook delivery body for the `invoice.paid` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.paid","description":"Event type. Always `invoice.paid`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoicePaid"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoicePaid"},"WebhookEventPayloadInvoicePaymentReminderSent":{"type":"object","description":"Webhook delivery body for the `invoice.payment_reminder_sent` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.payment_reminder_sent","description":"Event type. Always `invoice.payment_reminder_sent`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoicePaymentReminderSent"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoicePaymentReminderSent"},"WebhookEventPayloadInvoiceRectified":{"type":"object","description":"Webhook delivery body for the `invoice.rectified` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.rectified","description":"Event type. Always `invoice.rectified`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceRectified"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceRectified"},"WebhookEventPayloadInvoiceSent":{"type":"object","description":"Webhook delivery body for the `invoice.sent` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.sent","description":"Event type. Always `invoice.sent`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceSent"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceSent"},"WebhookEventPayloadInvoiceSimplifiedCreated":{"type":"object","description":"Webhook delivery body for the `invoice.simplified_created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.simplified_created","description":"Event type. Always `invoice.simplified_created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceSimplifiedCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceSimplifiedCreated"},"WebhookEventPayloadInvoiceSimplifiedSubstituted":{"type":"object","description":"Webhook delivery body for the `invoice.simplified_substituted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.simplified_substituted","description":"Event type. Always `invoice.simplified_substituted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceSimplifiedSubstituted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceSimplifiedSubstituted"},"WebhookEventPayloadInvoiceSubstitutedByComplete":{"type":"object","description":"Webhook delivery body for the `invoice.substituted_by_complete` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.substituted_by_complete","description":"Event type. Always `invoice.substituted_by_complete`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceSubstitutedByComplete"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceSubstitutedByComplete"},"WebhookEventPayloadInvoiceUpdated":{"type":"object","description":"Webhook delivery body for the `invoice.updated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.updated","description":"Event type. Always `invoice.updated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceUpdated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceUpdated"},"WebhookEventPayloadInvoiceVerifactuFailed":{"type":"object","description":"Webhook delivery body for the `invoice.verifactu_failed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.verifactu_failed","description":"Event type. Always `invoice.verifactu_failed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceVerifactuFailed"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceVerifactuFailed"},"WebhookEventPayloadInvoiceVerifactuSubmitted":{"type":"object","description":"Webhook delivery body for the `invoice.verifactu_submitted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"invoice.verifactu_submitted","description":"Event type. Always `invoice.verifactu_submitted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataInvoiceVerifactuSubmitted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadInvoiceVerifactuSubmitted"},"WebhookEventPayloadPaymentReceived":{"type":"object","description":"Webhook delivery body for the `payment.received` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"payment.received","description":"Event type. Always `payment.received`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataPaymentReceived"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadPaymentReceived"},"WebhookEventPayloadProductCreated":{"type":"object","description":"Webhook delivery body for the `product.created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"product.created","description":"Event type. Always `product.created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProductCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProductCreated"},"WebhookEventPayloadProductUpdated":{"type":"object","description":"Webhook delivery body for the `product.updated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"product.updated","description":"Event type. Always `product.updated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProductUpdated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProductUpdated"},"WebhookEventPayloadProformaAccepted":{"type":"object","description":"Webhook delivery body for the `proforma.accepted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.accepted","description":"Event type. Always `proforma.accepted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaAccepted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaAccepted"},"WebhookEventPayloadProformaCancelled":{"type":"object","description":"Webhook delivery body for the `proforma.cancelled` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.cancelled","description":"Event type. Always `proforma.cancelled`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaCancelled"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaCancelled"},"WebhookEventPayloadProformaConvertedToInvoice":{"type":"object","description":"Webhook delivery body for the `proforma.converted_to_invoice` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.converted_to_invoice","description":"Event type. Always `proforma.converted_to_invoice`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaConvertedToInvoice"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaConvertedToInvoice"},"WebhookEventPayloadProformaCreated":{"type":"object","description":"Webhook delivery body for the `proforma.created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.created","description":"Event type. Always `proforma.created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaCreated"},"WebhookEventPayloadProformaDeleted":{"type":"object","description":"Webhook delivery body for the `proforma.deleted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.deleted","description":"Event type. Always `proforma.deleted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaDeleted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaDeleted"},"WebhookEventPayloadProformaEmailFailed":{"type":"object","description":"Webhook delivery body for the `proforma.email_failed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.email_failed","description":"Event type. Always `proforma.email_failed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaEmailFailed"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaEmailFailed"},"WebhookEventPayloadProformaEmailSent":{"type":"object","description":"Webhook delivery body for the `proforma.email_sent` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.email_sent","description":"Event type. Always `proforma.email_sent`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaEmailSent"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaEmailSent"},"WebhookEventPayloadProformaExpired":{"type":"object","description":"Webhook delivery body for the `proforma.expired` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.expired","description":"Event type. Always `proforma.expired`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaExpired"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaExpired"},"WebhookEventPayloadProformaMetadataChanged":{"type":"object","description":"Webhook delivery body for the `proforma.metadata_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.metadata_changed","description":"Event type. Always `proforma.metadata_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaMetadataChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaMetadataChanged"},"WebhookEventPayloadProformaNumberAssigned":{"type":"object","description":"Webhook delivery body for the `proforma.number_assigned` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.number_assigned","description":"Event type. Always `proforma.number_assigned`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaNumberAssigned"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaNumberAssigned"},"WebhookEventPayloadProformaRejected":{"type":"object","description":"Webhook delivery body for the `proforma.rejected` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.rejected","description":"Event type. Always `proforma.rejected`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaRejected"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaRejected"},"WebhookEventPayloadProformaUpdated":{"type":"object","description":"Webhook delivery body for the `proforma.updated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"proforma.updated","description":"Event type. Always `proforma.updated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataProformaUpdated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadProformaUpdated"},"WebhookEventPayloadPurchaseInvoiceCancelled":{"type":"object","description":"Webhook delivery body for the `purchase_invoice.cancelled` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"purchase_invoice.cancelled","description":"Event type. Always `purchase_invoice.cancelled`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataPurchaseInvoiceCancelled"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadPurchaseInvoiceCancelled"},"WebhookEventPayloadPurchaseInvoiceCreated":{"type":"object","description":"Webhook delivery body for the `purchase_invoice.created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"purchase_invoice.created","description":"Event type. Always `purchase_invoice.created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataPurchaseInvoiceCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadPurchaseInvoiceCreated"},"WebhookEventPayloadPurchaseInvoiceMetadataChanged":{"type":"object","description":"Webhook delivery body for the `purchase_invoice.metadata_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"purchase_invoice.metadata_changed","description":"Event type. Always `purchase_invoice.metadata_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataPurchaseInvoiceMetadataChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadPurchaseInvoiceMetadataChanged"},"WebhookEventPayloadPurchaseInvoicePaid":{"type":"object","description":"Webhook delivery body for the `purchase_invoice.paid` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"purchase_invoice.paid","description":"Event type. Always `purchase_invoice.paid`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataPurchaseInvoicePaid"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadPurchaseInvoicePaid"},"WebhookEventPayloadPurchaseInvoicePaymentRegistered":{"type":"object","description":"Webhook delivery body for the `purchase_invoice.payment_registered` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"purchase_invoice.payment_registered","description":"Event type. Always `purchase_invoice.payment_registered`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataPurchaseInvoicePaymentRegistered"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadPurchaseInvoicePaymentRegistered"},"WebhookEventPayloadPurchaseInvoiceUpdated":{"type":"object","description":"Webhook delivery body for the `purchase_invoice.updated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"purchase_invoice.updated","description":"Event type. Always `purchase_invoice.updated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataPurchaseInvoiceUpdated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadPurchaseInvoiceUpdated"},"WebhookEventPayloadQuoteApproved":{"type":"object","description":"Webhook delivery body for the `quote.approved` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.approved","description":"Event type. Always `quote.approved`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteApproved"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteApproved"},"WebhookEventPayloadQuoteCancelled":{"type":"object","description":"Webhook delivery body for the `quote.cancelled` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.cancelled","description":"Event type. Always `quote.cancelled`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteCancelled"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteCancelled"},"WebhookEventPayloadQuoteConverted":{"type":"object","description":"Webhook delivery body for the `quote.converted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.converted","description":"Event type. Always `quote.converted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteConverted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteConverted"},"WebhookEventPayloadQuoteCreated":{"type":"object","description":"Webhook delivery body for the `quote.created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.created","description":"Event type. Always `quote.created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteCreated"},"WebhookEventPayloadQuoteDeleted":{"type":"object","description":"Webhook delivery body for the `quote.deleted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.deleted","description":"Event type. Always `quote.deleted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteDeleted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteDeleted"},"WebhookEventPayloadQuoteEmailFailed":{"type":"object","description":"Webhook delivery body for the `quote.email_failed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.email_failed","description":"Event type. Always `quote.email_failed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteEmailFailed"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteEmailFailed"},"WebhookEventPayloadQuoteEmailSent":{"type":"object","description":"Webhook delivery body for the `quote.email_sent` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.email_sent","description":"Event type. Always `quote.email_sent`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteEmailSent"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteEmailSent"},"WebhookEventPayloadQuoteExpired":{"type":"object","description":"Webhook delivery body for the `quote.expired` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.expired","description":"Event type. Always `quote.expired`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteExpired"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteExpired"},"WebhookEventPayloadQuoteMarkedAsPending":{"type":"object","description":"Webhook delivery body for the `quote.marked_as_pending` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.marked_as_pending","description":"Event type. Always `quote.marked_as_pending`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteMarkedAsPending"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteMarkedAsPending"},"WebhookEventPayloadQuoteMetadataChanged":{"type":"object","description":"Webhook delivery body for the `quote.metadata_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.metadata_changed","description":"Event type. Always `quote.metadata_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteMetadataChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteMetadataChanged"},"WebhookEventPayloadQuoteNumberAssigned":{"type":"object","description":"Webhook delivery body for the `quote.number_assigned` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.number_assigned","description":"Event type. Always `quote.number_assigned`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteNumberAssigned"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteNumberAssigned"},"WebhookEventPayloadQuoteRejected":{"type":"object","description":"Webhook delivery body for the `quote.rejected` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.rejected","description":"Event type. Always `quote.rejected`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteRejected"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteRejected"},"WebhookEventPayloadQuoteUpdated":{"type":"object","description":"Webhook delivery body for the `quote.updated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"quote.updated","description":"Event type. Always `quote.updated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataQuoteUpdated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadQuoteUpdated"},"WebhookEventPayloadRecurringInvoiceActivated":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.activated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.activated","description":"Event type. Always `recurring_invoice.activated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoiceActivated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoiceActivated"},"WebhookEventPayloadRecurringInvoiceCancelled":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.cancelled` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.cancelled","description":"Event type. Always `recurring_invoice.cancelled`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoiceCancelled"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoiceCancelled"},"WebhookEventPayloadRecurringInvoiceCompleted":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.completed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.completed","description":"Event type. Always `recurring_invoice.completed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoiceCompleted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoiceCompleted"},"WebhookEventPayloadRecurringInvoiceCreated":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.created","description":"Event type. Always `recurring_invoice.created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoiceCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoiceCreated"},"WebhookEventPayloadRecurringInvoiceDeleted":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.deleted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.deleted","description":"Event type. Always `recurring_invoice.deleted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoiceDeleted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoiceDeleted"},"WebhookEventPayloadRecurringInvoiceExecuted":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.executed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.executed","description":"Event type. Always `recurring_invoice.executed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoiceExecuted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoiceExecuted"},"WebhookEventPayloadRecurringInvoiceFailed":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.failed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.failed","description":"Event type. Always `recurring_invoice.failed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoiceFailed"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoiceFailed"},"WebhookEventPayloadRecurringInvoiceMetadataChanged":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.metadata_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.metadata_changed","description":"Event type. Always `recurring_invoice.metadata_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoiceMetadataChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoiceMetadataChanged"},"WebhookEventPayloadRecurringInvoicePaused":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.paused` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.paused","description":"Event type. Always `recurring_invoice.paused`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoicePaused"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoicePaused"},"WebhookEventPayloadRecurringInvoiceUpdated":{"type":"object","description":"Webhook delivery body for the `recurring_invoice.updated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"recurring_invoice.updated","description":"Event type. Always `recurring_invoice.updated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataRecurringInvoiceUpdated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadRecurringInvoiceUpdated"},"WebhookEventPayloadSeriesArchived":{"type":"object","description":"Webhook delivery body for the `series.archived` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"series.archived","description":"Event type. Always `series.archived`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataSeriesArchived"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadSeriesArchived"},"WebhookEventPayloadSeriesCreated":{"type":"object","description":"Webhook delivery body for the `series.created` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"series.created","description":"Event type. Always `series.created`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataSeriesCreated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadSeriesCreated"},"WebhookEventPayloadSeriesDeleted":{"type":"object","description":"Webhook delivery body for the `series.deleted` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"series.deleted","description":"Event type. Always `series.deleted`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataSeriesDeleted"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadSeriesDeleted"},"WebhookEventPayloadSeriesDemotedFromDefault":{"type":"object","description":"Webhook delivery body for the `series.demoted_from_default` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"series.demoted_from_default","description":"Event type. Always `series.demoted_from_default`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataSeriesDemotedFromDefault"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadSeriesDemotedFromDefault"},"WebhookEventPayloadSeriesMarkedAsDefault":{"type":"object","description":"Webhook delivery body for the `series.marked_as_default` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"series.marked_as_default","description":"Event type. Always `series.marked_as_default`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataSeriesMarkedAsDefault"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadSeriesMarkedAsDefault"},"WebhookEventPayloadSeriesNumberConsumed":{"type":"object","description":"Webhook delivery body for the `series.number_consumed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"series.number_consumed","description":"Event type. Always `series.number_consumed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataSeriesNumberConsumed"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadSeriesNumberConsumed"},"WebhookEventPayloadSeriesUnarchived":{"type":"object","description":"Webhook delivery body for the `series.unarchived` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"series.unarchived","description":"Event type. Always `series.unarchived`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataSeriesUnarchived"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadSeriesUnarchived"},"WebhookEventPayloadSeriesUpdated":{"type":"object","description":"Webhook delivery body for the `series.updated` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"series.updated","description":"Event type. Always `series.updated`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataSeriesUpdated"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadSeriesUpdated"},"WebhookEventPayloadSeriesYearReset":{"type":"object","description":"Webhook delivery body for the `series.year_reset` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"series.year_reset","description":"Event type. Always `series.year_reset`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataSeriesYearReset"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadSeriesYearReset"},"WebhookEventPayloadTaxExternalReferenceChanged":{"type":"object","description":"Webhook delivery body for the `tax.external_reference_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"tax.external_reference_changed","description":"Event type. Always `tax.external_reference_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataTaxExternalReferenceChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadTaxExternalReferenceChanged"},"WebhookEventPayloadTaxMetadataChanged":{"type":"object","description":"Webhook delivery body for the `tax.metadata_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"tax.metadata_changed","description":"Event type. Always `tax.metadata_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataTaxMetadataChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadTaxMetadataChanged"},"WebhookEventPayloadTaxValidityChanged":{"type":"object","description":"Webhook delivery body for the `tax.validity_changed` event.","properties":{"id":{"type":"string","format":"uuid","description":"Opaque identifier of the event (UUID v7)."},"type":{"type":"string","const":"tax.validity_changed","description":"Event type. Always `tax.validity_changed`."},"api_version":{"type":["string","null"],"description":"API version (date-based) the payload was serialized under, sealed at emission (e.g. `2026-05-22`). `null` only for legacy events emitted before versions were sealed."},"created":{"type":"integer","description":"Unix timestamp (seconds) of when the event was created."},"livemode":{"type":"boolean","description":"`true` for production events (`fact_live_`); `false` for test-mode events (`fact_test_`)."},"correlation_id":{"type":["string","null"],"format":"uuid","description":"UUID v7 correlating this event end-to-end with the operation that produced it. `null` for events without a correlation context. The key is always present."},"data":{"$ref":"#/components/schemas/EventDataTaxValidityChanged"}},"required":["id","type","api_version","created","livemode","correlation_id","data"],"title":"WebhookEventPayloadTaxValidityChanged"}},"responses":{"BadRequest":{"description":"The request is syntactically malformed — e.g. an unknown query parameter, an integer parameter with non-numeric value, or a value outside the documented range.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"parameter_unknown":{"summary":"Unknown query parameter","value":{"error":{"type":"invalid_request_error","code":"parameter_unknown","message":"El parámetro 'per_page' no está reconocido por este endpoint.","param":"per_page","doc_url":"https://docs.factuarea.com/guides/errors#parameter_unknown","request_id":"req_01HKQS5N7UR6PWJ8K2T5BWPMZ9"}}},"parameter_invalid_format":{"summary":"Parameter has invalid format","value":{"error":{"type":"invalid_request_error","code":"parameter_invalid_format","message":"El parámetro 'created' debe seguir el formato ISO-8601 (YYYY-MM-DDTHH:mm:ssZ).","param":"created","doc_url":"https://docs.factuarea.com/guides/errors#parameter_invalid_format","request_id":"req_01HKQS5N7UR6PWJ8K2T5BWPMZA"}}},"parameter_invalid_range":{"summary":"Parameter value is out of range","value":{"error":{"type":"invalid_request_error","code":"parameter_invalid_range","message":"El parámetro 'limit' debe estar entre 1 y 100, recibido: 500.","param":"limit","doc_url":"https://docs.factuarea.com/guides/errors#parameter_invalid_range","request_id":"req_01HKQS5N7UR6PWJ8K2T5BWPMZB"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_api_key":{"summary":"Missing API key","value":{"error":{"type":"authentication_error","code":"missing_api_key","message":"No se ha proporcionado una API key válida en el header Authorization.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#missing_api_key","request_id":"req_01HKQS5N8VR7QXJ9K3T6BWPMZA"}}},"invalid_api_key":{"summary":"Invalid API key format","value":{"error":{"type":"authentication_error","code":"invalid_api_key","message":"La API key no tiene el formato esperado (debe empezar por fact_live_ o fact_test_).","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#invalid_api_key","request_id":"req_01HKQS5N9JTQM7HVTQP3FBN5XB"}}},"api_key_revoked":{"summary":"Revoked API key","value":{"error":{"type":"authentication_error","code":"api_key_revoked","message":"Esta API key ha sido revocada y ya no es válida.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#api_key_revoked","request_id":"req_01HKQS5NA8K7E2V9YDZWMT6RJC"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"Forbidden":{"description":"The API key lacks the required scope for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"insufficient_scope":{"summary":"API key lacks required scope","value":{"error":{"type":"authorization_error","code":"insufficient_scope","message":"Esta API key no tiene el scope requerido para esta operación.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#insufficient_scope","request_id":"req_01HKQS5NBC3P8M1KX4V7SLNHQD"}}},"feature_not_available_in_plan":{"summary":"Plan upgrade required","value":{"error":{"type":"authorization_error","code":"feature_not_available_in_plan","message":"Esta funcionalidad requiere el plan empresario o superior. Actualiza tu suscripción para acceder.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#feature_not_available_in_plan","request_id":"req_01HKQS5NCK4V9N2L7Y8X3WPMRE"}}},"addon_not_active":{"summary":"Required add-on is not active","value":{"error":{"type":"authorization_error","code":"addon_not_active","message":"Esta operación requiere un addon que no está activo para tu cuenta.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#addon_not_active","request_id":"req_01HKQS5NDP5W0Q3M8Z9A4BVSNF"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"NotFound":{"description":"The requested resource does not exist or belongs to another company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"resource_not_found":{"summary":"Resource not found","value":{"error":{"type":"not_found_error","code":"resource_not_found","message":"El recurso solicitado no existe o pertenece a otra empresa.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#resource_not_found","request_id":"req_01HKQS5NEQ6X1R4N9B0C5DWTPG"}}},"tax_report_not_found":{"summary":"Tax report not found for the period","value":{"error":{"type":"not_found_error","code":"tax_report_not_found","message":"No se ha encontrado ninguna declaración generada para el período indicado.","param":"period","doc_url":"https://docs.factuarea.com/guides/errors#tax_report_not_found","request_id":"req_01HKQS5NTAXRNOTFOUNDPERIOD07"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"Conflict":{"description":"The request conflicts with the current resource state — e.g. an idempotency key was reused with a different body, or the resource is in a state that does not allow this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"Idempotency key reused with different body","value":{"error":{"type":"idempotency_error","code":"idempotency_key_reused","message":"La cabecera `Idempotency-Key` ya se usó con un body distinto. Usa una clave nueva o reenvía exactamente el mismo body.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#idempotency_key_reused","request_id":"req_01HKQS5NHT9A4U7R2E3F8GZWTJ"}}},"resource_already_exists":{"summary":"Resource already exists (with subcode)","value":{"error":{"type":"conflict_error","code":"resource_already_exists","subcode":"tax_id_already_exists","message":"Ya existe un cliente con ese CIF/NIF.","param":"tax_id","doc_url":"https://docs.factuarea.com/guides/errors#resource_already_exists","request_id":"req_01HKQS5NKW1C6W9T4G5HAIBZVM"}}},"resource_conflict":{"summary":"Generic resource conflict","value":{"error":{"type":"conflict_error","code":"resource_conflict","message":"El recurso está en un estado que no permite esta operación.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#resource_conflict","request_id":"req_01HKQS5NKW1C6W9T4G5HAIBZVL"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"ConflictInvoice":{"description":"The invoice request conflicts with its current state — e.g. an invalid status transition (marking an already-paid invoice as paid), an attempt to edit an issued invoice (use corrective instead), or a reused idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"Idempotency key reused with different body","value":{"error":{"type":"idempotency_error","code":"idempotency_key_reused","message":"La cabecera `Idempotency-Key` ya se usó con un body distinto. Usa una clave nueva o reenvía exactamente el mismo body.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#idempotency_key_reused","request_id":"req_01HKQS5NHT9A4U7R2E3F8GZWTJ"}}},"resource_conflict":{"summary":"Generic resource conflict","value":{"error":{"type":"conflict_error","code":"resource_conflict","message":"El recurso está en un estado que no permite esta operación.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#resource_conflict","request_id":"req_01HKQS5NKW1C6W9T4G5HAIBZVL"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"ConflictQuote":{"description":"The quote request conflicts with its current state — e.g. an invalid status transition (accepting a rejected quote), an attempt to convert a non-accepted quote, or a reused idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"Idempotency key reused with different body","value":{"error":{"type":"idempotency_error","code":"idempotency_key_reused","message":"La cabecera `Idempotency-Key` ya se usó con un body distinto. Usa una clave nueva o reenvía exactamente el mismo body.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#idempotency_key_reused","request_id":"req_01HKQS5NHT9A4U7R2E3F8GZWTJ"}}},"resource_conflict":{"summary":"Generic resource conflict","value":{"error":{"type":"conflict_error","code":"resource_conflict","message":"El recurso está en un estado que no permite esta operación.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#resource_conflict","request_id":"req_01HKQS5NKW1C6W9T4G5HAIBZVL"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"ConflictProforma":{"description":"The proforma request conflicts with its current state — e.g. an invalid status transition (re-converting an already-converted proforma), an attempt to edit a sent proforma, or a reused idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"Idempotency key reused with different body","value":{"error":{"type":"idempotency_error","code":"idempotency_key_reused","message":"La cabecera `Idempotency-Key` ya se usó con un body distinto. Usa una clave nueva o reenvía exactamente el mismo body.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#idempotency_key_reused","request_id":"req_01HKQS5NHT9A4U7R2E3F8GZWTJ"}}},"resource_conflict":{"summary":"Generic resource conflict","value":{"error":{"type":"conflict_error","code":"resource_conflict","message":"El recurso está en un estado que no permite esta operación.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#resource_conflict","request_id":"req_01HKQS5NKW1C6W9T4G5HAIBZVL"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"ConflictDeliveryNote":{"description":"The delivery note request conflicts with its current state — e.g. an invalid status transition (signing an already-signed delivery note), an attempt to sign a non-delivered note, or a reused idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"Idempotency key reused with different body","value":{"error":{"type":"idempotency_error","code":"idempotency_key_reused","message":"La cabecera `Idempotency-Key` ya se usó con un body distinto. Usa una clave nueva o reenvía exactamente el mismo body.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#idempotency_key_reused","request_id":"req_01HKQS5NHT9A4U7R2E3F8GZWTJ"}}},"resource_conflict":{"summary":"Generic resource conflict","value":{"error":{"type":"conflict_error","code":"resource_conflict","message":"El recurso está en un estado que no permite esta operación.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#resource_conflict","request_id":"req_01HKQS5NKW1C6W9T4G5HAIBZVL"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"ConflictPurchaseInvoice":{"description":"The purchase invoice request conflicts with its current state — e.g. an invalid status transition (marking an already-received invoice as received), an attempt to delete a paid purchase invoice, or a reused idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"idempotency_key_reused":{"summary":"Idempotency key reused with different body","value":{"error":{"type":"idempotency_error","code":"idempotency_key_reused","message":"La cabecera `Idempotency-Key` ya se usó con un body distinto. Usa una clave nueva o reenvía exactamente el mismo body.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#idempotency_key_reused","request_id":"req_01HKQS5NHT9A4U7R2E3F8GZWTJ"}}},"resource_conflict":{"summary":"Generic resource conflict","value":{"error":{"type":"conflict_error","code":"resource_conflict","message":"El recurso está en un estado que no permite esta operación.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#resource_conflict","request_id":"req_01HKQS5NKW1C6W9T4G5HAIBZVL"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"UnprocessableEntity":{"description":"Validation failed. The `error.param` field identifies which input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"parameter_invalid":{"summary":"Parameter failed validation","value":{"error":{"type":"invalid_request_error","code":"parameter_invalid","message":"El campo `name` es obligatorio y no puede estar vacío.","param":"name","doc_url":"https://docs.factuarea.com/guides/errors#parameter_invalid","request_id":"req_01HKQS5NGS8Z3T6Q1D2E7FYVSI"}}},"max_api_keys_exceeded":{"summary":"Plan limit reached (authorization)","value":{"error":{"type":"authorization_error","code":"max_api_keys_exceeded","message":"Has alcanzado el número máximo de API keys permitido por tu plan. Revoca alguna existente o actualiza tu suscripción.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#max_api_keys_exceeded","request_id":"req_01HKQS5NGS8Z3T6Q1D2E7FYVSJ"}}},"invalid_idempotency_key_format":{"summary":"Invalid Idempotency-Key format","value":{"error":{"type":"invalid_request_error","code":"invalid_param_format","message":"La Idempotency-Key debe tener entre 1 y 64 caracteres ASCII printable.","param":"Idempotency-Key","doc_url":"https://docs.factuarea.com/guides/errors#invalid_param_format","request_id":"req_01HKQS5NIDEMPKEYFORMAT0007"}}},"invalid_period_quarter_required_for_303":{"summary":"Modelo 303 without quarter","value":{"error":{"type":"invalid_request_error","code":"invalid_period","subcode":"quarter_required_for_303","message":"El Modelo 303 requiere indicar el trimestre (1-4).","param":"quarter","doc_url":"https://docs.factuarea.com/guides/errors#invalid_period","request_id":"req_01HKQS5NTAXR03QTRREQUIRED1"}}},"invalid_period_quarter_not_allowed_for_347":{"summary":"Modelo 347 with quarter","value":{"error":{"type":"invalid_request_error","code":"invalid_period","subcode":"quarter_not_allowed_for_347","message":"El Modelo 347 es anual y no admite trimestre.","param":"quarter","doc_url":"https://docs.factuarea.com/guides/errors#invalid_period","request_id":"req_01HKQS5NTAXR47QTRNALLOWED2"}}},"invalid_period_year_out_of_range":{"summary":"Year out of range","value":{"error":{"type":"invalid_request_error","code":"invalid_period","subcode":"year_out_of_range","message":"El año indicado está fuera del rango permitido.","param":"year","doc_url":"https://docs.factuarea.com/guides/errors#invalid_period","request_id":"req_01HKQS5NTAXRYEAROUTRANGE03"}}},"insufficient_data_for_report":{"summary":"No invoices in the period","value":{"error":{"type":"invalid_request_error","code":"insufficient_data_for_report","subcode":"no_invoices_in_period","message":"No hay facturas en el período indicado para generar la declaración.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#insufficient_data_for_report","request_id":"req_01HKQS5NTAXRNOINVOICES0004"}}},"tax_report_format_invalid":{"summary":"Invalid format","value":{"error":{"type":"invalid_request_error","code":"invalid_param_value","message":"El formato indicado no es válido. Formatos admitidos: txt_aeat, pdf, excel.","param":"format","doc_url":"https://docs.factuarea.com/guides/errors#invalid_param_value","request_id":"req_01HKQS5NTAXRFMTINVALID0005"}}},"unsupported_format":{"summary":"Formatter not available for the type/format/year combination","value":{"error":{"type":"invalid_request_error","code":"unsupported_format","subcode":"formatter_not_available","message":"No hay un generador disponible para la combinación de tipo, formato y año indicada.","param":"format","doc_url":"https://docs.factuarea.com/guides/errors#unsupported_format","request_id":"req_01HKQS5NTAXRFMTUNSUPPRT006"}}},"signature_payload_too_large":{"summary":"Signature image too large (>2MB)","value":{"error":{"type":"invalid_request_error","code":"signature_payload_too_large","message":"La imagen de firma supera el tamaño máximo permitido de 2 MB.","param":"signature_image_base64","doc_url":"https://docs.factuarea.com/guides/errors#signature_payload_too_large","request_id":"req_01HKQS5NDNSIGNTOOLARGE0007"}}},"invalid_status_transition":{"summary":"Invalid document status transition","value":{"error":{"type":"invalid_request_error","code":"invalid_status_transition","message":"No se puede editar una factura emitida; usa una factura rectificativa.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#invalid_status_transition","request_id":"req_01HKQS5NJV0B5V8S3F4G9HAYUK"}}},"invoice_already_paid":{"summary":"Invoice already paid","value":{"error":{"type":"invalid_request_error","code":"invoice_already_paid","message":"No se puede marcar como pagada una factura ya pagada.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#invoice_already_paid","request_id":"req_01HKQS5NJV0B5V8S3F4G9HAYUL"}}},"quote_already_accepted":{"summary":"Quote already accepted","value":{"error":{"type":"invalid_request_error","code":"quote_already_accepted","message":"El presupuesto ya está aceptado.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#quote_already_accepted","request_id":"req_01HKQS5NJV0B5V8S3F4G9HAYUN"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"TooManyRequests":{"description":"Rate limit exceeded. Retry after the duration in `Retry-After`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limit_exceeded":{"summary":"Rate limit exceeded","value":{"error":{"type":"rate_limit_error","code":"rate_limit_exceeded","message":"Has excedido el rate limit de 60 peticiones por minuto. Reintenta tras 30 segundos.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#rate_limit_exceeded","request_id":"req_01HKQS5NKW1C6W9T4G5H0JBZVL"}}},"too_many_auth_failures":{"summary":"Too many authentication failures (temporary lockout)","value":{"error":{"type":"authentication_error","code":"too_many_auth_failures","message":"Has alcanzado el número máximo de intentos de autenticación fallidos. La API key queda bloqueada temporalmente. Reintenta tras el tiempo indicado en `Retry-After`.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#too_many_auth_failures","request_id":"req_01HKQS5NKW1C6W9T4G5H0JBZVM"}}}}}},"headers":{"Retry-After":{"description":"Number of seconds to wait before retrying.","schema":{"type":"integer"}},"RateLimit-Limit":{"description":"Request quota for the current window (RFC 9331).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Remaining requests in the current window (RFC 9331).","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the quota window resets (RFC 9331).","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Request quota for the current window (legacy header).","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining requests in the current window (legacy header).","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Seconds until the quota window resets (legacy header).","schema":{"type":"integer"}},"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}},"InternalServerError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"Unexpected server error","value":{"error":{"type":"api_error","code":"internal_error","message":"Ha ocurrido un error inesperado. Si persiste, contacta con soporte adjuntando el request_id.","param":null,"doc_url":"https://docs.factuarea.com/guides/errors#internal_error","request_id":"req_01HKQS5NLX2D7X0U5H6J1KCAWM"}}}}}},"headers":{"X-Request-Id":{"description":"Unique request identifier, propagated for log correlation and support.","schema":{"type":"string","format":"uuid"}}}}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Unique key generated by the client to ensure idempotency on retries. It lets you safely resend the same request: the first response is cached and returned without re-executing the mutation. It is an **opaque string** to the server; any unique value of up to 64 characters is valid (UUID v7, UUID v4, ULID, nanoid, etc.). UUID v7 is recommended for consistency with the API identifiers. The same key reused with a different body returns `409 idempotency_key_reused`.","required":false,"schema":{"type":"string","minLength":1,"maxLength":64,"example":"01928f10-7c0e-7c4a-9b7d-2f8a6e3c1d4b"}}}}}