curl " https://api.playground.try.be/shop/offering-search/most-popular?site_id=00000000-0000-0000-0000-000000000000 " \
-H " Authorization: Bearer YOUR_API_KEY " \
-H " Accept: application/json " const response = await fetch ( ' https://api.playground.try.be/shop/offering-search/most-popular?site_id=00000000-0000-0000-0000-000000000000 ' , {
method : ' GET ' ,
headers : {
Authorization : ' Bearer YOUR_API_KEY ' ,
Accept : ' application/json ' ,
},
} )
if ( ! response . ok ) {
throw new Error ( ` Trybe API ${ response . status } : ${ await response . text () }` )
}
const data = await response . json () import httpx
response = httpx . get (
" https://api.playground.try.be/shop/offering-search/most-popular?site_id=00000000-0000-0000-0000-000000000000 " ,
headers = {
" Authorization " : " Bearer YOUR_API_KEY " ,
" Accept " : " application/json " ,
},
)
response . raise_for_status ()
data = response . json () <? php
$ client = new \ GuzzleHttp \ Client ();
$ response = $ client -> request ( ' GET ' , ' https://api.playground.try.be/shop/offering-search/most-popular?site_id=00000000-0000-0000-0000-000000000000 ' , [
' headers ' => [
' Authorization ' => ' Bearer YOUR_API_KEY ' ,
' Accept ' => ' application/json ' ,
],
]);
$ data = json_decode ($ response -> getBody (), true ); package main
import (
" encoding/json "
" net/http "
)
func main () {
req , _ := http . NewRequest ( " GET " , " https://api.playground.try.be/shop/offering-search/most-popular?site_id=00000000-0000-0000-0000-000000000000 " , nil )
req . Header . Set ( " Authorization " , " Bearer YOUR_API_KEY " )
req . Header . Set ( " Accept " , " application/json " )
resp , err := http . DefaultClient . Do ( req )
if err != nil {
panic ( err )
}
defer resp . Body . Close ()
var data map [ string ] interface {}
json . NewDecoder ( resp . Body ). Decode ( & data )
} 200 401 403 422
The most popular offerings.
{
" data " : [
{
" id " : " 64a9f3b2c3d8e1f4a5b6c7d8 " ,
" categories " : [
{
" id " : " 64a9f3b2c3d8e1f4a5b6c7d8 " ,
" name " : " Alex Morgan "
}
],
" image_url " : " https://example.com " ,
" inventory_categories " : [
{
" id " : " 64a9f3b2c3d8e1f4a5b6c7d8 " ,
" name " : " Alex Morgan "
}
],
" members_only " : false ,
" name " : " Alex Morgan " ,
" offering_type " : " appointment "
}
]
} {
" message " : " Unauthenticated "
} {
" message " : " This action is unauthorized. "
} {
" errors " : {},
" message " : " The request didn't pass validation "
}