OData (Open Data Protocol)

Is an ISO certified standard that is used in rest APIs to define filters.

Odata start guide or Odata References

📘

Pagination

Endpoints in the API that support OData such as documents, orders, parties and products have a default pagesize op 120 records. The responses will contain a NextpageLink if there are still records left to be fetched.

Alternatively the "&$skip={skipAmount}" filter can be used to manually go over different pages.

Lets start with an example to show you what OData can do for you.

The following GET request will provide you with all changed invoices from the date provided, in this example: the first of January

GET /v1/orders?$filter=LastModified+ge+DateTime'2022-01-
01'+and+OrderType+eq+'Invoice'&$orderby=LastModified+asc

You can use this on other GET endpoints too, here is an example on our Party Endpoint.

The following GET request will provide us with all customers that were Last Modified >= 1st of January 2019, sorted

GET /v1/parties?$filter=PartyType+eq+'Customer'+and+LastModified
+ge+DateTime'2019-01-01'&$orderby=LastModified+asc

The following GET request will provide us with all products that were Last Modified >= 1st of January 2019, sorted

GET /v1/products?$filter=LastModified+ge+DateTime'2019-01-
01'+and+GroupName+eq+'Testgroep'&$orderby=LastModified+asc

The following GET request will provide us with all the orders, with an order date between 2022-01-01 and 2022-12-31

GET /v1/orders?$filter=OrderDate ge datetime'2022-01-01' and OrderDate le datetime'2022-12-31'

The following GET request will provide us with all the orders, Using the ExternalProviderID and only returning those

Use case: Using a POST, you stored the Unique Invoice ID from your software in Billit using the ExternalProviderID. Now you want to check if any invoices exists with that unique
ExternalProviderID . You can use the following filter.

GET /v1/orders?$filter=ExternalProviderID+eq+'MyCustomNumber'