Skip to content

Upload documents

POST /product/upload-documents

Uploads one or more documents to a given document category.

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

    curl_setopt_array($ch, [
        CURLOPT_URL => 'YOUR-BASEURL/product/upload-documents',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS =>'{
            "vehicleIdentificationNumber": "string",
            "documentCategoryID": 1,
            "private": 1,
            "documents": [
                ...
            ]
        }',
        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
documentCategoryID One of the described category IDs from the categories section
documents 1 An array of URLs to be uploaded. Each url must return a HTTP code < 400.
private 2 Whether a document is eligible for being uploaded to the AP platform.

1 One of the following extensions are required: ["jpg", "png", "gif", "jpeg", "pdf"]
Likewise documents must also have a mimetype any of ["image/jpg", "image/png", "image/gif", "image/jpeg", "application/pdf"]
Only documents in the following categories will ever be uploaded: ["Reg. certificate", "Reg. certificate - Part 1", "Reg. certificate- Part 2", "COC", "CarInspector sales reports"].

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

Document Upload Process

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

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

Ensure that the URLs are active and that the documents 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.