Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 2 KB

endpoints.md

File metadata and controls

79 lines (57 loc) · 2 KB

REST API Endpoints

Authentication

Documentation on authentication WooCommerce REST API requests can be found here. The credentials used for authentication can be found in the WooCommerce > Settings > Advanced > REST API page of the main GoodBids site admin (or in 1Pass).

WooCommerce

POST /wc/v3/credentials

Used to generate WooCommerce API credentials for a Nonprofit site. If credentials already exist, they will be revoked and new credentials will be created. This endpoint is only available on the Main GoodBids site.

Parameters

Parameter Type Description
domain string The domain of the nonprofit site.

Response

The response will contain the WooCommerce API credentials that can be used for the given site.

{
	"key": "ck_XXXXX",
	"secret": "cs_XXXXX"
}

GoodBids

GET /wp/v2/auction/<id>/details

Retrieves the Auction details for the given Auction ID.

Parameters

None.

Response

The response will contain the details shown below.

{
  "auctionStatus": "string",
  "socketUrl": "string",
  "bidUrl": "string",
  "accountUrl": "string", 
  "startTime": "string",
  "endTime": "string",
  "totalBids": "number",
  "totalRaised": "float",
  "currentBid": "float",
  "lastBid": "number"
}

GET /wp/v2/auction/<id>/user

Retrieves the User-related details for the given Auction ID.

Parameters

Parameter Type Description
cookie string The Session Cookie for the desired user.

Response

The response will contain the details shown below.

{
  "isLastBidder": "bool",
  "rewardClaimed": "bool",
  "rewardUrl": "string",
  "userFreeBids": "number",
  "userTotalBids": "number", 
  "userTotalDonated": "number"
}