Get Profit Margin
curl --request GET \
--url https://api-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}', 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-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}",
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: Bearer <token>"
],
]);
$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-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"lab_percent": 50,
"merchant_uuid": "4483de5e-1000-44ac-bef1-cc6e74d8fe7f",
"mined_percent": 35,
"price_max": 0,
"price_min": 0,
"uuid": "b5209c7e-997c-4423-aeb9-a5e489285dab",
"weight_max": 0.75,
"weight_min": 0,
"weight_or_price": "weight"
}Profit Margins
Get Profit Margin
Get profit margin according to profit_margin_uuid.
Returns
A profit margin object.
GET
/
api
/
v2
/
profit_margins
/
{profit_margin_uuid}
Get Profit Margin
curl --request GET \
--url https://api-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}', 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-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}",
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: Bearer <token>"
],
]);
$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-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.unbridaled.ai/api/v2/profit_margins/{profit_margin_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"lab_percent": 50,
"merchant_uuid": "4483de5e-1000-44ac-bef1-cc6e74d8fe7f",
"mined_percent": 35,
"price_max": 0,
"price_min": 0,
"uuid": "b5209c7e-997c-4423-aeb9-a5e489285dab",
"weight_max": 0.75,
"weight_min": 0,
"weight_or_price": "weight"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Given UUID of the profit margin object.
⌘I