curl --request POST \
--url https://api.arcuserp.com/v1/shipping-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"priority": 10,
"is_active": true,
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sales_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"min_weight": 0,
"max_weight": 999999,
"item_count_min": 123,
"item_count_max": 123,
"shipping_tokens": [
"<string>"
],
"preferred_service_token": "<string>",
"preferred_carrier": "<string>",
"free_shipping_threshold": 123,
"flat_rate": 123,
"auto_buy": false,
"absorb_cost": true,
"outcome": "<string>",
"condition": {},
"actions": {},
"external_source": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://api.arcuserp.com/v1/shipping-rules"
payload = {
"name": "<string>",
"priority": 10,
"is_active": True,
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sales_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"min_weight": 0,
"max_weight": 999999,
"item_count_min": 123,
"item_count_max": 123,
"shipping_tokens": ["<string>"],
"preferred_service_token": "<string>",
"preferred_carrier": "<string>",
"free_shipping_threshold": 123,
"flat_rate": 123,
"auto_buy": False,
"absorb_cost": True,
"outcome": "<string>",
"condition": {},
"actions": {},
"external_source": "<string>",
"external_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
priority: 10,
is_active: true,
location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sales_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_category_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
min_weight: 0,
max_weight: 999999,
item_count_min: 123,
item_count_max: 123,
shipping_tokens: ['<string>'],
preferred_service_token: '<string>',
preferred_carrier: '<string>',
free_shipping_threshold: 123,
flat_rate: 123,
auto_buy: false,
absorb_cost: true,
outcome: '<string>',
condition: {},
actions: {},
external_source: '<string>',
external_id: '<string>'
})
};
fetch('https://api.arcuserp.com/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://api.arcuserp.com/v1/shipping-rules",
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([
'name' => '<string>',
'priority' => 10,
'is_active' => true,
'location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sales_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'min_weight' => 0,
'max_weight' => 999999,
'item_count_min' => 123,
'item_count_max' => 123,
'shipping_tokens' => [
'<string>'
],
'preferred_service_token' => '<string>',
'preferred_carrier' => '<string>',
'free_shipping_threshold' => 123,
'flat_rate' => 123,
'auto_buy' => false,
'absorb_cost' => true,
'outcome' => '<string>',
'condition' => [
],
'actions' => [
],
'external_source' => '<string>',
'external_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.arcuserp.com/v1/shipping-rules"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"priority\": 10,\n \"is_active\": true,\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sales_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"min_weight\": 0,\n \"max_weight\": 999999,\n \"item_count_min\": 123,\n \"item_count_max\": 123,\n \"shipping_tokens\": [\n \"<string>\"\n ],\n \"preferred_service_token\": \"<string>\",\n \"preferred_carrier\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"flat_rate\": 123,\n \"auto_buy\": false,\n \"absorb_cost\": true,\n \"outcome\": \"<string>\",\n \"condition\": {},\n \"actions\": {},\n \"external_source\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.arcuserp.com/v1/shipping-rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"priority\": 10,\n \"is_active\": true,\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sales_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"min_weight\": 0,\n \"max_weight\": 999999,\n \"item_count_min\": 123,\n \"item_count_max\": 123,\n \"shipping_tokens\": [\n \"<string>\"\n ],\n \"preferred_service_token\": \"<string>\",\n \"preferred_carrier\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"flat_rate\": 123,\n \"auto_buy\": false,\n \"absorb_cost\": true,\n \"outcome\": \"<string>\",\n \"condition\": {},\n \"actions\": {},\n \"external_source\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arcuserp.com/v1/shipping-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"priority\": 10,\n \"is_active\": true,\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sales_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"min_weight\": 0,\n \"max_weight\": 999999,\n \"item_count_min\": 123,\n \"item_count_max\": 123,\n \"shipping_tokens\": [\n \"<string>\"\n ],\n \"preferred_service_token\": \"<string>\",\n \"preferred_carrier\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"flat_rate\": 123,\n \"auto_buy\": false,\n \"absorb_cost\": true,\n \"outcome\": \"<string>\",\n \"condition\": {},\n \"actions\": {},\n \"external_source\": \"<string>\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}Create a shipping rule
Creates a new shipping rule for the entity; supplying external_source auto-stamps the calling API key as imported_via_api_key_id and a unique index makes re-imports idempotent, so re-posting the same import returns 409 instead of a duplicate. Requires settings:write scope and also supports the Idempotency-Key header.
curl --request POST \
--url https://api.arcuserp.com/v1/shipping-rules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"priority": 10,
"is_active": true,
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sales_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"min_weight": 0,
"max_weight": 999999,
"item_count_min": 123,
"item_count_max": 123,
"shipping_tokens": [
"<string>"
],
"preferred_service_token": "<string>",
"preferred_carrier": "<string>",
"free_shipping_threshold": 123,
"flat_rate": 123,
"auto_buy": false,
"absorb_cost": true,
"outcome": "<string>",
"condition": {},
"actions": {},
"external_source": "<string>",
"external_id": "<string>"
}
'import requests
url = "https://api.arcuserp.com/v1/shipping-rules"
payload = {
"name": "<string>",
"priority": 10,
"is_active": True,
"location_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sales_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"min_weight": 0,
"max_weight": 999999,
"item_count_min": 123,
"item_count_max": 123,
"shipping_tokens": ["<string>"],
"preferred_service_token": "<string>",
"preferred_carrier": "<string>",
"free_shipping_threshold": 123,
"flat_rate": 123,
"auto_buy": False,
"absorb_cost": True,
"outcome": "<string>",
"condition": {},
"actions": {},
"external_source": "<string>",
"external_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
priority: 10,
is_active: true,
location_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
sales_channel_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
product_category_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
min_weight: 0,
max_weight: 999999,
item_count_min: 123,
item_count_max: 123,
shipping_tokens: ['<string>'],
preferred_service_token: '<string>',
preferred_carrier: '<string>',
free_shipping_threshold: 123,
flat_rate: 123,
auto_buy: false,
absorb_cost: true,
outcome: '<string>',
condition: {},
actions: {},
external_source: '<string>',
external_id: '<string>'
})
};
fetch('https://api.arcuserp.com/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://api.arcuserp.com/v1/shipping-rules",
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([
'name' => '<string>',
'priority' => 10,
'is_active' => true,
'location_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'sales_channel_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'product_category_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'min_weight' => 0,
'max_weight' => 999999,
'item_count_min' => 123,
'item_count_max' => 123,
'shipping_tokens' => [
'<string>'
],
'preferred_service_token' => '<string>',
'preferred_carrier' => '<string>',
'free_shipping_threshold' => 123,
'flat_rate' => 123,
'auto_buy' => false,
'absorb_cost' => true,
'outcome' => '<string>',
'condition' => [
],
'actions' => [
],
'external_source' => '<string>',
'external_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.arcuserp.com/v1/shipping-rules"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"priority\": 10,\n \"is_active\": true,\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sales_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"min_weight\": 0,\n \"max_weight\": 999999,\n \"item_count_min\": 123,\n \"item_count_max\": 123,\n \"shipping_tokens\": [\n \"<string>\"\n ],\n \"preferred_service_token\": \"<string>\",\n \"preferred_carrier\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"flat_rate\": 123,\n \"auto_buy\": false,\n \"absorb_cost\": true,\n \"outcome\": \"<string>\",\n \"condition\": {},\n \"actions\": {},\n \"external_source\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.arcuserp.com/v1/shipping-rules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"priority\": 10,\n \"is_active\": true,\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sales_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"min_weight\": 0,\n \"max_weight\": 999999,\n \"item_count_min\": 123,\n \"item_count_max\": 123,\n \"shipping_tokens\": [\n \"<string>\"\n ],\n \"preferred_service_token\": \"<string>\",\n \"preferred_carrier\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"flat_rate\": 123,\n \"auto_buy\": false,\n \"absorb_cost\": true,\n \"outcome\": \"<string>\",\n \"condition\": {},\n \"actions\": {},\n \"external_source\": \"<string>\",\n \"external_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.arcuserp.com/v1/shipping-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"priority\": 10,\n \"is_active\": true,\n \"location_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"sales_channel_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"product_category_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"min_weight\": 0,\n \"max_weight\": 999999,\n \"item_count_min\": 123,\n \"item_count_max\": 123,\n \"shipping_tokens\": [\n \"<string>\"\n ],\n \"preferred_service_token\": \"<string>\",\n \"preferred_carrier\": \"<string>\",\n \"free_shipping_threshold\": 123,\n \"flat_rate\": 123,\n \"auto_buy\": false,\n \"absorb_cost\": true,\n \"outcome\": \"<string>\",\n \"condition\": {},\n \"actions\": {},\n \"external_source\": \"<string>\",\n \"external_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}{
"error": "not_found",
"code": "not_found",
"type": "not_found",
"hint": "The requested order does not exist or does not belong to this entity.",
"param": "expand[0]",
"required": "accounts:read",
"request_id": "req_abc123"
}Authorizations
API key issued per entity via Settings > Developers > API Keys.
Each key carries scopes (e.g. orders:read, products:write).
Bearer token format: Authorization: Bearer ark_live_ent_
Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.
Headers
Client-generated unique key for idempotent POST/PATCH/DELETE operations. Alias for the Idempotency parameter. Max 255 chars. On retry with the same key, the original response is returned without re-executing the operation. Keys expire after 24 hours.
255Body
Lower runs first.
Layer 4 per-location scope. NULL = entity-wide.
Source-channel condition. NULL = applies to all channels.
Category condition. When set, the rule wins over a non-category rule even at higher priority (TUF-TITE pattern).
Inclusive weight band lower bound (lb).
Inclusive weight band upper bound (lb).
Inclusive item-count band lower bound. NULL = no filter.
Inclusive item-count band upper bound. NULL = no filter.
Allowed Shippo carrier service tokens. First = primary suggestion when preferred_service_token is unset.
Primary suggested Shippo service token (e.g. usps_ground_advantage).
Primary suggested carrier (USPS/UPS/FedEx/DHL Express).
When true and the rule resolves to one unambiguous service, Pack-with-Arcus auto-purchases the label.
Per-rule cost-absorption override. NULL = use entity default; true = absorb (Freight Out GL); false = charge customer.
Freight-rule outcome (force_freight/force_parcel/etc). Presence marks a freight rule rather than a carrier-routing rule.
Freight-rule condition JSONB (validated).
Freight-rule actions (block_message / accessorials).
Migration provenance tag.
Response
Shipping rule created
The response is of type object.
Was this page helpful?

