Skip to content

Update product

POST /product/update

Update one or more field values for a product.

Custom field keys can be seen when editing your company. In the top right account menu go to: Edit company > Product Fields > (Edit any field)

The request body example below are not exhaustive.
a GET request can be made against /product/fields to retrieve a list of available field keys.

Meta data

Meta data are optional and will be used as-is.
It is completely safe to ommit certain meta data, as the features they interact with will simply be disabled or ignored if not present.
The use of meta data is customer specific, inquire with your dedicated FLEETproff consultant if in doubt.

{
    "vehicleIdentificationNumber": string,
    "fields": {
        "registrationNumber": string,
        "firstRegistrationDate": date, // Format must be in 'Y-m-d', 'Y-m-d H:i:s' or 'd-m-Y', other formats will be ignored
        "brand": string,
        "model": string,
        "variant": string,
        "engine": numeric,
        "mileage": int,
        "isDrivable": bool,
        "location": string,
        "checkinDate": date // Format must be in 'Y-m-d', 'Y-m-d H:i:s' or 'd-m-Y', other formats will be ignored
    },
    "meta": {
        "sellerContact": string,
        "sellerPhone": string,
        "sellerEmail": string,
        "integratorId": string
    }
}
{
    "message": string,
    "status": enum
}
<?php
    $ch = curl_init();

    curl_setopt_array($ch, [
        CURLOPT_URL => 'YOUR-BASEURL/product/update-fields',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS =>'{
            "vehicleIdentificationNumber": "2135678987654",
            "fields": {
                "registrationNumber": "AB12345",
                "firstRegistrationDate": "2023-02-01",
                "brand": "Tesla",
                "model": "Model Y",
                "variant": "Test",
                "isDrivable": 1,
                "mileage": 12333,
                "location": "Dansk Autologik, Balstrupvej 91, 4100 Ringsted"
            }
        }',
        CURLOPT_HTTPHEADER => [
            'Content-Type: application/json',
            'X-Api-Key: YOUR-API-KEY'
        ],
    ]);

    $response = curl_exec($ch);

    curl_close($ch);
Parameter Required Description
vehicleIdentificationNumber This is the primary identifier, and should be your 17 character VIN
fields An object of key-value pairs, where key is the field key used by Fleet.
fields.* Key-value pairs of fields to set, not currently validated