Get the options
curl --request GET \
--url https://sandbox.yasmina.ai/api/v1/cargo/options \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.yasmina.ai/api/v1/cargo/options"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.yasmina.ai/api/v1/cargo/options', 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://sandbox.yasmina.ai/api/v1/cargo/options",
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://sandbox.yasmina.ai/api/v1/cargo/options"
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://sandbox.yasmina.ai/api/v1/cargo/options")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.yasmina.ai/api/v1/cargo/options")
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{
"customer_roles": [
{
"value": "importer",
"label": "Importer"
},
{
"value": "exporter",
"label": "Exporter"
},
{
"value": "buyer",
"label": "Buyer"
},
{
"value": "seller",
"label": "Seller"
},
{
"value": "freight_forwarder",
"label": "Freight forwarder"
},
{
"value": "other",
"label": "Other"
}
],
"transport_modes": [
{
"value": "sea",
"label": "Sea"
},
{
"value": "air",
"label": "Air"
},
{
"value": "road",
"label": "Road"
},
{
"value": "combined",
"label": "Combined (more than one mode)"
}
],
"goods_categories": [
{
"value": "general_merchandise",
"label": "General merchandise"
},
{
"value": "electronics",
"label": "Electronics and appliances"
},
{
"value": "machinery",
"label": "Machinery and equipment"
},
{
"value": "vehicles_and_parts",
"label": "Vehicles and spare parts"
},
{
"value": "foodstuff",
"label": "Foodstuff and beverages"
},
{
"value": "textiles",
"label": "Textiles and garments"
},
{
"value": "building_materials",
"label": "Building materials"
},
{
"value": "chemicals",
"label": "Chemicals"
},
{
"value": "pharmaceuticals",
"label": "Pharmaceuticals and medical supplies"
},
{
"value": "furniture",
"label": "Furniture"
},
{
"value": "arms_and_ammunition",
"label": "Arms and ammunition"
}
],
"packaging": [
{
"value": "container_fcl",
"label": "Full container (FCL)"
},
{
"value": "container_lcl",
"label": "Shared container (LCL)"
},
{
"value": "palletized",
"label": "Palletized"
},
{
"value": "cartons",
"label": "Cartons"
},
{
"value": "crates",
"label": "Crates"
},
{
"value": "drums",
"label": "Drums"
},
{
"value": "bags",
"label": "Bags"
},
{
"value": "bulk",
"label": "Bulk"
},
{
"value": "unpacked",
"label": "Unpacked"
}
],
"conditions": [
{
"value": "new",
"label": "New"
},
{
"value": "used",
"label": "Used"
}
],
"characteristics": [
{
"value": "hazardous",
"label": "Hazardous"
},
{
"value": "fragile",
"label": "Fragile"
},
{
"value": "perishable",
"label": "Perishable"
},
{
"value": "refrigerated",
"label": "Refrigerated"
},
{
"value": "high_value",
"label": "High value"
}
],
"coverages": [
{
"value": "icc_a",
"label": "All risks (Institute Cargo Clauses A)"
},
{
"value": "icc_b",
"label": "Named perils (Institute Cargo Clauses B)"
},
{
"value": "icc_c",
"label": "Basic perils (Institute Cargo Clauses C)"
}
],
"extensions": [
{
"value": "war",
"label": "War risks"
},
{
"value": "strikes",
"label": "Strikes, riots and civil commotion"
},
{
"value": "warehouse_to_warehouse",
"label": "Warehouse to warehouse"
}
],
"valuation_bases": [
{
"value": "invoice_value",
"label": "Invoice value"
},
{
"value": "cif",
"label": "Invoice value plus freight and other costs (CIF)"
},
{
"value": "cif_plus_10",
"label": "CIF plus 10%"
}
],
"incoterms": [
{
"value": "EXW",
"label": "EXW"
},
{
"value": "FCA",
"label": "FCA"
},
{
"value": "CPT",
"label": "CPT"
},
{
"value": "CIP",
"label": "CIP"
},
{
"value": "DAP",
"label": "DAP"
},
{
"value": "DPU",
"label": "DPU"
},
{
"value": "DDP",
"label": "DDP"
},
{
"value": "FAS",
"label": "FAS"
},
{
"value": "FOB",
"label": "FOB"
},
{
"value": "CFR",
"label": "CFR"
},
{
"value": "CIF",
"label": "CIF"
}
],
"insurance_arranged_by": [
{
"value": "buyer",
"label": "Buyer"
},
{
"value": "seller",
"label": "Seller"
}
],
"currencies": [
{
"value": "SAR",
"label": "SAR"
},
{
"value": "USD",
"label": "USD"
},
{
"value": "EUR",
"label": "EUR"
},
{
"value": "GBP",
"label": "GBP"
},
{
"value": "AED",
"label": "AED"
},
{
"value": "CNY",
"label": "CNY"
}
],
"countries": [
{
"value": "SA",
"label": "Saudi Arabia"
},
{
"value": "AF",
"label": "Afghanistan"
},
{
"value": "AL",
"label": "Albania"
}
]
}{
"code": "40101",
"message": "Unauthenticated"
}Get the options
Every list of values the cargo endpoints accept: customer roles, transport modes, goods categories, packaging, conditions, characteristics, coverages, extensions, valuation bases, Incoterms, currencies and countries. Each entry has the value to send and a label to show. Build your dropdowns from this response instead of hard-coding them, so a new value reaches your users without a release on your side.
GET
/
options
Get the options
curl --request GET \
--url https://sandbox.yasmina.ai/api/v1/cargo/options \
--header 'Authorization: Bearer <token>'import requests
url = "https://sandbox.yasmina.ai/api/v1/cargo/options"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sandbox.yasmina.ai/api/v1/cargo/options', 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://sandbox.yasmina.ai/api/v1/cargo/options",
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://sandbox.yasmina.ai/api/v1/cargo/options"
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://sandbox.yasmina.ai/api/v1/cargo/options")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.yasmina.ai/api/v1/cargo/options")
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{
"customer_roles": [
{
"value": "importer",
"label": "Importer"
},
{
"value": "exporter",
"label": "Exporter"
},
{
"value": "buyer",
"label": "Buyer"
},
{
"value": "seller",
"label": "Seller"
},
{
"value": "freight_forwarder",
"label": "Freight forwarder"
},
{
"value": "other",
"label": "Other"
}
],
"transport_modes": [
{
"value": "sea",
"label": "Sea"
},
{
"value": "air",
"label": "Air"
},
{
"value": "road",
"label": "Road"
},
{
"value": "combined",
"label": "Combined (more than one mode)"
}
],
"goods_categories": [
{
"value": "general_merchandise",
"label": "General merchandise"
},
{
"value": "electronics",
"label": "Electronics and appliances"
},
{
"value": "machinery",
"label": "Machinery and equipment"
},
{
"value": "vehicles_and_parts",
"label": "Vehicles and spare parts"
},
{
"value": "foodstuff",
"label": "Foodstuff and beverages"
},
{
"value": "textiles",
"label": "Textiles and garments"
},
{
"value": "building_materials",
"label": "Building materials"
},
{
"value": "chemicals",
"label": "Chemicals"
},
{
"value": "pharmaceuticals",
"label": "Pharmaceuticals and medical supplies"
},
{
"value": "furniture",
"label": "Furniture"
},
{
"value": "arms_and_ammunition",
"label": "Arms and ammunition"
}
],
"packaging": [
{
"value": "container_fcl",
"label": "Full container (FCL)"
},
{
"value": "container_lcl",
"label": "Shared container (LCL)"
},
{
"value": "palletized",
"label": "Palletized"
},
{
"value": "cartons",
"label": "Cartons"
},
{
"value": "crates",
"label": "Crates"
},
{
"value": "drums",
"label": "Drums"
},
{
"value": "bags",
"label": "Bags"
},
{
"value": "bulk",
"label": "Bulk"
},
{
"value": "unpacked",
"label": "Unpacked"
}
],
"conditions": [
{
"value": "new",
"label": "New"
},
{
"value": "used",
"label": "Used"
}
],
"characteristics": [
{
"value": "hazardous",
"label": "Hazardous"
},
{
"value": "fragile",
"label": "Fragile"
},
{
"value": "perishable",
"label": "Perishable"
},
{
"value": "refrigerated",
"label": "Refrigerated"
},
{
"value": "high_value",
"label": "High value"
}
],
"coverages": [
{
"value": "icc_a",
"label": "All risks (Institute Cargo Clauses A)"
},
{
"value": "icc_b",
"label": "Named perils (Institute Cargo Clauses B)"
},
{
"value": "icc_c",
"label": "Basic perils (Institute Cargo Clauses C)"
}
],
"extensions": [
{
"value": "war",
"label": "War risks"
},
{
"value": "strikes",
"label": "Strikes, riots and civil commotion"
},
{
"value": "warehouse_to_warehouse",
"label": "Warehouse to warehouse"
}
],
"valuation_bases": [
{
"value": "invoice_value",
"label": "Invoice value"
},
{
"value": "cif",
"label": "Invoice value plus freight and other costs (CIF)"
},
{
"value": "cif_plus_10",
"label": "CIF plus 10%"
}
],
"incoterms": [
{
"value": "EXW",
"label": "EXW"
},
{
"value": "FCA",
"label": "FCA"
},
{
"value": "CPT",
"label": "CPT"
},
{
"value": "CIP",
"label": "CIP"
},
{
"value": "DAP",
"label": "DAP"
},
{
"value": "DPU",
"label": "DPU"
},
{
"value": "DDP",
"label": "DDP"
},
{
"value": "FAS",
"label": "FAS"
},
{
"value": "FOB",
"label": "FOB"
},
{
"value": "CFR",
"label": "CFR"
},
{
"value": "CIF",
"label": "CIF"
}
],
"insurance_arranged_by": [
{
"value": "buyer",
"label": "Buyer"
},
{
"value": "seller",
"label": "Seller"
}
],
"currencies": [
{
"value": "SAR",
"label": "SAR"
},
{
"value": "USD",
"label": "USD"
},
{
"value": "EUR",
"label": "EUR"
},
{
"value": "GBP",
"label": "GBP"
},
{
"value": "AED",
"label": "AED"
},
{
"value": "CNY",
"label": "CNY"
}
],
"countries": [
{
"value": "SA",
"label": "Saudi Arabia"
},
{
"value": "AF",
"label": "Afghanistan"
},
{
"value": "AL",
"label": "Albania"
}
]
}{
"code": "40101",
"message": "Unauthenticated"
}⌘I