Introducing Auction API for the Product Auction App for Shopify.
Product Auction app helps merchants to run auctions on their stores. Then, customers visit the stores and place bids for the auction products.
Now, the merchants using the Product Auction app can get access to the Auction API via the app.
API stands for an Application programming interface. It is a set of tools and protocols that will help you building sync and much more.
Now, the Auction API Documentation includes POST & GET API methods.
POST Method of the API is where developers can interface with other APIs or systems to get the desired outcome. Moreover, it is more often utilized to create new resources.
Additionally, the GET Method of API is to read or retrieve a representation of a resource or information.
Let’s understand this in detail.
Then, get the base URL.
Base URL: sp-auction.webkul.com/product-auction-api
Use Of Auction API
Firstly, you need to understand exactly what actions you perform via the given APIs. Auction API lets you do the following functions:
For TOKEN:-
POST/api/user/refresh
-Create an access token using the refresh token.
NOTE:- POST requests are used to send data to the API server to create or update a resource. Also, the GET method is used to retrieve data from a server at the specified resource.
Then, proceed to check Auction API methods.
For AUCTION:-
POST/api/start/{auctionId}.json
-Start auction by auction ID
POST/api/stop/{auctionId}.json
-Stop auction by auction ID
Also, GET/api/auctions.json
-Get Auctions by Shop
POST/api/auctions.json
-Add Auction
GET/api/auctions/{id}.json
-Get Auctions by ID
Also,
GET/api/shop/auctions.json
-Get Auctions
and GET/api/shop/auction/{type}.json
-Get Products on Auction
also, GET/api/shop/auctions/running_bids_auction/{customerId}.json
-Get Running Bid Auctions
and GET/api/shop/auctions/loss_auction/{customerId}.json
-Get Lossing Auctions
also, GET/api/shop/auctions/winning_auction/{customerId}.json
-Get Winning Auctions
Also, GET/api/shop/auction/{auctionId}/start_bid.json
-Get Start Bid of Auctions
Then, comes the Bid API methods.
For BID:-
GET/api/shop/auction/bidding_list/{auctionId}.json
-Get Bidding List
POST/api/bids.json
-Place Bid
also, GET/api/shop/auction/{auctionId}/bid/{bidId}.json
-Get Bid Information
Then, comes the Configuration API methods.
For CONFIGURATION:-
GET/api/auction/configuration.json
-Get Configuration by the shop
Then, proceed to check the token properties.
Token Properties
access_token: This is the access token from product auction API credentials.
Then, refresh_token: This is the refresh token from product auction API credentials.
Auction Properties
auction_id: This is the auction ID, that’s used as a unique identifier for the auction.
Then, check start & stop auction API properties.
start_now: This is to start an auction immediately after creating using the auction ID.
also, stop_now: This is to stop an auction immediately using the auction ID.
Then, check the start & end auction API properties.
start_date: This is the start date of the auction in UTC.
also, end_date: This is the end date of the auction in UTC.
by_seller: 1 if the auction is created by seller else 0.
Then, check the properties for auction start & reserve prices.
start_price: This is the starting price of the auction, the price from where the bidding will start.
then, comes the target auction bidding price.
reserve_price: This is the reserve price for the auction. Also, the target auction bidding price where the product bidding should be reached.
Then, use the bid rule in JSON format.
bid_rule: This is used for bid rule in JSON format.
Then, check the proxy bidding.
proxy_bidding_on: It allows customers to make bids automatically on auction products.
also, popcorn_bidding: Dynamic bidding.
Popcorn Bidding, also known as Dynamic Bidding, is a way of giving the bidders who were outbid an opportunity to rebid. Know More
More…
Then, comes the Popcorn bidding cases:
extend_deadline_by: Minutes by which the auction deadline should be extended in case of popcorn bidding.
extend_deadline_within: Minutes within which the deadline should be extended before ending the auction in case of popcorn bidding.
Also, check the maximum popcorn bidding properties.
max_popcorn_bid: Maximum number of popcorn bidding allowed.
then, check the Booking Amount properties.
booking_amount: Configure the booking amount for the auction if the configuration is enabled.
Then, check the Joining Fee Properties.
joining_amount: It is the joining amount. The customer has to pay while joining the auctions.
About Joining Fee
Whenever a bidder wants to bid on the auction product, he/she first needs to pay the auction joining fee set by the admin.
So, this is the case when you want to charge a joining fee from customers before placing a bid.
Moreover, it will work only if the configuration is enabled.
buy_now_price: It is used to set the buy now price. Also, it will work only if the configuration is enabled.
joining_fee_enable: It is used to enable the joining fee for the auction. Also, it will work only if the configuration is enabled.
display_auction_days: It is used to set display auction days in terms of days.
Then, comes the autopay feature.
Additionally, the app allows Braintree payment gateway along with autopay functionality for your bid winner.
auto_pay_enable: It is used to enable or disable autopay for the auction.
NOTE:-
It will work only if the configuration for the same is enabled in configurations.
sort_by: Determines the parameter by which the auctions are sorted in the response.
Here, the available parameters are id, product_name, start_date, end_date.
sort_order: Determines the sorting order.
Then, let’s proceed to check the Bid Properties.
Bid Properties
sort_by: Determines the parameter by which the bids are sorted in the response.
Then, check the available parameters.
Available parameters:
- id
- bid_amount,
- quantity,
- is_public,
- first_name,
- last_name,
- bid_date.
Then, check the sorting properties.
sort_order: Determines the sorting order. 1). asc-> ascending 2). desc-> descending.
Then, comes the filter option.
filter: Searches only for the auction with the specified ‘bid_id’, ‘bid_amount’, and more.
auction_id: id of the auction.
Also, amount: amount to place bid.
Then, check the anonymous bid properties.
public: This refers to the bid place is anonymous or public.
Also, proxy_bid: bid place is proxy bid or not.
Furthermore, check the email property.
email: email of the customer for which bid should be placed.
Also, Note: Customers should be registered in the merchant store with this email.
quantity: quantity of the product for which bid should be placed.
Lastly, bid_id: id of the bid placed.
Then, coming to the configuration properties.
Configuration Properties
type: Use this to get configuration by type.
Now, possible types are general_config, auction_config, widget_config, design_config, label_config, smtp_config.
Then, use multiple options separated by a comma.
Furthermore, let’s explore the endpoint.
End Points
TOKEN
POST/api/user/refresh
– Create an access token using the refresh token.
then, proceed to check parameters.
Parameters
NAME | DESCRIPTION |
Token Details json (body) | This is the token data. |
Now, proceed to check the response to the request.
Then, check the response here:
Response
{ "access_token":"ZWFlZTA4NTExMWJlNTIzOWRmYzIyYTJkMGUxYTBiYWFjOTg4OTEyNzEyZjRjMDE2ODkwNzc1NjQyNGJkYjNlYQ","expires_in":4086400,"token_type":"bearer","scope":null,"refresh_token":"NTI2MzQ5Y2I4YTQzYWE2MzY0ODg4ZGNhMGQ5OTA3NDU0YjRhOTljMGZiMzZhOTcwNGE5NWNlY2E3M2M4MDI1Yg" }
Then, coming to Auction.
AUCTION
POST/api/start/{auctionId}.json
-Start auction by auction ID
Then, check the parameters here:
Parameters
NAME | DESCRIPTION |
Start Now json (body) | To start an auction immediately. |
auctionId string (path) *Required | Also, an auction ID, a unique identifier for the auction. |
Then, check the response here:
Response
INPUT: {"start_now":"1"} OUTPUT: { "Response": true, "Reason": "Auction Started Successfully", "Code": 200 }
POST/api/stop/{auctionId}.json
-Stop auction by auction ID
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
Force Stop json (body) | To stop the auction forcefully. { “stop_now”: “string” } |
auctionId string (path) *Required | Auction ID, a unique identifier for the auction. |
Then, check the response here:
Response
INPUT: {"stop_now":"1"} OUTPUT: { "Response": true, "Reason": "Finished", "Code": 200 }
Furthermore, proceed to get auction by shop property.
GET/api/auctions.json
-Get Auctions by Shop
No Parameters
Then, check the response here:
Response
{ "auctions": { "id": "10472", "shopify_product_id": "7038970921145", "product_handle": "test-webkul", "product_title": "Test Webkul", "start_date": "2021-10-13 06:31:18", "end_date": "2021-10-13 06:21:27", "auction_status": "Finished", "reserve_price": "100.00", "start_price": "5.00", "proxy_bidding_on": "1", "active": "1", "joining_fee_enable": "0", "date_add": "2021-10-13 06:12:03", "date_upd": "2021-10-13 06:21:27" } }
Then, comes the Add Auction.
POST/api/auctions.json
-Add Auction
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
addauction json (body) | This is used to create a new auction. |
Then, check the response here:
Response
{'Response' => true, 'Reason' => 'Aution Successfully placed ', 'Code' => 200,}
GET/api/auctions/{id}.json
-Get Auctions by ID
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
id string (path) Required | Unique ID to get auction. |
Then, check the response here:
Response
{ "auction": { "id": "10472", "shopify_product_id": "7038970921145", "product_handle": "test-webkul", "product_title": "Test Webkul", "start_date": "2021/10/13 06:31:18", "end_date": "2021/10/13 06:21:27", "auction_status": "Finished", "reserve_price": "100.00", "start_price": "5.00", "proxy_bidding_on": "1", "active": "1", "joining_fee_enable": "0", "date_add": "2021-10-13 06:12:03", "date_upd": "2021-10-13 06:21:27", "max_bid": null, "total_bid": "0", "now": "2021/10/13 06:26:07" }, "bid_rule": [ { "bid_from": "0.00", "bid_to": "100.00", "rate": "10.00" } ], "cust_date": "2021-10-13 06:26:07", "booking_product": null }
Then, proceed to Get Auction.
GET/api/shop/auctions.json
-Used to Get Auctions
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
sort_by string (query) | Determines the parameter by which the auctions are sorted in the response. Default value: id |
sort_order string (query) | Then, it determines the sorting order. 1).asc-> ascending 2).desc-> descending Default value: desc |
filter string (query) | Then, searches for the auction with the specified ‘id’, ‘product_name’, ‘start_date’, ‘end_date’, ‘current_bid’, ‘winners’, ‘purchase_status’, ‘current_status’, ‘auction_id_lt’ (auction id less than), ‘auction_id_gt’ (auction id greater than). (Example: {“id”:”10001″, “product_name”:”White Shirt”, “start_date”:”2021-09-22″, “end_date”:”2021-09-22″, “current_bid”:”1001″, “winners”:”Test Customer”, “purchase_status”:”winner, purchased, without_winner, without_purchase”}). NOTE: You need to provide only JSON data in this case. |
Then, check the response:
Responses
{ "auctions": [ { "id": "10472", "shopify_product_id": "7038970921145", "product_handle": "test-webkul", "product_title": "Test Webkul", "start_date": "2021-10-13 12:01:18", "end_date": "2021-10-13 11:51:27", "bid_date": null, "auction_status": "Finished", "reserve_price": "100.00", "start_price": "5.00", "proxy_bidding_on": "1", "active": "1", "joining_fee_enable": "0", "joining_amount": null, "bid_winner_id": null, "bid_winner_amt": null, "is_purchased": null, "popcorn_bidding": "1", "max_popcorn_bid": "10", "extend_deadline_within": { "type": "minutes", "value": 2 }, "extend_deadline_by": { "type": "minutes", "value": 10 }, "date_add": "2021-10-13 06:12:03", "max_bid": null, "total_bid": null } ] }
Then, coming to next API:
GET/api/shop/auction/{type}.json
-Get Products on Auction
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
search string (query) | Used for auction search. |
offset string (query) | Then, Offset |
type string (path) -Required | Also, note:- It is the required field. |
Now, proceed to check the response to the request.
Then, check the response:
Response
{ "Auctions": [ { "id": "10467", "shopify_product_id": "7038970921145", "product_handle": "test-webkul", "product_title": "Test Webkul", "img_src": "https://cdn.shopify.com/s/files/1/0507/5353/6185/products/webkul-logo-accent-sq_a0a57afe-bb1f-4c86-bb46-100f2f7b515a.png?v=1634105284", "end_date": "2021-10-30 18:23:02", "start_price": "10.00", "auc_bid_count": "0", "auction_status": "Running", "higghest_bidder_n_count": false } ] }
then, the API to get running auction.
GET/api/shop/auctions/running_bids_auction/{customerId}.json
-Get the running auction details in which the customer has participated.
Also, check the parameters:
Parameter
NAME | DESCRIPTION |
sort_by string (query) | Determines the parameter by which the auctions are sorted in the response. Default value: id |
sort_order string (query) | Now, determines the sorting order. Default value: desc |
filter string (query) | Searches only for the auction with the specified ‘id’, ‘product_name’, ‘start_date’, ‘end_date’, ‘auction_id_lt’ (auction id less than), ‘auction_id_gt’ (auction id greater than). (Example: {“id”:”10001″, “product_name”:”White Shirt”, “start_date”:”2021-09-22″, “end_date”:”2021-09-22″}) NOTE: You need to provide only JSON data in this case. |
customerId string (path) –Required | Also, It’s a unique customer ID. This is the required field. |
Then, check the response:
Response
{ "running_bids_auction": [ { "id": "10470", "current_bid": "200.00", "number_of_bids": "4", "shopify_product_id": "7038970921145", "product_handle": "test-webkul", "product_title": "Test Webkul", "product_url": "https://test-webkul.myshopify.com/products/test-digital", "img_src": "https://cdn.shopify.com/s/files/1/0507/5353/6185/products/webkul-logo-accent-sq_a0a57afe-bb1f-4c86-bb46-100f2f7b515a.png?v=1634105284", "max_bid": "200.00", "max_proxy_bid": null, "highest_bidder_name": "current", "start_date": "2021-10-08 18:23:01", "end_date": "2021-10-30 18:23:02" } ] }
then, it comes to get auction details.
GET/api/shop/auctions/loss_auction/{customerId}.json
-Get auction details in which the customer has participated but is not the winner.
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
sort_by string (query) | Determines the parameter by which the auctions are sorted in the response. Default value : end_date |
sort_order string (query) | then, determines the sorting order. 1).asc-> ascending 2).desc-> descending Default value: desc |
filter string (query) | Searches only for the auction with the specified ‘id’, ‘product_name’, ‘start_date’, ‘end_date’, ‘auction_id_lt’ (auction id less than), ‘auction_id_gt’ (auction id greater than). (Example: {“id”:”10001″, “product_name”:”White Shirt”, “start_date”:”2021-09-22″, “end_date”:”2021-09-22″}) NOTE: You need to provide only JSON data in this case. |
customerId string (path) -Required | This is the required field. |
Then, check the response:
Response
{ "loss_auctions": [ { "id": "10470", "current_bid": "65.00", "number_of_bids": "8", "shopify_product_id": "7038970921145", "product_handle": "test-webkul", "product_title": "Test Webkul", "max_proxy_bid": null, "max_bid": "65.00", "start_date": "2021-10-06 14:10:52", "end_date": "2021-10-06 14:35:36" } ] }
Then, comes the winning auction.
Winning Auction
GET/api/shop/auctions/winning_auction/{customerId}.json
-Get Winning Auctions
Moreover, get auction details in which the customer has participated and is the winner of the auction.
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
sort_by string (query) | Determines the parameter by which the auctions are sorted in the response. Default value : end_date |
sort_order string (query) | Also, determines the sorting order. Default value: desc |
filter string (query) | Searches only for the auction with the specified ‘id’, ‘product_name’, ‘is_purchased’, ‘auction_id_lt’ (auction id less than), ‘auction_id_gt’ (auction id greater than). (Example: {“id”:”10001″, “product_name”:”White Shirt”}) NOTE: You need to provide only JSON data in this case. |
customerId string (path) -Required | This is the required field. |
Then, check the response:
Response
{ "winning_auctions": [ { "id": "10470", "by_seller": "0", "shopify_product_id": "7038970921145", "product_handle": "test-webkul", "product_title": "Test Webkul", "product_url": "https://test-webkul.myshopify.com/products/new-global-product-1", "is_purchased": "0", "bid_winner_amt": "75.00", "quantity": "1", "number_of_bids": "8", "main_id_variant": "41237567963321", "max_proxy_bid": null, "max_bid": "75.00", "system_generated_bid": null, "checkout_url": "https://test-webkul.myshopify.com/cart/41237567963321:1" } ] }
Then, it comes to get the start bid.
GET/api/shop/auction/{auctionId}/start_bid.json
-Get Start Bid of Auctions
Moreover, this is used to get start bids by auction ID.
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
auctionId * string (path) | This is the required field. |
Then, check the response:
Response
{ "start_bid": "10.00" }
Then, comes the BID API.
BID
GET/api/shop/auction/bidding_list/{auctionId}.json
-Get Bidding List
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
sort_by string (query) | Determines the parameter by which the bids are sorted in the response. Default value: id |
sort_order string (query) | Also, determines the sorting order. 1).asc-> ascending 2).desc-> descending Default value: desc |
filter string (query) | Searches only for the auction with the specified ‘bid_id’, ‘bid_amount’, ‘quantity’, ‘is_public’, ‘first_name’, ‘last_name’, ‘bid_date’, ‘bid_id_lt’ (bid id less than), ‘bid_id_gt’ (bid id greater than). (Example: {“id”:”10001″, “bid_amount”:”10″, “quantity”:”1″, “is_public”:”1″, “first_name”:”test”, “last_name”:”Customer”, “bid_date”:”2021-09-22″}) NOTE: You need to provide only JSON data in this case. |
auctionId string (path) -Required | Also, this is the required field. |
Then, check the response:
Response
{ "Auction_id": "10470", "total_bids": "2", "max_bid": "200.00", "bids": [ { "id": "93", "bid_amount": "200.00", "quantity": "1", "is_public": "1", "first_name": "Demo", "last_name": "Webkul1", "bid_date": "2021-10-08 19:04:24" }, { "id": "92", "bid_amount": "100.00", "quantity": "1", "is_public": "1", "first_name": "Demo", "last_name": "Webkul2", "bid_date": "2021-10-08 19:04:20" } ] }
Then, comes the API to place bids.
POST/api/bids.json
-Place Bid
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
addBid json (body) | This is used to place a bid. |
Then, proceed to check the response.
Response
{ "Response": true, "message": "Bid Placed", "Amount": 800 }
Then, comes the get bid info API.
GET/api/shop/auction/{auctionId}/bid/{bidId}.json
-Get Bid Information
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
auctionId string (path) -Required | Also, used as a unique auction ID. This is the required field. |
bidId * string (path) | This is a unique bid ID. Also, this is the required field. |
Then, check the response:
Response
{ "bid": { "id": "93", "auction_id": "10470", "bid_amount": "200.00", "quantity": "1", "is_public": "1", "auto_bid": "0", "system_generated_bid": "0", "bid_date": "2021-10-08 19:04:24", "customer_id": "4495404761273", "email_id": "[email protected]", "first_name": "Demo", "last_name": "Webkul" } }
Then, comes the configuration API part.
CONFIGURATIONS
GET/api/auction/configuration.json
-Get configuration by the shop.
Also, check the parameters:
Parameters
NAME | DESCRIPTION |
type string (query) | get Auction by Type. Default value : general_config |
Now, proceed to check the response to the request.
Response
passed type = general_config { "Configuration": { "general_config": [ { "config_label_name": "Email", "input_name": "email", "value": "[email protected]", "extra_field": null }, { "config_label_name": "Shop Logo", "input_name": "shop_logo", "value": "0", "extra_field": null }, { "config_label_name": "Timezone", "input_name": "timezone", "value": "234", "extra_field": null }, { "config_label_name": "Email Notification For Every Bid", "input_name": "receive_bid_email", "value": "1", "extra_field": null }, { "config_label_name": "Enable Twilio SMS Gateway", "input_name": "twilio_gateway", "value": "1", "extra_field": null }, { "config_label_name": "Enable Bootstrap grids", "input_name": "bootstrap_layout", "value": "1", "extra_field": null }, { "config_label_name": "Show Current Bid", "input_name": "wk_show_current_bid", "value": "1", "extra_field": null }, { "config_label_name": "Show Highest Bidder", "input_name": "wk_show_highest_bidder", "value": "0", "extra_field": null }, { "config_label_name": "Show Bid Count", "input_name": "wk_show_bid_count", "value": "0", "extra_field": null }, { "config_label_name": "Show Bid Count (Product Page)", "input_name": "wk_show_bid_count_pp", "value": "0", "extra_field": null }, { "config_label_name": "Show Bid Count (Collection Page)", "input_name": "wk_show_bid_count_cp", "value": "1", "extra_field": null }, { "config_label_name": "Sort Running Auctions", "input_name": "auction_sort", "value": "4", "extra_field": null }, { "config_label_name": "Display Current Bid (Product Page)", "input_name": "wk_show_current_bid_pp", "value": "1", "extra_field": null }, { "config_label_name": "Display Current Bid(Collection Page)", "input_name": "wk_show_current_bid_cp", "value": "0", "extra_field": null }, { "config_label_name": "Display Start Bid", "input_name": "wk_show_start_bid", "value": "1", "extra_field": null }, { "config_label_name": "Display Start Bid Until Bid Placed (Product Page)", "input_name": "wk_show_start_current_bid_pp", "value": "0", "extra_field": null }, { "config_label_name": "Add Product Type on Shopify Auction Product", "input_name": "add_product_type", "value": "0", "extra_field": null }, { "config_label_name": "Show start bid for Upcoming Auction", "input_name": "start_bid_upcoming_auction", "value": "0", "extra_field": null }, { "config_label_name": "From Email", "input_name": "gen_email_from", "value": "[email protected]", "extra_field": null }, { "config_label_name": "From Name", "input_name": "gen_from_name", "value": "Demo Webkul", "extra_field": null }, { "config_label_name": "Include Product Images in Auction Emails", "input_name": "show_prod_image", "value": "1", "extra_field": null }, { "config_label_name": "Add \"Sort By\" Option On Auction Listing Page", "input_name": "sort_by_customer", "value": "1", "extra_field": "[\"Alphabetically, Z-A\",\"Current Bid, High to Low\",\"Current Bid, Low to High\",\"Auction Ending Soon\",\"Auction Ending Latest\"]" } ] } }
So, these are the response you will get using the APIs. This was all about the Auction API.
Now, you can now proceed to create your auction website and enable the Auction API via the app.
GET/api/shop/auction/{auctionId}/bid-rule.json
Get Auction Bid Rule by auctionId.
Now, Check the Parameters :
NAME | DESCRIPTION |
auctionId* (string) | an acution ID, a unique identifier for the auction |
Now proceed to check the response of the request:
RESPONSE
{ "bid_rule": [ { "bid_from": "0.00", "bid_to": "100.00", "rate": "10.00" } ] }
Demo
In case you want to check the demo store of the auction app, Visit.
Also, if you need access from the backend (admin panel), please drop a request at [email protected]
Moreover, you can also check the instructional guide of the app.
Then, to check the upgraded features, check this out.
Need Help With Auction API?
Drop your query/suggestion at [email protected]. Also, you can create a ticket at Webkul UV Desk.
Then, Know More about the Product Auction app.
Don’t have a Shopify store? Then, create one. Furthermore, proceed to create an auction website.
Thanks for reading !!!
Be the first to comment.