POST api/v1/bid

Makes bid(s) into specified auction(s).

Requires authorization!

Requires scope BidsEdit

Response Codes

  • 202 - Successfully accepted the bid(s). It may take some time until the bid requests are created. It will take more time until the actual bid(s) are made for the Auction(s).
  • 400 - No bids specified
  • 400 - Too many items. Max items 100
  • 401 - User is not Authorized
  • 404 - Auction with specified ID is not found

Request Information

URI Parameters

None.

Body Parameters

BidRequest
NameDescriptionTypeAdditional information
Bids

The bids to make.

Collection of Bid

Required

Request Formats

application/json, text/json

Sample:
{
  "Bids": [
    {
      "AuctionId": "f715fbed-a42e-4a30-aab3-7d179a92372c",
      "Amount": 2.0,
      "MinAmount": 1.0
    },
    {
      "AuctionId": "f715fbed-a42e-4a30-aab3-7d179a92372c",
      "Amount": 2.0,
      "MinAmount": 1.0
    }
  ]
}

application/xml, text/xml

Sample:
<BidRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Sobralaen.Api.Models">
  <Bids>
    <Bid>
      <Amount>2</Amount>
      <AuctionId>f715fbed-a42e-4a30-aab3-7d179a92372c</AuctionId>
      <MinAmount>1</MinAmount>
    </Bid>
    <Bid>
      <Amount>2</Amount>
      <AuctionId>f715fbed-a42e-4a30-aab3-7d179a92372c</AuctionId>
      <MinAmount>1</MinAmount>
    </Bid>
  </Bids>
</BidRequest>

application/x-www-form-urlencoded

Sample:
Bids[0][AuctionId]=f715fbed-a42e-4a30-aab3-7d179a92372c&Bids[0][Amount]=2&Bids[0][MinAmount]=1&Bids[1][AuctionId]=f715fbed-a42e-4a30-aab3-7d179a92372c&Bids[1][Amount]=2&Bids[1][MinAmount]=1

Response Information

Resource Description

Makes bid(s) into specified auction(s).

ApiResultMakeBids
NameDescriptionTypeAdditional information
Payload

The payload of the response. Type depends on the API request.

Collection of BidResponse

None.

Success

Indicates if the request was successfull or not. true if the request was handled successfully, false otherwise.

boolean

Required

Errors

Error(s) accociated with the API request.

Collection of ApiError

None.

Response Formats

application/json, text/json

Sample:
{
  "Payload": [
    {
      "Id": "719fb8b7-a82d-43b4-9765-daee07e6898f",
      "AuctionId": "55b7d8da-03ae-47b2-a7fb-25ee5fd8dc83",
      "Amount": 3.0,
      "MinAmount": 1.0
    },
    {
      "Id": "719fb8b7-a82d-43b4-9765-daee07e6898f",
      "AuctionId": "55b7d8da-03ae-47b2-a7fb-25ee5fd8dc83",
      "Amount": 3.0,
      "MinAmount": 1.0
    }
  ],
  "Success": true,
  "Errors": [
    {
      "Code": 1,
      "Message": "sample string-2",
      "Details": "sample string-3"
    },
    {
      "Code": 1,
      "Message": "sample string-2",
      "Details": "sample string-3"
    }
  ]
}

application/xml, text/xml

Sample:
<ApiResultMakeBids xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Sobralaen.Api.Models">
  <Errors>
    <ApiError>
      <Code>1</Code>
      <Details>sample string-3</Details>
      <Message>sample string-2</Message>
    </ApiError>
    <ApiError>
      <Code>1</Code>
      <Details>sample string-3</Details>
      <Message>sample string-2</Message>
    </ApiError>
  </Errors>
  <Success>true</Success>
  <Payload>
    <BidResponse>
      <Amount>3</Amount>
      <AuctionId>55b7d8da-03ae-47b2-a7fb-25ee5fd8dc83</AuctionId>
      <Id>719fb8b7-a82d-43b4-9765-daee07e6898f</Id>
      <MinAmount>1</MinAmount>
    </BidResponse>
    <BidResponse>
      <Amount>3</Amount>
      <AuctionId>55b7d8da-03ae-47b2-a7fb-25ee5fd8dc83</AuctionId>
      <Id>719fb8b7-a82d-43b4-9765-daee07e6898f</Id>
      <MinAmount>1</MinAmount>
    </BidResponse>
  </Payload>
</ApiResultMakeBids>