Styles
Retrieve
Retrieve a style profile.
GET
/
styles
/
retrieve
/
{id}
Retrieve
curl --request GET \
--url https://api.buybase.ai/styles/retrieve/{id} \
--header 'authorization: <authorization>'import requests
url = "https://api.buybase.ai/styles/retrieve/{id}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.buybase.ai/styles/retrieve/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.buybase.ai/styles/retrieve/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.buybase.ai/styles/retrieve/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.buybase.ai/styles/retrieve/{id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buybase.ai/styles/retrieve/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"style": {
"id": "style_12345",
"text": "Minimalist casual style with neutral colors like black, white, and beige. Preference for cotton fabrics, clean lines, and simple designs without logos or patterns.",
"profile_id": "prof_67890",
"created_at": "2023-09-15T14:22:31Z",
"updated_at": "2023-09-15T14:22:31Z"
},
"code": "STYLE_RETRIEVED"
}
Headers
string
required
Your API key for authorization.
Path Parameters
string
required
The ID of the style to retrieve.
Response
boolean
Indicates whether the operation was successful.
object
The style object containing:
id: The style IDtext: The style descriptionprofile_id: The ID of the profile this style is attached tocreated_at: Timestamp when the style was createdupdated_at: Timestamp when the style was last updated
string
A code indicating the result of the operation. Possible values:
STYLE_RETRIEVED: Style retrieved successfullySTYLE_NOT_FOUND: Style not found
string
Error message if the request fails.
{
"success": true,
"style": {
"id": "style_12345",
"text": "Minimalist casual style with neutral colors like black, white, and beige. Preference for cotton fabrics, clean lines, and simple designs without logos or patterns.",
"profile_id": "prof_67890",
"created_at": "2023-09-15T14:22:31Z",
"updated_at": "2023-09-15T14:22:31Z"
},
"code": "STYLE_RETRIEVED"
}
⌘I
Retrieve
curl --request GET \
--url https://api.buybase.ai/styles/retrieve/{id} \
--header 'authorization: <authorization>'import requests
url = "https://api.buybase.ai/styles/retrieve/{id}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.buybase.ai/styles/retrieve/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.buybase.ai/styles/retrieve/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.buybase.ai/styles/retrieve/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.buybase.ai/styles/retrieve/{id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buybase.ai/styles/retrieve/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"style": {
"id": "style_12345",
"text": "Minimalist casual style with neutral colors like black, white, and beige. Preference for cotton fabrics, clean lines, and simple designs without logos or patterns.",
"profile_id": "prof_67890",
"created_at": "2023-09-15T14:22:31Z",
"updated_at": "2023-09-15T14:22:31Z"
},
"code": "STYLE_RETRIEVED"
}