GetCustomersOnTheWay
Exports customers on the way between two given locations including the additional driving time and distance required for the detour to insert the customer on the way. The locations can either be customers or the user's home location.
|
https://my.portatour.net/a/api/GetCustomersOnTheWay?parameters
|
| Required URL parameters | |
| format | Export format, can be one of xlsx, xls, ods, csv, simplecsv, or xlsxtable. |
|---|---|
| userEmail, employeeNumber | Email address or employee number of the user whose customers to export. Exactly one must be specified. |
| Optional URL parameters | |
| language | Recommended. Language used for the export. |
| measurementSystem | Recommended. Measurement system used for the export. |
| fromCustomerWithExternalID, fromCustomerWithPortatourID | External ID and/or Portatour ID of the customer used as start location of the way. If neither of the parameters is specified, the user's home location will be used. |
| toCustomerWithExternalID, toCustomerWithPortatourID | External ID and/or Portatour ID of the customer used as end location of the way. If neither of the parameters is specified, the user's home location will be used. |
| maxResultRows | If specified, only the first maxResultRows customers will be exported. |
| orderBy | How the customers should be ordered, can be one of time or distance. Default is time. |
| includeDefaultValues | If set to true, fields using default values are filled with the value that actually applies instead of being exported empty, and each such field is followed by an additional column telling whether its value is the default. Settings defaulted only as a whole, such as the business hours, share a single such column behind their last column. Default is false. |
| exportFields | If specified, the export will only contain the listed fields, in the specified order. More information |
|
using API token:
curl -H "Authorization: Bearer <your_api_token>" -o customers.csv
"https://my.portatour.net/a/api/GetCustomersOnTheWay?format=csv&language=en-US&userEmail=bob@example.com"
using basic authentication:
curl -u <admin_username>:<admin_password> -o customers.csv
"https://my.portatour.net/a/api/GetCustomersOnTheWay?format=csv&language=en-US&userEmail=bob@example.com"
|
Caution: When you process exported data, don't depend on the column order. Use the column header names to access data. The order of the columns might change, e.g if new fields are added. In case your importer doesn’t support accessing field values by field name, use the exportFields parameter to specify the columns and their order.