...
For each session, first get authenticated with /auth/generate/
, then use the received token in the header for all the other calls. Like this:
Code Block |
---|
curl https://dev-planandgo.di.no/pl/api/v-1/routePlan
-H "Content-Type:application/json"
-H "X-API-Token:olof:5f9a3609a5a295eff861d930a0c75bbee7991842"
-d "{
\"companyId\": 1,
\"date\": '2015-12-04T00:00:00.000+0100',
\"name\": \"Kolonihagen uke 9\"
}" |
Environments
- DEV:Â https://dev-planandgo.di.no
- STAGING: https://staging-planandgo.di.no
- PROD: https://planandgo.di.no
API-methods
# | Â | Method | URL | Description | Example - Request | Example - Response | ||||
---|---|---|---|---|---|---|---|---|---|---|
1 | 🔓 | POST | /auth/generate | Fetches an login-token that the application can use to gain access to the API. |
|
| ||||
2 | 🔒 | POST | /routePlan | Create an empty route plan (for a given distribution date). Create a route plan for each area (each plan has a given start-point). |
|
| ||||
3 | 🔒 | POST | /routePlan/<rp_id>/customerSystem/<cs_id> | Create an empty file (prepare for a file-upload). Step 1 in file upload. |
|
| ||||
4 | 🔒 | POST | /file/<f_id> | Upload the content of the file you have prepared. Filetypes supported:
Mimetype: multipart/form-data Name the file-field: "file". See file specification. Step 2 in file upload. | Â |
| ||||
5 | 🔒 | GET | /customerSystem/<cs_id>/publishedOrders/<yyyy-mm-dd> | Fetch the published orders including the routename of each order. This will return orders across many routePlans, but only from published plans for the given distribution-date. Assumes that imported customers/deliveries used the ORDER_ID field. Â | Â | List of orders
|
...