Website logo

Buy an auction using Buy Now

Buys an item using Buy Now.

URL: https://api.trademe.co.nz/v1/Bidding/BuyNow.{file_format}
HTTP Method: POST
Requires Authentication? Yes
Permission Required: BiddingAndBuying: Place bids, and complete purchases using Buy Now & Fixed Price Offers.
Supported Formats: XML, JSON
Rate Limited? Yes

URL parameters

file_format Enumeration (required) The format of the response.
xml Serialize responses into XML.
json Serialize responses into JSON.

POST Data

<BuyNowRequest>

ListingId Long Integer (required)

The ID of the listing the Buy Now request is for.

ShippingOption Long Integer (required)

The ID of the preferred shipping option which will be used if the Buy Now request succeeds. This ID can be retrieved from the ShippingId field in the listing detail.

Quantity Integer (optional)

The quantity to buy. Defaults to 1. Only applicable to Buy Now Only auctions.

FirearmsLicence String (optional)

The user's firearms licence number. This is required for firearms purchases.

FirearmsLicenceHolder <FirearmsLicenceHolderDetails> (optional)

The user Enters First, Middle, and Last Names associated to the firearms licence.

FirstName String (required)

First name of Licence Holder. Required;

MiddleNames String (optional)

Middle Names of Licence Holder. Optional;

LastName String (required)

Last name of Licence Holder. Required;

IsBuyerOlderThan18 Boolean (optional)

The user agrees they are older than 18. This is required for wine purchases.

ReturnListingDetails Boolean (optional)

Indicates whether full listing details should be returned in the response.

ReferringSearchQueryId String (optional)

The search query ID for the search which referred the user to the listing.

Returns

<BuyNowResponse>

The details of the Buy Now request.

Success Boolean

Indicates whether the operation was successful.

Description String or null

The description of the error, if the operation failed.

StatusCode Enumeration

The status of the Buy Now request.

Success 0

The bid was a success.

None 1

The bid had some other error.

ReserveMet 2

The reserve was met.

ErrorAccountDisabled 3

The buyer account is disabled.

ReserveNotMet 4

The reserve was not met.

ErrorBadMemberDetails 5

Not a member.

ReserveMetAutoBidGreaterThanReserve 6

The auto bid was higher than the reserve.

ErrorHeavyQuarantine 7

Needs proof of goods.

ReserveMetAutoBidIncreased 8

The autobid was increased.

ReserveNotMetAutoBid 9

An autobid did not met the reserve.

ReserveMetExistingAutoBidGreaterThanBid 10

Someone else has a higher bid which mets the reserve.

ErrorOwnAuction 11

This is an auction owed by the member.

ReserveNotMetExistingAutoBidGreaterThanBid 12

Someone else has a higher bid and the reserve is not met.

ErrorBlacklisted 13

The member has been blacklisted by the seller.

ReserveMetExistingAutoBidEqualToBid 14

The reserve is met and the auto bids match.

ErrorAuthenticatedMembersOnlyAuction 15

The member needs to be authenticated to bid.

ReserveNotMetExistingAutoBidEqualToBid 16

The reserve is not met and the auto bids match.

ErrorAccountIndebt 17

The accountis in debt and can not bid.

ReserveMetAutoBid 18

The reserve is met by an auto bid.

ErrorBidTooHigh 19

The bid is too high for our rules.

ErrorBidLessThanMinimumNextBid 21

The bid is too low.

ErrorBidLessThanFiftyCents 23

Bid needs to be higher than 50c.

ErrorBidLessThanStartPrice 25

The bid must be greater than the start price.

ErrorTooManyBids 27

There have been too many bids from the member in the last 24 hours.

ErrorHasTopAutoBid 29

The member already has the top autobid.

ErrorAuctionClosed 30

The auction is closed.

ErrorDatabase 31

There was an error in the database.

ErrorListingAcceptsBuyNowOnly 34

Attempting to bid on a listing that can't be bidded on.

ErrorQuantityInvalid 35

Quantity is either less than 1 or greater than the maximum.

ErrorListingIsAClassified 36

Attempting to bid on a classified listing.

ErrorInvalidShipping 37

Invalid shipping ID.

ErrorInvalidFirearmsLicense 38

Invalid or missing firearms license number.

ErrorAgeConfirmationRequired 39

Age confirmation is required for this listing.

ErrorListingAcceptsPayNowOnly 40

Attempting to buy a listing that can only be paid for by pay now

ErrorBuyProcessBan 41

Attempting to bid or buy now when member has been purchase banned.

AutoBidDecreased 42

The autobid was decreased.

PurchaseId Long Integer

The ID of the purchase that was just made.

Listing <ListedItemDetail> or null

The state of the listing, after the Buy Now has successfully completed. This field is only present if the ReturnListingDetails parameter is true and the Buy Now operation was successful. This field will also be missing if there was an error retrieving the listing details. For more information on this field, see the documentation for the listing details API.

(This type is defined elsewhere)

Example XML Request (switch to JSON)

<BuyNowRequest xmlns="http://api.trademe.co.nz/v1">
  <ListingId>123</ListingId>
  <ShippingOption>123</ShippingOption>
  <Quantity>123</Quantity>
  <FirearmsLicence>ABC</FirearmsLicence>
  <FirearmsLicenceHolder>
    <FirstName>ABC</FirstName>
    <MiddleNames>ABC</MiddleNames>
    <LastName>ABC</LastName>
  </FirearmsLicenceHolder>
  <IsBuyerOlderThan18>false</IsBuyerOlderThan18>
  <ReturnListingDetails>false</ReturnListingDetails>
  <ReferringSearchQueryId>ABC</ReferringSearchQueryId>
</BuyNowRequest>

Example JSON Request (switch to XML)

{
  "ListingId": 123,
  "ShippingOption": 123,
  "Quantity": 123,
  "FirearmsLicence": "ABC",
  "FirearmsLicenceHolder": {
    "FirstName": "ABC",
    "MiddleNames": "ABC",
    "LastName": "ABC"
  },
  "IsBuyerOlderThan18": false,
  "ReturnListingDetails": false,
  "ReferringSearchQueryId": "ABC"
}

Example XML Response (switch to JSON)

<BuyNowResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <Description>ABC</Description>
  <StatusCode>Success</StatusCode>
  <PurchaseId>123</PurchaseId>
  <Listing> ... </Listing>
</BuyNowResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "Description": "ABC",
  "StatusCode": 0,
  "PurchaseId": 123,
  "Listing": { ... }
}