Recurring sales invoices
List all recurring sales invoices
Returns a paginated list of all recurring sales invoices in the administration.
The filter
argument allows you to filter on the list of recurring invoices. Filters are a combination of keys and values,
separated by a comma: state:active,contact_id:123
. The available options for filtering are:
Filter | Type | Default | Description |
state | String |
active |
active or inactive |
frequency | String |
all |
all , day , week , month , quarter or year |
auto_send | Boolean |
null |
null , true or false |
contact_id | Integer |
Filters recurring invoices by a single contact | |
workflow_id | Integer |
Filters recurring invoices by a single workflow |
Parameters
Parameter | Type | Description |
---|---|---|
filter |
String |
Example: returns all recurring sales invoices of an administration
Request
Response
Example: returns recurring invoices filtered on frequency
Request
Response
Example: returns recurring invoices filtered on contact
Request
Response
Example: returns paginated recurring sales invoices on page 1
Request
Response
Example: returns paginated recurring sales invoices on page 2
Request
Response
Example: returns an error when too many recurring sales invoices are requested
Request
Response
List all IDs and versions
Returns all recurring sales invoices in the administration. The list contains the invoice id and the version of the
recurring invoice. Check if the version of the recurring invoice is newer than the version you have stored locally,
use the POST
variant for fetching recurring invoices with the given IDs.
Parameters
Parameter | Type | Description |
---|---|---|
filter |
String |
Example: retrieves the IDs for synchronization
Request
Response
Example: retrieves the IDs for synchronization with a filter
Request
Response
Fetch recurring sales invoices with given IDs
Given a list of recurring sales invoice IDs, returns the details of the recurring invoices. Returns a maximum of 100 recurring invoices, even if more IDs are provided.
Parameters
Parameter | Type | Description |
---|---|---|
ids |
Array[integer] |
Required |
Get a recurring sales invoice by id
Example: returns invoice by given id
Request
Response
Example: returns 404 when invoice does not exist
Request
Response
Creates a new recurring sales invoice
A recurring sales invoice will create new sales invoices on set intervals. To create a new recurring sales invoice, you need to provide at least a contact and details for the invoice. Furthermore you need to determine the planning. The following fields will influence the planning:
invoice_date
: the date in which the first invoice should be createdfrequency_type
: the type of frequency you want to use, for examplemonth
frequency
: defines the actual frequency, e.g.frequency=2
andfrequency_type=month
will create an invoice every 2 monthshas_desired_count
: whether or not the desired count should take effectdesired_count
: maximum number of sales invoices to create
Parameters
Parameter | Type | Description |
---|---|---|
recurring_sales_invoice[document_style_id] |
Integer |
Should be a valid document style id. |
recurring_sales_invoice[contact_id] |
Integer |
Should be a valid contact id. |
recurring_sales_invoice[contact_person_id] |
Integer |
Should be a valid contact person id. |
recurring_sales_invoice[update_contact] |
Boolean |
|
recurring_sales_invoice[reference] |
String |
|
recurring_sales_invoice[invoice_date] |
String |
Should be in the future. |
recurring_sales_invoice[workflow_id] |
Integer |
Should be a valid workflow id. |
recurring_sales_invoice[currency] |
String |
ISO three-character currency code, e.g. EUR or USD. |
recurring_sales_invoice[first_due_interval] |
Integer |
|
recurring_sales_invoice[prices_are_incl_tax] |
Boolean |
|
recurring_sales_invoice[discount] |
Decimal |
Discount percentage, e.g. 10,0%. |
recurring_sales_invoice[frequency_type] |
String |
Can be |
recurring_sales_invoice[frequency] |
String |
|
recurring_sales_invoice[has_desired_count] |
Boolean |
|
recurring_sales_invoice[desired_count] |
String |
|
recurring_sales_invoice[auto_send] |
Boolean |
|
recurring_sales_invoice[mergeable] |
Boolean |
|
recurring_sales_invoice[details_attributes][id] |
Integer |
|
recurring_sales_invoice[details_attributes][description] |
String |
|
recurring_sales_invoice[details_attributes][period] |
String |
String with a date range: |
recurring_sales_invoice[details_attributes][price] |
Decimal |
Both a decimal and a string ‘10,95’ are accepted. |
recurring_sales_invoice[details_attributes][amount] |
String |
|
recurring_sales_invoice[details_attributes][tax_rate_id] |
Integer |
Should be a valid tax rate id. |
recurring_sales_invoice[details_attributes][ledger_account_id] |
Integer |
Should be a valid ledger account id. |
recurring_sales_invoice[details_attributes][product_id] |
Integer |
Should be a valid product id. |
recurring_sales_invoice[details_attributes][project_id] |
Integer |
Should be a valid project id. |
recurring_sales_invoice[details_attributes][row_order] |
Integer |
|
recurring_sales_invoice[details_attributes][_destroy] |
Boolean |
|
recurring_sales_invoice[details_attributes][automated_tax_enabled] |
Boolean |
|
recurring_sales_invoice[custom_fields_attributes][id] |
Integer |
Required |
recurring_sales_invoice[custom_fields_attributes][value] |
String |
Required |
Example: creates a new recurring sales invoice
Request
Response
Updates a recurring sales invoice
Example: updates the recurring sales invoice
Request
Response
Example: updates a recurring sales invoice detail
Request
Response
Destroy or deactivate a recurring sales invoice
A recurring sales invoice will be destroyed if it has not created any sales invoices. If it has created sales invoices, it will be deactivated.
Example: destroys a recurring sales invoice
Request
Response
Adds note to entity
Parameters
Parameter | Type | Description |
---|---|---|
note[note] |
String |
Required. Text for the note or to-do. |
note[todo] |
Boolean |
If |
note[assignee_id] |
Integer |
Assign to-do to user. Should be a valid user id. If assignee_id is provided the note will be a to-do. |