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 specified400
– Too many items. Max items 100401
– User is not Authorized404
– Auction with specified ID is not found
Request Information
URI Parameters
None.
Body Parameters
BidRequestName | Description | Type | Additional information |
---|---|---|---|
Bids |
The bids to make. |
Collection of Bid |
Required |
Request Formats
application/json, text/json
Sample:
{ "Bids": [ { "AuctionId": "5a5b71ab-920d-4cd7-9777-d457ed2f682a", "Amount": 2.0, "MinAmount": 1.0 }, { "AuctionId": "5a5b71ab-920d-4cd7-9777-d457ed2f682a", "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>5a5b71ab-920d-4cd7-9777-d457ed2f682a</AuctionId> <MinAmount>1</MinAmount> </Bid> <Bid> <Amount>2</Amount> <AuctionId>5a5b71ab-920d-4cd7-9777-d457ed2f682a</AuctionId> <MinAmount>1</MinAmount> </Bid> </Bids> </BidRequest>
application/x-www-form-urlencoded
Sample:
Bids[0][AuctionId]=5a5b71ab-920d-4cd7-9777-d457ed2f682a&Bids[0][Amount]=2&Bids[0][MinAmount]=1&Bids[1][AuctionId]=5a5b71ab-920d-4cd7-9777-d457ed2f682a&Bids[1][Amount]=2&Bids[1][MinAmount]=1
Response Information
Resource Description
Makes bid(s) into specified auction(s).
ApiResultMakeBidsName | Description | Type | Additional 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.
|
boolean |
Required |
Errors |
Error(s) accociated with the API request. |
Collection of ApiError |
None. |
Response Formats
application/json, text/json
Sample:
{ "Payload": [ { "Id": "a3ec3b6c-2c17-433a-bbd7-fdec73a6ecf7", "AuctionId": "aca19fed-a2fc-485c-8ae8-8f0e9a43fe5d", "Amount": 3.0, "MinAmount": 1.0 }, { "Id": "a3ec3b6c-2c17-433a-bbd7-fdec73a6ecf7", "AuctionId": "aca19fed-a2fc-485c-8ae8-8f0e9a43fe5d", "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>aca19fed-a2fc-485c-8ae8-8f0e9a43fe5d</AuctionId> <Id>a3ec3b6c-2c17-433a-bbd7-fdec73a6ecf7</Id> <MinAmount>1</MinAmount> </BidResponse> <BidResponse> <Amount>3</Amount> <AuctionId>aca19fed-a2fc-485c-8ae8-8f0e9a43fe5d</AuctionId> <Id>a3ec3b6c-2c17-433a-bbd7-fdec73a6ecf7</Id> <MinAmount>1</MinAmount> </BidResponse> </Payload> </ApiResultMakeBids>