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": "ed83e604-f228-4a3c-8b17-22472659784b", "Amount": 2.0, "MinAmount": 1.0 }, { "AuctionId": "ed83e604-f228-4a3c-8b17-22472659784b", "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>ed83e604-f228-4a3c-8b17-22472659784b</AuctionId> <MinAmount>1</MinAmount> </Bid> <Bid> <Amount>2</Amount> <AuctionId>ed83e604-f228-4a3c-8b17-22472659784b</AuctionId> <MinAmount>1</MinAmount> </Bid> </Bids> </BidRequest>
application/x-www-form-urlencoded
Sample:
Bids[0][AuctionId]=ed83e604-f228-4a3c-8b17-22472659784b&Bids[0][Amount]=2&Bids[0][MinAmount]=1&Bids[1][AuctionId]=ed83e604-f228-4a3c-8b17-22472659784b&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": "bba1d59b-5f79-4a5d-bc47-e4d3799bcd85", "AuctionId": "ef5c0059-7737-42f2-8d61-7639cc806bcc", "Amount": 3.0, "MinAmount": 1.0 }, { "Id": "bba1d59b-5f79-4a5d-bc47-e4d3799bcd85", "AuctionId": "ef5c0059-7737-42f2-8d61-7639cc806bcc", "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>ef5c0059-7737-42f2-8d61-7639cc806bcc</AuctionId> <Id>bba1d59b-5f79-4a5d-bc47-e4d3799bcd85</Id> <MinAmount>1</MinAmount> </BidResponse> <BidResponse> <Amount>3</Amount> <AuctionId>ef5c0059-7737-42f2-8d61-7639cc806bcc</AuctionId> <Id>bba1d59b-5f79-4a5d-bc47-e4d3799bcd85</Id> <MinAmount>1</MinAmount> </BidResponse> </Payload> </ApiResultMakeBids>