API Історія продажів з аукціону

API Історія продажів з аукціону забезпечує доступ до історії продажу авто через аукціони аварійних та списаних транспортних засобів, що включає детальне описання лоту та фото авто на момент продажу.

Авторизація

Для авторизації, вам потрібен логін і пароль, та наступна URL:
POST https://www.clearvin.com/rest/vendor/login
Запит має бути надісланий з зареєстрованої IP адреси
Структура запиту:
{
    "email" : “[email protected]”,
    "password": "11111111"
}
Відповідь
ELEMENTDESCRIPTIONFORMAT
statusStates whether the request was handled successfully, or ended with an errorString error or ok
messageContains details about the result if status is errorString
tokenJSON web token. The token expires in 300 minutesString


Якщо дані були введені правильно, ви отримаєте токен для доступу:
{
    "status": "ok",
    "token": " I6MTgxLCJpYXQiOjE1MDk1NTg4MTksIm4cCI6MTUwOTU1OTQxOX0.ACV0t3UyHXs0"
}


Звіт

Як тільки ви отримали токен, ви можете використати її для отримання звіту за допомогою наступної URL:
GET https://www.clearvin.com/rest/vendor/report?vin=5UXFA13544LU21050
Щоб використати токен, вам потрібно налаштувати HTTP заголовки наступним чином:
Authorization: Bearer I6MTgxLCJpYXQiOjE1MDk1NTg4MTksIm4cCI6MTUwOTU1OTQxOX0.ACV0t3UyHXs0
Відповідь
ELEMENTDESCRIPTIONТип
statusStates whether the request was handled successfully, or ended with an errorString error or ok
messageContains details about the result if status is errorString
Report idContains current report idString
Report vinRequested vinString
Report reportContains full information about the vehicleJSON object

Використайте наступну URL, щоб отримати звіт у форматі HTML:
GET https://www.clearvin.com/rest/vendor/report?vin=5UXFA13544LU21050&format=html
Та налаштувати HTTP заголовки наступним чином:
Authorization: Bearer I6MTgxLCJpYXQiOjE1MDk1NTg4MTksIm4cCI6MTUwOTU1OTQxOX0.ACV0t3UyHXs0
Content-Type: text/html


Авторизація

Запит
curl -X POST \
    https://www.clearvin.com/rest/vendor/login \
    -H 'Content-Type: application/json' \
    -d '{
        "email": "[email protected]",
        "password": "yourpassword"
}
Успішна авторизація
{
    "status": "ok",
    "token": "I6MTgxLCJpYXQiOjE1MDk1NTg4MTksIm4cCI6MTUwOTU1OTQxOX0.ACV0t3UyHXs0"
}
Помилка авторизації
{
    "status": "error",
    "message": "Wrong username or password"
}

Звіт

Запит
curl - X GET\ 'https://www.clearvin.com/rest/vendor/report?vin=WBAFR7C57CC811956'\ -
    H 'Authorization: Bearer I6MTgxLCJpYXQiOjE1MDk1NTg4MTksIm4cCI6MTUwOTU1OTQxOX0.ACV0t3UyHXs0'\ -
    H 'Content-Type: application/json'
