---
title: "POST /billing/{tenantLocator}/invoices"
method: POST
path: "/billing/{tenantLocator}/invoices"
---

# POST /billing/{tenantLocator}/invoices

`POST /billing/{tenantLocator}/invoices`

## Request

- Base URL: `https://docs.socotra.com`
- URL: `https://docs.socotra.com/billing/{tenantLocator}/invoices`
- Auth: none declared
- TypeScript: <https://skmtc.dev/socotra/apis/socotra-insurance-suite-openapi/docs/billing/:tenantLocator/invoices/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `tenantLocator` string, uuid, required

## Request body

- AggregateInvoiceCreateRequest
  - `accountLocator` string, ulid, required: The account associated with the aggregate invoice.
  - `invoiceLocators` string[], required: Up to 100, no duplicates. Each must belong to the account, share one currency, and not already be on an aggregate invoice. May be empty or omitted.
  - `startTime` string, date-time: Defaults to the earliest `startTime` of the included invoices, or the creation time if not present. Must be before `endTime`.
  - `endTime` string, date-time: Defaults to the latest `endTime` of the included invoices, or the creation time if not present.
  - `dueTime` string, date-time: Defaults to the earliest `dueTime` of the included invoices, or the creation time if not present.
  - `currency` string: Must match the included invoices. Defaults to their currency, then the tenant default.
  - `timezone` string: Defaults to the shared timezone of the included invoices, then the account timezone, then the tenant default.

## Response `200`

OK

- InvoiceResponse
  - `locator` string, ulid, required
  - `accountLocator` string, ulid, required
  - `invoiceState` 'building' | 'open' | 'settled' | 'discarded', required
  - `invoiceItems` InvoiceItemResponse[]: Not included when part of a list response
    - `locator` string, ulid, required
    - `chargeType` string, required
    - `chargeCategory` string, required
    - `amount` number, required
    - `remainingAmount` number
    - `settlementTime` string, date-time
    - `invoiceLocator` string, ulid, required
    - `installmentItemLocators` string[], required
    - `timezone` string, required
    - `quoteLocator` string, ulid
    - `policyLocator` string, ulid
    - `elementStaticLocator` string, ulid
    - `elementType` string
    - `transactionLocators` string[], required
    - `unsettledTime` string, date-time
  - `generatedTime` string, date-time, required
  - `dueTime` string, date-time, required
  - `currency` string, required
  - `startTime` string, date-time, required
  - `endTime` string, date-time, required
  - `unsettledTime` string, date-time
  - `timezone` string, required
  - `invoiceNumber` string
  - `autopayTime` string, date-time
  - `settledTime` string, date-time
  - `aggregateInvoiceLocator` string, ulid
  - `invoiceType` 'normal' | 'aggregate', required
  - `totalAmount` number
  - `totalRemainingAmount` number

---

[API](https://skmtc.dev/socotra/apis/socotra-insurance-suite-openapi.md) - [All operations](https://skmtc.dev/socotra/apis/socotra-insurance-suite-openapi/llms.txt) - [OpenAPI document](https://skmtc.dev/socotra/apis/socotra-insurance-suite-openapi/revisions/6537d24b3693?raw)
