Zum Inhalt

Job Api

The Localion Navigator provides a HTTP-API which allows customers to manage and share their jobs.

Authentication

For each request to the API, you must include an API key as Authorization header. If you have not received an API-Key yet, please contact the support at navigation@localion.de

Share a Job

To upload a job with the API, you must use the /shareJob endpoint. The upload is in the form of a CSV-file.

When requesting to upload a job, you must provide metadata. The following metadata must be provided in the header:

  • QR-Code: True or False to request a QR-Code instead of an url

If the QR code is not displayed correctly, it can be helpful to set Accept-Encoding to image/png.

Parameters

Sharing a job does not require any parameters in the URL:

https://customerapi.navigator.localion.de/manageJobs/shareJob

Body

The CSV-FILE must be attached as multipart/form-data with the key X-Localion-File. E.g. with Postman.

The CSV-FILE must comply with the following rules:

Row format:

Key Type Description Required
NAME String A short station name Yes
YPOS Double The latitude of the decimal coordinate (WGS84) Yes
XPOS Double The longitude of the decimal coordinate (WGS84) Yes
INFO String A detailed station description No

Any further column will be stored in the station description.

E.g.:

NAME;YPOS;XPOS;Kunde;Tel.;Kundennr.
Job AB1234;51.526445;7.224776;Ruth Müller;+49 2324 1111 111;12345
Job BC2314;51.546361;7.217106;Felix Maier;+49 2324 2222 222;23456
Job DC3342;51.556697;7.208630;Rita Klein;+49 2324 3333 333;34567

Result

The result is a link that can be used to open the shared job with the Localion Navigator. If you set the QR-Code flag, the result is a png image and the corresponding url can be found as header with the key X-Localion-Url.

E.g.:

https://navigator.localion.de/job?version=1&id=01HJ1ACARBB7RSDVJ1TZBGHE7X-01HMS7KQGZ70HP54DCYRTGP0XQ

List Shared Jobs

To receive the list of previously shared jobs, you must use the /listJobs endpoint.

Parameters

When requesting the details of a job, you don't need any parameters because the corresponding jobs are identified via your Api-Key:

https://customerapi.navigator.localion.de/manageJobs/listJobs

Result

The result is a list of triples consisting of the id and the title of the Job. These parameters can be used to get the details of the corresponding job or to delete a job.

E.g.:

[
    {
        "jobId": "01HJ1ACARBB7RSDVJ1TZBGHE7X",
        "title": "Working stations"
    },
    {
        "jobId": "9b23111948c1437fa0b4926571c148c5",
        "title": "Hotels"
    },
    {
        "jobId": "8c23419948c1208fa0b8442161c943c6",
        "title": "My favourite locations"
    }
]

Get a Job

To receive the details of a job, you must use the /getJob endpoint.

Parameters

When requesting the details of a job, you must provide the id of the requested job:

https://customerapi.navigator.localion.de/manageJobs/getJob/{jobId}

Result

The result is in the form of a job json.

E.g.:

{
    "title": "Test Job",
    "description": "This is a job description",
    "backendId": "01HJ1ACARBB7RSDVJ1TZBGHE7X",
    "shareLink": "https://navigator.localion.de/job?version=1&id=01HJ1ACARBB7RSDVJ1TZBGHE7X-01HMS7KQGZ70HP54DCYRTGP0XQ",
    "lastChange": "2023-12-19T14:53:20.334+01:00",
    "shareTime": "2023-12-19T14:53:20.334+01:00",
    "stations": [
        {
            "location": {
                "coordinate": {
                    "latitude": 51.557302654407295,
                    "longitude": 7.208404984736785
                }
            },
            "title": "Robert-Bosch-Str.",
            "description": "44629 Herne",
            "type": "address"
        },
        {
            "location": {
                "coordinate": {
                    "latitude": 51.55490466507057,
                    "longitude": 7.206809316057825
                }
            },
            "title": "Westring",
            "description": "44629 Herne",
            "type": {
                "type": "address"
            }
        },
        {
            "location": {
                "coordinate": {
                    "latitude": 51.55521064434219,
                    "longitude": 7.209560284324872
                }
            },
            "title": "In den Weiden",
            "description": "44629 Herne",
            "type": "address"
        }
    ]
}

Delete a Job

To delete a shared job, you must use the /deleteJob endpoint.

Parameters

When requesting the deletion of a job, you must provide the job id and the share id:

https://customerapi.navigator.localion.de/manageJobs/deleteJob/{jobId}