---
title: "Determine country of origin"
method: POST
path: "/origin"
tags: ["Origin"]
---

# Determine country of origin

`POST /origin`

## Request

- Base URL: `https://api.tarifflo.com/api/v2`
- URL: `https://api.tarifflo.com/api/v2/origin`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Rules-of-origin determinations (non-preferential, marking, FTA-preferential) for up to 5 goods from their bill of materials. Answers 202 with the run id; a run takes minutes. The result is delivered as an `origin.completed` webhook to the key environment's URL (or `Tarifflo-Webhook-Url`) and pollable at GET /origin/{jobId}.

Requires the API key scope `origin`.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `jobs` object[], required
    - `id` string: Your correlation id, echoed back on the result line.
    - `import_into` string: The importing country (default US).
    - `finished_good` object, required
      - `description` string, required
      - `hts` string
      - `value_usd` number
      - `ex_works_price_usd` number
    - `country_of_finished_production` string, required
    - `claimed_country_of_origin` string
    - `processing` string: What is done in the country of finished production.
    - `bom` object[], required
      - `item` string, required
      - `hts` string
      - `origin` string, required
      - `value_usd` number
    - `automotive` object
    - `fungible_inventory` object
    - `quality` 'ship' | 'screen': "ship" (default, the full ensemble) or "screen" (one draft, about half the cost).
  - `dryRun` boolean: Price the request at the organization's card and reserve nothing; answers 200 with the estimate.

## Response `202`

Queued (or, for `dryRun`, priced with 200)

- union
  - object
    - `jobId` string, required: The run id: poll GET /origin/{jobId}.
    - `credits` object, required: What the job has reserved, used and refunded so far, in credits.
      - `action` 'rate_lookup' | 'adcvd_screen' | 'pga_applicability' | 'code_classified' | 'export_control' | 'origin_determination' | 'entry_filed' | 'entry_prepared' | 'document_ocr' | 'document_extract' | 'document_sort' | 'product_enrich' | 'entry_review' | 'rationale_document' | 'audit_parse' | 'data_export', nullable, required
      - `reserved` number, required
      - `used` number, required
      - `refunded` number, required
    - `status` 'queued', required
    - `jobsQueued` number, required
    - `message` string, required
  - object
    - `dryRun` true, required
    - `estimatedCredits` number, required
    - `lines` object[], required
      - `action` 'rate_lookup' | 'adcvd_screen' | 'pga_applicability' | 'code_classified' | 'export_control' | 'origin_determination' | 'entry_filed' | 'entry_prepared' | 'document_ocr' | 'document_extract' | 'document_sort' | 'product_enrich' | 'entry_review' | 'rationale_document' | 'audit_parse' | 'data_export', required
      - `units` number, required
      - `credits` number, required
    - `balance` number, required
    - `unit` 'token' | 'credit', required
    - `note` string

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `402`: Not enough credits
- `403`: Insufficient access
- `409`: The first request with this Idempotency-Key is still filing
- `500`: Internal server error

---

[API](https://skmtc.dev/tarifflo/apis/tarifflo-api.md) - [All operations](https://skmtc.dev/tarifflo/apis/tarifflo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tarifflo/apis/tarifflo-api/revisions/f048ebac1ac5?raw)
