Get commodities available in the system
curl --request GET \
--url https://api.coverwhale.dev/v1/commodityList \
--header 'Accept: <accept>' \
--header 'AccessToken: <api-key>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.coverwhale.dev/v1/commodityList"
headers = {
"Content-Type": "<content-type>",
"Accept": "<accept>",
"AccessToken": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Accept: '<accept>', AccessToken: '<api-key>'}
};
fetch('https://api.coverwhale.dev/v1/commodityList', 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.coverwhale.dev/v1/commodityList",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"AccessToken: <api-key>",
"Content-Type: <content-type>"
],
]);
$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.coverwhale.dev/v1/commodityList"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("AccessToken", "<api-key>")
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.coverwhale.dev/v1/commodityList")
.header("Content-Type", "<content-type>")
.header("Accept", "<accept>")
.header("AccessToken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coverwhale.dev/v1/commodityList")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Accept"] = '<accept>'
request["AccessToken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"commodities": "['agricultural_equipment': 'Agricultural Equipment', 'alcoholic_beverages': 'Alcoholic beverages (except beer and wine)', 'appliances': 'Appliances (except TV and stereos)', 'arms_ammunition_fireworks': 'Arms, ammunition, fireworks']"
}{
"status": "failed"
}Reference Data
Get commodities available in the system
Get the list of all available commodity types
GET
/
commodityList
Get commodities available in the system
curl --request GET \
--url https://api.coverwhale.dev/v1/commodityList \
--header 'Accept: <accept>' \
--header 'AccessToken: <api-key>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.coverwhale.dev/v1/commodityList"
headers = {
"Content-Type": "<content-type>",
"Accept": "<accept>",
"AccessToken": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Accept: '<accept>', AccessToken: '<api-key>'}
};
fetch('https://api.coverwhale.dev/v1/commodityList', 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.coverwhale.dev/v1/commodityList",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"AccessToken: <api-key>",
"Content-Type: <content-type>"
],
]);
$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.coverwhale.dev/v1/commodityList"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Accept", "<accept>")
req.Header.Add("AccessToken", "<api-key>")
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.coverwhale.dev/v1/commodityList")
.header("Content-Type", "<content-type>")
.header("Accept", "<accept>")
.header("AccessToken", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coverwhale.dev/v1/commodityList")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Accept"] = '<accept>'
request["AccessToken"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": "success",
"commodities": "['agricultural_equipment': 'Agricultural Equipment', 'alcoholic_beverages': 'Alcoholic beverages (except beer and wine)', 'appliances': 'Appliances (except TV and stereos)', 'arms_ammunition_fireworks': 'Arms, ammunition, fireworks']"
}{
"status": "failed"
}Authorizations
AWS Cognito access token obtained from the /authentication endpoint. Token expires after 3600 seconds.