Estimate Rates For Product Variants
curl --request POST \
--url https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch \
--header 'Content-Type: application/json' \
--data '
{
"definition": "<string>",
"location_id": 123,
"region": "<string>",
"country": "<string>",
"sku": [
"<string>"
],
"external_id": [
"<string>"
],
"barcode": [
"<string>"
]
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch"
payload = {
"definition": "<string>",
"location_id": 123,
"region": "<string>",
"country": "<string>",
"sku": ["<string>"],
"external_id": ["<string>"],
"barcode": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
definition: '<string>',
location_id: 123,
region: '<string>',
country: '<string>',
sku: ['<string>'],
external_id: ['<string>'],
barcode: ['<string>']
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch', 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.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'definition' => '<string>',
'location_id' => 123,
'region' => '<string>',
'country' => '<string>',
'sku' => [
'<string>'
],
'external_id' => [
'<string>'
],
'barcode' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch"
payload := strings.NewReader("{\n \"definition\": \"<string>\",\n \"location_id\": 123,\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"sku\": [\n \"<string>\"\n ],\n \"external_id\": [\n \"<string>\"\n ],\n \"barcode\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch")
.header("Content-Type", "application/json")
.body("{\n \"definition\": \"<string>\",\n \"location_id\": 123,\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"sku\": [\n \"<string>\"\n ],\n \"external_id\": [\n \"<string>\"\n ],\n \"barcode\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"definition\": \"<string>\",\n \"location_id\": 123,\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"sku\": [\n \"<string>\"\n ],\n \"external_id\": [\n \"<string>\"\n ],\n \"barcode\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Rate
Estimate Rates For Product Variants
A POST to the /rates/product-variant-estimate/batch endpoint returns the estimated
rate for each of up to 100 product variants in one call, without persisting any data.
It applies the same rules as /rates/product-variant-estimate to every variant.
Send the same fields as /rates/product-variant-estimate, with sku, external_id,
or barcode as a list. data is an object keyed by each identifier sent. Each value
is what /rates/product-variant-estimate returns in data for that variant, or null
when the variant is not found or no rate matches it.
POST
/
v3
/
rates
/
product-variant-estimate
/
batch
Estimate Rates For Product Variants
curl --request POST \
--url https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch \
--header 'Content-Type: application/json' \
--data '
{
"definition": "<string>",
"location_id": 123,
"region": "<string>",
"country": "<string>",
"sku": [
"<string>"
],
"external_id": [
"<string>"
],
"barcode": [
"<string>"
]
}
'import requests
url = "https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch"
payload = {
"definition": "<string>",
"location_id": 123,
"region": "<string>",
"country": "<string>",
"sku": ["<string>"],
"external_id": ["<string>"],
"barcode": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
definition: '<string>',
location_id: 123,
region: '<string>',
country: '<string>',
sku: ['<string>'],
external_id: ['<string>'],
barcode: ['<string>']
})
};
fetch('https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch', 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.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'definition' => '<string>',
'location_id' => 123,
'region' => '<string>',
'country' => '<string>',
'sku' => [
'<string>'
],
'external_id' => [
'<string>'
],
'barcode' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch"
payload := strings.NewReader("{\n \"definition\": \"<string>\",\n \"location_id\": 123,\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"sku\": [\n \"<string>\"\n ],\n \"external_id\": [\n \"<string>\"\n ],\n \"barcode\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch")
.header("Content-Type", "application/json")
.body("{\n \"definition\": \"<string>\",\n \"location_id\": 123,\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"sku\": [\n \"<string>\"\n ],\n \"external_id\": [\n \"<string>\"\n ],\n \"barcode\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{tenant}.getomneo.com/api/v3/rates/product-variant-estimate/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"definition\": \"<string>\",\n \"location_id\": 123,\n \"region\": \"<string>\",\n \"country\": \"<string>\",\n \"sku\": [\n \"<string>\"\n ],\n \"external_id\": [\n \"<string>\"\n ],\n \"barcode\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}