{"openapi":"3.1.0","info":{"title":"DutyCite API","version":"0.1.0","description":"US import duty API where every rate comes with its official source citation. Informational only; not customs brokerage or binding classification."},"servers":[{"url":"https://dutycite.com"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"DutyRequest":{"type":"object","required":["hts","origin","customs_value"],"properties":{"hts":{"type":"string","example":"6109.10.00.12"},"origin":{"type":"string","example":"VN","description":"ISO 3166-1 alpha-2"},"customs_value":{"type":"number","example":20000},"mode":{"type":"string","enum":["ocean","air","truck","rail","mail","other"],"default":"ocean"},"quantity":{"type":"number"},"unit":{"type":"string"},"quantities":{"type":"object","additionalProperties":{"type":"number"}},"claim_preference":{"type":"boolean","default":false},"entry_type":{"type":"string","enum":["formal","informal","auto"],"default":"auto"},"entry_date":{"type":"string","format":"date"},"options":{"type":"object","properties":{"auto_part":{"type":"boolean"},"mhd_vehicle_part":{"type":"boolean"},"metal_weight_pct":{"type":"number"},"uk_melted":{"type":"boolean"}}}}}}},"paths":{"/v1/hts/search":{"get":{"summary":"Search HTS (free)","operationId":"htsSearch","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":50}}],"responses":{"200":{"description":"Results"}}}},"/v1/hts/{code}":{"get":{"summary":"Look up an HTS code (free)","operationId":"htsLookup","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Entry"},"404":{"description":"Not found"}}}},"/v1/duty":{"post":{"summary":"Calculate duty stack ($0.02)","operationId":"calculateDuty","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DutyRequest"}}}},"responses":{"200":{"description":"Duty stack with sources"},"402":{"description":"Payment required: missing API key or insufficient credits. Body includes checkout links."},"422":{"description":"Validation error (not charged)"}}}},"/v1/duty/bulk":{"post":{"summary":"Bulk duty ($0.01/line, max 100)","operationId":"calculateDutyBulk","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["lines"],"properties":{"lines":{"type":"array","maxItems":100,"items":{"$ref":"#/components/schemas/DutyRequest"}},"mode":{"type":"string"},"entry_type":{"type":"string"}}}}}},"responses":{"200":{"description":"Per-line results + entry totals"},"402":{"description":"Payment required: missing API key or insufficient credits. Body includes checkout links."}}}},"/v1/account":{"get":{"summary":"Key balance","operationId":"account","security":[{"bearer":[]}],"responses":{"200":{"description":"Balance"}}}},"/v1/keys/trial":{"post":{"summary":"Free trial key (10 calls)","operationId":"trialKey","responses":{"201":{"description":"Key (shown once)"},"429":{"description":"Limit reached"}}}},"/v1/checkout":{"post":{"summary":"Create Stripe Checkout session for a credit pack","operationId":"checkout","parameters":[{"name":"pack","in":"query","schema":{"type":"string","enum":["try","starter","growth","scale"]}},{"name":"key_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"{url}"}}}}}}