{
  "openapi": "3.1.0",
  "info": {
    "title": "XQustoms Tariff Intelligence API",
    "version": "1.0.0",
    "description": "Current tariff-api contract. Served on the own domain at https://xqustoms.com/api/v1. Response examples are illustrative structures, not live tariff assessments. Internal engine includes V2 intelligence features; public /v1 is the branded path to the same engine, not a new backend implementation.\n\nOperations: Every response carries x-request-id (send your own x-request-id, 8–64 chars [A-Za-z0-9_-], to correlate) and x-api-version. Gateway failures return JSON {error, message, request_id}: 502 UPSTREAM_UNAVAILABLE and 504 UPSTREAM_TIMEOUT are safe to retry with backoff; 413 PAYLOAD_TOO_LARGE above 2 MB.\n\nScopes: keys carry scopes tariff:classify, tariff:lookup, tariff:calculate, tariff:feedback and tariff:ask (reserved; no public route requires it yet). Each operation names its scope in x-required-scope. Legacy permissions map as tariff:read = classify + lookup + feedback and tariff:calculate = calculate; keys issued before the scope rollout keep full access. A key without the scope gets 403 INSUFFICIENT_SCOPE {error, required_scope}; a key that may not send feedback gets 403 FEEDBACK_NOT_ALLOWED.\n\nRate limit: only keys with a configured per-minute limit are limited. Above it the answer is 429 RATE_LIMITED {error, retry_after_seconds} with a Retry-After header (seconds); wait and retry. Denied and successful logged calls count, 429 answers do not.\n\nTest keys: keys with the prefix xqt_test_ run the same engine on the same data, are never billed and consume no quota (meta.quota_remaining is null). Their answers carry meta.test_mode = true (where a meta object exists) and the header x-xqustoms-test: true.\n\nAttribution: optional request headers X-Integration and X-End-Customer-Ref (max 128 characters, control characters removed) are stored with the usage entry for reporting. They never change the result. Do not send personal data."
  },
  "servers": [
    {
      "url": "https://xqustoms.com/api/v1",
      "description": "XQustoms production API"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "responses": {
      "GatewayError": {
        "description": "Gateway error (502 UPSTREAM_UNAVAILABLE, 504 UPSTREAM_TIMEOUT, 413 PAYLOAD_TOO_LARGE)",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error",
                "message",
                "request_id"
              ],
              "properties": {
                "error": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "request_id": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "429 RATE_LIMITED – per-minute limit of this key reached. Retry after the number of seconds in Retry-After.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Seconds to wait before retrying."
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "error",
                "retry_after_seconds"
              ],
              "properties": {
                "error": {
                  "type": "string",
                  "enum": [
                    "RATE_LIMITED"
                  ]
                },
                "retry_after_seconds": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "EndCustomerRef": {
        "name": "X-End-Customer-Ref",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 128
        },
        "description": "Optional. Your own reference for the end customer this call is made for; stored with the usage entry. No personal data."
      },
      "Integration": {
        "name": "X-Integration",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "maxLength": 128
        },
        "description": "Optional. Name of the calling integration or channel; stored with the usage entry and used for usage reports."
      }
    }
  },
  "paths": {
    "/product-lookup": {
      "post": {
        "operationId": "product_lookup",
        "summary": "Product lookup",
        "description": "One request from an e-commerce platform or ERP: classify products and retrieve their tariff context.\n\nQuota: 1 unit per input item (1–50). The batch is charged before matching; NO_MATCH items are also charged.\n\nquery OR code is required on every item. If both exist, code takes precedence.\nA top candidate is a suggestion, not a binding classification. Review TARIC subdivisions even when confidence is high.\nOne request returns codes, document/Y-code conditions, CBAM/PGA flags, VAT and descriptions, not a full landed-cost calculation. Call calculate separately for tax amounts.\nCanada: CBSA T2026-2 import nomenclature and MFN only. Preferential treatment texts are stored but not automatically applied. Statistics Canada 2026 export candidates are separate from import codes. MFN + 5% standard GST calculation requires CAD, exact 10-digit code and canada_review confirmations; no additional duties or exemptions are inferred. General Canadian document checklist is available; product-specific permits, SIMA/surtaxes/excise, preferential eligibility and export charges still require review. No EU Y-codes apply.\n\nnational_datasets = [{dataset_key, title, country, kind, rows:[{row_key, data, verification_status}]}]: admin-managed national lists of the line's country (e.g. TR İGV, US Section 301 lists) matched on the code or a parent code; base nomenclature/rate sets are excluded. Empty array when no list applies. Required scope: tariff:classify.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "jurisdiction": "EU",
                  "direction": "import",
                  "results": [
                    {
                      "ref": "SKU-COTTON-01",
                      "query": "pamuklu erkek tişört",
                      "status": "OK",
                      "confidence": "review",
                      "candidates": [],
                      "lookup": {
                        "classification": {
                          "stored_code": "6109100010"
                        },
                        "document_requirements": [],
                        "compliance_flags": []
                      }
                    }
                  ],
                  "meta": {
                    "quota_remaining": 99,
                    "units": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jurisdiction": {
                    "type": "string",
                    "description": "National tariff jurisdiction. EU country is selected separately.",
                    "enum": [
                      "EU",
                      "UK",
                      "US",
                      "TR",
                      "CA"
                    ]
                  },
                  "country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "direction": {
                    "type": "string",
                    "description": "",
                    "enum": [
                      "import",
                      "export"
                    ]
                  },
                  "partner_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "languages": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "",
                      "enum": [
                        "de",
                        "en",
                        "tr"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 3,
                    "default": [
                      "en"
                    ]
                  },
                  "candidates": {
                    "type": "integer",
                    "description": "Returned suggestions per item.",
                    "minimum": 1,
                    "maximum": 10,
                    "default": 3
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": "string",
                          "description": "ERP/SKU correlation reference; returned unchanged.",
                          "maxLength": 64
                        },
                        "query": {
                          "type": "string",
                          "description": "Product type + material + characteristics, in any supported search language.",
                          "minLength": 2,
                          "maxLength": 200
                        },
                        "code": {
                          "type": "string",
                          "description": "Exact national code; if supplied, query classification is skipped.",
                          "maxLength": 14
                        },
                        "qualifiers": {
                          "type": "object",
                          "properties": {
                            "trade_name": {
                              "type": "string",
                              "description": "Commercial product name.",
                              "maxLength": 120
                            },
                            "brand": {
                              "type": "string",
                              "description": "",
                              "maxLength": 80
                            },
                            "model": {
                              "type": "string",
                              "description": "",
                              "maxLength": 80
                            },
                            "material": {
                              "type": "string",
                              "description": "Composition; include percentages where known.",
                              "maxLength": 160
                            },
                            "use": {
                              "type": "string",
                              "description": "Intended use.",
                              "maxLength": 160
                            }
                          },
                          "required": []
                        }
                      },
                      "required": [],
                      "anyOf": [
                        {
                          "required": [
                            "query"
                          ]
                        },
                        {
                          "required": [
                            "code"
                          ]
                        }
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 50
                  }
                },
                "required": [
                  "jurisdiction",
                  "direction",
                  "items"
                ]
              },
              "example": {
                "jurisdiction": "EU",
                "country": "DE",
                "direction": "import",
                "partner_country": "CN",
                "languages": [
                  "de",
                  "en"
                ],
                "candidates": 3,
                "items": [
                  {
                    "ref": "SKU-COTTON-01",
                    "query": "pamuklu erkek tişört",
                    "qualifiers": {
                      "material": "100% Baumwolle",
                      "use": "Bekleidung"
                    }
                  },
                  {
                    "ref": "SKU-STEEL-02",
                    "code": "7208390090"
                  }
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:classify"
      }
    },
    "/hs-lookup": {
      "post": {
        "operationId": "hs_lookup",
        "summary": "HS-Lookup",
        "description": "Retrieve a complete record for one exact national tariff code, including declaration format, documents, VAT and compliance flags.\n\nQuota: 1 unit after the code is found and declarable.\n\ncountry defaults: EU → DE, UK → GB, US → US, TR → TR, CA → CA. Send a country that belongs to the chosen jurisdiction; the current endpoint does not reject inconsistent combinations.\npartner_country is the trading partner used for document applicability; preserve origin context in import flows.\n404 CODE_NOT_FOUND and 422 CODE_NOT_DECLARABLE may return alternative candidates.\nGermany’s national 11th digit and missing official EZT subdivision texts must be reviewed; never append a digit on your own.\nTR/US document coverage is not a complete national certificate catalogue. CBAM flags identify potential obligations; no emissions reporting or certificate-cost calculation is included.\nCanada: CBSA T2026-2 import nomenclature and MFN only. Preferential treatment texts are stored but not automatically applied. Statistics Canada 2026 export candidates are separate from import codes. MFN + 5% standard GST calculation requires CAD, exact 10-digit code and canada_review confirmations; no additional duties or exemptions are inferred. General Canadian document checklist is available; product-specific permits, SIMA/surtaxes/excise, preferential eligibility and export charges still require review. No EU Y-codes apply.\nCanada: CBSA T2026-2 import nomenclature and MFN only. Preferential treatment texts are stored but not automatically applied. Statistics Canada 2026 export candidates are available. CAD MFN + 5% standard GST requires exact code and canada_review confirmations; product-specific permits, SIMA/surtaxes/excise, exemptions and export charges require separate review. No EU Y-codes apply.\nUS origin-based additional duties: for jurisdiction US, direction import and partner_country (origin), us_duty_layers = {hts_code, origin_country, base, mfn_rate, layers[{code,name,rate,ch99,top_up,condition?,possible_exemptions?[{heading,ref,text,claim}],verification_status,legal_basis}], waived[{code,because_of,via?}], additional_rate, total_rate, missing}. Rates are percentage points on customs value (transaction value, no international freight). Section 301 country rates (HTSUS 9903.05.20–9903.05.84, e.g. Türkiye 12.5% under 9903.05.79), Section 232 and their non-stacking rules come from the same engine as calculate. ch99 lists the Chapter 99 heading(s) to declare in addition to the HTSUS line. Top-up rules (EU, JP, CH: total duty = rate) add only the gap above MFN. All country rows are to_verify.\n\nnational_datasets = [{dataset_key, title, country, kind, rows:[{row_key, data, verification_status}]}]: admin-managed national lists of the line's country (e.g. TR İGV, US Section 301 lists) matched on the code or a parent code; base nomenclature/rate sets are excluded. Empty array when no list applies. Required scope: tariff:lookup.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "jurisdiction": "EU",
                  "country": "DE",
                  "direction": "import",
                  "classification": {
                    "stored_code": "6109100010",
                    "declared_code": "6109100010",
                    "digits": 11,
                    "status": "national_digit_missing"
                  },
                  "duty": {
                    "third_country": null,
                    "text": null
                  },
                  "document_requirements": [],
                  "compliance_flags": [],
                  "german_text": null,
                  "meta": {
                    "quota_remaining": 99
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "jurisdiction": {
                    "type": "string",
                    "description": "National tariff jurisdiction. EU country is selected separately.",
                    "enum": [
                      "EU",
                      "UK",
                      "US",
                      "TR",
                      "CA"
                    ]
                  },
                  "country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "code": {
                    "type": "string",
                    "description": "Keep codes as strings to preserve leading zeros. HS-Lookup requires an exact declarable national line; punctuation is stripped.",
                    "minLength": 6,
                    "maxLength": 12
                  },
                  "direction": {
                    "type": "string",
                    "description": "",
                    "enum": [
                      "import",
                      "export"
                    ]
                  },
                  "partner_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "languages": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "",
                      "enum": [
                        "de",
                        "en",
                        "tr"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 3,
                    "default": [
                      "en"
                    ]
                  },
                  "qualifiers": {
                    "type": "object",
                    "properties": {
                      "trade_name": {
                        "type": "string",
                        "description": "Commercial product name.",
                        "maxLength": 120
                      },
                      "brand": {
                        "type": "string",
                        "description": "",
                        "maxLength": 80
                      },
                      "model": {
                        "type": "string",
                        "description": "",
                        "maxLength": 80
                      },
                      "material": {
                        "type": "string",
                        "description": "Composition; include percentages where known.",
                        "maxLength": 160
                      },
                      "use": {
                        "type": "string",
                        "description": "Intended use.",
                        "maxLength": 160
                      }
                    },
                    "required": []
                  },
                  "claims": {
                    "type": "array",
                    "maxItems": 6,
                    "items": {
                      "type": "string",
                      "enum": [
                        "us_auto_part",
                        "eu_tr_customs_union",
                        "us_301_listed_article",
                        "us_civil_aircraft",
                        "us_pharmaceutical_use",
                        "us_cafta_dr"
                      ]
                    },
                    "description": "US import only, with partner_country as origin: claimed Section 301 exemptions (see calculate)."
                  },
                  "loaded_on": {
                    "type": "string",
                    "format": "date",
                    "description": "Optional date the goods were loaded onto the vessel at the port of loading. Used for in-transit rules (US 9903.05.85: loaded before 2026-07-24 and entered before 2026-07-28 → no Section 301 country duty). If the entry date is inside a transit window and loaded_on is missing, missing contains CHARGE_IN_TRANSIT_UNKNOWN:<charge_code>."
                  },
                  "entry_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Planned entry date for in-transit windows; default today."
                  }
                },
                "required": [
                  "jurisdiction",
                  "code",
                  "direction"
                ]
              },
              "example": {
                "jurisdiction": "EU",
                "country": "DE",
                "code": "6109100010",
                "direction": "import",
                "partner_country": "CN",
                "languages": [
                  "de",
                  "en",
                  "tr"
                ],
                "qualifiers": {
                  "trade_name": "T-Shirt",
                  "material": "100% Baumwolle"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:lookup"
      }
    },
    "/search": {
      "post": {
        "operationId": "search",
        "summary": "Multilingual search",
        "description": "Search official national lines by code or product description. Ranking weights product type above material and attributes.\n\nInclude destination_country or jurisdiction for national multilingual search. Destination country resolves the national nomenclature; input language never selects the country.\nDE/EN/TR search terms are expanded into tariff terminology. Cached queries are faster; new expansions can be slower. No response-time SLA is promised.\nMaterial-only searches such as pamuk or Baumwolle are ambiguous: add the product type, e.g. cotton T-shirt. Scores are ranking values, not probabilities.\nUse declarable_only:true to omit branches. Candidates are not binding classifications; confirm before lookup/analyze. Required scope: tariff:classify.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "query": "baumwolle tshirt",
                  "jurisdiction": "EU",
                  "expansion": null,
                  "results": [],
                  "meta": {
                    "quota_remaining": 99
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "query": {
                    "type": "string",
                    "description": "",
                    "minLength": 2,
                    "maxLength": 200
                  },
                  "jurisdiction": {
                    "type": "string",
                    "description": "National tariff jurisdiction. EU country is selected separately.",
                    "enum": [
                      "EU",
                      "UK",
                      "US",
                      "TR",
                      "CA"
                    ]
                  },
                  "limit": {
                    "type": "integer",
                    "description": "",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 20
                  },
                  "min_digits": {
                    "type": "integer",
                    "description": "Legacy search only (when jurisdiction is omitted).",
                    "minimum": 2,
                    "maximum": 12,
                    "default": 2
                  },
                  "expand": {
                    "type": "boolean",
                    "description": "Use cached multilingual query expansion; false skips expansion.",
                    "default": true
                  },
                  "destination_country": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "Destination ISO country: DE resolves to EU TARIC, US to HTSUS. Unsupported countries return 422; conflicting jurisdiction returns 400."
                  },
                  "declarable_only": {
                    "type": "boolean",
                    "default": false,
                    "description": "Return only national declarable candidates; confirmation is still required."
                  },
                  "query_language": {
                    "type": "string",
                    "enum": [
                      "tr",
                      "en",
                      "de"
                    ],
                    "description": "Optional. Language of text_in_query_language and ancestry texts. Omitted: detected from the query (single words may be misdetected). Does not change codes or ranking country."
                  }
                },
                "required": [
                  "query"
                ]
              },
              "example": {
                "destination_country": "DE",
                "query": "pamuklu tişört",
                "declarable_only": true,
                "limit": 5
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:classify"
      }
    },
    "/lookup": {
      "post": {
        "operationId": "lookup",
        "summary": "Tariff lookup",
        "description": "Resolve destination duties, VAT, measures, preference candidates and source metadata.\n\nQuota: 1 unit per request.\n\nResolution can use the longest matching prefix. Inspect national_line and rate_source; a prefix match is not proof of a declarable code.\nNo monetary calculation; use calculate for costs.\nCanada: CBSA T2026-2 import nomenclature and MFN only. Preferential treatment texts are stored but not automatically applied. Statistics Canada 2026 export candidates are separate from import codes. MFN + 5% standard GST calculation requires CAD, exact 10-digit code and canada_review confirmations; no additional duties or exemptions are inferred. General Canadian document checklist is available; product-specific permits, SIMA/surtaxes/excise, preferential eligibility and export charges still require review. No EU Y-codes apply.\nCanada: CBSA T2026-2 import nomenclature and MFN only. Preferential treatment texts are stored but not automatically applied. Statistics Canada 2026 export candidates are available. CAD MFN + 5% standard GST requires exact code and canada_review confirmations; product-specific permits, SIMA/surtaxes/excise, exemptions and export charges require separate review. No EU Y-codes apply.\nUS origin-based additional duties: when destination is US and origin_country is set, us_duty_layers = {hts_code, origin_country, base, mfn_rate, layers[{code,name,rate,ch99,top_up,condition?,possible_exemptions?[{heading,ref,text,claim}],verification_status,legal_basis}], waived[{code,because_of,via?}], additional_rate, total_rate, missing}. Rates are percentage points on customs value (transaction value, no international freight). Section 301 country rates (HTSUS 9903.05.20–9903.05.84, e.g. Türkiye 12.5% under 9903.05.79), Section 232 and their non-stacking rules come from the same engine as calculate. ch99 lists the Chapter 99 heading(s) to declare in addition to the HTSUS line. Top-up rules (EU, JP, CH: total duty = rate) add only the gap above MFN. All country rows are to_verify. Required scope: tariff:lookup.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hs_code": "6109100010",
                  "jurisdiction": "EU",
                  "duty_rate": null,
                  "vat": null,
                  "measures": [],
                  "required_documents": [],
                  "missing": [
                    "DUTY_RATE_MISSING",
                    "VAT_RATE_MISSING"
                  ],
                  "meta": {
                    "quota_remaining": 99,
                    "billed_as_extra": false,
                    "disclaimer": "Estimate; binding assessment by customs authority."
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hs_code": {
                    "type": "string",
                    "description": "Code with 4–12 digits after punctuation is stripped. This route may resolve a longer code through a rated prefix."
                  },
                  "destination_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "origin_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "claims": {
                    "type": "array",
                    "maxItems": 6,
                    "description": "Caller-declared evidence, never verified automatically. eu_tr_customs_union: 0% EU duty only for TR origin, EU destination, chapters 25–97 outside ECSC coal/steel, otherwise claims_rejected [{claim,reason}]. US Section 301 (HTSUS ch.99 U.S. note 52) exemptions waive the country duty only when claimed AND the HTSUS line is on the official list: us_301_listed_article (described articles, 9903.05.87 and 9903.06.01/.03/.05/.08/.11/.13/.15/.17/.19/.21), us_civil_aircraft (9903.05.88), us_pharmaceutical_use (9903.05.89), us_cafta_dr (9903.06.06/.09). A waived layer appears in us_duty_layers.waived / calculation.waived_charges with because_of = heading and via = claim.",
                    "items": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "us_auto_part",
                            "eu_tr_customs_union",
                            "us_301_listed_article",
                            "us_civil_aircraft",
                            "us_pharmaceutical_use",
                            "us_cafta_dr"
                          ]
                        },
                        {
                          "type": "object",
                          "required": [
                            "claim"
                          ],
                          "properties": {
                            "claim": {
                              "type": "string",
                              "enum": [
                                "us_auto_part",
                                "eu_tr_customs_union",
                                "us_301_listed_article",
                                "us_civil_aircraft",
                                "us_pharmaceutical_use",
                                "us_cafta_dr"
                              ]
                            },
                            "proof_code": {
                              "type": "string",
                              "maxLength": 8
                            }
                          }
                        }
                      ]
                    }
                  },
                  "departure_country": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "Optional ISO country the goods are shipped from. Duties always follow origin_country; when it differs, origin_notes returns ORIGIN_DEPARTURE_DIFFER (US: transshipment does not remove origin-based additional duties)."
                  },
                  "loaded_on": {
                    "type": "string",
                    "format": "date",
                    "description": "Optional date the goods were loaded onto the vessel at the port of loading. Used for in-transit rules (US 9903.05.85: loaded before 2026-07-24 and entered before 2026-07-28 → no Section 301 country duty). If the entry date is inside a transit window and loaded_on is missing, missing contains CHARGE_IN_TRANSIT_UNKNOWN:<charge_code>."
                  }
                },
                "required": [
                  "hs_code",
                  "destination_country"
                ]
              },
              "example": {
                "hs_code": "6109100010",
                "destination_country": "DE",
                "origin_country": "CN"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:lookup"
      }
    },
    "/measures": {
      "post": {
        "operationId": "measures",
        "summary": "Measures & documents",
        "description": "Return the same resolved tariff context as lookup, including measures, conditions and required documents.\n\nQuota: 1 unit per request.\n\nCurrently returns the same response shape as lookup, not a measures-only array.\nDocument and preference conditions depend on origin and available measures.\nUS origin-based additional duties: when destination is US and origin_country is set, us_duty_layers = {hts_code, origin_country, base, mfn_rate, layers[{code,name,rate,ch99,top_up,condition?,possible_exemptions?[{heading,ref,text,claim}],verification_status,legal_basis}], waived[{code,because_of,via?}], additional_rate, total_rate, missing}. Rates are percentage points on customs value (transaction value, no international freight). Section 301 country rates (HTSUS 9903.05.20–9903.05.84, e.g. Türkiye 12.5% under 9903.05.79), Section 232 and their non-stacking rules come from the same engine as calculate. ch99 lists the Chapter 99 heading(s) to declare in addition to the HTSUS line. Top-up rules (EU, JP, CH: total duty = rate) add only the gap above MFN. All country rows are to_verify. Required scope: tariff:lookup.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hs_code": "6109100010",
                  "jurisdiction": "EU",
                  "duty_rate": null,
                  "vat": null,
                  "measures": [],
                  "required_documents": [],
                  "missing": [
                    "DUTY_RATE_MISSING",
                    "VAT_RATE_MISSING"
                  ],
                  "meta": {
                    "quota_remaining": 99,
                    "billed_as_extra": false,
                    "disclaimer": "Estimate; binding assessment by customs authority."
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hs_code": {
                    "type": "string",
                    "description": "Code with 4–12 digits after punctuation is stripped. This route may resolve a longer code through a rated prefix."
                  },
                  "destination_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "origin_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "claims": {
                    "type": "array",
                    "maxItems": 6,
                    "description": "Caller-declared evidence, never verified automatically. eu_tr_customs_union: 0% EU duty only for TR origin, EU destination, chapters 25–97 outside ECSC coal/steel, otherwise claims_rejected [{claim,reason}]. US Section 301 (HTSUS ch.99 U.S. note 52) exemptions waive the country duty only when claimed AND the HTSUS line is on the official list: us_301_listed_article (described articles, 9903.05.87 and 9903.06.01/.03/.05/.08/.11/.13/.15/.17/.19/.21), us_civil_aircraft (9903.05.88), us_pharmaceutical_use (9903.05.89), us_cafta_dr (9903.06.06/.09). A waived layer appears in us_duty_layers.waived / calculation.waived_charges with because_of = heading and via = claim.",
                    "items": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "us_auto_part",
                            "eu_tr_customs_union",
                            "us_301_listed_article",
                            "us_civil_aircraft",
                            "us_pharmaceutical_use",
                            "us_cafta_dr"
                          ]
                        },
                        {
                          "type": "object",
                          "required": [
                            "claim"
                          ],
                          "properties": {
                            "claim": {
                              "type": "string",
                              "enum": [
                                "us_auto_part",
                                "eu_tr_customs_union",
                                "us_301_listed_article",
                                "us_civil_aircraft",
                                "us_pharmaceutical_use",
                                "us_cafta_dr"
                              ]
                            },
                            "proof_code": {
                              "type": "string",
                              "maxLength": 8
                            }
                          }
                        }
                      ]
                    }
                  },
                  "departure_country": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "Optional ISO country the goods are shipped from. Duties always follow origin_country; when it differs, origin_notes returns ORIGIN_DEPARTURE_DIFFER (US: transshipment does not remove origin-based additional duties)."
                  },
                  "loaded_on": {
                    "type": "string",
                    "format": "date",
                    "description": "Optional date the goods were loaded onto the vessel at the port of loading. Used for in-transit rules (US 9903.05.85: loaded before 2026-07-24 and entered before 2026-07-28 → no Section 301 country duty). If the entry date is inside a transit window and loaded_on is missing, missing contains CHARGE_IN_TRANSIT_UNKNOWN:<charge_code>."
                  }
                },
                "required": [
                  "hs_code",
                  "destination_country"
                ]
              },
              "example": {
                "hs_code": "6109100010",
                "destination_country": "DE",
                "origin_country": "CN"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:lookup"
      }
    },
    "/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "Landed-cost calculation",
        "description": "Calculate duty, VAT and supported national import charges with source-based rules.\n\nQuota: 1 unit per request.\n\nEU/UK/TR: CIF uses value + freight + insurance. US duty base excludes international freight/insurance.\nSpecific duties are only computed for supported per-kg expressions with net_mass_kg and matching currency; otherwise SPECIFIC_DUTY_NOT_CALCULATED remains visible.\nUS Section 301/232 and TR İGV/EMY/ÖTV are conditional. claims: [us_auto_part, eu_tr_customs_union] are caller evidence/context, not automatically verified eligibility.\ncurrency is a label/input; no general currency conversion occurs. TR TRY-dependent charges use available TCMB data and report missing FX.\ncomplete and missing must both be checked; estimates are not customs rulings.\nCanada: CBSA T2026-2 import nomenclature and MFN only. Preferential treatment texts are stored but not automatically applied. Statistics Canada 2026 export candidates are separate from import codes. MFN + 5% standard GST calculation requires CAD, exact 10-digit code and canada_review confirmations; no additional duties or exemptions are inferred. General Canadian document checklist is available; product-specific permits, SIMA/surtaxes/excise, preferential eligibility and export charges still require review. No EU Y-codes apply.\nUS origin-based additional duties: when destination is US and origin_country is set, us_duty_layers = {hts_code, origin_country, base, mfn_rate, layers[{code,name,rate,ch99,top_up,condition?,possible_exemptions?[{heading,ref,text,claim}],verification_status,legal_basis}], waived[{code,because_of,via?}], additional_rate, total_rate, missing}. Rates are percentage points on customs value (transaction value, no international freight). Section 301 country rates (HTSUS 9903.05.20–9903.05.84, e.g. Türkiye 12.5% under 9903.05.79), Section 232 and their non-stacking rules come from the same engine as calculate. ch99 lists the Chapter 99 heading(s) to declare in addition to the HTSUS line. Top-up rules (EU, JP, CH: total duty = rate) add only the gap above MFN. All country rows are to_verify.\ncalculation.charges[] carry ch99_headings (Chapter 99 heading parsed from the legal basis); waived_charges lists non-stacking or claimed exemptions. Required scope: tariff:calculate.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "hs_code": "6109100010",
                  "jurisdiction": "EU",
                  "duty_rate": null,
                  "vat": null,
                  "measures": [],
                  "required_documents": [],
                  "missing": [
                    "DUTY_RATE_MISSING",
                    "VAT_RATE_MISSING"
                  ],
                  "meta": {
                    "quota_remaining": 99,
                    "billed_as_extra": false,
                    "disclaimer": "Estimate; binding assessment by customs authority."
                  },
                  "currency": "EUR",
                  "calculation": {
                    "cif_value": 217,
                    "duty": null,
                    "vat": null,
                    "total_taxes": null,
                    "complete": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hs_code": {
                    "type": "string",
                    "description": "Code with 4–12 digits after punctuation is stripped. This route may resolve a longer code through a rated prefix."
                  },
                  "destination_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "origin_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "customs_value": {
                    "type": "number",
                    "description": "Transaction/customs value in the given currency. Freight and insurance are supplied separately; do not include them twice.",
                    "minimum": 0
                  },
                  "freight": {
                    "type": "number",
                    "description": "International freight. US calculations exclude this from the customs duty base.",
                    "minimum": 0
                  },
                  "insurance": {
                    "type": "number",
                    "description": "International insurance. US calculations exclude this from the customs duty base.",
                    "minimum": 0
                  },
                  "net_mass_kg": {
                    "type": "number",
                    "description": "Net mass for supported per-kg specific duty expressions.",
                    "exclusiveMinimum": 0
                  },
                  "currency": {
                    "type": "string",
                    "description": "Three-character currency code. No general automatic FX conversion.",
                    "minLength": 3,
                    "maxLength": 3,
                    "default": "EUR"
                  },
                  "payment_terms": {
                    "type": "string",
                    "description": "Payment terms used to evaluate conditional charges, e.g. KKDF.",
                    "maxLength": 40
                  },
                  "transport_mode": {
                    "type": "string",
                    "description": "",
                    "enum": [
                      "sea",
                      "air",
                      "road",
                      "rail",
                      "post"
                    ]
                  },
                  "vehicle": {
                    "type": "object",
                    "properties": {
                      "propulsion": {
                        "type": "string",
                        "description": "",
                        "enum": [
                          "ice",
                          "hybrid",
                          "phev",
                          "ev"
                        ]
                      },
                      "cc": {
                        "type": "number",
                        "description": "Engine displacement in cm³.",
                        "exclusiveMinimum": 0
                      },
                      "kw": {
                        "type": "number",
                        "description": "Motor power in kW.",
                        "exclusiveMinimum": 0
                      }
                    },
                    "required": [
                      "propulsion"
                    ]
                  },
                  "claims": {
                    "type": "array",
                    "maxItems": 6,
                    "description": "Caller-declared evidence, never verified automatically. eu_tr_customs_union: 0% EU duty only for TR origin, EU destination, chapters 25–97 outside ECSC coal/steel, otherwise claims_rejected [{claim,reason}]. US Section 301 (HTSUS ch.99 U.S. note 52) exemptions waive the country duty only when claimed AND the HTSUS line is on the official list: us_301_listed_article (described articles, 9903.05.87 and 9903.06.01/.03/.05/.08/.11/.13/.15/.17/.19/.21), us_civil_aircraft (9903.05.88), us_pharmaceutical_use (9903.05.89), us_cafta_dr (9903.06.06/.09). A waived layer appears in us_duty_layers.waived / calculation.waived_charges with because_of = heading and via = claim.",
                    "items": {
                      "oneOf": [
                        {
                          "type": "string",
                          "enum": [
                            "us_auto_part",
                            "eu_tr_customs_union",
                            "us_301_listed_article",
                            "us_civil_aircraft",
                            "us_pharmaceutical_use",
                            "us_cafta_dr"
                          ]
                        },
                        {
                          "type": "object",
                          "required": [
                            "claim"
                          ],
                          "properties": {
                            "claim": {
                              "type": "string",
                              "enum": [
                                "us_auto_part",
                                "eu_tr_customs_union",
                                "us_301_listed_article",
                                "us_civil_aircraft",
                                "us_pharmaceutical_use",
                                "us_cafta_dr"
                              ]
                            },
                            "proof_code": {
                              "type": "string",
                              "maxLength": 8
                            }
                          }
                        }
                      ]
                    }
                  },
                  "canada_review": {
                    "type": "object",
                    "description": "Canada only: caller review, not engine-verified eligibility. CAD customs_value is adjusted CBSA value for duty.",
                    "properties": {
                      "valuation_confirmed": {
                        "type": "boolean"
                      },
                      "standard_gst_no_additional_charges_confirmed": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "valuation_confirmed",
                      "standard_gst_no_additional_charges_confirmed"
                    ]
                  },
                  "clearance_country": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "EU member state of release; import VAT rate and country come from here (default: destination_country)."
                  },
                  "customs_procedure": {
                    "type": "string",
                    "enum": [
                      "4000",
                      "4200"
                    ],
                    "description": "4000 release for free circulation; 4200 VAT-exempt import with onward intra-EU supply (Art. 143(1)(d) Directive 2006/112/EC). Only valid when clearance_country differs from destination_country."
                  },
                  "declaration_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Rates, measures and VAT valid on this date (default: today)."
                  },
                  "inland_freight": {
                    "type": "number",
                    "minimum": 0,
                    "description": "Transport inside the EU to the first destination; enters the import VAT base only, never the customs value."
                  },
                  "departure_country": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "Optional ISO country the goods are shipped from. Duties always follow origin_country; when it differs, origin_notes returns ORIGIN_DEPARTURE_DIFFER (US: transshipment does not remove origin-based additional duties)."
                  },
                  "loaded_on": {
                    "type": "string",
                    "format": "date",
                    "description": "Optional date the goods were loaded onto the vessel at the port of loading. Used for in-transit rules (US 9903.05.85: loaded before 2026-07-24 and entered before 2026-07-28 → no Section 301 country duty). If the entry date is inside a transit window and loaded_on is missing, missing contains CHARGE_IN_TRANSIT_UNKNOWN:<charge_code>."
                  }
                },
                "required": [
                  "hs_code",
                  "destination_country",
                  "customs_value"
                ]
              },
              "example": {
                "hs_code": "6109100010",
                "destination_country": "DE",
                "origin_country": "CN",
                "customs_value": 200,
                "freight": 15,
                "insurance": 2,
                "net_mass_kg": 1.5,
                "currency": "EUR",
                "transport_mode": "road"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:calculate"
      }
    },
    "/bulk-calculate": {
      "post": {
        "operationId": "bulk_calculate",
        "summary": "Bulk calculations",
        "description": "Calculate separate item costs in one request.\n\nQuota: 1 unit per input item (1–100).\n\nItems may have different origin, destination and currency. Do not sum different currencies.\nEach item is treated as its own consignment for de minimis/fixed charges. Use evaluate-shipment for one shared declaration.\nUS origin-based additional duties: when destination is US and origin_country is set, us_duty_layers = {hts_code, origin_country, base, mfn_rate, layers[{code,name,rate,ch99,top_up,condition?,possible_exemptions?[{heading,ref,text,claim}],verification_status,legal_basis}], waived[{code,because_of,via?}], additional_rate, total_rate, missing}. Rates are percentage points on customs value (transaction value, no international freight). Section 301 country rates (HTSUS 9903.05.20–9903.05.84, e.g. Türkiye 12.5% under 9903.05.79), Section 232 and their non-stacking rules come from the same engine as calculate. ch99 lists the Chapter 99 heading(s) to declare in addition to the HTSUS line. Top-up rules (EU, JP, CH: total duty = rate) add only the gap above MFN. All country rows are to_verify.\ncalculation.charges[] carry ch99_headings (Chapter 99 heading parsed from the legal basis); waived_charges lists non-stacking or claimed exemptions. Required scope: tariff:calculate.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "results": [
                    {
                      "hs_code": "6109100010",
                      "jurisdiction": "EU",
                      "duty_rate": null,
                      "vat": null,
                      "measures": [],
                      "required_documents": [],
                      "missing": [
                        "DUTY_RATE_MISSING",
                        "VAT_RATE_MISSING"
                      ],
                      "meta": {
                        "quota_remaining": 99,
                        "billed_as_extra": false,
                        "disclaimer": "Estimate; binding assessment by customs authority."
                      },
                      "currency": "EUR",
                      "calculation": {
                        "cif_value": 217,
                        "duty": null,
                        "vat": null,
                        "total_taxes": null,
                        "complete": false
                      }
                    }
                  ],
                  "meta": {
                    "quota_remaining": 99,
                    "billed_as_extra": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "hs_code": {
                          "type": "string",
                          "description": "Code with 4–12 digits after punctuation is stripped. This route may resolve a longer code through a rated prefix."
                        },
                        "destination_country": {
                          "type": "string",
                          "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                          "minLength": 2,
                          "maxLength": 2
                        },
                        "origin_country": {
                          "type": "string",
                          "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                          "minLength": 2,
                          "maxLength": 2
                        },
                        "customs_value": {
                          "type": "number",
                          "description": "Transaction/customs value in the given currency. Freight and insurance are supplied separately; do not include them twice.",
                          "minimum": 0
                        },
                        "freight": {
                          "type": "number",
                          "description": "International freight. US calculations exclude this from the customs duty base.",
                          "minimum": 0
                        },
                        "insurance": {
                          "type": "number",
                          "description": "International insurance. US calculations exclude this from the customs duty base.",
                          "minimum": 0
                        },
                        "net_mass_kg": {
                          "type": "number",
                          "description": "Net mass for supported per-kg specific duty expressions.",
                          "exclusiveMinimum": 0
                        },
                        "currency": {
                          "type": "string",
                          "description": "Three-character currency code. No general automatic FX conversion.",
                          "minLength": 3,
                          "maxLength": 3,
                          "default": "EUR"
                        },
                        "payment_terms": {
                          "type": "string",
                          "description": "Payment terms used to evaluate conditional charges, e.g. KKDF.",
                          "maxLength": 40
                        },
                        "transport_mode": {
                          "type": "string",
                          "description": "",
                          "enum": [
                            "sea",
                            "air",
                            "road",
                            "rail",
                            "post"
                          ]
                        },
                        "vehicle": {
                          "type": "object",
                          "properties": {
                            "propulsion": {
                              "type": "string",
                              "description": "",
                              "enum": [
                                "ice",
                                "hybrid",
                                "phev",
                                "ev"
                              ]
                            },
                            "cc": {
                              "type": "number",
                              "description": "Engine displacement in cm³.",
                              "exclusiveMinimum": 0
                            },
                            "kw": {
                              "type": "number",
                              "description": "Motor power in kW.",
                              "exclusiveMinimum": 0
                            }
                          },
                          "required": [
                            "propulsion"
                          ]
                        },
                        "claims": {
                          "type": "array",
                          "maxItems": 6,
                          "description": "Caller-declared evidence, never verified automatically. eu_tr_customs_union: 0% EU duty only for TR origin, EU destination, chapters 25–97 outside ECSC coal/steel, otherwise claims_rejected [{claim,reason}]. US Section 301 (HTSUS ch.99 U.S. note 52) exemptions waive the country duty only when claimed AND the HTSUS line is on the official list: us_301_listed_article (described articles, 9903.05.87 and 9903.06.01/.03/.05/.08/.11/.13/.15/.17/.19/.21), us_civil_aircraft (9903.05.88), us_pharmaceutical_use (9903.05.89), us_cafta_dr (9903.06.06/.09). A waived layer appears in us_duty_layers.waived / calculation.waived_charges with because_of = heading and via = claim.",
                          "items": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "us_auto_part",
                                  "eu_tr_customs_union",
                                  "us_301_listed_article",
                                  "us_civil_aircraft",
                                  "us_pharmaceutical_use",
                                  "us_cafta_dr"
                                ]
                              },
                              {
                                "type": "object",
                                "required": [
                                  "claim"
                                ],
                                "properties": {
                                  "claim": {
                                    "type": "string",
                                    "enum": [
                                      "us_auto_part",
                                      "eu_tr_customs_union",
                                      "us_301_listed_article",
                                      "us_civil_aircraft",
                                      "us_pharmaceutical_use",
                                      "us_cafta_dr"
                                    ]
                                  },
                                  "proof_code": {
                                    "type": "string",
                                    "maxLength": 8
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "canada_review": {
                          "type": "object",
                          "description": "Canada only: caller review, not engine-verified eligibility. CAD customs_value is adjusted CBSA value for duty.",
                          "properties": {
                            "valuation_confirmed": {
                              "type": "boolean"
                            },
                            "standard_gst_no_additional_charges_confirmed": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "valuation_confirmed",
                            "standard_gst_no_additional_charges_confirmed"
                          ]
                        },
                        "clearance_country": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 2,
                          "description": "EU member state of release; import VAT rate and country come from here (default: destination_country)."
                        },
                        "customs_procedure": {
                          "type": "string",
                          "enum": [
                            "4000",
                            "4200"
                          ],
                          "description": "4000 release for free circulation; 4200 VAT-exempt import with onward intra-EU supply (Art. 143(1)(d) Directive 2006/112/EC). Only valid when clearance_country differs from destination_country."
                        },
                        "declaration_date": {
                          "type": "string",
                          "format": "date",
                          "description": "Rates, measures and VAT valid on this date (default: today)."
                        },
                        "inland_freight": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Transport inside the EU to the first destination; enters the import VAT base only, never the customs value."
                        },
                        "departure_country": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 2,
                          "description": "Optional ISO country the goods are shipped from. Duties always follow origin_country; when it differs, origin_notes returns ORIGIN_DEPARTURE_DIFFER (US: transshipment does not remove origin-based additional duties)."
                        },
                        "loaded_on": {
                          "type": "string",
                          "format": "date",
                          "description": "Optional date the goods were loaded onto the vessel at the port of loading. Used for in-transit rules (US 9903.05.85: loaded before 2026-07-24 and entered before 2026-07-28 → no Section 301 country duty). If the entry date is inside a transit window and loaded_on is missing, missing contains CHARGE_IN_TRANSIT_UNKNOWN:<charge_code>."
                        }
                      },
                      "required": [
                        "hs_code",
                        "destination_country",
                        "customs_value"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "items"
                ]
              },
              "example": {
                "items": [
                  {
                    "hs_code": "6109100010",
                    "destination_country": "DE",
                    "origin_country": "CN",
                    "customs_value": 200,
                    "freight": 15,
                    "insurance": 2,
                    "net_mass_kg": 1.5,
                    "currency": "EUR",
                    "transport_mode": "road"
                  }
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:calculate"
      }
    },
    "/evaluate-shipment": {
      "post": {
        "operationId": "evaluate_shipment",
        "summary": "Shipment evaluation",
        "description": "One shared shipment context with per-item calculations, required documents and totals.\n\nQuota: 1 unit per input item (1–100).\n\nFixed per-declaration charges apply once, on the first item. De minimis evaluates the whole consignment.\nblocked=false does not replace a complete legal or compliance review.\nNo customs submission, MRN generation or automatic ATLAS declaration is performed by this endpoint.\nUS origin-based additional duties: when destination is US and origin_country is set, us_duty_layers = {hts_code, origin_country, base, mfn_rate, layers[{code,name,rate,ch99,top_up,condition?,possible_exemptions?[{heading,ref,text,claim}],verification_status,legal_basis}], waived[{code,because_of,via?}], additional_rate, total_rate, missing}. Rates are percentage points on customs value (transaction value, no international freight). Section 301 country rates (HTSUS 9903.05.20–9903.05.84, e.g. Türkiye 12.5% under 9903.05.79), Section 232 and their non-stacking rules come from the same engine as calculate. ch99 lists the Chapter 99 heading(s) to declare in addition to the HTSUS line. Top-up rules (EU, JP, CH: total duty = rate) add only the gap above MFN. All country rows are to_verify.\ncalculation.charges[] carry ch99_headings (Chapter 99 heading parsed from the legal basis); waived_charges lists non-stacking or claimed exemptions. Required scope: tariff:calculate.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "origin_country": "CN",
                  "destination_country": "DE",
                  "currency": "EUR",
                  "totals": null,
                  "required_documents": [],
                  "blocked": false,
                  "items": [
                    {
                      "hs_code": "6109100010",
                      "jurisdiction": "EU",
                      "duty_rate": null,
                      "vat": null,
                      "measures": [],
                      "required_documents": [],
                      "missing": [
                        "DUTY_RATE_MISSING",
                        "VAT_RATE_MISSING"
                      ],
                      "meta": {
                        "quota_remaining": 99,
                        "billed_as_extra": false,
                        "disclaimer": "Estimate; binding assessment by customs authority."
                      },
                      "currency": "EUR",
                      "calculation": {
                        "cif_value": 217,
                        "duty": null,
                        "vat": null,
                        "total_taxes": null,
                        "complete": false
                      }
                    }
                  ],
                  "meta": {
                    "quota_remaining": 99
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "origin_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "destination_country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "incoterm": {
                    "type": "string",
                    "description": "Informational only; does not infer costs or change the duty base.",
                    "maxLength": 3
                  },
                  "currency": {
                    "type": "string",
                    "description": "Three-character currency code. No general automatic FX conversion.",
                    "minLength": 3,
                    "maxLength": 3,
                    "default": "EUR"
                  },
                  "payment_terms": {
                    "type": "string",
                    "description": "Payment terms used to evaluate conditional charges, e.g. KKDF.",
                    "maxLength": 40
                  },
                  "transport_mode": {
                    "type": "string",
                    "description": "",
                    "enum": [
                      "sea",
                      "air",
                      "road",
                      "rail",
                      "post"
                    ]
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "hs_code": {
                          "type": "string",
                          "description": "Code with 4–12 digits after punctuation is stripped. This route may resolve a longer code through a rated prefix."
                        },
                        "customs_value": {
                          "type": "number",
                          "description": "Transaction/customs value in the given currency. Freight and insurance are supplied separately; do not include them twice.",
                          "minimum": 0
                        },
                        "freight": {
                          "type": "number",
                          "description": "International freight. US calculations exclude this from the customs duty base.",
                          "minimum": 0
                        },
                        "insurance": {
                          "type": "number",
                          "description": "International insurance. US calculations exclude this from the customs duty base.",
                          "minimum": 0
                        },
                        "net_mass_kg": {
                          "type": "number",
                          "description": "Net mass for supported per-kg specific duty expressions.",
                          "exclusiveMinimum": 0
                        },
                        "vehicle": {
                          "type": "object",
                          "properties": {
                            "propulsion": {
                              "type": "string",
                              "description": "",
                              "enum": [
                                "ice",
                                "hybrid",
                                "phev",
                                "ev"
                              ]
                            },
                            "cc": {
                              "type": "number",
                              "description": "Engine displacement in cm³.",
                              "exclusiveMinimum": 0
                            },
                            "kw": {
                              "type": "number",
                              "description": "Motor power in kW.",
                              "exclusiveMinimum": 0
                            }
                          },
                          "required": [
                            "propulsion"
                          ]
                        },
                        "claims": {
                          "type": "array",
                          "maxItems": 6,
                          "description": "Caller-declared evidence, never verified automatically. eu_tr_customs_union: 0% EU duty only for TR origin, EU destination, chapters 25–97 outside ECSC coal/steel, otherwise claims_rejected [{claim,reason}]. US Section 301 (HTSUS ch.99 U.S. note 52) exemptions waive the country duty only when claimed AND the HTSUS line is on the official list: us_301_listed_article (described articles, 9903.05.87 and 9903.06.01/.03/.05/.08/.11/.13/.15/.17/.19/.21), us_civil_aircraft (9903.05.88), us_pharmaceutical_use (9903.05.89), us_cafta_dr (9903.06.06/.09). A waived layer appears in us_duty_layers.waived / calculation.waived_charges with because_of = heading and via = claim.",
                          "items": {
                            "oneOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "us_auto_part",
                                  "eu_tr_customs_union",
                                  "us_301_listed_article",
                                  "us_civil_aircraft",
                                  "us_pharmaceutical_use",
                                  "us_cafta_dr"
                                ]
                              },
                              {
                                "type": "object",
                                "required": [
                                  "claim"
                                ],
                                "properties": {
                                  "claim": {
                                    "type": "string",
                                    "enum": [
                                      "us_auto_part",
                                      "eu_tr_customs_union",
                                      "us_301_listed_article",
                                      "us_civil_aircraft",
                                      "us_pharmaceutical_use",
                                      "us_cafta_dr"
                                    ]
                                  },
                                  "proof_code": {
                                    "type": "string",
                                    "maxLength": 8
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "canada_review": {
                          "type": "object",
                          "description": "Canada only: caller review, not engine-verified eligibility. CAD customs_value is adjusted CBSA value for duty.",
                          "properties": {
                            "valuation_confirmed": {
                              "type": "boolean"
                            },
                            "standard_gst_no_additional_charges_confirmed": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "valuation_confirmed",
                            "standard_gst_no_additional_charges_confirmed"
                          ]
                        },
                        "clearance_country": {
                          "type": "string",
                          "minLength": 2,
                          "maxLength": 2,
                          "description": "EU member state of release; import VAT rate and country come from here (default: destination_country)."
                        },
                        "customs_procedure": {
                          "type": "string",
                          "enum": [
                            "4000",
                            "4200"
                          ],
                          "description": "4000 release for free circulation; 4200 VAT-exempt import with onward intra-EU supply (Art. 143(1)(d) Directive 2006/112/EC). Only valid when clearance_country differs from destination_country."
                        },
                        "declaration_date": {
                          "type": "string",
                          "format": "date",
                          "description": "Rates, measures and VAT valid on this date (default: today)."
                        },
                        "inland_freight": {
                          "type": "number",
                          "minimum": 0,
                          "description": "Transport inside the EU to the first destination; enters the import VAT base only, never the customs value."
                        }
                      },
                      "required": [
                        "hs_code",
                        "customs_value"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 100
                  },
                  "departure_country": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2,
                    "description": "Optional ISO country the goods are shipped from. Duties always follow origin_country; when it differs, origin_notes returns ORIGIN_DEPARTURE_DIFFER (US: transshipment does not remove origin-based additional duties)."
                  },
                  "loaded_on": {
                    "type": "string",
                    "format": "date",
                    "description": "Optional date the goods were loaded onto the vessel at the port of loading. Used for in-transit rules (US 9903.05.85: loaded before 2026-07-24 and entered before 2026-07-28 → no Section 301 country duty). If the entry date is inside a transit window and loaded_on is missing, missing contains CHARGE_IN_TRANSIT_UNKNOWN:<charge_code>."
                  }
                },
                "required": [
                  "origin_country",
                  "destination_country",
                  "items"
                ]
              },
              "example": {
                "origin_country": "CN",
                "destination_country": "DE",
                "currency": "EUR",
                "incoterm": "DAP",
                "transport_mode": "sea",
                "items": [
                  {
                    "hs_code": "6109100010",
                    "customs_value": 200,
                    "freight": 15,
                    "insurance": 2
                  }
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:calculate"
      }
    },
    "/validate-code": {
      "post": {
        "operationId": "validate_code",
        "summary": "Code validation",
        "description": "Validate code digits and supplied value/weight against an available country/regime rule.\n\nQuota: 1 unit per request.\n\nThis legacy validation route checks the shared tree, not the complete national-line engine. TR existence currently reports NOMENCLATURE_NOT_LOADED even when the national TR catalogue is loaded.\nUse hs-lookup for national declarability; do not interpret this endpoint as a cross-country code mapping. Required scope: tariff:classify.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "code_exists": "FOUND",
                  "required_checks": [],
                  "meta": {
                    "quota_remaining": 99
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hs_code": {
                    "type": "string",
                    "description": ""
                  },
                  "country": {
                    "type": "string",
                    "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "regime": {
                    "type": "string",
                    "description": "",
                    "minLength": 2,
                    "maxLength": 30
                  },
                  "value_eur": {
                    "type": "number",
                    "description": "",
                    "minimum": 0
                  },
                  "gross_kg": {
                    "type": "number",
                    "description": "",
                    "minimum": 0
                  }
                },
                "required": [
                  "hs_code",
                  "country",
                  "regime"
                ]
              },
              "example": {
                "hs_code": "6203423100",
                "country": "DE",
                "regime": "import"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:classify"
      }
    },
    "/bulk-verify-shipment": {
      "post": {
        "operationId": "bulk_verify_shipment",
        "summary": "Bulk shipment validation",
        "description": "Apply one country/regime rule to a shipment and all its codes, including shipment value/weight limits.\n\nQuota: 1 unit per input item (1–200).\n\nExports validate origin rules; imports validate destination rules. TR code existence uses the legacy limitation documented under validate-code.\nOmitted unit prices contribute zero; omitted quantity defaults to 1. Supply complete values before using a threshold check.\nMissing rules block validation; to_verify rules are explicitly unverified. Required scope: tariff:calculate.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "rule_country": "TR",
                  "regime": "etgb",
                  "valid": false,
                  "shipment_issues": [],
                  "items": [],
                  "value_eur_total": 240,
                  "meta": {
                    "quota_remaining": 99
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "context": {
                    "type": "object",
                    "properties": {
                      "trade_direction": {
                        "type": "string",
                        "description": "",
                        "enum": [
                          "import",
                          "export",
                          "transit"
                        ]
                      },
                      "customs_regime": {
                        "type": "string",
                        "description": "Rule key, e.g. import or etgb; availability depends on loaded country rules.",
                        "minLength": 2,
                        "maxLength": 30
                      },
                      "origin_country": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                        "minLength": 2,
                        "maxLength": 2
                      },
                      "destination_country": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                        "minLength": 2,
                        "maxLength": 2
                      },
                      "gross_mass_kg": {
                        "type": "number",
                        "description": "Shipment gross mass, not per-item mass.",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "trade_direction",
                      "customs_regime",
                      "origin_country",
                      "destination_country"
                    ]
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ref": {
                          "type": "string",
                          "description": "",
                          "maxLength": 64
                        },
                        "hs_code": {
                          "type": "string",
                          "description": "",
                          "minLength": 4,
                          "maxLength": 14
                        },
                        "description": {
                          "type": "string",
                          "description": "",
                          "maxLength": 500
                        },
                        "quantity": {
                          "type": "number",
                          "description": "",
                          "exclusiveMinimum": 0
                        },
                        "unit_price": {
                          "type": "number",
                          "description": "",
                          "minimum": 0
                        },
                        "currency": {
                          "type": "string",
                          "description": "",
                          "minLength": 3,
                          "maxLength": 3
                        }
                      },
                      "required": [
                        "hs_code"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 200
                  }
                },
                "required": [
                  "context",
                  "items"
                ]
              },
              "example": {
                "context": {
                  "trade_direction": "export",
                  "customs_regime": "etgb",
                  "origin_country": "TR",
                  "destination_country": "DE",
                  "gross_mass_kg": 3.8
                },
                "items": [
                  {
                    "ref": "ERP-1",
                    "hs_code": "420310000000",
                    "quantity": 2,
                    "unit_price": 120,
                    "currency": "EUR"
                  }
                ]
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:calculate"
      }
    },
    "/classify-interactive": {
      "post": {
        "operationId": "classify_interactive",
        "summary": "Interactive classification",
        "description": "Explainable descent through the official shared HS/EU tree with follow-up questions.\n\nQuota: 1 unit when a session starts. Follow-up choices in that session are not charged.\n\nSessions cannot be continued with another API key. Resolved sessions return 409 SESSION_RESOLVED.\nThis route is the shared HS/EU classifier, not a full national US/TR/UK classifier. Use product-lookup for national suggestions.\nLearned shortcuts require at least 5 confirmations and 95% agreement; legal classification is never guaranteed. Required scope: tariff:classify.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "status": "CLARIFICATION_REQUIRED",
                  "session_id": "11111111-1111-4111-8111-111111111111",
                  "question": {
                    "code": "HEADING",
                    "text": "Which heading describes the goods?",
                    "options": []
                  },
                  "meta": {
                    "quota_remaining": 99
                  }
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_id": {
                    "type": "string",
                    "description": "Use the returned session ID for follow-up questions.",
                    "format": "uuid"
                  },
                  "selected_code": {
                    "type": "string",
                    "description": "A child option returned by the preceding question."
                  },
                  "context": {
                    "type": "object",
                    "properties": {
                      "trade_direction": {
                        "type": "string",
                        "description": "",
                        "enum": [
                          "import",
                          "export",
                          "transit"
                        ]
                      },
                      "customs_regime": {
                        "type": "string",
                        "description": "Rule key, e.g. import or etgb; availability depends on loaded country rules.",
                        "minLength": 2,
                        "maxLength": 30
                      },
                      "origin_country": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                        "minLength": 2,
                        "maxLength": 2
                      },
                      "destination_country": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                        "minLength": 2,
                        "maxLength": 2
                      },
                      "gross_mass_kg": {
                        "type": "number",
                        "description": "Shipment gross mass, not per-item mass.",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "trade_direction",
                      "customs_regime",
                      "origin_country",
                      "destination_country"
                    ]
                  },
                  "item": {
                    "type": "object",
                    "properties": {
                      "description": {
                        "type": "string",
                        "description": "",
                        "minLength": 2,
                        "maxLength": 300
                      },
                      "quantity": {
                        "type": "number",
                        "description": "",
                        "exclusiveMinimum": 0
                      },
                      "unit_price": {
                        "type": "number",
                        "description": "",
                        "minimum": 0
                      },
                      "currency": {
                        "type": "string",
                        "description": "",
                        "minLength": 3,
                        "maxLength": 3,
                        "default": "EUR"
                      },
                      "origin_country": {
                        "type": "string",
                        "description": "ISO 3166-1 alpha-2 country code; normalized to uppercase.",
                        "minLength": 2,
                        "maxLength": 2
                      },
                      "net_mass_kg": {
                        "type": "number",
                        "description": "",
                        "exclusiveMinimum": 0
                      }
                    },
                    "required": [
                      "description"
                    ]
                  }
                },
                "required": [],
                "anyOf": [
                  {
                    "required": [
                      "session_id"
                    ]
                  },
                  {
                    "required": [
                      "context",
                      "item"
                    ]
                  }
                ]
              },
              "example": {
                "item": {
                  "description": "cotton trousers",
                  "quantity": 1,
                  "unit_price": 200,
                  "currency": "EUR"
                },
                "context": {
                  "trade_direction": "import",
                  "customs_regime": "import",
                  "origin_country": "TR",
                  "destination_country": "DE"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:classify"
      }
    },
    "/classification-feedback": {
      "post": {
        "operationId": "classification_feedback",
        "summary": "Classification feedback",
        "description": "Record a confirmation or rejection for the learning graph.\n\nQuota: No quota unit is consumed by the current implementation.\n\nOnly submit feedback after expert review; this endpoint does not verify the correctness of the supplied code.\nDo not send buyer identities or other unnecessary personal information in description/context_key. Required scope: tariff:feedback.",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "recorded": true
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "description": "",
                    "minLength": 2,
                    "maxLength": 300
                  },
                  "hs_code": {
                    "type": "string",
                    "description": ""
                  },
                  "confirmed": {
                    "type": "boolean",
                    "description": ""
                  },
                  "context_key": {
                    "type": "string",
                    "description": "",
                    "maxLength": 60
                  }
                },
                "required": [
                  "description",
                  "hs_code",
                  "confirmed"
                ]
              },
              "example": {
                "description": "cotton t-shirt",
                "hs_code": "6109100010",
                "confirmed": true,
                "context_key": "erp-product-review"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": "tariff:feedback"
      }
    },
    "/quota": {
      "get": {
        "operationId": "quota",
        "summary": "Quota & usage",
        "description": "Read the API key’s included quota, usage and extra-query settings.\n\nQuota: No quota unit is consumed.\n\nAuthentication is still required. A zero remaining balance can allow extra billed requests if enabled for the key.\nUse quota monitoring; it does not reserve units for the next request. Required scope: none (any active key).",
        "tags": [
          "Tariff Intelligence"
        ],
        "responses": {
          "200": {
            "description": "Success. Check per-item status, missing and verification metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "example": {
                  "client_system": "third_party",
                  "monthly_quota": 100,
                  "used": 1,
                  "remaining": 99,
                  "extra_queries_used": 0,
                  "extra_query_price": 0
                }
              }
            }
          },
          "400": {
            "description": "BODY_INVALID / VALIDATION_FAILED / invalid classification option",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "API_KEY_REQUIRED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "402": {
            "description": "QUOTA_EXHAUSTED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "API_KEY_INVALID / quota access denied Restricted keys only: INSUFFICIENT_SCOPE {error, required_scope} or FEEDBACK_NOT_ALLOWED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "404": {
            "description": "NOT_FOUND / CODE_NOT_FOUND / SESSION_NOT_FOUND",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "409": {
            "description": "SESSION_RESOLVED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "422": {
            "description": "CODE_NOT_DECLARABLE",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "500": {
            "description": "Processing error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "413": {
            "$ref": "#/components/responses/GatewayError"
          },
          "502": {
            "$ref": "#/components/responses/GatewayError"
          },
          "504": {
            "$ref": "#/components/responses/GatewayError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/EndCustomerRef"
          },
          {
            "$ref": "#/components/parameters/Integration"
          }
        ],
        "x-required-scope": null
      }
    }
  }
}
