Sales Receipts

A sale the customer paid for on the spot, with nothing left to collect: a till, a booking system, your own checkout. A sales receipt posts to the ledger the moment it is created, debiting the account the money went to and crediting each line's income account, with sales tax, discount, processing fee and the cost of any tracked inventory sold on their own lines. The total is always derived from the line items. For a sale the customer pays later, create an invoice instead. Requires the money_in scope.

Where the money goes

Name a bank or cash account in deposit_to_account_id when the money lands there directly. Leave it out and the receipt waits in Undeposited Funds until a deposit in the app sweeps it with the day's other takings, which is how a till that banks once a day usually reads. When the card processor keeps a fee before paying out, send it as processing_fee_cents: it is posted as an expense and the deposit is the total less the fee.

Bank feeds

A sales receipt created through the API is not matched to any bank transaction. If the same money later arrives on a connected bank feed it appears in Review, and the user matches it to this receipt (or to the deposit that swept it) there. Send an Idempotency-Key on every create so a retry never posts the same sale twice.

Editing and voiding

An edit reposts the entry. A receipt already swept into a deposit keeps its amount, customer, currency, entity and deposit account until the deposit is undone. A void reverses the entry and is refused while the receipt is in a deposit (in_deposit) or has a refund against it (refunded).

The Sales Receipt Object

FieldTypeDescription
iduuidSales receipt UUID
objectsales_receiptAlways 'sales_receipt'
receipt_numberstringHuman-readable receipt number (e.g., SR-0001)
datedateISO 8601 date of the sale
postedbooleanWhether the receipt's entry is live on the ledger. True from create; false once voided
voidedbooleanWhether the receipt was voided (its entry reversed)
voided_atdate-time | nullISO 8601 timestamp it was voided (null unless voided)
currencystringISO currency code (e.g., USD)
exchange_ratestringUnits of the company's home currency per unit of currency, as a decimal string
subtotal_centsintegerSum of the lines before discount and tax, in cents
discount_centsintegerTotal discount, in cents
tax_amount_centsintegerSales tax, in cents
total_centsintegerTotal the customer paid: subtotal - discount + tax, in cents
processing_fee_centsintegerWhat the card processor kept before the money landed, in cents (0 if none)
memostring | nullInternal memo
deposit_to_account_iduuid | nullChart account UUID the money went to; null means Undeposited Funds, waiting for a deposit
location_iduuid | nullLocation UUID (if set)
entity_iduuid | nullEntity UUID the sale belongs to (multi-entity companies)
partyobject | nullCustomer summary (null if none)
line_itemsobject[]Sales receipt line items
created_atdate-timeISO 8601 timestamp
updated_atdate-timeISO 8601 timestamp

Endpoints

GET/api/v1/sales_receipts

List sales receipts

Returns a paginated list of sales receipts for the current organization, newest first.

Scopes: sales_receipts:read or sales_receipts:write or money_in·operationId: listSalesReceipts

Path & Query Parameters

