Proformas

Accept a proforma

Mark a proforma as accepted by the client. Returns 422 if the proforma is in a status that cannot transition to accepted.

post/companies/{company}/proformas/{proforma}/accept

Request

  • Base URL: https://api.factuarea.com/v1
  • URL: https://api.factuarea.com/v1/companies/{company}/proformas/{proforma}/accept
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

companystring uuid required

Public identifier (UUID v7) of the company. Get it from GET /v1/me (data.scope[].id).

proformastring uuid required

Public identifier (UUID v7) of the proforma.

Headers

Idempotency-Keystring
Example:01928f10-7c0e-7c4a-9b7d-2f8a6e3c1d4b

Client-generated opaque key (up to 255 characters; UUID v7 recommended) that makes retries safe: the first response is cached and replayed for repeats without re-executing the mutation. Reusing a key with a different body returns 422 idempotency_key_reused; the values of secret fields (password, secret…) count as part of the body, so retrying with a corrected secret under the same key is a different request, never the replay of the earlier answer. See the Idempotency guide.

Factuarea-Versionstring date
Example:2026-06-01

Pin the API version (YYYY-MM-DD, Stripe-style date versioning) for this request; omit to use the key's pinned version, or the latest if none. Unsupported version → 400 unsupported_api_version; malformed → 400 parameter_invalid_format. The effective version is echoed in the Factuarea-Version response header. See the Versioning guide.

Request body

reasonstring nullable
metadataMetadata nullable

A free map of up to 50 key→value pairs for storing arbitrary structured data (values are strings up to 500 characters). Unlike custom_fields — an ordered list of typed {field, value} pairs with display semantics, present on the six document resources — metadata is an unordered map for opaque integration data; a document may carry both. The master resources (Client, Supplier) have no custom_fields, so their metadata doubles as the custom-fields store.

Reserved keys (read-only). When the system auto-issues an invoice from a payment correlation (Stripe/GoCardless/MONEI), it writes stripe_subscription_id, stripe_invoice_id, billing_reason, period_start and period_end into that invoice metadata automatically. Do not set or overwrite them by hand — the platform owns them and a manual value may be replaced when the correlation runs.

Example request

{
  "metadata": {
    "erp_code": "IVA-GEN",
    "ledger_account": "477000"
  }
}

Response

Example response

{
  "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",
    "operation_regime": "general",
    "converted_invoice_number": "F-2025-003",
    "subtotal": "1500.00",
    "taxes_total": "315.00",
    "total_vat": "315.00",
    "total_retention": "0.00",
    "total_surcharge": "0.00",
    "total": "1815.00",
    "shipping_cost": "15.50",
    "total_with_shipping": "1830.50",
    "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": [
      {
        "description": "Setup inicial",
        "additional_description": "Auditoría inicial e informe de mejoras",
        "product": {
          "id": "01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8a09",
          "name": "Consultoría hora estándar"
        },
        "quantity": 1,
        "unit_price": "1500.0000",
        "tax_rate": 21,
        "subtotal": "1500.00",
        "taxes": "315.00",
        "total": "1815.00",
        "counted_quantity": "4.0000",
        "configuration": {
          "id": "01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c03",
          "name": "Setup · In situ",
          "signature": "e2704ac1936bd85f0c4a71e2853d69b0fa17c4e6d92038b5417ec0a6395d8b12"
        },
        "options": [
          {
            "group": {
              "id": "01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c13",
              "name": "Modalidad"
            },
            "value": {
              "id": "01931b3e-7c4a-7f2e-9a8b-3c5d6e7f8c23",
              "name": "In situ"
            },
            "price_adjustment": "250.0000",
            "applied": true
          }
        ],
        "price_semantics": "per_commercial_unit",
        "price_adjustment_total": "250.0000"
      }
    ],
    "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"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.