Enums

  • supported currencies: USD, EUR, GEL, UAH, BTC
  • supported locales: en, gl, uk, ru

Other enums (e.g., list of makers, fuel type, etc) are returned by horizon from /enums group of endpoints.

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"
              }
          }
      ]
    }
    

Ping

Used for checking connection with horizon, getting network passphrase used for signing transactions (the passphrase is used to generate the network hash — unique network identifier).

Request:

  • GET /

Responses:

  • 200 OK

      {
          "data": null,
          "meta": {
              "current_time": 1529404960,
              "network_passphrase": "eAuction Stage Network ; June 2016",
              "platforms": [
                  "GBNU5BACDP6WSVB2NOURR5AZWQDAU4WOPELQSEI4QRQKDDOL4WWABN2S"
              ]
          }
      }
    

Submit transaction

Submits a transaction to the shelf network.

Field Description
tx base64 encoded transaction envelope

Request:

  • POST /transactions

      {
          "data": {
              "type": "transactions",
              "attributes": {
                  "tx": "AAAAAFtOhAIb/WlUOmupGPQZyVtJk..."
              }
          }
      }
    

Responses:

  • 200 OK:
{
    "data": null,
    "meta": {
        "envelope_xdr": "AAAAAFtOhAIb/WlUOmupGPQZyVtJk...",
        "hash": "191e3414633f9ef621ac952e75bd217a223d83195d3f48789b59bf9747c4a760",
        "ledger": 24289,
        "result_meta_xdr": "AAAAAAAAAAEAAAABAAAAAAAAXuEAAAAAA+WsAAAAAAA=...",
        "result_xdr": "AAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA"
    }
}
  • 400 Bad Request Core rejected transaction. Look auction-xdr for details.

Create account

Creates a new account.

Field Description
account_type required: account type, one of (user, admin, broker)
platform_id required: account id of the platform that should host an account
first_name required: UTF-8 string (up to 30 symbols)
last_name required: UTF-8 string (up to 30 symbols)
email required: email
password required: account password
broker_cities required for account_type=broker array of city ids represented as strings
phone_number phone number in an international format (e.g. +380991234567)
facebook_token facebook token
telegram_token telegram token
avatar_link link to an account's avatar
country ISO 3166-1 Alpha 3 country code
country_id identity-svc country id
city UTF-8 string (up to 30 symbols)
city_id identity-svc city id
region UTF-8 string (up to 30 symbols)
address UTF-8 string (up to 100 symbols)
company UTF-8 string (up to 30 symbols)
currency One of supported currencies that a user has chosen as default for their account
locale One of supported localization preferences that a user has chosen for their account

Request:

  • POST /accounts
  • Body:

      {
        "data": {
                  "type": "accounts",
                  "id": "GALUVYZFWNW6BMUMGYDVGBL5VG2WRWOKAUVJL6R6JRLHPFYGN44CC46B",
                  "attributes": {
                    "account_type": "user",
                    "platform_id": "GAKW6QSW3JKSZQJZ2TJD66EJHEVOF7Z72GCBKMUMNMV3GUTIFPVD6KDY",
                    "first_name" : "Taras",
                    "last_name" : "Shevchenko",
                    "email" : "shevchenko@gmail.com",
                    "password": "asadf324dasf32",
                    "phone_number": "+380639857604",
                    "avatar_link" : "some.link/avatar",
                    "country": "GEO",
                    "country_id": 1,
                    "city": "Tbilisi",
                    "city_id": 2,
                    "address": "address string",
                    "company": "company name",
                    "currency": "GEL",
                    "locale": "gl"
                  }
                }
      }
    

Responses:

  • 201 Created

          {
            "data": {
                      "type": "accounts",
                      "id": "GALUVYZFWNW6BMUMGYDVGBL5VG2WRWOKAUVJL6R6JRLHPFYGN44CC46B",
                      "attributes": {
                        "account_type": "user",
                        "platform_id": "GAKW6QSW3JKSZQJZ2TJD66EJHEVOF7Z72GCBKMUMNMV3GUTIFPVD6KDY",
                        "first_name" : "Taras",
                        "last_name" : "Shevchenko",
                        "email" : "shevchenko@gmail.com",
                        "email_verified": false,
                        "phone_number": "+380639857604",
                        "phone_verified": false,
                        "avatar_link" : "some.link/avatar",
                        "country": "GEO",
                        "country_id": 1,
                        "city": "Tbilisi",
                        "city_id": 2,
                        "address": "address string",
                        "company": "company name",
                        "currency": "GEL",
                        "locale": "gl"
                      }
                    }
          }
    
  • 400 Bad Request One of the request fields is malformed or not given.

  • 409 Conflict Such email or account id already exists.

  • 403 Forbidden Signing account is not allowed to create this account type.

Get account

Returns account by its id.

