The ability to search is limited to a small amount of fields. These fields are listed in the table under the section “Fields” in the documentation for each resource.
To search, enter the field name as a GET parameter and the search value as the value of the specified parameter.
In this case “articlenumber” is the GET parameter and also the name of the field in wich the search is made. The value “A100” is the search value.
The search query is in this example will use the LIKE parameter: SELECT * FROM Article WHERE ArticleNumber ILIKE ‘%A100%’
This means that we will return all articles with an articlenumber containing A100, for example A1001 or 1A100.
|Search name||Description||Example value|
|lastmodified||Retrieves all records since the provided timestamp.||2014-03-10 12:30|
|financialyear||Selects what financial year that should be used||5|
|financialyeardate||Selects by date, what financial year that should be used||2014-03-10|
|fromdate||Defines a selection based on a start date.
Only available for invoices, orders, offers and vouchers.
|todate||Defines a selection based on an end date.
Only available for invoices, orders, offers and vouchers
It’s possible to filter the results so that only specific items will be returned. The available filters is listed under the section “Filters” in the documentation for each resource.
This is made in the same way as the search, by adding GET parameters. The parameter named “filter” is used to set a specific filter for the request.
In this case the filter is unpaid, wich only retrieves invoices that are unpaid.
A result can be sorted, either ascending or descending, by specific fields. These fields are listed in the table under the section “Fields” in the documentation for each resource.
This is made in the same way as the search and the filter, by adding GET parameters. Apart from the filters and the search, sorting uses two parameters. One named “sortby”, which specifies the field that the result should be sorted by and one named “sortorder”, which specifies the order in which the sorting should be made.
In the case above, the invoices is being sorted ascending by the field “customernumber”.
Limit & Offset
Because of performance reasons both on our side and on yours, we encourage you to use the parameter limit as much as possible.
This parameter limits the count of records that will be returned, by default this is set to 100, but you can go as low as to 1 or as high as to 500.
When retrieving a list of records you sometimes want to choose what record to start from, this is done by using the paramater offset.
By default the offset parameter is set to 0, but you can ofcourse start from whatever record you like.
If the request returns multiple pages with records you need to paginate to access all records.
This is done with the parameter page, you should specify the page number that you want to retrieve.