# Open invoice

> Initiates the process of opening an invoice receivable. This assigns an invoice number, locks the invoice for editing, and optionally sends it via email or submits it to e-invoicing systems. The request body is optional - if not provided, the invoice will be opened with default settings (no email sent, no e-invoice submission).

`POST https://api.light.inc/v1/invoice-receivables/{invoiceReceivableId}/open`

## Note

Two phases. Synchronously the invoice is validated ( paymentType , dueDate , customerId , invoiceTemplateId , entity, currency, a bank account for bank transfer or direct debit, at least one line with product, account and tax, a total above zero, required custom properties — errors such as INVOICE_RECEIVABLE_DETAILS_MISSING_FIELD , INVOICE_RECEIVABLE_LINE_MISSING_FIELD , INVOICE_RECEIVABLE_MISSING_LINES ), the ledger posting is previewed against open accounting periods, the invoice number is assigned , and the response comes back in OPEN_IN_PROGRESS with invoiceNumber set. In the background the e-invoice is submitted (if requested), the email is sent (if requested), and only then is the invoice posted to the ledger and moved to OPEN with openedAt . Poll GET /v1/invoice-receivables/{invoiceReceivableId} until the state leaves OPEN_IN_PROGRESS . A validation failure in the background (for example shouldSubmitEInvoice on an entity without e-invoicing) sends it back to DRAFT with failureContext , keeping the number for the next attempt. If the company auto-allocates customer credits, an invoice can land in PARTIALLY_PAID or PAID straight away. With shouldSendEmail , emailInfo is required.

## Authorization

- API key
- Bearer token

See https://light.inc/docs/getting-started/authentication.

## Path parameters

- `invoiceReceivableId` (string, uuid, required)

## Request body

`application/json;charset=UTF-8`


```json
{
  "emailInfo": {
    "subject": "string",
    "replyTo": "string",
    "recipients": [
      "string"
    ],
    "cc": [
      "string"
    ],
    "customMessage": "string"
  },
  "shouldSendEmail": true,
  "shouldSubmitEInvoice": true
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders, and fields that exclude each other are all shown. Do not send it unchanged.

## Response

- `amount` — Gross total after discounts and tax, signed: a debit-side line (for example a negative `priceOverwrite`) reduces it.
- `invoiceNumber` — `null` on a draft unless you set one; assigned synchronously by `open` and kept across `reset` and `archive`.
- `currency` — The invoice currency.
- `lines` — `null` on the list endpoint; populated only by `GET /v1/invoice-receivables/{invoiceReceivableId}`.
- `lines.discount` — Discount applied to the line, by percentage or by amount.
- `lines.netAmount` — Signed: credit-side lines are positive, debit-side lines (a negative `priceOverwrite`) are negative. `discountAmount` is unsigned.
- `lines.taxAmount` — Signed the same way as `netAmount`: negative on a debit-side line.
- `externalSource` — Set when the invoice was imported from another system (for example Chargebee): the system's name and the invoice's id there.
- `failureContext` — Set when a background open fails and the invoice drops back to `DRAFT`; cleared by the next successful open. The description about vendor onboarding is a copy-paste from another model.

```json
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "contractId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "amount": 100000,
  "paymentType": "AIRWALLEX",
  "payeeBankAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceDate": "2026-01-15",
  "effectiveInvoiceDate": "2026-01-15",
  "postingDate": "2026-01-15",
  "dueDate": "2026-01-15",
  "netTerms": 0,
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "invoiceTemplateAdditionalText": "string",
  "invoiceNumber": "string",
  "type": "STANDARD",
  "state": "CREATED",
  "openedAt": "2026-01-15T09:30:00Z",
  "poNumber": "string",
  "reference": "string",
  "paymentReference": "string",
  "description": "string",
  "currency": "USD",
  "taxEngineName": "AVATAX",
  "areLinesWithTax": true,
  "localCurrencyFxRate": 0,
  "groupCurrencyFxRate": 0,
  "lines": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "invoiceReceivableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "productId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "quantity": 0,
      "taxCodeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "discount": {
        "type": "PERCENTAGE"
      },
      "discountAmount": 100000,
      "netAmount": 100000,
      "taxAmount": 100000,
      "avataxCode": "string",
      "billingStart": "2026-01-15",
      "billingEnd": "2026-01-15",
      "priceOverwrite": 100000,
      "productNameOverwrite": "string",
      "createdAt": "2026-01-15T09:30:00Z",
      "updatedAt": "2026-01-15T09:30:00Z",
      "accrualTemplateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "accrualStartDate": "2026-01-15",
      "accrualEndDate": "2026-01-15",
      "customProperties": [
        {
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "string",
          "values": [
            {}
          ]
        }
      ]
    }
  ],
  "customProperties": [
    {
      "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "groupInternalName": "string",
      "values": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "groupInternalName": "string",
          "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "internalName": "string",
          "label": "string",
          "context": "string",
          "createdAt": "2026-01-15T09:30:00Z",
          "updatedAt": "2026-01-15T09:30:00Z"
        }
      ]
    }
  ],
  "externalSource": {
    "name": "CHARGEBEE",
    "externalId": "string"
  },
  "createdAt": "2026-01-15T09:30:00Z",
  "updatedAt": "2026-01-15T09:30:00Z",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "failureContext": {
    "name": "string",
    "type": "BAD_REQUEST",
    "errors": [
      {
        "type": "string",
        "message": "string",
        "path": [
          "string"
        ],
        "context": null
      }
    ]
  }
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders.

## Code

```bash
curl -X POST "https://api.light.inc/v1/invoice-receivables/3c90c3cc-0d44-4b50-8888-8dd25736052a/open" \
  -H "Authorization: Basic YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "emailInfo": {
    "subject": "string",
    "replyTo": "string",
    "recipients": [
      "string"
    ],
    "cc": [
      "string"
    ],
    "customMessage": "string"
  },
  "shouldSendEmail": true,
  "shouldSubmitEInvoice": true
}'
```

---

Full page: https://light.inc/docs/api-reference/v1--invoice-receivables/open-invoice · Index: https://light.inc/docs/llms.txt
