Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

# MethodURLDescriptionExample - RequestExample - Response
1

🔓

POST/auth/generate

Fetches an login-token that the application can use to gain access to the API.

Get the username/password from DI.

Code Block
{
    "username": "olof",
    "password": "secret123"
}
Code Block
{
	"token": "olof:5f9a3609a5a295eff861d930a0c75bbee7991842",
	"userId": 23432,
	"customerSystemId": 233,
	"roles: [...]
}
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).

Code Block
{
    companyId: 1,
    date: '2015-12-04T00:00:00.000+0100',
    name: 'Asker'
}
Code Block
{
	id: 344,
	date: '2015-12-04T00:00:00.000+0100',
	name: 'Asker',
	...
}
3🔒POST/routePlan/<rp_id>/customerSystem/<cs_id>

Create an empty file (prepare for a file-upload).

Step 1 in file upload.

Code Block
{
    name: 'my-file-name.csv'
}
Code Block
{
	id: 6722,
	name: 'my-file-name.csv',
	...
}
4🔒POST/file/<f_id>

Upload the content of the file you have prepared.

Filetypes supported:

  • .csv
  • .xls
  • .xlsx

Mimetype: multipart/form-data

Name the file-field: "file"

Step 2 in file upload.

 
Code Block
{
	status: 'ok'
}
5🔒GET/customerSystem/<cs_id>/publishedDeliveries/<yyyy-mm-dd>

(warning) TODO

Fetch the published deliveries including the routename of each deliveries.

This will return deliveries across many routePlans, but only from published plans for the given distribution-date.

(question) What should be the key to recognise each delivery?

 

List of deliveries

Code Block
[
	{
		idorderId: '12452',
		routeName: 'Asker 1',
		...
	},
	...
]

...