---
title: "Convert a sales order to an invoice"
method: POST
path: "/sales_orders/{id}/to_invoice"
tags: ["Sales Orders", "Invoices"]
---

# Convert a sales order to an invoice

`POST /sales_orders/{id}/to_invoice`

## Request

- Base URL: `https://api.shopvox.com/v1`
- URL: `https://api.shopvox.com/v1/sales_orders/{id}/to_invoice`
- Auth: API key in query parameter `account_id` and API key in query parameter `authToken`

**Plan: Paid API.**

The request has no body. The conversion copies the customer, the contact, the
addresses, the charges, the tags and the line items with their prices and taxes, as the
web app does. It does not calculate the prices again. Each line item gets the quantity
that is not on an invoice yet. The term code of the sales order sets the due date. The
sales order links to the new invoice and its invoiced status changes. The jobs do not
change. Each call makes a new invoice.

A sales order that is void, deleted or fully invoiced returns `422` with the reason in
`base`. An account on the Pro or Express plan of the old web app also gets `422`.

## Response `201`

Created.

- Invoice: Single invoice with line items and signatures.
  - `id` string, uuid
  - `tags` NamedRef[]: Active tags of the record.
    - `id` string, uuid
    - `name` string
  - `name` string
  - `title` string
  - `txnNumber` string
  - `txnDate` string, date, nullable
  - `dueDate` string, date, nullable
  - `shippingDate` string, date, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `workflowState` string, nullable
  - `totalPriceWithTaxInDollars` number, nullable: Account currency.
  - `balanceInDollars` number, nullable: Account currency.
  - `totalPaymentsInDollars` number, nullable: Account currency.
  - `customerPoNumber` string, nullable
  - `customerPoDate` string, date, nullable
  - `changed` 'Yes' | 'No'
  - `accountingSyncDate` 'Yes' | 'No'
  - `lastNote` string, nullable
  - `pm` Party: A person reference (sales rep, PM, designer) with initials.
    - `id` string, uuid
    - `name` string, nullable
    - `initials` string, nullable
  - `projectManager` Party: A person reference (sales rep, PM, designer) with initials.
    - `id` string, uuid
    - `name` string, nullable
    - `initials` string, nullable
  - `designer` Party: A person reference (sales rep, PM, designer) with initials.
    - `id` string, uuid
    - `name` string, nullable
    - `initials` string, nullable
  - `primaryContact` ContactRef: Contact reference returned by some transactions (name, phone, id - no initials).
    - `id` string, uuid
    - `name` string, nullable
    - `phoneWithExt` string, nullable
  - `primarySalesRep` Party: A person reference (sales rep, PM, designer) with initials.
    - `id` string, uuid
    - `name` string, nullable
    - `initials` string, nullable
  - `company` NamedRef: Lightweight reference to a related record.
    - `id` string, uuid
    - `name` string
  - `divisionId` string, uuid, nullable
  - `division` object: Full division record (all columns), present only when the invoice has a division.
  - `lineItems` InvoiceLineItem[]
    - `id` string, uuid
    - `position` integer
    - `name` string, nullable
    - `description` string, nullable
    - `fullDescription` string, nullable
    - `quantity` number, nullable
    - `volumeDiscountPercent` number, nullable
    - `volumeDiscountInDollars` number, nullable
    - `rangeDiscountPercent` number, nullable
    - `rangeDiscountInDollars` number, nullable
    - `costInDollars` number, nullable: Account currency.
    - `suggestedPriceInDollars` number, nullable: Account currency.
    - `priceInDollars` number, nullable: Account currency.
    - `totalCostInDollars` number, nullable: Account currency.
    - `totalPriceInDollars` number, nullable: Account currency.
    - `totalTaxInDollars` number, nullable: Account currency.
    - `workflowState` string, nullable
    - `productId` string, uuid, nullable
    - `productType` string, nullable
    - `productName` string, nullable
    - `saleType` string, nullable
    - `taxable` boolean
    - `taxName` string, nullable
    - `taxRate` number, nullable
    - `priceOverride` boolean, nullable
    - `incomeCoaAccountId` string, uuid, nullable
    - `incomeAccountName` string, nullable
    - `cogCoaAccountId` string, uuid, nullable
    - `cogAccountName` string, nullable
    - `cogAccountNumber` string, nullable
    - `parentLineItemId` string, uuid, nullable
  - `signatures` Signature[]
    - `name` string
    - `location` string, nullable
    - `signatureUrl` string, nullable
    - `createdAt` string, date-time

## Other responses

- `401`: Missing/expired credentials, an index request without a required filter, or the plan does not include this endpoint.
- `404`: Not found.
- `422`: Unprocessable entity - field errors keyed by attribute.

## Changes

- **2026-11-17** `66de040f44b3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/shopvox/apis/shopvox-public-api/changes/sales_orders/:id/to_invoice/post.md)

---

[API](https://skmtc.dev/shopvox/apis/shopvox-public-api.md) - [All operations](https://skmtc.dev/shopvox/apis/shopvox-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shopvox/apis/shopvox-public-api/revisions/66de040f44b3?raw)
