Importing lots from external db

1. Prepare data for importing

Map your representation of the fields below to required format. Vehicle description fields:

Field Description
country supported countries
city supported countries
year year of manufacturing
color supported colors
maker supported makers
model supported makers
notes optional additional information about vehicle
wheel wheel location, either left or right
lot_name lot name (year maker model)
vin_code vehicle identification number
fuel_type supported fuel types
registered whether or not a vehicle is registered (true or false)
hd_img_links optional array of links to high resolution vehicle images
full_img_links array of links to vehicle images
transmission supported transmission types
youtube_link link to a youtube video with a lot review
engine_volume volume of engine (litres)
odometer_value odometer value (km)
price_negotiable whether or not the price is negotiable (true or false)

2. Create lots using shelf api

Use this endpoint to create a lot in Shelf system. Note, normally it takes about 5 seconds to get a response.

This endpoint requires authentication with a JWT token, which is returned from auth-server on successful login (see Issue JWT).

All prices should be passed as a string with two decimal precision. (e.g., "110.00" — one hundred and ten)

Field Description
type required: lot type, either no_auction or eng
currency required: lot's currency, one of supported currencies
start_price required: eng lot start price
buy_now_price required: eng/no_auction buy now price
deposit required: eng lot deposit amount
min_step required: eng minimal bid step
max_step required: eng lot maximum bid step
details required: object with vehicle description fields from step 1
start_time lot start time in seconds since POSIX epoch
duration sale duration

Note: eng lot type requires that min_step and max_step are non-zero, and max_step > min_step. no_auction lot type requires min_step, max_step and start_price to be zero.

Request:

  • POST /lots
    Authorization: Bearer yJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50X2lkIjoiR0JGS05MWUhLSEtXVTNOSTRVMkZJS0tCRkU3MkJIQUREWFFMV01UNUxLNFFIUDJKMlozRVJVR0giLCJhY2NvdW50X3R5cGUiOjUsInBsYXRmb3JtX2lkIjoiR0NNT0xFVVRVVDMyUTJLSVk0T1BVRUNERjZTTDNQSDRFTUJOTkVGSjMyUEdVR0g3WDZLTFZIWkMiLCJ0cnVzdGluZ19wbGF0Zm9ybXMiOlsiR0FLRURMUkhNN0dRUFVTUTNXVUVETEk0R05aM1czMk41TjVWMktYVFVRN1BLRjNYTDVYVlFHWFEiXSwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwaG9uZV92ZXJpZmllZCI6ZmFsc2UsImV4cCI6MTU1MzY5NjgzMn0.020-cZbsXD0FtOXYAp_x-4ikkn5X1GbASi9Kb_mAWyW3COP9L1GPVm_AVe1yd97SSKkLBnzFze9D4OC49w9t1g

  • Body:

      {
        "data": {
          "type": "lots",
          "attributes": {
            "type": "no_auction",
            "details": {
              "city": "Tbilisi",
              "year": 2019,
              "color": "black",
              "maker": "BENTLEY",
              "model": "Continental",
              "notes": "additional vehicle description",
              "wheel": "left",
              "country": "GEO",
              "lot_name": "2019 BENTLEY Continental",
              "vin_code": "5TDBY64A68S008152",
              "fuel_type": "Gasoline",
              "registered": true,
              "hd_img_links": [
                "https: //shelf-dev-docs.s3-eu-west-1.amazonaws.com/48eb645036f2429b367d1dc3.jpg"
              ],
              "transmission": "manual",
              "youtube_link": "",
              "engine_volume": 0.5,
              "full_img_links": [
                "https: //shelf-dev-docs.s3-eu-west-1.amazonaws.com/8847c4feebf067ff9e01fc59"
              ],
              "odometer_value": "23135424",
              "price_negotiable": false
            },
            "currency": "USD",
            "start_price": "0.00",
            "deposit": "100.00",
            "buy_now_price": "50000.00",
            "min_step": "0.00",
            "max_step": "0.00",
            "start_time": 0,
            "duration": 360000
          }
        }
      }
    

Responses:

  • 204 No Content

  • 400 Bad Request one of the fields is malformed

Reference

Supported enum values like maker, model, etc are returned from API.

Vehicle colors

One of beige, black, blue, brown, gold, green, gray, orange, purple, red, silver, white, yellow

Makers and models

The list of supported vehicle makers with corresponding models.

  • GET /enums/makers

Responses: (partial)

  • 200 OK
{
    "data": [{
            "type": "makers",
            "id": "ACURA",
            "attributes": {
                "classes": [{
                    "name": "",
                    "prefix": "",
                    "models": [
                        "EL",
                        "RLX",
                        "TLX",
                        "MDX",
                        "NSX"
                    ]
                }]
            }
        }
    ]
}

Country codes

The list of supported ISO 4217 3-letter currency codes.

  • GET /enums/countries

Responses: (partial)

  • 200 OK
{
    "data": [
        {
            "type": "countries",
            "id": "GEORGIA",
            "attributes": {
                "cities": [
                    "Tbilisi",
                    "Kutaisi",
                    "Batumi",
                    "Poti"
                ],
                "code": "GEO"
            }
        },
        {
            "type": "countries",
            "id": "UNITED_STATES",
            "attributes": {
                "cities": null,
                "code": "USA"
            }
        },
        {
            "type": "countries",
            "id": "UKRAINE",
            "attributes": {
                "cities": null,
                "code": "UKR"
            }
        }
    ]
}

Fuel types

The list of supported fuel types.

  • GET /enums/fuels

Responses: (partial)

  • 200 OK
{
    "data": [
        {
            "type": "fuel_types",
            "id": "GASOLINE",
            "attributes": {
                "verbose": "gas"
            }
        },
        {
            "type": "fuel_types",
            "id": "DIESEL",
            "attributes": {
                "verbose": "diesel"
            }
        }
    ]
}

Wheel positions

The list of available wheel positions.

  • GET /enums/wheels

Responses:

  • 200 OK

      {
          "data": [
              {
                  "type": "wheel_positions",
                  "id": "LEFT",
                  "attributes": {
                      "verbose": "left"
                  }
              },
              {
                  "type": "wheel_positions",
                  "id": "RIGHT",
                  "attributes": {
                      "verbose": "right"
                  }
              }
          ]
      }
    

Transmission types

The list of supported transmission types.

  • GET /enums/transmissions

Responses:

  • 200 OK

      {
      "data": [
          {
              "type": "transmission_types",
              "id": "AUTOMATIC",
              "attributes": {
                  "verbose": "Automatic"
              }
          },
          {
              "type": "transmission_types",
              "id": "MANUAL_GEARBOX",
              "attributes": {
                  "verbose": "Manual"
              }
          }
      ]
    }
    

results matching ""

    No results matching ""