---
title: "Post Invoice"
method: POST
path: "/crm/invoices"
tags: ["CRM Service Calls"]
---

# Post Invoice

`POST /crm/invoices`

Create a new invoice.

Must reference a valid account via `account_id`.

**Request Body (InvoiceRequest):**

- **invoice_num** *(required)*: Unique invoice number / identifier.
- **invoice_type** *(default: "sales")*: Values: sales, credit, refund, reimbursement.
- **account_id** *(required)*: FK to the customer account.
- **contact_id** *(optional)*: FK to the billing contact.
- **stage** *(default: "draft")*: Values: draft, open, paid, cancelled, void, uncollectible.
- **description** *(optional)*: Invoice notes.
- **total_amount** *(required)*: Final total.
- **invoice_date** *(optional)*: Epoch timestamp.
- **invoice_line_list** *(required)*: Array of line items,
  e.g. `[{"description":"Widget","amount":99.99,"line_detail_dict":{"qty":1,"unit_price":99.99}}]`.

**Response:** The created invoice object.

## Request body

- InvoiceRequest — Request to create a new invoice.
  - `invoice_num` string, required — Unique invoice number / identifier
  - `invoice_type` string — Possible values: sales, credit, refund, reimbursement
  - `account_id` string, required — FK to Accounts (customer)
  - `contact_id` string, nullable — FK to AccountContacts (billing contact)
  - `stage` string, nullable — Possible values: draft, open, paid, cancelled, void, uncollectible
  - `description` string, nullable — Invoice description / notes
  - `total_amount` number, required — Final total amount
  - `invoice_date` integer, nullable — Invoice date (epoch timestamp)
  - `invoice_line_list` unknown[], required — Array of InvoiceLine objects, e.g. [{"description":"Widget","amount":99.99,"line_detail_dict":{"qty":1,"unit_price":99.99}}]
    - unknown

## Response `200`

Successful Response

- InvoiceResponse
  - `id` string, required
  - `name` string, nullable
  - `stage` string, nullable
  - `description` string, nullable
  - `invoice_num` string, nullable
  - `total_amount` string, nullable
  - `invoice_date` string, nullable
  - `created_ts` string, nullable
  - `created_ts_date` string, nullable
  - `updated_ts` string, nullable
  - `updated_ts_date` string, nullable
  - `contact` string, nullable
  - `opportunity` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ambivo/apis/ambivo-api.md) · [All operations](https://skmtc.net/ambivo/apis/ambivo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ambivo/ambivo-api/versions/165a6d16a9a0/schema)
