Skip to content

Create order

[ POST ] order

Created order will be associated with the API user and company your API key belongs to.
The returned car_id can then be used to keep track of your current order /order/get.
Pickup and delivery address can furthermore be an integer, describing your location.

The field "error_override" can be set to true you want to submit an order regardless of the input and let Dansk Autologik handle the errors.

Should you choose to provide a pickup address that is not Denmark, your order wlll be marked as import.
An import order requires you to submit a valid attorney file on the car, should your profile not already contain one.

Delivery receiver information is not required and should you choose not to fill in that information
the delivery information will copied to it.

Please note that you can send multiple cars seperated by objects in the global car key.

Fields

Brand and model must match GET cars exactly.

car

Field Type Required Description Example
car string Yes Car brand. "Audi"
model string Yes Car model. "A4"
pickup_date date (d-m-Y) Yes Requested pickup date. Weekends and holidays are moved to the next valid date. "15-09-2026"
car_number string Yes VIN (chassis number). Cannot be empty. "WAUZZZ8K9DA123456"
can_drive bool Yes true if the car can be driven, false if it must be transported as non-driveable. true
external_ref string No Your own reference for the order. "ORD-2026-1042"
files.attorney string No Base64-encoded attorney file for import orders (jpg, jpeg, png, webp). Required for import if the API user has no attorney on file. "data:image/png;base64,..."

booking

Addresses as string must be roadname, roadnumber, postalcode. An integer is a stored location id.

Field Type Required Description Example
pickup_address string or int Yes Pickup address or location id. Non-Danish pickup marks the order as import. "Koldingvej 10, 6580"
pickup_email string Yes Contact email at pickup. "lager@example.dk"
pickup_phone string Yes Contact phone at pickup. "+4570131410"
pickup_name string Yes Contact name at pickup. "Anders Jensen"
company_name_pickup string Yes Company name at pickup. "Eksempel A/S"
delivery_address string or int Yes Delivery address or location id. "Østerbrogade 12, 2100"
delivery_email string Yes Contact email at delivery. "modtagelse@example.dk"
delivery_phone string Yes Contact phone at delivery. "+4522334455"
company_name_delivery string Yes Company name at delivery. "Modtager ApS"
delivery_name string Yes Contact name at delivery. "Mette Nielsen"
delivery_receiver_address string No Final receiver address. Copied from delivery if omitted. "Nørrebrogade 5, 2200"
delivery_receiver_email string No Final receiver email. "receiver@example.dk"
delivery_receiver_phone string No Final receiver phone. "+4511223344"
delivery_receiver_name string No Final receiver name. "Peter Holm"
delivery_receiver_companyname string No Final receiver company. "Holm Handel ApS"
comment string No Comment visible to Autologik. "Ring ved ankomst"
files.order_file string No Base64-encoded booking file (jpg, jpeg, png, webp). "data:image/jpeg;base64,..."

custom

Field Type Required Description Example
customer_number string No NAV customer number used for price calculation. "42886600"
error_override bool No Submit even if some fields fail validation. Autologik handles the errors. false
customer_email string No If this email matches a user, that user is set as owner of the created order instead of the API user. "chdu@toyota.dk"

Example request

{
    "car": [
        {
            "car": "Audi",
            "model": "A4",
            "pickup_date": "15-09-2026",
            "car_number": "WAUZZZ8K9DA123456",
            "can_drive": true,
            "external_ref": "ORD-2026-1042"
        }
    ],
    "booking": {
        "pickup_address": "Koldingvej 10, 6580",
        "pickup_email": "lager@example.dk",
        "pickup_phone": "+4570131410",
        "pickup_name": "Anders Jensen",
        "company_name_pickup": "Eksempel A/S",
        "delivery_address": "Østerbrogade 12, 2100",
        "delivery_email": "modtagelse@example.dk",
        "delivery_phone": "+4522334455",
        "company_name_delivery": "Modtager ApS",
        "delivery_name": "Mette Nielsen",
        "comment": "Ring ved ankomst"
    }
}
{
    "car": [
        {
            "car": string,
            "model": string,
            "pickup_date": date,
            "car_number": string,
            "can_drive": bool,
            "external_ref": *string,
            "files": {
                "attorney": *string
            }
        }
    ],
    "booking": {
        "pickup_address": string|int,
        "pickup_email": string,
        "pickup_phone": string,
        "pickup_name": string,
        "company_name_pickup": string,
        "delivery_address": string|int,
        "delivery_email": string,
        "delivery_phone": string,
        "company_name_delivery": string,
        "delivery_name": string,
        "delivery_receiver_address": *string,
        "delivery_receiver_email": *string,
        "delivery_receiver_phone": *string,
        "delivery_receiver_name": *string,
        "delivery_receiver_companyname": *string,
        "comment": *string,
        "files": {
            "order_file": *string
        }
    },
    "custom": {
        "customer_number": *string,
        "error_override": *bool,
        "customer_email": *string
    }
}
Please note that the response will be split into keys, if you send in multiple cars.

