This endpoint updates an existing invoice. Only draft invoices can have their line items modified. Sent invoices can only update certain fields.
Authentication
This endpoint requires a valid API key with invoices:write
permissions.
Authorization: Bearer YOUR_API_KEY
Path Parameters
The unique identifier of the invoice
Request Body
Update due date (YYYY-MM-DD)
Update line items (draft invoices only)
Response
Returns the updated invoice object.
curl --location --request PUT 'https://api.stateset.com/v1/invoices/inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"due_date": "2024-02-28",
"payment_terms": "Net 45",
"notes": "Updated payment terms as discussed"
}'
{
"id": "inv_0901f083-aa1c-43c5-af5c-0a9d2fc64e30",
"object": "invoice",
"invoice_number": "INV-2024-0001",
"status": "sent",
"updated_at": "2024-01-20T11:00:00Z",
"due_date": "2024-02-28",
"payment_terms": "Net 45",
"notes": "Updated payment terms as discussed",
"total_amount": 697500,
"amount_due": 697500,
"days_until_due": 40
}