We are using cookies to improve your experience!

By clicking "Allow all", you agree to use of all cookies. Visit our Privacy Policy to learn more.

Set Invoice Status

PATCH /api/v1/invoices/:id/status

URL

/api/v1/invoices/:id/status

Update the status of an invoice (e.g., from draft to sent or cancelled).

Path Parameters

Parameter Type Required Description
id integer Yes The unique ID of the invoice.

Request Body

Field Type Required Description
invoice[status] string Yes New status: draft, sent, paid, overdue, cancelled.

Request Example

{
  "invoice": {
    "status": "sent"
  }
}
PATCH /api/v1/invoices/123/status HTTP/1.1
Host: koteshen.com
Authorization: Bearer {access_token}
Content-Type: application/json
Accept: application/json

{request_body}

Response

Status Codes:

  • 200 OK - Status updated.
  • 401 Unauthorized - Invalid or missing token.
  • 404 Not Found - Invoice not found.
  • 422 Unprocessable Entity - Invalid status transition (e.g., cannot send a paid invoice).

Success Response (200)

Same structure as Retrieve an Invoice, with updated status.