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": "6dc25c24-097f-4bcd-9b12-b5f80ed045af",
      "Amount": 2.0,
      "MinAmount": 1.0
    },
    {
      "AuctionId": "6dc25c24-097f-4bcd-9b12-b5f80ed045af",
      "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>6dc25c24-097f-4bcd-9b12-b5f80ed045af</AuctionId>
      <MinAmount>1</MinAmount>
    </Bid>
    <Bid>
      <Amount>2</Amount>
      <AuctionId>6dc25c24-097f-4bcd-9b12-b5f80ed045af</AuctionId>
      <MinAmount>1</MinAmount>
    </Bid>
  </Bids>
</BidRequest>

application/x-www-form-urlencoded

Sample:
Bids[0][AuctionId]=6dc25c24-097f-4bcd-9b12-b5f80ed045af&Bids[0][Amount]=2&Bids[0][MinAmount]=1&Bids[1][AuctionId]=6dc25c24-097f-4bcd-9b12-b5f80ed045af&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": "0cb87493-9a16-4ab6-9547-a2da4618abc5",
      "AuctionId": "c4e58b27-d788-45dc-8e74-9eeda63ae64e",
      "Amount": 3.0,
      "MinAmount": 1.0
    },
    {
      "Id": "0cb87493-9a16-4ab6-9547-a2da4618abc5",
      "AuctionId": "c4e58b27-d788-45dc-8e74-9eeda63ae64e",
      "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>c4e58b27-d788-45dc-8e74-9eeda63ae64e</AuctionId>
      <Id>0cb87493-9a16-4ab6-9547-a2da4618abc5</Id>
      <MinAmount>1</MinAmount>
    </BidResponse>
    <BidResponse>
      <Amount>3</Amount>
      <AuctionId>c4e58b27-d788-45dc-8e74-9eeda63ae64e</AuctionId>
      <Id>0cb87493-9a16-4ab6-9547-a2da4618abc5</Id>
      <MinAmount>1</MinAmount>
    </BidResponse>
  </Payload>
</ApiResultMakeBids>