NAV Navbar
shell
  • Auctionity API 0.0.1
  • Authenfication API
  • Auction API
  • Models
  • Errors
  • Auctionity API 0.0.1

    Authenfication API

    Login

    POST /login HTTP/1.1

    curl "https://api.auctionity.com/login" -d '{"email": "[email protected]", "password":"my-password"}' -H "Content-Type: application/json"
    
    {
      "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ",
      "expires_in": 86400,
      "token_type": "Bearer"
    }
    

    Request Parameters

    Name Type Description
    email *  String Email value
    password *  String Password value

    Response Data

    Name Type Description
    access_token String JWT token
    expires_in Integer Token life time
    token_type String Token type (Bearer)

    Signup

    POST /signup HTTP/1.1

    curl "https://api.auctionity.com/signup" -d '{"email": "[email protected]", "password":"my-password"}'
    -H "Content-Type: application/json"
    

    Parameters

    Name Type Description
    email *  String Email value
    password *  String Password value

    Change password

    POST /password/reset HTTP/1.1

    curl "https://api.auctionity.com/password/reset" -d '{"email": "[email protected]"}' -H "Content-Type: application/json"
    

    Parameters

    Name Type Description
    email *  String Email value

    Auction API

    Auctionity provides a simple API to integrate auctions into your site or application.

    Authorization

    Authorization: Bearer <accessToken>

    curl "api_endpoint_here" -H "Authorization: Bearer <accessToken>"
    

    Replace "accessToken" with a valid JWT Token

    Get Auctions

    GET /auction HTTP/1.1

    curl "https://api.auctionity.com/auction?id[]=0x0000000000000000000000000000000000000000000000000000000000000000&id[]=0x0000000000000000000000000000000000000000000000000000000000000001"
    
    {
      "auctions": [
        {
          "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "name": "My auction name",
          "amount": 100,
          "start_date": "2018-01-25T14:00:00.000Z",
          "end_date": "2018-01-26T14:00:00.000Z",
          "history": [
            {
              "id": "0x000000000000000000000000000000000000000000000000000000000000000d",
              "user_id": "16fd2706-8baf-433b-82eb-8c7fada847da",
              "amount": 100,
              "date": "2018-01-25T19:00:00.000Z"
            }
          ]
        },
        {
          "id": "0x0000000000000000000000000000000000000000000000000000000000000001",
          "name": "Awesome Auction",
          "amount": 42,
          "start_date": "2018-01-25T14:00:00.000Z",
          "end_date": "2018-01-26T14:00:00.000Z",
          "history": []
        }
      ],
      "total": 2,
    }
    

    Parameters

    Name Type Description Default
    id *  Array[String] Auctions id values
    field String Column value: name / created_at / start_at / end_at created_at
    order String DESC or ASC DESC

    Response Data

    Name Type Description
    auctions Array[Auction] Auction list
    total Integer Number of auctions

    🔒 Create an Auction

    POST /auction HTTP/1.1

    curl "https://api.auctionity.com/auction" -H "Authorization: Bearer <accessToken>" -H "Content-Type: application/json" -d
    '{
      "name": "My Auction",
      "base_amount": 150,
      "currency": "DRT",
      "start_at": "2018-01-25T14:00:00.000Z",
      "end_at": "2018-05-02T12:05:30.000Z"
    }'
    
    {
      "id": "0x0000000000000000000000000000000000000000000000000000000000000000"
    }
    

    Parameters

    Name Type Description Default
    name *  String Name of auction
    base_amount *  Integer Base amount of auction
    start_at *  String Auction start date
    end_at *  String Auction end date
    currency String Currency of auction DRT

    Response Data

    Name Type Description
    id String Auction transaction id

    🔒 Get User Auctions

    GET /user/auction HTTP/1.1

    curl "https://api.auctionity.com/user/auction?field=amount&order=DESC" -H "Authorization: Bearer <accessToken>"
    
    {
      "auctions": [
        {
          "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
          "name": "My auction name",
          "amount": 100,
          "start_date": "2018-01-25T14:00:00.000Z",
          "end_date": "2018-01-26T14:00:00.000Z",
          "history": [
            {
              "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
              "user_id": "16fd2706-8baf-433b-82eb-8c7fada847da",
              "amount": 100,
              "date": "2018-01-25T19:00:00.000Z"
            }
          ]
        }
      ],
      "total": 1
    }
    

    Parameters

    Name | Type | Description | Default --- | --- | --- | field | String | Column value: name / created_at / start_at / end_at | created_at order | String | DESC or ASC | DESC page | String | Pagination page | 1 per_page | Integer | Number auction per page | 20

    Response Data

    Name Type Description
    auctions Array[Auction] Auction list
    total Integer Number of auctions

    🔒 Make a bid

    POST /bid HTTP/1.1

    curl "https://api.auctionity.com/bid" -d '{"auction_id": "0x0000000000000000000000000000000000000000000000000000000000000000", "amount":150}'
      -H "Authorization: Bearer <accessToken>" -H "Content-Type: application/json"
    
    {
      "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "user_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
    }
    

    Parameters

    Name Type Description
    id *  String Auction id
    amount *  Integer Bid amount

    Response Data

    Name Type Description
    id String Bid transaction id
    user_id String Bid creator user id

    🔒 Get winner info

    GET /auction/winner/info HTTP/1.1

    curl "https://api.auctionity.com/auction/winner/info?id=0x0000000000000000000000000000000000000000000000000000000000000000"
      -H "Authorization: Bearer <accessToken>"
    
    {
      "email": "[email protected]"
    }
    

    Parameters

    Name Type Description
    id *  String Auction id (you must to be the auction creator)

    Response Data

    Name Type Description
    email String Email of the auction winner

    Models

    Auction

    {
        "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "name": "Auction Name",
        "amount": 42,
        "start_date": "2018-01-25T14:00:00.000Z",
        "end_date": "2018-01-26T17:00:00.000Z",
        "history": [
            {
                "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
                "user_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
                "amount": 42,
                "date": "2018-01-25T14:42:42.000Z"
            }
        ]
    }
    

    Fields

    Name Type Format
    id String Ethereum transaction hash
    name String
    amount Integer
    start_date Date ISO8601
    end_date Date ISO8601
    history Array[Bid]

    Bid

    {
        "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "user_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
        "amount": 42,
        "date": "2018-01-25T14:00:00.000Z"
    }
    

    Fields

    Name Type Format
    id String Ethereum transaction hash
    user_id String uuid
    amount Integer
    date String ISO8601

    Errors

    The Auctionity API uses the following error codes:

    Error Code Meaning
    400 Bad Request -- Your request is invalid.
    401 Unauthorized -- Your JWT is wrong or missing.
    403 Forbidden -- Wrong email or password.
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.