Skip to content

Upload images

POST /product/upload-images

Uploads one or more images to the product.

{
    "vehicleIdentificationNumber": string,
    "private": bool,
    "images": array
}
{
    "message": string,
    "status": enum
}
<?php
    $ch = curl_init();

    curl_setopt_array($ch, [
        CURLOPT_URL => 'YOUR-BASEURL/product/upload-images',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS =>'{
            "vehicleIdentificationNumber": "string",
            "private": 1,
            "images": [
                ...
            ]
        }',
        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
images 1 An array of URLs to be uploaded. Each url must return a HTTP code < 400.
private 2 Indicates whether an image is eligible for being uploaded to the AP platform.

1 One of the following extensions are required: ["jpg", "png", "gif", "jpeg", "pdf"]
Likewise images must also have a mimetype any of ["image/jpg", "image/png", "image/gif", "image/jpeg"]

2 Unless otherwise agreed upon between involved parties, this field should likely always be set to 1

Image Upload Process

When uploading images, it's important to understand how submitted URLs are handled to ensure a smooth and efficient upload experience.

The images located at the provided URLs are copied in-process to our filesystem. Our system will access the URL to retrieve and store the image.

Ensure that the URLs are active and that the images can be accessed without authentication or additional headers at the time of the request.

It is perfectly acceptable to use short-lived URLs, such as those generated by temporary storage services or presigned URLs from cloud storage providers, as long as they meet the validation requirements.

If using short-lived URLs, ensure they remain valid for a sufficient duration to allow for processing. We recommend a validity period that accounts for any potential delays or retries in the upload process.