Attribute Description
account_type account_type (1-4)
account_type_str string representation of account_type, either user or admin or platform
platform_id account id of the platform that should host the account
first_name UTF-8 string (up to 30 symbols)
last_name UTF-8 string (up to 30 symbols)
email account's email
email_verified does account's email is verified (true or false)
phone_number phone number in an international format (e.g. `+380991234567')
phone_verified whether the account's phone number is verified or not (true or false)
avatar_link link to the account's avatar
country ISO 3166-1 Alpha 3 country code
city UTF-8 string (up to 30 symbols)
address UTF-8 string (up to 100 symbols)
company UTF-8 string (up to 30 symbols)
currency One of supported currencies that a user has chosen as default for their account
locale One of supported localization preferences that a user has chosen for their account
created_at account creation timestamp in RFC3339
updated_at last update timestamp in RFC3339

Request:

  • GET /accounts/{account-id}

Responses:

  • 200 OK

      {
        "data": {
          "type": "accounts",
          "id": "GDVSS53JF4FVGPW23JRWHD53E6A6ETD5WC4XB6ID4TFMSDBNCVRCWZKA",
          "attributes": {
            "account_type": 4,
            "account_type_str": "user",
            "avatar_link": "https://shelf-dev-docs.s3-eu-west-1.amazonaws.com/3e7dac013bcec257fa418123",
            "created_at": "2019-02-25T17:13:17Z",
            "currency": "UAH",
            "details": null,
            "email": "tester2050@i.ua",
            "email_verified": false,
            "first_name": "Riki",
            "last_name": "mor",
            "locale": "uk",
            "phone_number": "+380631234567",
            "phone_verified": true,
            "platform_id": "GCMOLEUTUT32Q2KIY4OPUECDF6SL3PH4EMBNNEFJ32PGUGH7X6KLVHZC",
            "updated_at": "2019-03-25T18:34:09Z"
          }
        }
      }
    
  • 404 Not Found account with such account-id not found.

Update account

Update account fields.

Field Description
first_name UTF-8 string (up to 30 symbols)
last_name UTF-8 string (up to 30 symbols)
avatar_link link to account's avatar
country ISO 3166-1 Alpha 3 country code
city UTF-8 string (up to 30 symbols)
address UTF-8 string (up to 100 symbols)
company UTF-8 string (up to 30 symbols)
currency One of supported currencies that a user has chosen as default for their account
locale One of supported localization preferences that a user has chosen for their account

Request:

  • PATCH /accounts/{account-id}

      {
        "data": {
                  "type": "accounts",
                  "id": "GDR46PBKNZCTCGMQRNHB4WITFUQR363LW4UJ67PPPVK6ANVYUCG4GL35",
                  "attributes": {
                    "locale": "ru",
                    "currency": "USD",
                    "country" : "...",
                    "city" : "...",
                    "address" : "...",
                    "company" : "...",
                    "first_name" : "...",
                    "last_name" : "...",
                    "avatar_link" : "...",
                  }
                }
      }
    

Responses:

  • 200 OK

  • 400 Bad Request One of the fields is malformed.

  • 403 Forbidden Signing account is not allowed to update target account.

  • 404 Not Found Account not found.

Verify account's phone number

Verify phone number of an account.

Field Description
id account id to verify
token phone verification token

Request:

  • PATCH accounts/verification/phone
  • Body:
    {
    "data": {
      "type": "accounts",
      "id": "GAYPLNP7J43G3BO77HN3DDJN57QRRISLW4GZFZM2PATJ6IGECT7XGSBB",
      "attributes": {
        "token": "123456"
      }
    }
    }
    

Responses:

  • 200 OK

      {
        "data": {
          "type": "accounts",
          "id": "GALUVYZFWNW6BMUMGYDVGBL5VG2WRWOKAUVJL6R6JRLHPFYGN44CC46B",
          "attributes": {
            "account_type": 4,
            "currency": "BTC",
            "email": "dsadsadas@ukr.net",
            "email_verified": false,
            "flags": 0,
            "locale": "en",
            "phone_number": "+995631936331",
            "phone_verified": true,
            "platform_id": "GAKW6QSW3JKSZQJZ2TJD66EJHEVOF7Z72GCBKMUMNMV3GUTIFPVD6KDY"
          }
        }
      }
    
  • 400 Bad Request One of the request's fields is malformed.
  • 401 Unauthorized Token is invalid.
  • 404 Not Found Account not found.

Verify account email

Verify email of an account.

Field Description
id account id to verify
token email verification token

Request:

  • PATCH accounts/verification/email
  • Body:
      {
        "data": {
                    "type": "accounts",
                    "id": "GAYPLNP7J43G3BO77HN3DDJN57QRRISLW4GZFZM2PATJ6IGECT7XGSBB",
                    "attributes": {
                        "token": "VUYrGIgSSzLTNjatmoXx"
                    }
                }
      }
    

Responses:

  • 200 OK

        {
          "data": {
              "type": "accounts",
              "id": "GALUVYZFWNW6BMUMGYDVGBL5VG2WRWOKAUVJL6R6JRLHPFYGN44CC46B",
              "attributes": {
                  "account_type": 4,
                  "currency": "BTC",
                  "email": "dsadsadas@ukr.net",
                  "email_verified": true,
                  "flags": 0,
                  "locale": "en",
                  "phone_number": "995631936331",
                  "phone_verified": true,
                  "platform_id": "GAKW6QSW3JKSZQJZ2TJD66EJHEVOF7Z72GCBKMUMNMV3GUTIFPVD6KDY"
              }
          }
      }
    
  • 400 Bad Request One of the request's fields is malformed.

  • 401 Unauthorized Token is invalid.
  • 404 Not Found Account not found.

Resend verification tokens

Send phone/email verification tokens again.

Field Description
account_id target account id
receiver array of token types to send (email, phone)

Request:

  • GET /accounts/verification/resend?account_id=GAYPLNP7J43G3BO77HN3DDJN57QRRISLW4GZFZM2PATJ6IGECT7XGSBB&receiver=phone,email

Responses:

  • 204 No Content
  • 400 Bad Request One of the request's fields is malformed.
  • 404 Not Found Account not found.

Add a lot to the watchlist

Add a lot to the watchlist.

Field Description
id lot id

Request:

  • POST /accounts/{account-id}/stars
  • Body:
      {
          "data": {
            "type": "lots",
            "id": "6"
          }
      }
    

Responses:

  • 201 Created

      {
        "data": {
            "type": "lots",
            "id": "6",
            "attributes": {
                "account_id": "GBFSW4P2RQBWXNQAPC53KV6XYHT7HYZCH7A3WEFCH3YMR23KVPB5YDNL"
            }
        }
      }
    
  • 400 Bad Request One of the request fields is malformed.

  • 409 Conflict The lot is already in account's watchlist.

Remove a lot from the watchlist

Remove a lot from the watchlist.

Request:

  • DELETE /accounts/{account-id}/stars/{lot-id}

Responses:

  • 204 No content
  • 400 Bad Request One of the request fields is malformed.
  • 404 Not Found The lot is not in account's watchlist.

Create a lot

Create a new lot. 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
details required: object with a vehicle description
b_to_b_vehicle_price B2B vehicle price
b_to_c_vehicle_price B2C vehicle price
b_to_c_total price B2C total price
start_time lot start time in seconds since POSIX epoch
duration sale duration

Lot details description

Field Description
country ISO 3166-1 Alpha 3 country code of the lot location
city city of the lot location
year year of manufacturing
color vehicle color
maker vehicle maker
model vehicle model
notes vehicle description
wheel wheel location, either left or right
lot_name lot name (year maker model)
vin_code vehicle identification number
fuel_type fuel type
registered whether or not a vehicle is registered (true or false)
hd_img_links array of links to high resolution vehicle images
full_img_links array of links to vehicle images
transmission transmission type
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)

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
  • Body:

      {
        "data": {
          "type": "lots",
          "attributes": {
            "type": "no_auction",
            "details": {
              "city": "",
              "year": 2019,
              "color": "black",
              "maker": "BENTLEY",
              "model": "Continental",
              "notes": "",
              "wheel": "left",
              "country": "USA",
              "lot_name": "2019 BENTLEY Continental",
              "vin_code": "",
              "fuel_type": "Plugin Hybrid",
              "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": "0.00",
            "b2b_vehicle_price": "10.00",
            "b2c_vehicle_price": "10.00",
            "b2c_total_price": "10.00",
            "min_step": "0.00",
            "max_step": "0.00",
            "start_time": 0,
            "duration": 3232
          }
        }
      }
    

Responses:

  • 204 No Content

  • 400 Bad Request one of the fields is malformed

Get lot

Returns a single lot by id.

Field Description
currency converts lot prices to one of supported currencies

Supported includes.

Include Description
participants lot participants
callbacks list of callbacks requested for this lot
platform account of a hosting platform
deposits list of deposits
winner_details winner details
organizer account of a lot creator
stars accounts that have added this lot to the watchlist
messages count of unread messages regarding this lot

Request:

  • GET /lots/{lot-id}

Responses:

  • 200 OK

      {
        "data": {
          "type": "lots",
          "id": "1538",
          "attributes": {
            "buy_now_price": "0.00",
            "buy_now_support": false,
            "created_at": "2018-09-26T19:45:27Z",
            "currency": "EUR",
            "deposit": "0.00",
            "details": {
              "body_style": "SEDAN 4D",
              "city": "ELGIN",
              "color": "GRAY",
              "country": "USA",
              "document_type": "IL - SALVAGE CERTIFICATE",
              "drive_type": "Front-wheel Drive",
              "engine_cylinders": "4",
              "engine_volume": 1.3,
              "fuel_type": "HYBRID ENGINE",
              "lot_name": "2012 NISSAN Micra",
              "maker": "NISSAN",
              "mileage_type": "ACTUAL",
              "model": "Micra",
              "notes": "Any additional information.",
              "odometer_value": 116589,
              "primary_damage": "REAR END",
              "retain_value": 655700,
              "secondary_damage": "",
              "state": "IL",
              "transmission": "AUTOMATIC",
              "vin_code": "YGG2YXD3UR5URJMXG",
              "wheel": "right",
              "year": 2012
            },
            "duration": "456876",
            "highest_bid": "0.00",
            "lot_state": 1,
            "lot_state_str": "lot_state_pending",
            "lot_type": 1,
            "lot_type_str": "lot_type_eng",
            "max_step": "316.00",
            "min_step": "142.00",
            "organizer_id": "GBZ23MX4GBC2LTGOXLDXTKEIPWRE6XB56QD2CT4KOCV3YKM7VZTHTO22",
            "publisher_id": "GBF5AAW3D6IVOYTJ37TRPDIRUXZ24UUTQ7UJY6AE62PCMV5RQ7J7H44B",
            "start_price": "1449.00",
            "start_time": "2018-09-26T19:45:27Z",
            "updated_at": "2018-09-26T19:45:27Z",
            "winner_id": ""
          },
          "relationships": {
            "callbacks": {
              "data": [
                {
                  "type": "callbacks",
                  "id": "GDLDZMSGVEVHV4IQ2SWSNAFFVWIZCKG74TJVMOAQYZY6OK33RYYZXKYL"
                }
              ]
            }
          }
        },
        "included": [
          {
            "type": "callbacks",
            "id": "GDLDZMSGVEVHV4IQ2SWSNAFFVWIZCKG74TJVMOAQYZY6OK33RYYZXKYL",
            "attributes": {
              "email": "mai0005@gmail.com",
              "first_name": "first_name",
              "last_name": "last_name",
              "lot_id": 1538,
              "phone_number": "+951171190413"
            }
          }
        ]
      }
    
  • 400 Bad Request One of the url parameters is malformed.

  • 404 Not Found Lot not found.

Get broker's contacts

Returns contacts of lot's organizer for direct sales created by user from the same platform as platform_id, broker/admin contacts from the region or list of all brokers available.

Field Description
filter[platform_id] platform (required)
filter[lot_id] lot id (optional)
filter[region] user's region (optional)

Request:

  • GET /brokers?filter[platform_id]=GANQKCCNRPDRO6MDARLWJFVQKO6JYXGBG6CC2UKPUU5M7C5TPX4D2EN3&filter[region]=Poltava Oblast

Responses:

  • 200 OK

    {
      "data": [
        {
          "type": "accounts",
          "id": "GAKUVHRKIBCDTU2MBG3GFRWOSDEP7ZUMMORQZT7OX3ZFZUK24Q2VYWRQ",
          "attributes": {
            "account_type": 6,
            "account_type_str": "broker",
            "created_at": "2019-07-19T17:07:46Z",
            "currency": "USD",
            "details": null,
            "email": "mail3@gmail.com",
            "email_verified": false,
            "facebook_token": "fb-token",
            "telegram_token": "tlgrm-token",
            "first_name": "test",
            "last_name": "user",
            "locale": "en",
            "phone_number": "+380661111113",
            "phone_verified": false,
            "platform_id": "GANQKCCNRPDRO6MDARLWJFVQKO6JYXGBG6CC2UKPUU5M7C5TPX4D2EN3",
            "region": "Poltava Oblast",
            "updated_at": "2019-07-19T17:07:46Z"
          }
        }
      ]
    }
    

Get admins

Returns contacts of the admins from the platform_id.

Field Description
filter[platform_id] platform (required)

Request:

  • GET /admins?filter[platform_id]=GANQKCCNRPDRO6MDARLWJFVQKO6JYXGBG6CC2UKPUU5M7C5TPX4D2EN3

Responses:

  • 200 OK

    {
      "data": [
        {
          "type": "accounts",
          "id": "GCK5SHQ4YDHTBRWA6YDE2KPDHAF3ZIMPSDATUXYQDXDWQTB42VVMCWA2",
          "attributes": {
            "account_type": 5,
            "account_type_str": "admin",
            "created_at": "2019-07-03T10:42:31Z",
            "currency": "USD",
            "details": null,
            "email": "admin-mail1@gmail.com",
            "email_verified": false,
            "first_name": "test",
            "last_name": "user",
            "locale": "en",
            "phone_number": "+380661111112",
            "phone_verified": false,
            "platform_id": "GANQKCCNRPDRO6MDARLWJFVQKO6JYXGBG6CC2UKPUU5M7C5TPX4D2EN3",
            "trusting_platforms": [
              "GAKEDLRHM7GQPUSQ3WUEDLI4GNZ3W32N5N5V2KXTUQ7PKF3XL5XVQGXQ"
            ],
            "updated_at": "2019-07-03T10:42:31Z"
          }
        }
      ]
    }
    

Index lots

Returns a list of lots that satisfy certain conditions.

Filters description.

Field Description
country ISO 3166-1 Alpha 3
city lot's city
stars_of returns lots that have been added to the watchlist by a particular account
in array of lot ids to return
vin array of vin codes
organizer_type filter lots by account type of their organizer (aka creator)
lot_type array of lot types, either eng or no_auction or copart oriaai
lot_state array of lot states, either pending or finished or sold
participant returns lots this account participates in
winner returns lots won by this account
not_winner returns lots that were not won by this account
wheel wheel position, either left or right
year year range (e.g. ?year=2012,2018)
engine_volume engine volume range (e.g ?engine_volume=1.6,2.0)
currency converts prices to one of supported currencies
price price range (e.g. ?price=2000,5000, meaning that the range is between 2 and 5 thousands units in a selected currency)
transmission transmission type. (e.g. ?transmission=automatic)
fuel array of fuel types. One or multiple: {cng, convertible, diesel, electric, gas, plugin_hybrid, hybrid, hydrogen, flexible, lpg}
maker vehicle maker (e.g. ?maker=BMW)
model model. (e.g. ?model=M3)
model_prefix search by model names that start with particular prefix (e.g ?model=GLS)
start_time auction start time. (e.g. ?start_time=1536166800)
trim_copart excludes copart lots in which start time < (now + given value) (e.g. ?trim_by_start_time=3600)
trim_iaai excludes iaai lots in which start time < (now + given value) (e.g. ?trim_by_start_time=3600)
time_period range of start_time (e.g ?time_period=1536166800,1536166900)
yard_number filters by the copart yard number (e.g. ?yard_number=313)
copart_status array of copart sale types, either one or multiple: {approval, pure, min} (e.g. ?copart_status=pure)
registered whether the lot customs are cleared{true, false}
deposit has deposit{true, false}
has_winner whether the lot has a winner {true, false}
has_callbacks whether the lot has callbacks {true, false}
has_requests whether the lot has pending requests {true, false}
has_participants return lots that have participants other than copart platform {true}
has_participants_from return lots that have participants from the specified platforms. (e.g. ?has_participants_from=GANQKCCNRPDRO6MDARLWJFVQKO6JYXGBG6CC2UKPUU5M7C5TPX4D2EN3,GDK6GUQ2E3U4AKCCE4MX76PK45M7QHTN2MTRKAIVLNBFNO5OUFXNTRMC)
is_finished filters lots by whether they are finished or not {true, false}
buy_now whether a lot supports the 'buy now' feature or not{true, false}
search search by vin, lot_id, copart_lot_id, and model. (e.g. ?search=KM4MP6727D1600115)
publisher lots hosted by a specific platform (e.g. ?publisher=GAKEDLRHM7GQPUSQ3WUEDLI4GNZ3W32N5N5V2KXTUQ7PKF3XL5XVQGXQ,GANQKCCNRPDRO6MDARLWJFVQKO6JYXGBG6CC2UKPUU5M7C5TPX4D2EN3)
direct_sale_publisher publisher filter, which is applied only to direct sales
organizer lot organizer id (e.g. ?organizer=GAKEDLRHM7GQPUSQ3WUEDLI4GNZ3W32N5N5V2KXTUQ7PKF3XL5XVQGXQ)
winner_account_type filters lots by the winner's account type (e.g. ?winner_account_type=platform)
invoice_sent returns lots with or without sent invoice {true, false}
invoice_paid returns lots with or without paid invoice {true, false}
tab admin panel tab, requires signature, one of {won, lost}

Sort keys. (default -start_time)

Key Description
start_time start time
time left start time + duration - now
price lot price
buy_now_price buy now price
created_at created at
updated_at updated at

Supported includes.

Same as lot includes

Request:

  • GET /lots?price=2000,10000&currency=USD?year=2012,&sort=-time_left

Responses:

  • 200 OK
{
  "data": [{
    "type": "lots",
    "id": "77000",
    "attributes": {
      "buy_now_price": "0.00",
      "buy_now_support": false,
      "deposit": "0.00",
      "details": {
        "body_style": "ROAD/STR",
        "city": "DALLAS",
        "color": "BLACK",
        "copart_lot_id": 40413028,
        "country": "USA",
        "document_type": "TX - SALVAGE VEHICLE TITLE",
        "drive_type": "",
        "engine_cylinders": "2",
        "engine_volume": 0,
        "fuel_type": "GAS",
        "full_img_links": ["https://cs.copart.com/v1/AUTH_svc.pdoc00001/PIX134/e7e45d77-b03f-48d1-880a-de6d434efda0.JPG", "..." ]
        "highlights": "RUNS AND DRIVES",
        "lot_link": "https://www.copart.com/lot/40413028",
        "lot_name": "2004 HARLEY-DAVIDSON FXSTD ",
        "maker": "HARLEY-DAVIDSON",
        "mileage_type": "EXEMPT",
        "model": "FXSTD",
        "odometer_value": 30768,
        "primary_damage": "ALL OVER",
        "retain_value": 933630,
        "sale_link": "https://www.copart.com/auctionDashboard?auctionDetails=313-",
        "sale_status": "Pure Sale",
        "secondary_damage": "",
        "state": "TX",
        "thumbnail_img_links": ["https://cs.copart.com/v1/AUTH_svc.pdoc00001/PIX134/38260336-6263-4935-af2d-8a7ebc926f3a.JPG","..."],
        "transmission": "MANUAL",
        "vin_code": "1HD1BSY154Y012920",
        "yard_number": 313,
        "year": 2004
      },
      "duration": "0",
      "lot_type": 2,
      "max_step": "0.00",
      "min_step": "0.00",
      "organizer_id": "GBLDFSF4GNDKZA6BZ2G5RRYBNJI2LQ5ELLWAE6WX3I2MSRPFSAEEVVKF",
      "publisher_id": "GBLDFSF4GNDKZA6BZ2G5RRYBNJI2LQ5ELLWAE6WX3I2MSRPFSAEEVVKF",
      "currency": "USD",
      "start_price": "0.00",
      "b2b_vehicle_price": "10.00",
      "b2c_vehicle_price": "10.00",
      "b2c_total_price": "10.00",
      "start_time": "1536166800",
      "winner_id": ""
    }
  }],
   "links": {
      "next": "/lots?page%5Bcursor%5D=16&page%5Blimit%5D=3&sort=-time_left",
      "prev": "/lots?page%5Bcursor%5D=4&page%5Blimit%5D=3&sort=time_left",
      "self": "/lots?sort=-time_left&page[limit]=3&page[cursor]=8"
    },
  "meta": {
    "on_page": 1
  }
}
  • 400 Bad Request one of the url parameters is malformed.

Count lots

For optimization, the total number of lots satisfying filters is returned from a separated endpoint.

Filters.
Same as index lots

Request:

  • GET /lots/count

Responses:

  • 200 OK

    {
        "data": {
            "type": "lots_count",
            "id": "39814"
        }
    }
    
  • 400 Bad Request One of url parameters is malformed.

Request participation

Participate in an auction.

Field Description
lot_id lot id
buy_now request buy now (true or false)

Request:

  • POST /lots/{lot-id}/participation_requests
  • Body:

      {
          "data": {
              "type": "participation_requests",
              "attributes": {
                  "lot_id": 621419,
                  "buy_now": false
              }
          }
      }
    

Responses:

  • 204 No Content
  • 400 Bad Request The lot is already finished or does not support buy now.
  • 403 Forbidden The lot owner cant participate.
  • 404 Not Found The lot is not found.
  • 409 Conflict The signing account is already participant.

Create bid

Create a bid on a lot.

Field Description
lot_id lot id
amount bid amount (string)
  • POST /lots/{lot-id}/bid_requests
  • Body:
{
    "data": {
        "type": "bid_requests",
        "attributes": {
            "lot_id": 621419,
            "amount": "1000.00"
        }
    }
}

Responses:

  • 204 Created
  • 400 Bad Request The lot is not active, amount is less than the previous bid or wrong bid step.
  • 403 Forbidden Signing account is not a participant. Participant have not payed deposit yet or is in rejected state.
  • 404 Not Found The lot is not found.
  • 409 Conflict Already has bid (max bid flow)

Request buy now

Request buy now.

Field Description
lot-id lot id
participant-account-id participant ACCOUNT ID

Request:

  • PATCH /v2/lots/{lot-id}/participants/{participant-account-id}
  • Body: empty

Responses:

  • 200 OK
  • 400 Bad Request One of the request fields is malformed or signing account is not a participant of the lot.
  • 404 Not Found Participant not found.

Index deposits

Get a list of deposits.

Field Description
state deposit state, either pending or paid or returned

Includes.

Include Description
participant lot's participant

Sorting keys.

Key Description
created_at deposit creation timestamp

Request:

  • GET /deposits?state=pending&sort=-created_at

Responses:

  • 200 OK

    {
    "data": [
      {
        "type": "deposits",
        "id": "1",
        "attributes": {
          "amount": "8.44",
          "created_at": "2019-03-06T13:46:39Z",
          "currency": "GEL",
          "participant_id": 186,
          "state": 1,
          "state_str": "pending",
          "updated_at": "2019-03-06T13:46:39Z"
        }
      },
      {
        "type": "deposits",
        "id": "2",
        "attributes": {
          "amount": "660.44",
          "created_at": "2019-03-06T13:46:39Z",
          "currency": "GEL",
          "participant_id": 1064,
          "state": 1,
          "state_str": "pending",
          "updated_at": "2019-03-06T13:46:39Z"
        }
      }
    ],
    "links": {
      "next": "/deposits?page%5Bcursor%5D=7&page%5Blimit%5D=10&sort=created_at",
      "prev": "/deposits?page%5Bcursor%5D=1&page%5Blimit%5D=10&sort=-created_at",
      "self": "/deposits"
    },
    "meta": {
      "on_page": 10
    }
    }
    
  • 400 Bad Request One of the request's fields is malformed.

Set deposit state

Approve or return deposit.

Field Description
state deposit state, either paid or returned

Request:

  • PATCH /deposits/{id}
  • Body:

      {
          "data": {
             "type": "deposits",
              "attributes" : {
                "state": "paid"
              }
          }
      }
    

Responses:

  • 200 OK

      {
          "data": {
              "type": "deposits",
              "id": "209529",
              "attributes": {
                  "account_id": "GDWF6Q7MAFWGJG2NFP75RESDKL33QUVPREP4MGSZ3BGS5BYWOHU3GJ2A",
                  "amount": 4267,
                  "currency": "GEL",
                  "state": 2,
                  "state_str": "paid"
              }
          }
      }
    
  • 400 Bad Request One of the request's fields is malformed.
  • 403 Forbidden Signing account is not allowed to manage the deposit.
  • 404 Not Found Deposit not found.

Choose winner

Choose winner/buy now winner of a lot.

Field Description
account_id participant ACCOUNT ID
buy_now is buy now winner (true or false)

Request:

  • POST /v2/lots/{lot-id}/winners
  • Body:

      {
          "data": {
              "type": "participants",
              "id" : 123,
              "attributes": {
                  "buy_now" : false,
                  "account_id": "GBJOEBMEGFPZB57MQMTMSS7KLMU7AI7OTWHFTLBQN3ELZ7UEV3USVF3L"
              }
          }
      }
    

Responses:

  • 200 OK
  • 400 Bad Request Participant with given id is not a participant of the lot. The lot is inactive or already has a winner.
  • 403 Forbidden Signing account does not have permissions to manage this participant.
  • 404 Not Found The participant is not found.

Reject participant

Reject a participant.

Request:

  • DELETE /v2/lots/{lot-id}/participants/{participant-account-id}

Responses:

  • 204 No Content
  • 400 Bad Request One of the request fields is malformed.
  • 403 Forbidden Signing account does not have permissions to manage this participant.
  • 404 Not Found The participant is not found.

Close lot

Mark lot as finished or sold.

Field Description
state deposit state, either sold or finished

Request:

  • POST /lots/closed

      {
          "data": {
              "type": "lots",
              "id": "3232",
              "attributes" : {
                "state" : "sold"
              }
          }
      }
    

Responses:

  • 200 OK
  • 400 Bad Request The lot is already closed. An attempt to mark the lot as sold when there are no participants with state winner/buy_now_winner. An attempt to mark the lot as finished when there is a participant with state winner/buy_now_winner.
  • 403 Forbidden Signing account does not have permissions to close this lot.
  • 404 Not Found The lot is not found.

Set winner details

Attach additional data for a winner, such as a link to the invoice id, transportation information, etc.

Field Description
id lot id
invoice_id document_id of invoice
invoice_paid whether the invoice amount is paid by a winner or not (true or false)
deal_canceled winner refused to pay (bool)
container_id id of a container (UTF-8 string, up to 100 symbols)
service_link service link
fee_amount fee amount
transportation_fee transportation fee
fee_currency currency of fee_amount and transportation_fee

Note: all fields are optional.

Request:

  • PUT /lots/{lot-id}/winner_details
  • Body:
      {
          "data": {
              "type": "winner_details",
              "id": "432",
              "attributes" : {
                "invoice_id" : "...",
                "invoice_paid" : true,
                "container_id" : "...",
                "service_link" : "...",
                "fee_amount" : 322,
                "fee_currency" : "USD"
              }
            }
      }
    

Responses:

  • 200 OK

      {
          "data": {
              "type": "winner_details",
              "id": "432",
              "attributes" : {
                "invoice_id" : "...",
                "invoice_paid" : true,
                "container_id" : "...",
                "service_link" : "...",
                "fee_amount" : 322,
                "fee_currency" : "BTC"
              }
            }
      }
    
  • 400 Bad Request One of request's fields is malformed.

  • 403 Forbidden Signing account is not allowed to set winner details for this lot.

Request callback

Request a callback from an admin.

Field Description
lot-id lot id

Request:

  • POST /lots/{lot-id}/callbacks
  • Body: empty

Responses:

  • 201 Created

      {
          "data": {
                  "type": "callbacks",
                  "id": "1538",
                  "attributes": {
                      "account_id": "GBZ23MX4GBC2LTGOXLDXTKEIPWRE6XB56QD2CT4KOCV3YKM7VZTHTO22"
                  }
              }
      }
    
  • 400 Bad Request One of the request fields is malformed.
  • 401 Unauthorized Request has no signature.
  • 404 Not Found Source account not found.
  • 409 Conflict The callback is already requested.

Delete callback

Remove processed callback.

Field Description
lot-id lot id
account-id account id
  • DELETE /lots/{lot-id}/callbacks/{account-id}

Responses:

  • 204 No content
  • 400 Bad Request One of the request fields is malformed.
  • 404 Not Found The callback is not found.

Send message

Send message to a lot organizer or respond to a user.

Field Description
sender account id of the message sender
receiver account id of the message receiver
lot_id id of a lot that is being discussed
text text of the message

Request:

  • POST /messages
  • Body:

      {
          "data": {
              "type": "messages",
              "attributes": {
                  "sender" : "GANQKCCNRPDRO6MDARLWJFVQKO6JYXGBG6CC2UKPUU5M7C5TPX4D2EN3",
                  "receiver" : "GAKEDLRHM7GQPUSQ3WUEDLI4GNZ3W32N5N5V2KXTUQ7PKF3XL5XVQGXQ",
                  "lot_id": 621419,
                  "text" : "test"
              }
          }
      }
    

Responses:

  • 204 No Content
  • 400 Bad Request One of the request fields is malformed. Lot is not found.
  • 401 Unauthorized Request has no signature.
  • 403 Forbidden Signing account is not allowed to send message from sender.

Index messages

Get a list of messages.

Field Description
receivers array of receiver account ids
sender account id of a sender
lot_id id of a lot that is being discussed
platform array of platform ids that an admin can manage (relevant only for admins)
search full text search in the messages content

Supported includes.

Include Description
lot lot under discussion
members accounts of senders and receivers

Request:

  • GET /lots/{lot-id}/messages

Responses:

  • 200 OK

      {
        "data": [
          {
            "type": "messages",
            "id": "GBXZWVLTG7DPHY2BORT5SMX4SDJ7GPI72B5C22E2FDGS6KPV3JY6PJQC",
            "attributes": {
              "account_id": "GBFZQZQ5C6LOGBETSG4MCOHDLTZXMEOFPKJ5JEVF7NLXWRXGVK2ELOCA",
              "lot_id": "GCGSTJQDP6V73KEMOTJHM2O3TRGZD3SUXP4ELJMVDNNSXWH5KLJUTAJZ",
              "ref_message_id": "GD4S6SDSWKQLZMLBZDHSBOLDMQJNSFRTEQO6GK42KV36YASGFJ34XDUD",
              "text": "გამარჯობა, \n\nმანქანის საწყისი ფასია 21500 ევრო."
            }
          },
          {
            "type": "messages",
            "id": "GD4S6SDSWKQLZMLBZDHSBOLDMQJNSFRTEQO6GK42KV36YASGFJ34XDUD",
            "attributes": {
              "account_id": "GARW6EPFMK6PD252WCML4FENOPDPH3QQKXXYZZBI6PUZN2MOVJNXZV4Z",
              "lot_id": "GCGSTJQDP6V73KEMOTJHM2O3TRGZD3SUXP4ELJMVDNNSXWH5KLJUTAJZ",
              "ref_message_id": "GD4S6SDSWKQLZMLBZDHSBOLDMQJNSFRTEQO6GK42KV36YASGFJ34XDUD",
              "text": "ramdenia fasi\n"
            }
          }
        ],
        "links": {
          "first": "/messages?lot=GCGSTJQDP6V73KEMOTJHM2O3TRGZD3SUXP4ELJMVDNNSXWH5KLJUTAJZ&page%5Bnumber%5D=1&page%5Bsize%5D=10",
          "last": "/messages?lot=GCGSTJQDP6V73KEMOTJHM2O3TRGZD3SUXP4ELJMVDNNSXWH5KLJUTAJZ&page%5Bnumber%5D=1&page%5Bsize%5D=10",
          "self": "/messages?lot=GCGSTJQDP6V73KEMOTJHM2O3TRGZD3SUXP4ELJMVDNNSXWH5KLJUTAJZ"
        },
        "meta": {
          "on_page": 10,
          "total_items": 2
        }
      }
    
  • 400 Bad Request One of the request fields is malformed.

  • 401 Unauthorized Request has no signature.
  • 403 Forbidden Signing account is not allowed to view the messages.

Index dialogs

Get list of dialogs (tuple of sender, receiver, lot_id).

Field Description
receivers array of receiver account ids
with account id of the dialog companion
lot_id id of the lot that is being discussed

Supported includes.

Include Description
lot lot under discussion
members accounts of senders and receivers

Request:

  • GET /messages/dialogs

Responses:

  • 200 OK

          {
          "data": [
              {
                  "type": "dialogs",
                  "attributes": {
                      "lot_id": 12,
                      "with": "GCY67NYOUKSGHK3K56RGHYMU2KR5NW44VLTRKWMQWVN4JRZFOZRO4P5C",
                      "unread_messages": 2
                  }
              }
          ]
      }
    
  • 400 Bad Request One of the request fields is malformed.

  • 401 Unauthorized Request has no signature.
  • 403 Forbidden Signing account is not allowed to view dialogs.

Get count of unread messages

Get number of unread messages.

Field Description
receiver account id of a receiver
sender account id of a sender
lot_id id of a lot that is being discussed
platform platform of a sender
  • GET /messages/unread

Responses:

  • 200 OK

      {
          "data": {
              "type": "unread_messages",
              "attributes": {
                  "count": 1
              }
          }
      }
    
  • 400 Bad Request One of the request fields is malformed.
  • 401 Unauthorized Request has no signature.
  • 403 Forbidden Signing account is not allowed view the messages count.

Mark messages as read

Marks messages as read.

Field Description
receiver optional account id of a receiver
sender account id of a sender
lot_id id of the lot that is being discussed
  • PATCH /accounts/{account-id}/messages/

      {
        "data" : {
          "attributes" : {
            "receiver" : "...",
            "sender" : "GCCLLN3SEES2AMVDS7YZD2IKMTDF6ORJR2LDX5YJYEUPVRSEB5I4SGZG",
            "lot_id" : 2
          }
        }
      }
    

Responses:

  • 204 No Content
  • 400 Bad Request One of the request fields is malformed.
  • 401 Unauthorized Request has no signature.
  • 403 Forbidden Signing account is not allowed to mark messages as read.

Get reviewable request

Get a reviewable request by id. Currently, only create_lot requests are supported.

Field Description
currency converts price of create_lot request to one of supported currencies
  • GET /requests/{request-id}

Responses:

  • 200 OK

      {
        "data": {
          "type": "create_lot_requests",
          "id": "4232489",
          "attributes": {
            "buy_now_price": "0.00",
            "buy_now_support": true,
            "created_at": "2019-03-26T09:35:29Z",
            "currency": "USD",
            "deposit": "0.00",
            "details": {
              "city": "Tbilisi",
              "color": "black",
              "country": "GEO",
              "engine_volume": 3.3,
              "fuel_type": "Gasoline",
              "full_img_links": [
                "https://shelf-dev-docs.s3-eu-west-1.amazonaws.com/e03c82dfd8e12f8bfd825f39"
              ],
              "hd_img_links": [
                "https://shelf-dev-docs.s3-eu-west-1.amazonaws.com/65409b49f7637abf56d0a695.jpg"
              ],
              "lot_name": "2014 BMW 520",
              "maker": "BMW",
              "model": "520",
              "notes": "Test",
              "odometer_value": "50000",
              "registered": true,
              "transmission": "automatic",
              "vin_code": "WAUFFAFM0BA054191",
              "wheel": "left",
              "year": 2014,
              "youtube_link": ""
            },
            "duration": "2419200",
            "hash": "14ed7b55ec77a832a8080e34a02f66ad3e993722e12f71fc8138b04e7b73c9fc",
            "lot_id": 4232490,
            "lot_type": 0,
            "lot_type_str": "lot_type_no_auction",
            "max_step": "0.00",
            "min_step": "0.00",
            "organizer_id": "GB4VCACES775FR63LUQPRG7LJXUFLQVI4WPOWUDSFKYPRD2JIHAON5ER",
            "platform_id": "GCMOLEUTUT32Q2KIY4OPUECDF6SL3PH4EMBNNEFJ32PGUGH7X6KLVHZC",
            "reject_reason": "",
            "request_state": "pending",
            "requestor": "GB4VCACES775FR63LUQPRG7LJXUFLQVI4WPOWUDSFKYPRD2JIHAON5ER",
            "reviewer": "GCMOLEUTUT32Q2KIY4OPUECDF6SL3PH4EMBNNEFJ32PGUGH7X6KLVHZC",
            "start_price": "0.00",
            "start_time": "1970-01-01T00:00:00Z",
            "updated_at": "2019-03-26T09:35:29Z"
          }
        }
      }
    
  • 404 Not Found request not found.

Index reviewable requests

Get a list of reviewable requests.

Field Description
type required: currently, only lots is supported
requestor account id of a requestor
reviewer account id of a reviewer
state array of request states, either pending or approved or rejected or permanently_rejected or canceled
archived rejected, permanently_rejected, or an auction for the approved lot has just finished (true or false)
currency converts price of create_lot requests to one of supported currencies

Supported sorting keys.

Field Description
created_at created at
updated_at updated at

Request:

  • GET /requests?type=lots
  • GET /accounts/{account-id}/create_lot_requests

Responses:

  • 200 OK

          {
        "data": [{
          "type": "create_lot_request",
          "id": "109765",
          "attributes": {
            "buy_now_price": "6000.00",
            "buy_now_support": true,
            "created_at": "2018-08-16T10:53:54Z",
            "deposit": "0.00",
            "details": {
              "test": "test"
            },
            "duration": "200",
            "hash": "b20dce4071995031086528e0b3ed79679e34b983c83d776e83faf33ebcaaa364",
            "lot_id": 109766,
            "lot_type": "LotTypeLotTypeEng",
            "max_step": "1000.00",
            "min_step": "100.00",
            "organizer_id": "GBG24EV64BDSCYHAM6R57ISMUPLOCAMAWO6BL3JRQ7RLTMO5UXIDDBBD",
            "platform_id": "GCMTXAFIXSCRWCJTJ3NAHZNXBPT65JDQ3XAN4EVKFYAFALNBZUXTKOP3",
            "reject_reason": "",
            "request_state": "approved",
            "requestor": "GBG24EV64BDSCYHAM6R57ISMUPLOCAMAWO6BL3JRQ7RLTMO5UXIDDBBD",
            "reviewer": "GCMTXAFIXSCRWCJTJ3NAHZNXBPT65JDQ3XAN4EVKFYAFALNBZUXTKOP3",
            "start_price": "5555.00",
            "start_time": "2018-08-16T10:53:54Z",
            "updated_at": "2018-08-16T10:53:54Z"
          }
        }],
        "links": {
          "first": "/requests?page%5Bnumber%5D=1\u0026page%5Bsize%5D=10\u0026type=lots",
          "last": "/requests?page%5Bnumber%5D=1\u0026page%5Bsize%5D=10\u0026type=lots",
          "self": "/requests?type=lots"
        },
        "meta": {
          "on_page": 10,
          "total_items": 1
        }
      }
    
  • 400 Bad Request One of the request fields is malformed.

Review request

Review request.

Field Description
hash required: hash of the request body
state required: action to do; either approved or rejected or permanently_rejected
reject_reason reject reason

Request:

  • PATCH /requests/{request-id}
  • Body:

      {
          "data": {
              "type": "reviewable_requests",
              "id": "123",
              "attributes": {
                  "hash" : "20aefa4b93ee23c34285a95973bad373d593ea8916e6d7bd83e168a2b6b47cb6",
                  "state" : "rejected",
                  "reject_reason": "nope"
              }
          }
      }
    

Responses:

  • 200 OK
  • 400 Bad Request One of the request fields is malformed.
  • 401 Unauthorized Request has no signature.
  • 403 Forbidden Signing account is not allowed to review this request.
  • 404 Not Found Request not found or should be reviewed by another platform.

Cancel request

Cancel a lot creation request.

Request:

  • DELETE /requests/{request-id}

Responses:

  • 204 No Content
  • 400 Bad Request invalid request id.
  • 401 Unauthorized Request has no signature.
  • 403 Forbidden Signing account is not allowed to cancel this request.

Convert currency

Convert amount from one currency to another.

Field Description
from required: supported currencies
to required: supported currencies
amount amount with two decimal places precision

Request:

  • GET /convert?from=GEL&to=USD&amount=18000.00

Responses:

  • 200 OK

      {
          "data": {
              "type": "converted_currency",
              "attributes": {
                  "amount": "6289.65",
                  "currency": "USD"
              }
          }
      }
    
  • 400 Bad Request One of the request fields is malformed.

Convert currencies

Bulk version of the convert currency

  • POST /convert
  • Body:

          {
          "data": [
            {
              "attributes": {
                    "from" : "USD",
                    "to" : "GEL",
                    "amount": 123
                }
            },
            {
              "attributes": {
                    "from" : "BTC",
                    "to" : "USD",
                    "amount": 1
                }
            }
    
          ]
      }
    

Responses:

  • 200 OK

          {
          "data": [
              {
                  "type": "converted_currency",
                  "attributes": {
                      "amount": "334.59",
                      "currency": "GEL"
                  }
              },
              {
                  "type": "converted_currency",
                  "attributes": {
                      "amount": "6403.23",
                      "currency": "USD"
                  }
              }
          ]
      }
    
  • 400 Bad Request One of the request fields is malformed.

Administration endpoints

Protect master account

Add a signer to the root account. This method is being called only once, during the environment initialization. On this endpoint, Horizon accepts only local request.

Request:

  • POST /master/signers
  • Body:
      {
        "data": {
                    "type": "signers",
                    "id": "GCQRIHL3TR2HKVY7LQEWGQS5LWAGRO7XCZXKERU5CSAQXNPKC6PF57FC"
          }
      }
    

Responses:

  • 204 No Content

Create platform

Create a new platform.

Field Description
id required: account id of the platform
seed required: secret key of the master account
first_name UTF-8 string (up to 30 symbols)
last_name UTF-8 string (up to 30 symbols)
email email
phone_number phone number in an international format (e.g. `+380991234567')
avatar_link link to account's avatar
country ISO 3166-1 Alpha 3 country code
city UTF-8 string (up to 30 symbols)
address UTF-8 string (up to 100 symbols)
company UTF-8 string (up to 30 symbols)

Request:

  • POST /platforms
  • Body:

      {
        "data": {
                    "type": "accounts",
                    "id": "GCQRIHL3TR2HKVY7LQEWGQS5LWAGRO7XCZXKERU5CSAQXNPKC6PF57FC",
                    "attributes": {
                      "seed": "SD36I76AVTUI5TDKA3Y5TRX4MR7ZPLTBKHRLDSMYGHOQXPMV47SJYYMB",
                      "first_name" : "New",
                      "last_name" : "Platform",
                      "email" : "platform@gmail.com",
                      "phone_number": "+380639857111",
                      "avatar_link" : "some.link/avatar",
                      "country": "Ukraine",
                      "city": "Kharkiv",
                      "address" : "Sumska Str",
                      "company": "Company"
                  }
          }
      }
    

Responses:

  • 201 Created

          {
          "data": {
              "type": "accounts",
              "id": "GCQRIHL3TR2HKVY7LQEWGQS5LWAGRO7XCZXKERU5CSAQXNPKC6PF57FC",
              "attributes": {
                  "account_type": 2,
                  "account_type_str": "platform",
                  "created_at": "2019-03-20T10:56:43Z",
                  "details": null,
                  "email_verified": true,
                  "phone_verified": true,
                  "platform_id": "GCQRIHL3TR2HKVY7LQEWGQS5LWAGRO7XCZXKERU5CSAQXNPKC6PF57FC",
                  "updated_at": "2019-03-20T10:56:43Z"
              }
          }
      }
    
  • 400 Bad Request One of the request fields is malformed.

  • 403 Forbidden Can not sign this transaction with a given seed.
  • 409 Conflict Platform already exists.

results matching ""

    No results matching ""