Duplicate Invoice
PATCH /api/v1/invoices/:id/duplicate
/api/v1/invoices/:id/duplicate
Create a duplicate of the existing invoice as a new draft invoice. All details (items, taxes, etc.) are copied except the ID and status.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id |
integer | Yes | The unique ID of the source invoice. |
Request Example
PATCH /api/v1/invoices/123/duplicate HTTP/1.1
Host: koteshen.com
Authorization: Bearer {access_token}
Content-Type: application/json
Accept: application/json
Response
Status Codes:
201 Created- Duplicate created.401 Unauthorized- Invalid or missing token.404 Not Found- Source invoice not found.
Success Response (201)
Same structure as Create an Invoice, representing the new duplicated invoice.