Skip to main content
POST
Requires the restrict:read scope. A rule must have at least one of hs_prefix, keywords, or origin_countries — a rule that could match nothing is rejected with 400.
string
required
prohibition, restriction, or observation.
string
required
Short rule name (up to 200 chars) — shown on matches.
string
default:"*"
Imposing country (ISO alpha-2), or * for any destination (import rules) / any origin leg (export rules).
string
default:"import"
import (checked against the ship-to country) or export (checked against the ship-from country).
string
HS code prefix (up to 14 chars; non-digits are stripped, stored to 10 digits). Items whose code falls under this prefix match.
array
Up to 100 keywords (each 1–100 chars, lower-cased on storage). Matched against the item’s title/description/materials/category/brand text.
array
Up to 300 ISO alpha-2 codes — the rule fires on items manufactured in any of them.
string
Longer explanation (up to 10000 chars) returned on matches.
object | null
{ id } of the created rule.