curl --request GET \
--url https://api.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}', 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.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}",
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.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}"
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.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}")
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{
"id": "<string>",
"stockable_id": "<string>",
"uom_unit_id": "<string>",
"sku": "<string>",
"barcode": "<string>",
"is_active": true,
"sort_order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"uom_unit": {},
"prices": "<array>",
"stockable": {}
}View a unit of an item
Shows one unit of sale of an item.
curl --request GET \
--url https://api.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}', 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.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}",
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.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}"
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.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/stockables/{stockable}/units/{unit}")
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{
"id": "<string>",
"stockable_id": "<string>",
"uom_unit_id": "<string>",
"sku": "<string>",
"barcode": "<string>",
"is_active": true,
"sort_order": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"uom_unit": {},
"prices": "<array>",
"stockable": {}
}variant_units.retrieve, bundle_units.retrieve
Conditions
- The permission depends on the type of item: variant_units.retrieve or bundle_units.retrieve.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the sellable item (stockable): the stockable record of a product variant or of a bundle, not the variant or bundle identifier itself.
Identifier of the unit of measure (27-character KSUID).
Query Parameters
Response mode. Default resource; none answers 204 No Content.
resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, stockable_id, uom_unit_id, sku, barcode, is_active, sort_order, created_at, updated_at.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: uomUnit, prices, stockable, stockable.vat_rate, stockable.taxes, stockable.subject.
Response
Resource.
Identifier of the unit of sale (27-character KSUID string).
Identifier of the item the unit belongs to.
Identifier of the unit of measure (for example piece or box) this unit of sale uses.
Stock keeping unit code, unique within the organization. Generated as ITEM-UNIT-001 when not sent at creation.
Barcode of the unit, unique within the organization when set; null when none.
Whether the unit can be used for new prices and sales. A unit already used by orders is deactivated instead of deleted.
Display position of the unit; lower values come first. 0 when not sent at creation.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Unit of measure object. Only returned when selected with ?include=uomUnit.
Prices of this unit for the caller's company. Only returned when selected with ?include=prices.
The item the unit belongs to. Only returned when selected with ?include=stockable.