Skip to main content

Overview

The auction system allows users to bid on auction products. Auction products have start and end dates, and users can place bids during the active auction period.

Get Auction Products

Query Parameters

page
integer
default:"1"
Page number

Response

Returns paginated list of auction products that are currently active (between auction_start_date and auction_end_date).

Example

curl https://your-domain.com/api/v2/auction/products
If seller_auction_product setting is disabled, only admin auction products are returned.

Get Auction Product Details

Path Parameters

id
integer
required
Auction product ID

Response

Detailed auction product information including:
  • Product details
  • Current highest bid
  • Bid history
  • Auction start and end dates
  • Product images and description

Example

curl https://your-domain.com/api/v2/auction/products/123

Place Bid

Request

product_id
integer
required
Auction product ID
amount
number
required
Bid amount (must be higher than current highest bid)

Response

{
  "result": true,
  "message": "Bid placed successfully",
  "bid_id": 456
}

Example

curl -X POST https://your-domain.com/api/v2/auction/place-bid \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "product_id": 123,
    "amount": 150.00
  }'
Bidding requirements:
  • User must be authenticated
  • Auction must be active (between start and end dates)
  • Bid amount must be higher than current highest bid
  • Bid amount must meet minimum increment requirements

Get Bided Products

Query Parameters

page
integer
default:"1"
Page number

Response

Returns paginated list of products where the authenticated user has placed bids, ordered by most recent bid first.

Example

curl -X GET https://your-domain.com/api/v2/auction/bided-products \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Get Purchase History

Query Parameters

payment_status
string
Filter by payment status: paid, unpaid
delivery_status
string
Filter by delivery status: pending, confirmed, picked_up, on_the_way, delivered, cancelled
page
integer
default:"1"
Page number

Response

Returns paginated list of orders containing auction products won by the user.

Example

curl -X GET "https://your-domain.com/api/v2/auction/purchase-history?payment_status=paid&delivery_status=delivered" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Auction Product Flow

1. Browse Auction Products

Users can browse active auction products using the /api/v2/auction/products endpoint.

2. View Product Details

Get detailed information about a specific auction product including current bid status.

3. Place Bid

Authenticated users can place bids on active auctions. Each bid must be higher than the current highest bid.

4. Win Auction

When the auction ends, the highest bidder wins the product.

5. Complete Purchase

The winning bidder can complete the purchase by adding the won product to their cart and checking out.

Important Notes

Auction products in cart:
  • Cannot be mixed with regular products
  • Quantity is always 1
  • Once added to cart, the same auction product cannot be added again
Auction product characteristics:
  • Has auction_product flag set to 1
  • Has auction_start_date timestamp
  • Has auction_end_date timestamp
  • Only active between start and end dates
  • May have minimum bid increment
  • Controlled by seller_auction_product system setting

Bid Response Structure

id
integer
Bid ID
product_id
integer
Auction product ID
user_id
integer
Bidder user ID
amount
number
Bid amount
created_at
string
Bid timestamp

Product Response Fields

Auction products include all standard product fields plus:
auction_product
integer
Auction flag (1 for auction products)
auction_start_date
integer
Auction start timestamp
auction_end_date
integer
Auction end timestamp
current_bid
number
Current highest bid amount
total_bids
integer
Total number of bids placed

Build docs developers (and LLMs) love