curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules', 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://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules",
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://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules"
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://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules")
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{
"data": [
{
"name": "Perishables West → FedEx 2Day",
"when": {
"packingClasses": [
"perishable_dry_ice"
],
"states": [
"WA",
"OR",
"CA"
]
},
"then": {
"services": [
"FEDEX_2_DAY",
"FedEx 2Day"
],
"shipDays": [
"Tue",
"Wed"
],
"lock": true
}
}
],
"warnings": [
{
"rule": 2,
"message": "\"Islands\" has no conditions, so it applies to every order."
}
]
}{
"error": "Unauthorized",
"message": "Authentication credentials are missing or invalid",
"status_code": 401
}{
"message": "User does not have the right permissions."
}Get shipping rules
Return the tenant’s saved shipping rules — one ordered list that decides which carriers and services an order may ship with, and on which days. The same list is edited in the app under Operations → Operations Admin → Shipping Rules.
At label time, every rule whose conditions all hold applies, from top to bottom:
- It narrows the quoted rates to its
services, and tomaxTransitDaysif set. - A
lockrule refuses a label on any service outside its list. shipDaysrefuses a label on any other day, in the tenant operating timezone.- A rule that would leave no rate at all is skipped, so an order is never left unshippable.
On Parcel Perform accounts the carrier is chosen by Parcel Perform’s own rules, so only
shipDays takes effect there.
warnings lists configurations that are legal but probably unintended — a rule with no
conditions, two locked rules that can apply to the same order with disjoint services (between
them they refuse every label), or a state code that is not a US state or territory.
Available to every account. When per-user permissions are enabled, the token’s owner needs the fulfillmentSettings.read permission (the same as the Operations Admin pages); otherwise 403. When per-user
permissions are enabled, the token’s owner needs fulfillmentSettings.read.
curl --request GET \
--url https://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules \
--header 'Authorization: Bearer <token>'import requests
url = "https://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules', 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://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules",
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://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules"
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://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{companyName}.api.joinluminous.com/external/api/v1/shipping-rules")
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{
"data": [
{
"name": "Perishables West → FedEx 2Day",
"when": {
"packingClasses": [
"perishable_dry_ice"
],
"states": [
"WA",
"OR",
"CA"
]
},
"then": {
"services": [
"FEDEX_2_DAY",
"FedEx 2Day"
],
"shipDays": [
"Tue",
"Wed"
],
"lock": true
}
}
],
"warnings": [
{
"rule": 2,
"message": "\"Islands\" has no conditions, so it applies to every order."
}
]
}{
"error": "Unauthorized",
"message": "Authentication credentials are missing or invalid",
"status_code": 401
}{
"message": "User does not have the right permissions."
}