Novulo REST End points in the integrated application allow for easy-to-configure access in sales to create “my” environments.
To authenticate the Website user, please refer to REST API calls and authorization - #3 by Joost to know how to ensure the %website_user
parameter.
For the set-up of end points, we recommend the following structure:
/rest/app_name/customers/{customer_id}
/rest/app_name/customers/{customer_id}/sales?page=1
/rest/app_name/customers/{customer_id}/sales/{sales_id}
/rest/app_name/customers/{customer_id}/invoices?page=1
/rest/app_name/customers/{customer_id}/invoices/{invoice_id}
/rest/app_name/customers/{customer_id}/deliveries?page=1
/rest/app_name/customers/{customer_id}/deliveries/{delivery_id}
Which this set-up, you can define the end points using Path-parameters.
This set-up requires 7 REST End points, using 4 Data definitions using a show_details
-parameter.
For example, for saless, you typically set-up one Data definition on sales
. (which can have sub data definitions, like saleslines
or activities
).
The sales
data definition will feature fields like ID, description and date, which are always part of the object.
Details including sales lines and other details, are only shown when you have show_details=true
. This way of working ensures that the object is always managed in one place.
For ‘my’ end points that have saless with hundreds of lines per sales, you might choose to also add a paginated end point like:
/rest/app_name/customers/{customer_id}/sales/{sales_id}/saleslines