List product candidates
GET
/api/products
const url = 'https://example.com/api/products';const options = { method: 'GET', headers: {cookie: 'better-auth.session_token=<better-auth.session_token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/products \ --cookie better-auth.session_token=<better-auth.session_token>Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Mocked product candidates available for request matching.
Media type application/json
object
products
required
Array<object>
A product candidate that can be matched into an offer.
object
id
required
string
sku
required
string
name
required
string
description
required
string
source
required
string
prices
required
Array<object>
A price quote for a product in a specific currency.
object
id
required
string
productId
required
string
currency
required
string
net
required
number
gross
required
number
vatRate
required
number
source
required
string
Example
{ "products": [ { "id": "solar-panel-430", "name": "Solar Panel 430 W" } ]}No valid Better Auth session was present.
Media type application/json
Returned when no valid Better Auth session is present.
object
error
required
string
Example generated
{ "error": "example"}