invoices
Custom invoice action
Changed onPerforms a custom action on an invoice.
The current range of actions are as follows
- clone_to_invoice
- clone_to_quote
- history
- delivery_note
- mark_paid
- download
- archive
- delete
get/api/v1/invoices/{id}/{action}
Request
- Base URLhttps://demo.invoiceninja.com
- Authnone declared. Required headers: X-API-TOKEN, X-Requested-With
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
idstring string required
The Invoice Hashed ID
actionstring string required
The action string to be performed
Query parameters
includestring
Example:first_load
Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes
Headers
X-API-TOKENstring required
Example:TOKEN
The API token to be used for authentication
X-Requested-Withstring required
Example:XMLHttpRequest
Used to send the XMLHttpRequest header
Response
Returns the invoice object
Example response
{
"id": "Opnel5aKBz",
"user_id": "Opnel5aKBz",
"assigned_user_id": "Opnel5aKBz",
"client_id": "Opnel5aKBz",
"status_id": "4",
"number": "INV_101",
"po_number": "PO-1234",
"terms": "These are invoice terms",
"public_notes": "These are some public notes",
"private_notes": "These are some private notes",
"custom_value1": "2022-10-01",
"custom_value2": "Something custom",
"tax_rate1": 10,
"tax_rate2": 10,
"tax_rate3": 10,
"total_taxes": 10,
"line_items": [
{
"quantity": 1,
"cost": 10,
"product_key": "Product key",
"tags": "Retail,Priority Customer",
"product_cost": 10,
"notes": "Item notes",
"discount": 5,
"tax_name1": "GST",
"tax_rate1": 10,
"tax_name2": "VAT",
"tax_rate2": 5,
"tax_name3": "CA Sales Tax",
"tax_rate3": 3,
"sort_id": "0",
"line_total": 10,
"gross_line_total": 15,
"tax_amount": 1,
"custom_value1": "Custom value 1",
"custom_value2": "Custom value 2",
"custom_value3": "Custom value 3",
"custom_value4": "Custom value 4",
"type_id": "1",
"tax_id": "1"
}
],
"invitations": [
{
"id": "Opnel5aKBz",
"client_contact_id": "Opnel5aKBz",
"key": "Opnel5aKBz4343343566236gvbb",
"link": "https://www.example.com/invitations/Opnel5aKBz4343343566236gvbb",
"updated_at": 1434342123,
"archived_at": 1434342123,
"email_error": "The email error"
}
],
"amount": 10,
"balance": 10,
"paid_to_date": 10,
"discount": 10,
"partial": 10,
"is_amount_discount": true,
"is_deleted": true,
"uses_inclusive_taxes": true,
"date": "1994-07-30",
"last_sent_date": "1994-07-30",
"next_send_date": "1994-07-30",
"partial_due_date": "1994-07-30",
"due_date": "1994-07-30",
"last_viewed": 1434342123,
"updated_at": 1434342123,
"archived_at": 1434342123,
"custom_surcharge1": 10,
"custom_surcharge2": 10,
"custom_surcharge3": 10,
"custom_surcharge4": 10,
"custom_surcharge_tax1": true,
"custom_surcharge_tax2": true,
"custom_surcharge_tax3": true,
"custom_surcharge_tax4": true,
"project_id": "Opnel5aKBz",
"auto_bill_tries": 1,
"auto_bill_enabled": true,
"subscription_id": "Opnel5aKBz",
"location_id": "Opnel5aKBz",
"design_id": "Opnel5aKBz",
"exchange_rate": 1,
"vendor_id": "Opnel5aKBz"
}Changes
- info
added the optional property
//to the response with the status
- info
- info
added the optional property
//to the response with the status
- info