# Invoices AR invoice management operations. Invoices represent customer billing for shipment services. ## Filter invoices - [POST /invoices/filter](https://docs.mvmnt.io/apis/openapi/invoices/filterinvoices.md): Search for AR invoices using filter criteria. ## Common Filters - By customer: { "filter": { "customerId": { "equalTo": "uuid" } } } - Unpaid: { "filter": { "status": { "in": ["AWAITING_PAYMENT", "PARTIALLY_PAID"] } } } - Overdue: { "filter": { "overdue": true } } - By shipment: { "filter": { "shipmentId": { "equalTo": "uuid" } } } ## Create an invoice - [POST /invoices](https://docs.mvmnt.io/apis/openapi/invoices/createinvoice.md): Create a new invoice for an order. ## What happens - Invoice record is created for the order - Order status updates to DELIVERED_UNPAID - Due date calculated from payment term if not provided ## Note Each shipment can have only one AR invoice. Use POST /shipments/{id}/invoice/generate to generate the invoice PDF document. ## Get an invoice - [GET /invoices/{id}](https://docs.mvmnt.io/apis/openapi/invoices/getinvoice.md): Retrieve an invoice by ID. The response includes payments, credits, and document info. ## Update an invoice - [PATCH /invoices/{id}](https://docs.mvmnt.io/apis/openapi/invoices/updateinvoice.md): Update invoice fields. Note: Amount cannot be changed directly. Update order charges instead. ## Void an invoice - [DELETE /invoices/{id}](https://docs.mvmnt.io/apis/openapi/invoices/voidinvoice.md): Void/cancel an invoice. ## Prerequisites - Invoice must not have any payments applied - Invoice must not be factored ## Mark invoice as awaiting payment - [POST /invoices/{id}/mark-awaiting](https://docs.mvmnt.io/apis/openapi/invoices/markinvoiceawaiting.md): Mark invoice as awaiting payment. ## What happens - Sets invoice date and due date - Updates order status to DELIVERED_UNPAID - Invoice is now ready for payment collection ## Email invoice - [POST /invoices/{id}/send](https://docs.mvmnt.io/apis/openapi/invoices/sendinvoiceemail.md): Send invoice to customer via email. ## What happens - Generates invoice PDF if not already generated - Sends email with PDF attachment - Logs email in activity feed ## Get invoice payments - [GET /invoices/{id}/payments](https://docs.mvmnt.io/apis/openapi/invoices/getinvoicepayments.md): List all payments applied to a specific invoice. ## Batch generate invoices - [POST /invoices/batch-generate](https://docs.mvmnt.io/apis/openapi/invoices/batchgenerateinvoices.md): Generate invoices for multiple shipments in a single request. ## What happens - Creates invoice records for each shipment - Generates PDF documents - Optionally sends emails grouped by customer ## Note Shipments that already have invoices or are missing requirements will be skipped and returned in the failed array. ## Get aging report - [GET /invoices/aging-report](https://docs.mvmnt.io/apis/openapi/invoices/getagingreport.md): Generate accounts receivable aging report. ## Report buckets By default: Current, 1-30, 31-60, 61-90, 90+ days ## Export formats - JSON (default) - CSV (set Accept header to text/csv) ## Get available credits for invoice - [GET /invoices/{id}/available-credits](https://docs.mvmnt.io/apis/openapi/invoices/getavailablecreditsforinvoice.md): List credit memos that can be applied to an invoice. Returns credits for the same customer with remaining balance and matching currency.