Multiple cars:

{
    "data": {
        "12345": {
            "car": string,
            "model": string,
            "order_id": string,
            "car_number": string,
            "pickup_date": string,
            "price": string,
            "external_ref": string,
            "reg_no": string,
            "fetched_tt_status": string,
            "LATESTDELIVERYDATE": string,
            "booking_id": string,
            "latest_expected_delivery_date": string,
            "status": string,
            "track_and_trace": null,
            "car_id": string
        },
        "123456": {
            "car": string,
            "model": string,
            "order_id": string,
            "car_number": string,
            "pickup_date": string,
            "price": string,
            "external_ref": string,
            "reg_no": string,
            "fetched_tt_status": string,
            "LATESTDELIVERYDATE": string,
            "booking_id": string,
            "latest_expected_delivery_date": string,
            "status": string,
            "track_and_trace": null,
            "car_id": string
        }
    }
}
Single car:

{
    "data": {
        "car": string,
        "model": string,
        "car_number": string,
        "pickup_date": date (d-m-Y),
        "price": string,
        "external_ref": string,
        "reg_no": string,
        "status": string,
        "car_id": string,
        "booking_id": string,
        "latest_expected_delivery_date": date (d-m-Y),
        "track_and_trace": null
    }
}
pickup_date:

    When POSTing an order with a date that isn't valid (Weekend/ Holiday)
    the date will be converted to the next avaliable valid pickup_date

pickup_address | delivery_address:

    If a string:
        Must be formatted roadname, roadnumber, postalcode/ zipcode

custom:

    customer_email:
        If this email matches a user, that user is set as owner of the created order
        instead of the API user.

Files:

    Should you choose to upload files for the booking, they must be 
    base64 encoded and have one of the following extensions
    (jpg, jpeg, png, webp)
<?php
    $ch = curl_init();

    curl_setopt_array($ch, [
        CURLOPT_URL => 'YOUR-BASEURL/order',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS => '{
            "car": [
                {
                    "car": "Audi",
                    "model": "A4",
                    "pickup_date": "15-09-2026",
                    "car_number": "WAUZZZ8K9DA123456",
                    "can_drive": true,
                    "external_ref": "ORD-2026-1042"
                }
            ],
            "booking": {
                "pickup_address": "Koldingvej 10, 6580",
                "pickup_email": "lager@example.dk",
                "pickup_phone": "+4570131410",
                "pickup_name": "Anders Jensen",
                "company_name_pickup": "Eksempel A/S",
                "delivery_address": "Østerbrogade 12, 2100",
                "delivery_email": "modtagelse@example.dk",
                "delivery_phone": "+4522334455",
                "company_name_delivery": "Modtager ApS",
                "delivery_name": "Mette Nielsen",
                "comment": "Ring ved ankomst"
            }
        }',
        CURLOPT_HTTPHEADER => [
            'X-Api-Key: YOUR-API-KEY',
            'Content-Type: application/json'
        ],
    ]);

    $response = curl_exec($ch);

    curl_close($ch);
const axios = require('axios');
const postData = {
    car: [
        {
            car: 'Audi',
            model: 'A4',
            pickup_date: '15-09-2026',
            car_number: 'WAUZZZ8K9DA123456',
            can_drive: true,
            external_ref: 'ORD-2026-1042'
        }
    ],
    booking: {
        pickup_address: 'Koldingvej 10, 6580',
        pickup_email: 'lager@example.dk',
        pickup_phone: '+4570131410',
        pickup_name: 'Anders Jensen',
        company_name_pickup: 'Eksempel A/S',
        delivery_address: 'Østerbrogade 12, 2100',
        delivery_email: 'modtagelse@example.dk',
        delivery_phone: '+4522334455',
        company_name_delivery: 'Modtager ApS',
        delivery_name: 'Mette Nielsen',
        comment: 'Ring ved ankomst'
    }
};

axios.post('YOUR-BASEURL/order', postData, {
    headers: {
        'X-Api-Key': 'YOUR-API-KEY'
    }
})
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error);
});