# Create offer

`POST /v1/offers`

Creates an offer (quote) for a customer. It takes the same lines, VAT codes and accounts as `POST /v1/invoices`, and comes back in the same shape with `type: offer`. Read offers with `GET /v1/invoices?type=offer` or `GET /v1/invoices/{id}`.

An offer is never booked. Its life in Numina:

1. `draft`, until it's issued with `issue: true` or `POST /v1/offers/{id}/issue`, which gives it its `offer_number`.
2. `sent`, until the customer answers. Email it with `POST /v1/invoices/{id}/send`, or download it with `GET /v1/invoices/{id}/pdf` and send it yourself.
3. `accepted` or `declined`, set with `POST /v1/offers/{id}/outcome`.
4. An accepted offer becomes an invoice draft with `POST /v1/offers/{id}/invoice`.

### Retries

Send an `Idempotency-Key` header, such as a new UUID per request, to retry safely after a timeout or network error.

- Same key and body: you get the original response, with `Idempotent-Replayed: true`.
- Same key, different body: `422`.
- Same key while the first request is still running: `409`.

Keys belong to the company and are kept for 24 hours after a successful request. A failed request (`4xx` or `5xx`) frees its key, so a retry with that key runs again.

**Scopes:** any of `invoices:write`, `write:draft`, `write:ledger`

## Request

```bash
curl -X POST https://api.numina.app/v1/offers \
  -H "Authorization: Bearer numi_YOUR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "contact_id": "550e8400-e29b-41d4-a716-446655440000",
    "issue_date": "2026-01-15",
    "valid_until": "2026-02-15",
    "currency": "DKK",
    "currency_rate": 7.46,
    "sales_account_number": 1000,
    "vat_code": "U25",
    "items": [
      {
        "description": "Consulting services",
        "quantity": 10,
        "unit_price": 1000,
        "sales_account_number": 1030,
        "vat_code": "U25"
      }
    ],
    "memo": "Valid for 30 days",
    "order_reference": "PO-2026-0042",
    "bank_account_id": "550e8400-e29b-41d4-a716-446655440000",
    "issue": true
  }'
```

## Headers

- `Idempotency-Key` (string, optional): A unique key for this request, up to 255 characters. A retry with the same key and body returns the original response instead of running again. (max 255 chars)

## Body (`application/json`)

- `contact_id` (string (uuid), required): The customer the offer is for
- `issue_date` (string, required): Issue date, as `YYYY-MM-DD` (YYYY-MM-DD)
- `valid_until` (string, optional): Last day the customer can accept, as `YYYY-MM-DD`. Numina shows the offer as expired after it. (YYYY-MM-DD)
- `currency` (string, optional): ISO 4217 currency code. Defaults to `DKK`. A currency Numina has no exchange rate for returns `400`. Default: `"DKK"`. (max 3 chars)
- `currency_rate` (number, optional): Exchange rate to DKK: amount × rate = DKK. Leave it out to use Numina's rate for the issue date; the invoice made from the offer is then booked at Numina's rate, like any invoice. A rate you send carries over to that invoice and is kept when it is booked. Ignored for DKK. (≥ 0)
- `sales_account_number` (integer, optional): Sales account for lines that don't set their own, from `GET /v1/accounts`. Required unless every line has one.
- `vat_code` (string, optional): VAT code for lines that don't set their own, such as `U25`. Leave it out for no VAT on those lines. `GET /v1/vat-codes` lists the codes and their rates.
- `items` (array of objects, required): The offer lines. At least one.
  - `description` (string, required): Line item description
  - `quantity` (number, required): Quantity
  - `unit_price` (number, required): Unit price (excl. VAT)
  - `sales_account_number` (integer, optional): Sales account for this line, from `GET /v1/accounts`. Defaults to the invoice's `sales_account_number`.
  - `vat_code` (string, optional, nullable): VAT code for this line, from `GET /v1/vat-codes`. Send `null` for no VAT. If you leave it out, the line uses its sales account's default VAT code, like the invoice editor does, and then the invoice's `vat_code`.
- `memo` (string, optional): Note displayed on the offer (max 2000 chars)
- `order_reference` (string, optional): The customer's own reference, such as their request or purchase order number. Copied to the invoice made from the offer. (max 200 chars)
- `bank_account_id` (string (uuid), optional): The bank account shown on the offer and copied to its invoice, from `GET /v1/bank-accounts`. Defaults to the account marked `is_invoice_default`.
- `issue` (boolean, optional): Issue the offer right away: it gets an offer number and its status becomes `sent`. Nothing is emailed. Defaults to `false`, which saves a draft. Default: `false`.

## Response `201`

The offer

```json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "invoice_number": 1001,
  "offer_number": 42,
  "type": "invoice",
  "credited_invoice_id": "550e8400-e29b-41d4-a716-446655440000",
  "source_offer_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "sent",
  "issue_date": "2026-01-15",
  "due_date": "2026-02-15",
  "valid_until": "2026-02-15",
  "contact_id": "550e8400-e29b-41d4-a716-446655440001",
  "contact_name": "Acme ApS",
  "currency": "DKK",
  "subtotal": 10000,
  "vat": 2500,
  "vat_rate": 25,
  "total": 12500,
  "has_mixed_vat": false,
  "outstanding_balance": 12500,
  "outstanding_balance_currency": "DKK",
  "currency_rate": 0,
  "delivery_status": "sent",
  "email_delivery_status": "string",
  "email_sent_at": "string",
  "e_invoice_status": "delivered",
  "e_invoice_sent_at": "string",
  "e_invoice_number": "5790000123456",
  "e_invoice_scheme": "GLN",
  "attn_person": "Jane Doe",
  "order_reference": "PO-2026-0042",
  "is_overdue": false,
  "payment_state": "open",
  "unmatched_payments_note": "string",
  "items": [
    {
      "unit": "string",
      "vat_account_id": "string",
      "vat_code": "string",
      "sales_account_number": 0,
      "vat_rate": 0,
      "id": "550e8400-e29b-41d4-a716-446655440002",
      "description": "Consulting services",
      "quantity": 10,
      "unit_price": 1000
    }
  ],
  "memo": "Project Q1 delivery",
  "payment_details": {
    "bank_name": "Danske Bank",
    "scheme": "dk-registration-number",
    "clearing_code": "3409",
    "account_number": "0012345678",
    "iban": "DK5030000012345678",
    "swift_bic": "DABADKKK",
    "other_details": null
  },
  "created_at": "2026-01-15T10:30:00Z"
}
```

## Errors

- `400` Bad Request - The request is invalid
- `401` Unauthorized - Missing or invalid credentials
- `403` Forbidden - A scope is missing, or the company is archived
- `409` Conflict - A request with the same Idempotency-Key is still being processed
- `422` Unprocessable Entity - The `Idempotency-Key` was already used for a different request
- `429` Too Many Requests - You're over the rate limit
- `500` Internal Server Error - Something went wrong on our side

See https://developers.numina.app/errors.md for the error format.