Успішна авторизація
{
    "status": "ok",
    "result": {
        "id": "3646F9E2",
        "vin": "WBAFR7C57CC811956",
        "report": {
            "auctions": [{
                "announced_at_auction": "Jun 5, 2015",
                "make": "BMW",
                "model": "535I",
                "odometer": 26226,
                "odometer_status": "ACTUAL",
                "color": "BLACK",
                "engine": "3.0L L6  FI  DOHC 24V  F4",
                "drive": null,
                "acv": 37409,
                "repair_cost": null,
                "fuel": null,
                "cylinders": null,
                "own_doc": "CA SALVAGE CERTIFICATE",
                "primary_damage": "FRONT END",
                "secondary_damage": "LEFT SIDE",
                "location": "Anaheim",
                "sale_date": "2015-07-20",
                "sale_status": null,
                "images": ["https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891b27294a7c2c", "https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891827294a7c2c", "https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891927294a7c2c", "https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891e27294a7c2c", "https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891f27294a7c2c", "https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891c27294a7c2c", "https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891d27294a7c2c", "https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891227294a7c2c", "https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891327294a7c2c", "https://clearvin.com/images/auctions/a540c388ce3ad8a490996a06aaecb69e7b2ae33a889b1dc3572581932c2a32d86ee06a82fd96c47094d4a0ed2b89178d04ce8174535269a6891b5b4b0e663b7b"],
                "condition": "WON'T START",
                "auctionId": "591778387",
                "vendor": "salvagebid.com",
                "title_state": "CA",
                "date": "Jul 20, 2015"
            }, {
                "announced_at_auction": "Aug 10, 2015",
                "make": "BMW",
                "model": "535I",
                "odometer": "26227",
                "odometer_status": "ACTUAL",
                "color": "BLACK",
                "engine": "3.0L 6L 6",
                "drive": "Rear-wheel drive",
                "acv": "31250.00",
                "repair_cost": "0.00",
                "fuel": "GAS",
                "cylinders": "6",
                "own_doc": "CA SALVAGE CERTIFICATE",
                "primary_damage": "PARTIAL REPAIR",
                "secondary_damage": "",
                "location": "CA - SAN BERNARDINO",
                "sale_date": "2015-09-10",
                "sale_status": "On Minimum Bid",
                "images": ["https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e6ca4931c0f33466d662f5e5252da7f23418118bc58cf287641eb574b2cac342cf355e4879cb17678", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e3da0c21b5e32156d662b550150da7f2e17dc18e756ce2d7642ec56487cf56270f759ead39cb17678", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e68f193185d3f426a6629515751da7f23488018e706932a761aba5d4c7afd3573fe59e8d79cb17678", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e6ef6931c0832433a662d02015fda7f71448918e704947e7646b9561977fa6524a40bedd59cb17678", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e63f4954e0d66183d66785f0407da7f2013de18bf51c1787614b65e4b2afe3473f655bf849cb17678", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e63a7951c5f37463a66795e5457da7f75448e18bf59c62b7612b70f4e2ef43577f659e58e9cb17678", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e62f4961f5336106a662c500455da7f75408018e605c02a761be9081e78f53270fe55ebd09cb17678", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e62a4c24c5930423e662956065eda7f7412dc18e70592247615eb5e4829f46123f75bb8d39cb17678", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e62a4c71c0d641739667d520356da7f2f44de18bc54c4257611b7561e79fe3373a45de8d59cb17678", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f452fd729300cb8a75524e68a1931c5a32176d6624025404da7f22158b18bf0694247610e95e182ca96626f35beed39cb17678"],
                "condition": "Run & Drive Verified",
                "auctionId": "29866715",
                "vendor": "autobidmaster.com",
                "title_state": "CA",
                "date": "Sep 10, 2015"
            }, {
                "announced_at_auction": "Dec 2, 2016",
                "make": "BMW",
                "model": "535I",
                "odometer": "0",
                "odometer_status": "NOT ACTUAL",
                "color": "BLACK",
                "engine": "3.0LL 6",
                "drive": "Rear-wheel drive",
                "acv": "0.00",
                "repair_cost": "0.00",
                "fuel": "GAS",
                "cylinders": "6",
                "own_doc": "CA SALVAGE CERTIFICATE",
                "primary_damage": "MECHANICAL",
                "secondary_damage": "",
                "location": "*NCS - PACIFIC REGION",
                "sale_date": "2017-02-20",
                "sale_status": "",
                "images": ["https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d48521535862f3c61b463516687f31525d5691662f158b03f357917d6c1bba0b487cf96571e8278df1", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d4872150046ea0971d4662453d2f31525c04c5667612dc56f305c2796f16e90b4d2af56823e8278df1", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d4d3205a0338a2c1484663196d283152040396662e128a00f306c32e6d17bd5f1e7fff6827e8278df1", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d4837c07043aa2c51b4634126a7931525204926675128b00f306c7256c40bb0b4d2da83670e8278df1", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d4d4215a5738a5971d4663443e2a3152065392662e468c03f351c02d3a12ee5e4e2caf3321e8278df1", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d4d72605523fa19448463746342f31525c50c2662e178d50f359c0793812be5c452aac3126e8278df1", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d48374500363a292194637443e2d31520407cf6676178f54f352932e3d13b65c1b2bf8622de8278df1", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d4d67d07566aa1c74f466243697931525453ce6676418f0cf301ce2e6c46bf084b7da86822e8278df1", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d4d72551533ea2914f4665123f2d3152075e96662f108f02f356c7256b45eb574b2af56774e8278df1", "https://clearvin.com/images/auctions/a540c388ce3ad8a480d96910b6b1a0897c70ad64cbd50693020bbaa613066fcd62a33590f79d9d2dc3cba3f44cf57a9604d4d471565669a390494634196f783152510395662e12dc50f357c17e3a17be5d192cab3676e8278df1"],
                "condition": null,
                "auctionId": "42699816",
                "vendor": "autobidmaster.com",
                "title_state": "CA",
                "date": "Feb 20, 2017"
            }]
        }
    }
}