ParameterTypeDescription
customer_iduuidFilter by customer (party) UUID
voidedstringtrue: only voided receipts; false: only live ones. Omit for both
date_fromdateOnly receipts dated on or after this date (YYYY-MM-DD)
date_todateOnly receipts dated on or before this date (YYYY-MM-DD)
searchstringSearch by receipt number, customer name or memo
pageintegerPage number (default 1)
per_pageintegerResults per page (1-200, default 50)
Example
curl https://imprest.ai/api/v1/sales_receipts \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response · 200
{
  "sales_receipts": [
    {
      "id": "b3cb8a88-8853-4b46-981d-372389c39b78",
      "object": "sales_receipt",
      "receipt_number": "SR-0002",
      "date": "2026-03-05",
      "posted": false,
      "voided": true,
      "voided_at": "2026-11-23T22:27:50Z",
      "currency": "USD",
      "exchange_rate": "1.0",
      "subtotal_cents": 2500,
      "discount_cents": 0,
      "tax_amount_cents": 0,
      "total_cents": 2500,
      "processing_fee_cents": 0,
      "memo": null,
      "deposit_to_account_id": "def75944-088d-5417-88b3-d3d68486b302",
      "location_id": null,
      "entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
      "party": null,
      "line_items": [
        {
          "id": "8832668a-9dcf-4026-a3c3-667cfd4ba86a",
          "description": null,
          "quantity": "1.0",
          "rate_cents": 2500,
          "amount_cents": 2500,
          "discount_cents": 0,
          "taxable": false,
          "product_id": null,
          "account_id": "6c738cd1-e888-5afe-b0c0-628ac6316713",
          "entity_id": null,
          "location_id": null,
          "service_start_date": null,
          "service_end_date": null
        }
      ],
      "created_at": "2026-11-23T22:27:49Z",
      "updated_at": "2026-11-23T22:27:50Z"
    },
    {
      "id": "1177a99a-922c-4987-8356-0316e39487d8",
      "object": "sales_receipt",
      "receipt_number": "SR-0001",
      "date": "2026-03-01",
      "posted": true,
      "voided": false,
      "voided_at": null,
      "currency": "USD",
      "exchange_rate": "1.0",
      "subtotal_cents": 2500,
      "discount_cents": 0,
      "tax_amount_cents": 0,
      "total_cents": 2500,
      "processing_fee_cents": 0,
      "memo": null,
      "deposit_to_account_id": "def75944-088d-5417-88b3-d3d68486b302",
      "location_id": null,
      "entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
      "party": {
        "id": "1e65c523-b8fd-57b2-ae7b-1201f840fd5d",
        "display_name": "Acme Corp"
      },
      "line_items": [
        {
          "id": "114dd757-c85f-43eb-9c4b-401bfff559b1",
          "description": null,
          "quantity": "1.0",
          "rate_cents": 2500,
          "amount_cents": 2500,
          "discount_cents": 0,
          "taxable": false,
          "product_id": null,
          "account_id": "6c738cd1-e888-5afe-b0c0-628ac6316713",
          "entity_id": null,
          "location_id": null,
          "service_start_date": null,
          "service_end_date": null
        }
      ],
      "created_at": "2026-11-23T22:27:49Z",
      "updated_at": "2026-11-23T22:27:49Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 50,
    "total_count": 2,
    "total_pages": 1
  }
}
Response fields
ParameterTypeDescription
sales_receiptsrequiredobject[]Array of sales receipt objects
idrequireduuidSales receipt UUID
objectrequiredsales_receiptAlways 'sales_receipt'
receipt_numberrequiredstringHuman-readable receipt number (e.g., SR-0001)
daterequireddateISO 8601 date of the sale
postedrequiredbooleanWhether the receipt's entry is live on the ledger. True from create; false once voided
voidedrequiredbooleanWhether the receipt was voided (its entry reversed)
voided_atrequireddate-time | nullISO 8601 timestamp it was voided (null unless voided)
currencyrequiredstringISO currency code (e.g., USD)
exchange_raterequiredstringUnits of the company's home currency per unit of currency, as a decimal string
subtotal_centsrequiredintegerSum of the lines before discount and tax, in cents
discount_centsrequiredintegerTotal discount, in cents
tax_amount_centsrequiredintegerSales tax, in cents
total_centsrequiredintegerTotal the customer paid: subtotal - discount + tax, in cents
processing_fee_centsrequiredintegerWhat the card processor kept before the money landed, in cents (0 if none)
memorequiredstring | nullInternal memo
deposit_to_account_idrequireduuid | nullChart account UUID the money went to; null means Undeposited Funds, waiting for a deposit
location_idrequireduuid | nullLocation UUID (if set)
entity_idrequireduuid | nullEntity UUID the sale belongs to (multi-entity companies)
partyrequiredobject | nullCustomer summary (null if none)
idrequireduuidCustomer (party) UUID
display_namerequiredstringCustomer display name
line_itemsrequiredobject[]Sales receipt line items
idrequireduuidLine item UUID
descriptionrequiredstring | nullLine item description
quantityrequiredstringQuantity as a decimal string
rate_centsrequiredintegerUnit price in cents
amount_centsrequiredintegerLine total before discount, in cents
discount_centsrequiredintegerThis line's share of the discount, in cents
taxablerequiredbooleanWhether sales tax applies to the line
product_idrequireduuid | nullProduct UUID (if linked)
account_idrequireduuidIncome chart account UUID
entity_idrequireduuid | nullEntity UUID the line posts to (multi-entity companies)
location_idrequireduuid | nullLocation UUID (if set on the line)
service_start_daterequireddate | nullISO 8601 date the service starts; with service_end_date, the revenue is deferred and recognized over the period
service_end_daterequireddate | nullISO 8601 date the service ends
created_atrequireddate-timeISO 8601 timestamp
updated_atrequireddate-timeISO 8601 timestamp
paginationrequiredobjectWhere this page sits in the whole list
pagerequiredintegerThis page's number, from 1
per_pagerequiredintegerResults per page (1-200, default 50)
total_countrequiredintegerResults across every page
total_pagesrequiredintegerPages in the whole list (at least 1)

Errors

  • 401No valid access token (invalid_token).
  • 403The token or the person behind it can't do this: insufficient_scope names the scope the token lacks; forbidden means the person's role doesn't allow it.
  • 422A malformed date (invalid_date) or voided filter (invalid_filter)

Every error uses the same envelope: error, message and error_code.

POST/api/v1/sales_receipts

Create a sales receipt

Records a sale paid on the spot and posts it to the ledger: debits the deposit account (or Undeposited Funds), credits each line's income account, and books sales tax, discount, processing fee and the cost of any tracked inventory sold. The total is derived from the lines. The receipt is not matched to any bank transaction; if the same money arrives on a bank feed it appears in Review for matching.

Scopes: sales_receipts:write or money_in·operationId: createSalesReceipt

Body Parameters

ParameterTypeDescription
customer_iduuidCustomer (party) UUID. Optional: a walk-in sale has no customer
datedateSale date (YYYY-MM-DD, defaults to today in the company's time zone)
receipt_numberstringReceipt number (defaults to the next in sequence)
deposit_to_account_iduuidBank or cash chart account UUID the money went to. Omit to hold it in Undeposited Funds for a later deposit
memostringInternal memo
location_iduuidLocation UUID
entity_iduuidEntity UUID the sale belongs to (multi-entity companies)
currencystringISO currency code (defaults to the company's home currency)
exchange_ratestringHome currency per unit of currency, as a decimal string (foreign-currency sales)
tax_amount_centsintegerSales tax collected, in cents (kept as given)
discount_percentstringA discount on the whole sale as a percent, as a decimal string (e.g. "10"). Spread across the lines
discount_centsintegerA discount on the whole sale in cents. Spread across the lines. Not with discount_percent
processing_fee_centsintegerWhat the card processor kept, in cents. Booked to processing fees; the deposit is the total less the fee
processing_fee_account_iduuidExpense chart account UUID for the fee (defaults to the company's Payment Processing Fees)
dimension_valuesobjectDimension tagging (dimension_id => value_id)
line_items_attributesrequiredobject[]Line items (at least one)
product_iduuidProduct UUID. Its income account and description are used when not given
account_iduuidIncome chart account UUID (required when the line has no product)
descriptionstringLine item description
quantitynumberQuantity (default 1)
rate_centsintegerUnit price in cents (e.g., 2500 = $25.00)
amount_centsintegerLine total in cents; the unit price is derived as amount / quantity
taxablebooleanWhether sales tax applies to the line
location_iduuidLocation UUID for this line
entity_iduuidEntity UUID, for companies that keep several legal entities in one set of books
service_start_datedateService period start (YYYY-MM-DD). With service_end_date, defers the revenue
service_end_datedateService period end (YYYY-MM-DD)
Example
curl -X POST https://imprest.ai/api/v1/sales_receipts \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "customer_id": "1e65c523-b8fd-57b2-ae7b-1201f840fd5d",
  "date": "2026-03-10",
  "deposit_to_account_id": "def75944-088d-5417-88b3-d3d68486b302",
  "memo": "Farmers market",
  "line_items_attributes": [
    {
      "account_id": "6c738cd1-e888-5afe-b0c0-628ac6316713",
      "description": "Jam",
      "quantity": 3,
      "rate_cents": 850
    }
  ]
}'
Response · 201
{
  "sales_receipt": {
    "id": "497414fd-b1b1-4dbc-bef2-bf6d68c017a3",
    "object": "sales_receipt",
    "receipt_number": "SR-0001",
    "date": "2026-03-10",
    "posted": true,
    "voided": false,
    "voided_at": null,
    "currency": "USD",
    "exchange_rate": "1.0",
    "subtotal_cents": 2550,
    "discount_cents": 0,
    "tax_amount_cents": 0,
    "total_cents": 2550,
    "processing_fee_cents": 0,
    "memo": "Farmers market",
    "deposit_to_account_id": "def75944-088d-5417-88b3-d3d68486b302",
    "location_id": null,
    "entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
    "party": {
      "id": "1e65c523-b8fd-57b2-ae7b-1201f840fd5d",
      "display_name": "Acme Corp"
    },
    "line_items": [
      {
        "id": "7ea91710-705e-456b-93af-0d307a20f29a",
        "description": "Jam",
        "quantity": "3.0",
        "rate_cents": 850,
        "amount_cents": 2550,
        "discount_cents": 0,
        "taxable": false,
        "product_id": null,
        "account_id": "6c738cd1-e888-5afe-b0c0-628ac6316713",
        "entity_id": null,
        "location_id": null,
        "service_start_date": null,
        "service_end_date": null
      }
    ],
    "created_at": "2026-11-23T22:27:50Z",
    "updated_at": "2026-11-23T22:27:50Z"
  }
}
Response fields
ParameterTypeDescription
sales_receiptrequiredobjectSales receipt object
idrequireduuidSales receipt UUID
objectrequiredsales_receiptAlways 'sales_receipt'
receipt_numberrequiredstringHuman-readable receipt number (e.g., SR-0001)
daterequireddateISO 8601 date of the sale
postedrequiredbooleanWhether the receipt's entry is live on the ledger. True from create; false once voided
voidedrequiredbooleanWhether the receipt was voided (its entry reversed)
voided_atrequireddate-time | nullISO 8601 timestamp it was voided (null unless voided)
currencyrequiredstringISO currency code (e.g., USD)
exchange_raterequiredstringUnits of the company's home currency per unit of currency, as a decimal string
subtotal_centsrequiredintegerSum of the lines before discount and tax, in cents
discount_centsrequiredintegerTotal discount, in cents
tax_amount_centsrequiredintegerSales tax, in cents
total_centsrequiredintegerTotal the customer paid: subtotal - discount + tax, in cents
processing_fee_centsrequiredintegerWhat the card processor kept before the money landed, in cents (0 if none)
memorequiredstring | nullInternal memo
deposit_to_account_idrequireduuid | nullChart account UUID the money went to; null means Undeposited Funds, waiting for a deposit
location_idrequireduuid | nullLocation UUID (if set)
entity_idrequireduuid | nullEntity UUID the sale belongs to (multi-entity companies)
partyrequiredobject | nullCustomer summary (null if none)
idrequireduuidCustomer (party) UUID
display_namerequiredstringCustomer display name
line_itemsrequiredobject[]Sales receipt line items
idrequireduuidLine item UUID
descriptionrequiredstring | nullLine item description
quantityrequiredstringQuantity as a decimal string
rate_centsrequiredintegerUnit price in cents
amount_centsrequiredintegerLine total before discount, in cents
discount_centsrequiredintegerThis line's share of the discount, in cents
taxablerequiredbooleanWhether sales tax applies to the line
product_idrequireduuid | nullProduct UUID (if linked)
account_idrequireduuidIncome chart account UUID
entity_idrequireduuid | nullEntity UUID the line posts to (multi-entity companies)
location_idrequireduuid | nullLocation UUID (if set on the line)
service_start_daterequireddate | nullISO 8601 date the service starts; with service_end_date, the revenue is deferred and recognized over the period
service_end_daterequireddate | nullISO 8601 date the service ends
created_atrequireddate-timeISO 8601 timestamp
updated_atrequireddate-timeISO 8601 timestamp

Errors

  • 401No valid access token (invalid_token).
  • 402The company's subscription has lapsed, so its books are read-only until it's renewed (write_locked).
  • 403The token or the person behind it can't do this: insufficient_scope names the scope the token lacks; forbidden means the person's role doesn't allow it.
  • 422Validation errors (validation_error), an unknown customer (customer_not_found), a deposit account that is not a bank or cash account (invalid_deposit_account), a locked period, or a malformed cents/date value

Every error uses the same envelope: error, message and error_code.

GET/api/v1/sales_receipts/:id

Retrieve a sales receipt

Scopes: sales_receipts:read or sales_receipts:write or money_in·operationId: getSalesReceipt

Path & Query Parameters

ParameterTypeDescription
idrequireduuidSales receipt UUID
Example
curl https://imprest.ai/api/v1/sales_receipts/8c2808a2-5a8d-482d-a797-f1667640c9b1 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response · 200
{
  "sales_receipt": {
    "id": "8c2808a2-5a8d-482d-a797-f1667640c9b1",
    "object": "sales_receipt",
    "receipt_number": "SR-0001",
    "date": "2026-03-10",
    "posted": true,
    "voided": false,
    "voided_at": null,
    "currency": "USD",
    "exchange_rate": "1.0",
    "subtotal_cents": 2550,
    "discount_cents": 0,
    "tax_amount_cents": 0,
    "total_cents": 2550,
    "processing_fee_cents": 0,
    "memo": null,
    "deposit_to_account_id": "def75944-088d-5417-88b3-d3d68486b302",
    "location_id": null,
    "entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
    "party": {
      "id": "1e65c523-b8fd-57b2-ae7b-1201f840fd5d",
      "display_name": "Acme Corp"
    },
    "line_items": [
      {
        "id": "85647da0-f99c-4670-abe3-b6dc85224421",
        "description": "Jam",
        "quantity": "3.0",
        "rate_cents": 850,
        "amount_cents": 2550,
        "discount_cents": 0,
        "taxable": false,
        "product_id": null,
        "account_id": "6c738cd1-e888-5afe-b0c0-628ac6316713",
        "entity_id": null,
        "location_id": null,
        "service_start_date": null,
        "service_end_date": null
      }
    ],
    "created_at": "2026-11-23T22:27:50Z",
    "updated_at": "2026-11-23T22:27:50Z"
  }
}
Response fields
ParameterTypeDescription
sales_receiptrequiredobjectSales receipt object
idrequireduuidSales receipt UUID
objectrequiredsales_receiptAlways 'sales_receipt'
receipt_numberrequiredstringHuman-readable receipt number (e.g., SR-0001)
daterequireddateISO 8601 date of the sale
postedrequiredbooleanWhether the receipt's entry is live on the ledger. True from create; false once voided
voidedrequiredbooleanWhether the receipt was voided (its entry reversed)
voided_atrequireddate-time | nullISO 8601 timestamp it was voided (null unless voided)
currencyrequiredstringISO currency code (e.g., USD)
exchange_raterequiredstringUnits of the company's home currency per unit of currency, as a decimal string
subtotal_centsrequiredintegerSum of the lines before discount and tax, in cents
discount_centsrequiredintegerTotal discount, in cents
tax_amount_centsrequiredintegerSales tax, in cents
total_centsrequiredintegerTotal the customer paid: subtotal - discount + tax, in cents
processing_fee_centsrequiredintegerWhat the card processor kept before the money landed, in cents (0 if none)
memorequiredstring | nullInternal memo
deposit_to_account_idrequireduuid | nullChart account UUID the money went to; null means Undeposited Funds, waiting for a deposit
location_idrequireduuid | nullLocation UUID (if set)
entity_idrequireduuid | nullEntity UUID the sale belongs to (multi-entity companies)
partyrequiredobject | nullCustomer summary (null if none)
idrequireduuidCustomer (party) UUID
display_namerequiredstringCustomer display name
line_itemsrequiredobject[]Sales receipt line items
idrequireduuidLine item UUID
descriptionrequiredstring | nullLine item description
quantityrequiredstringQuantity as a decimal string
rate_centsrequiredintegerUnit price in cents
amount_centsrequiredintegerLine total before discount, in cents
discount_centsrequiredintegerThis line's share of the discount, in cents
taxablerequiredbooleanWhether sales tax applies to the line
product_idrequireduuid | nullProduct UUID (if linked)
account_idrequireduuidIncome chart account UUID
entity_idrequireduuid | nullEntity UUID the line posts to (multi-entity companies)
location_idrequireduuid | nullLocation UUID (if set on the line)
service_start_daterequireddate | nullISO 8601 date the service starts; with service_end_date, the revenue is deferred and recognized over the period
service_end_daterequireddate | nullISO 8601 date the service ends
created_atrequireddate-timeISO 8601 timestamp
updated_atrequireddate-timeISO 8601 timestamp

Errors

  • 401No valid access token (invalid_token).
  • 403The token or the person behind it can't do this: insufficient_scope names the scope the token lacks; forbidden means the person's role doesn't allow it.
  • 404Sales receipt not found

Every error uses the same envelope: error, message and error_code.

PATCH/api/v1/sales_receipts/:id

Update a sales receipt

Updates a sales receipt and reposts it to the ledger. A voided receipt can't be edited. A receipt swept into a deposit keeps its amount, customer, currency, entity and deposit account until the deposit is undone; other fields still change. The processing fee is set at create and can't be changed here.

Scopes: sales_receipts:write or money_in·operationId: updateSalesReceipt

Path & Query Parameters

ParameterTypeDescription
idrequireduuidSales receipt UUID

Body Parameters

ParameterTypeDescription
customer_iduuidCustomer (party) UUID
datedateSale date (YYYY-MM-DD)
receipt_numberstringReceipt number
deposit_to_account_iduuidBank or cash chart account UUID, or null for Undeposited Funds
memostringInternal memo
location_iduuidLocation UUID
entity_iduuidEntity UUID (multi-entity companies)
tax_amount_centsintegerSales tax collected, in cents
discount_percentstringDiscount on the whole sale as a percent (decimal string). "0" removes it
discount_centsintegerDiscount on the whole sale in cents. 0 removes it
dimension_valuesobjectDimension tagging (dimension_id => value_id). Omit to keep the current tags; {} clears them
line_items_attributesobject[]Line items. Include each line's id to edit in place (and _destroy to remove one); a set with no ids REPLACES every existing line
iduuidLine item UUID (for updates)
product_iduuidProduct UUID. Its income account and description are used when not given
account_iduuidIncome chart account UUID (required when the line has no product)
descriptionstringLine item description
quantitynumberQuantity (default 1)
rate_centsintegerUnit price in cents (e.g., 2500 = $25.00)
amount_centsintegerLine total in cents; the unit price is derived as amount / quantity
taxablebooleanWhether sales tax applies to the line
location_iduuidLocation UUID for this line
entity_iduuidEntity UUID, for companies that keep several legal entities in one set of books
service_start_datedateService period start (YYYY-MM-DD). With service_end_date, defers the revenue
service_end_datedateService period end (YYYY-MM-DD)
_destroybooleanRemove this line item
Example
curl -X PATCH https://imprest.ai/api/v1/sales_receipts/7da3ee84-0f2f-4ef9-b2e5-49ff792fbb51 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "memo": "Corrected",
  "line_items_attributes": [
    {
      "id": "0a30cce5-2832-44e9-b26a-548799f7fe90",
      "rate_cents": 4000
    }
  ]
}'
Response · 200
{
  "sales_receipt": {
    "id": "7da3ee84-0f2f-4ef9-b2e5-49ff792fbb51",
    "object": "sales_receipt",
    "receipt_number": "SR-0001",
    "date": "2026-03-01",
    "posted": true,
    "voided": false,
    "voided_at": null,
    "currency": "USD",
    "exchange_rate": "1.0",
    "subtotal_cents": 4000,
    "discount_cents": 0,
    "tax_amount_cents": 0,
    "total_cents": 4000,
    "processing_fee_cents": 0,
    "memo": "Corrected",
    "deposit_to_account_id": "def75944-088d-5417-88b3-d3d68486b302",
    "location_id": null,
    "entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
    "party": null,
    "line_items": [
      {
        "id": "0a30cce5-2832-44e9-b26a-548799f7fe90",
        "description": null,
        "quantity": "1.0",
        "rate_cents": 4000,
        "amount_cents": 4000,
        "discount_cents": 0,
        "taxable": false,
        "product_id": null,
        "account_id": "6c738cd1-e888-5afe-b0c0-628ac6316713",
        "entity_id": null,
        "location_id": null,
        "service_start_date": null,
        "service_end_date": null
      }
    ],
    "created_at": "2026-11-23T22:27:49Z",
    "updated_at": "2026-11-23T22:27:49Z"
  }
}
Response fields
ParameterTypeDescription
sales_receiptrequiredobjectSales receipt object
idrequireduuidSales receipt UUID
objectrequiredsales_receiptAlways 'sales_receipt'
receipt_numberrequiredstringHuman-readable receipt number (e.g., SR-0001)
daterequireddateISO 8601 date of the sale
postedrequiredbooleanWhether the receipt's entry is live on the ledger. True from create; false once voided
voidedrequiredbooleanWhether the receipt was voided (its entry reversed)
voided_atrequireddate-time | nullISO 8601 timestamp it was voided (null unless voided)
currencyrequiredstringISO currency code (e.g., USD)
exchange_raterequiredstringUnits of the company's home currency per unit of currency, as a decimal string
subtotal_centsrequiredintegerSum of the lines before discount and tax, in cents
discount_centsrequiredintegerTotal discount, in cents
tax_amount_centsrequiredintegerSales tax, in cents
total_centsrequiredintegerTotal the customer paid: subtotal - discount + tax, in cents
processing_fee_centsrequiredintegerWhat the card processor kept before the money landed, in cents (0 if none)
memorequiredstring | nullInternal memo
deposit_to_account_idrequireduuid | nullChart account UUID the money went to; null means Undeposited Funds, waiting for a deposit
location_idrequireduuid | nullLocation UUID (if set)
entity_idrequireduuid | nullEntity UUID the sale belongs to (multi-entity companies)
partyrequiredobject | nullCustomer summary (null if none)
idrequireduuidCustomer (party) UUID
display_namerequiredstringCustomer display name
line_itemsrequiredobject[]Sales receipt line items
idrequireduuidLine item UUID
descriptionrequiredstring | nullLine item description
quantityrequiredstringQuantity as a decimal string
rate_centsrequiredintegerUnit price in cents
amount_centsrequiredintegerLine total before discount, in cents
discount_centsrequiredintegerThis line's share of the discount, in cents
taxablerequiredbooleanWhether sales tax applies to the line
product_idrequireduuid | nullProduct UUID (if linked)
account_idrequireduuidIncome chart account UUID
entity_idrequireduuid | nullEntity UUID the line posts to (multi-entity companies)
location_idrequireduuid | nullLocation UUID (if set on the line)
service_start_daterequireddate | nullISO 8601 date the service starts; with service_end_date, the revenue is deferred and recognized over the period
service_end_daterequireddate | nullISO 8601 date the service ends
created_atrequireddate-timeISO 8601 timestamp
updated_atrequireddate-timeISO 8601 timestamp

Errors

  • 401No valid access token (invalid_token).
  • 402The company's subscription has lapsed, so its books are read-only until it's renewed (write_locked).
  • 403The token or the person behind it can't do this: insufficient_scope names the scope the token lacks; forbidden means the person's role doesn't allow it.
  • 422Validation errors, a voided receipt (sales_receipt_voided), or a change a deposit or a refund holds in place (invalid_state)

Every error uses the same envelope: error, message and error_code.

POST/api/v1/sales_receipts/:id/void

Void a sales receipt

Voids the sales receipt and reverses its ledger entry, including the cost of any inventory it sold.

Scopes: sales_receipts:write or money_in·operationId: voidSalesReceipt

Path & Query Parameters

ParameterTypeDescription
idrequireduuidSales receipt UUID
Example
curl -X POST https://imprest.ai/api/v1/sales_receipts/ec8a0e72-9ff4-4821-8391-8d35a597f827/void \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
Response · 200
{
  "sales_receipt": {
    "id": "ec8a0e72-9ff4-4821-8391-8d35a597f827",
    "object": "sales_receipt",
    "receipt_number": "SR-0001",
    "date": "2026-03-01",
    "posted": false,
    "voided": true,
    "voided_at": "2026-11-23T22:27:49Z",
    "currency": "USD",
    "exchange_rate": "1.0",
    "subtotal_cents": 2500,
    "discount_cents": 0,
    "tax_amount_cents": 0,
    "total_cents": 2500,
    "processing_fee_cents": 0,
    "memo": null,
    "deposit_to_account_id": "def75944-088d-5417-88b3-d3d68486b302",
    "location_id": null,
    "entity_id": "de1bcf26-486e-5a7f-ab1b-97d51478637b",
    "party": null,
    "line_items": [
      {
        "id": "339d0194-0501-4099-ad3a-9c389c6bfae5",
        "description": null,
        "quantity": "1.0",
        "rate_cents": 2500,
        "amount_cents": 2500,
        "discount_cents": 0,
        "taxable": false,
        "product_id": null,
        "account_id": "6c738cd1-e888-5afe-b0c0-628ac6316713",
        "entity_id": null,
        "location_id": null,
        "service_start_date": null,
        "service_end_date": null
      }
    ],
    "created_at": "2026-11-23T22:27:49Z",
    "updated_at": "2026-11-23T22:27:49Z"
  }
}
Response fields
ParameterTypeDescription
sales_receiptrequiredobjectSales receipt object with voided=true
idrequireduuidSales receipt UUID
objectrequiredsales_receiptAlways 'sales_receipt'
receipt_numberrequiredstringHuman-readable receipt number (e.g., SR-0001)
daterequireddateISO 8601 date of the sale
postedrequiredbooleanWhether the receipt's entry is live on the ledger. True from create; false once voided
voidedrequiredbooleanWhether the receipt was voided (its entry reversed)
voided_atrequireddate-time | nullISO 8601 timestamp it was voided (null unless voided)
currencyrequiredstringISO currency code (e.g., USD)
exchange_raterequiredstringUnits of the company's home currency per unit of currency, as a decimal string
subtotal_centsrequiredintegerSum of the lines before discount and tax, in cents
discount_centsrequiredintegerTotal discount, in cents
tax_amount_centsrequiredintegerSales tax, in cents
total_centsrequiredintegerTotal the customer paid: subtotal - discount + tax, in cents
processing_fee_centsrequiredintegerWhat the card processor kept before the money landed, in cents (0 if none)
memorequiredstring | nullInternal memo
deposit_to_account_idrequireduuid | nullChart account UUID the money went to; null means Undeposited Funds, waiting for a deposit
location_idrequireduuid | nullLocation UUID (if set)
entity_idrequireduuid | nullEntity UUID the sale belongs to (multi-entity companies)
partyrequiredobject | nullCustomer summary (null if none)
idrequireduuidCustomer (party) UUID
display_namerequiredstringCustomer display name
line_itemsrequiredobject[]Sales receipt line items
idrequireduuidLine item UUID
descriptionrequiredstring | nullLine item description
quantityrequiredstringQuantity as a decimal string
rate_centsrequiredintegerUnit price in cents
amount_centsrequiredintegerLine total before discount, in cents
discount_centsrequiredintegerThis line's share of the discount, in cents
taxablerequiredbooleanWhether sales tax applies to the line
product_idrequireduuid | nullProduct UUID (if linked)
account_idrequireduuidIncome chart account UUID
entity_idrequireduuid | nullEntity UUID the line posts to (multi-entity companies)
location_idrequireduuid | nullLocation UUID (if set on the line)
service_start_daterequireddate | nullISO 8601 date the service starts; with service_end_date, the revenue is deferred and recognized over the period
service_end_daterequireddate | nullISO 8601 date the service ends
created_atrequireddate-timeISO 8601 timestamp
updated_atrequireddate-timeISO 8601 timestamp

Errors

  • 401No valid access token (invalid_token).
  • 402The company's subscription has lapsed, so its books are read-only until it's renewed (write_locked).
  • 403The token or the person behind it can't do this: insufficient_scope names the scope the token lacks; forbidden means the person's role doesn't allow it.
  • 422Already voided (already_voided), in a deposit (in_deposit), refunded (refunded), on a reconciled bank line (reconciled), or otherwise refused (void_refused)

Every error uses the same envelope: error, message and error_code.