Skip to content

Create product

POST /product/create

Created products will be associated with the user and company your API key belongs to.
If your request was successfull, an ID will be returned in the message field, this is our internal primary key/product ID.

An example of field keys can be seen below.
This example may not be sufficient for your specific flow of list, as this depends on the criteria of the list where products should appear when created.
Refer to the fields section for a list of available keys, that can be used.

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

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.
Supported meta fields are listed below.

Custom field keys

When submitting custom fields in your payload, only submit either the custom field key customField_* or it's alias.
If both are given at the same time, we cannot guarantee the correct value will be saved.

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

    curl_setopt_array($ch, [
        CURLOPT_URL => 'https://YOUR-ENVIRONMENT.fleet.autoproff.com/api/product/create',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS =>'{
            "vehicleIdentificationNumber": "2135678987654",
            "fields": {
                "AP30Pno": 1231222,
                "AP30Guid": "dummyvalue",
                "AP30Hash": "dummyvalue",
                "registrationNumber": "AB12345",
                "deregistrationDate": "2023-02-01",
                "firstRegistrationDate": "2023-02-01",
                "brand": "Tesla",
                "model": "Model Y",
                "variant": "Test",
                "isDrivable": 1,
                "mileage": 12333,
                "location": "Dansk Autologik, Balstrupvej 91, 4100 Ringsted"
            },
            "meta": {
                "overrideTransportPickupContact": "John Doe",
                "overrideTransportPickupPhone": "+4512345678",
                "overrideTransportPickupEmail": "your@email.com",
                "integratorId": "52249fba-99cd-4f67-baa6-e9facf377b77"
            }
        }',
        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 your 17 character VIN, keep in mind multiple products can be created by the same VIN
fields An object of key-value pairs, where key is the field key used by Fleet.
fields.* This is the fields the user will be able to see under the "Information" tab
meta Meta data is fields invisible to the end user, but may alter user experience or feature behaviour