{
  "openapi": "3.1.0",
  "info": {
    "title": "Abeyline",
    "version": "0.1.0",
    "description": "EU autonomous tariff suspensions per CN or TARIC code and date, with review dates, history and what the latest Commission proposal does to each line."
  },
  "servers": [
    {
      "url": "https://abeyline.bulkhead.solutions"
    }
  ],
  "security": [
    {
      "bearer": []
    },
    {}
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/v1/tools/suspension_for": {
      "post": {
        "operationId": "suspension_for",
        "summary": "Suspensions for a CN or TARIC code on a date",
        "description": "Returns the EU autonomous tariff suspension lines (Annex of Regulation (EU) 2021/2278) that list a CN or TARIC code on a date: serial, codes, description, suspended rate, supplementary unit, mandatory review date, conditions (end-use authorisation, retail exclusion, ad valorem only) and, on the current version, what the latest Commission proposal does to the line. Pass code for one code or codes for a list of up to 100 (a compact row each). Call it when you know the goods' code and need to know if a suspension applies on the declaration date. An ex code covers only goods matching the description, so the code alone never proves the goods qualify. Dates from 2022-01-01. A date after the proposal's application date (1 January 2027) cannot be answered with certainty and says so. Not binding tariff information; does not cover tariff quotas, preferences or origin.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "maxLength": 20,
                    "description": "CN code (8 digits) or TARIC code (10 digits), spaces and dots allowed, for example 2917 19 80 or 2917198070. A 4 or 6 digit heading lists every line under it."
                  },
                  "codes": {
                    "type": [
                      "array",
                      "string"
                    ],
                    "maxItems": 100,
                    "maxLength": 2000,
                    "items": {
                      "type": [
                        "string",
                        "integer"
                      ],
                      "maxLength": 20
                    },
                    "description": "Instead of code: up to 100 CN or TARIC codes, as a list or one comma-separated string."
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Declaration date, default today. From 2022-01-01, YYYY-MM-DD."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/search_suspensions": {
      "post": {
        "operationId": "search_suspensions",
        "summary": "Find suspension lines by CAS RN, name or serial",
        "description": "Finds autonomous tariff suspension lines in force on a date whose description contains a CAS registry number (for example 97-65-4), all the given words (for example itaconic acid), or a serial number. Returns the full lines with codes, rate, review date, conditions and the proposal outcome, sorted by CN code, 20 per page. Also lists matching new lines in the latest Commission proposal. Call it when you know the substance or product but not its code. Do not use it for a code (use suspension_for). Matching is literal on the official English description; synonyms and trade names not in the text are not found.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "query"
                ],
                "properties": {
                  "query": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 200,
                    "description": "A CAS RN (97-65-4), a serial (0.3454) or words from the description (itaconic acid)."
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Date the lines must be in force, default today. From 2022-01-01, YYYY-MM-DD."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "description": "Results per page, default 20."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "next_cursor from the previous page."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/proposal_outlook": {
      "post": {
        "operationId": "proposal_outlook",
        "summary": "What the latest Commission proposal does to a line",
        "description": "Says what the latest Commission proposal to amend Regulation (EU) 2021/2278 (now COM(2026) 612 of 10 November 2026, which would replace the whole annex from 1 January 2027) does to each line: kept, extended (new review date), amended (description, codes, rate, unit or conditions change), withdrawn (the suspension ends and the normal duty returns) or new. Pass serial for one line with its current and proposed text, code for every line under a code, outcome for the list of one outcome (paged), or nothing for the counts. Call it before 1 January to know which suspensions survive. A proposal is not law: the Council adopts the final regulation, usually in December, and it can differ.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "serial": {
                    "type": "string",
                    "maxLength": 12,
                    "description": "Suspension serial number as printed in the annex, for example 0.3454 (3454 is accepted too)."
                  },
                  "code": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "maxLength": 20,
                    "description": "CN code (8 digits) or TARIC code (10 digits), spaces and dots allowed, for example 2917 19 80 or 2917198070. A 4 or 6 digit heading lists every line under it."
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "kept",
                      "extended",
                      "amended",
                      "withdrawn",
                      "new"
                    ],
                    "description": "List the lines with one outcome: kept, extended, amended, withdrawn, new."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "description": "Results per page, default 50."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "next_cursor from the previous page."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/due_for_review": {
      "post": {
        "operationId": "due_for_review",
        "summary": "Suspension lines due for mandatory review",
        "description": "Lists the suspension lines in force whose mandatory review date falls on or before a date (default 31 December 2026), with the proposal outcome of each and counts per outcome, optionally for one CN chapter or one outcome, 50 per page. Call it to plan which inputs may lose their suspension at the next 1 January, or to audit a product range by chapter. The review date is when the Commission must have reviewed the line; the line ends only when an amending regulation removes it, so a past review date does not end it by itself.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "before": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Review dates on or before this date, default 2026-12-31, YYYY-MM-DD."
                  },
                  "after": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Optional: only review dates after this date, YYYY-MM-DD."
                  },
                  "chapter": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "maxLength": 2,
                    "description": "Optional 2-digit CN chapter, for example 29 (organic chemicals) or 85 (electrical machinery)."
                  },
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "kept",
                      "extended",
                      "amended",
                      "withdrawn",
                      "new"
                    ],
                    "description": "Optional: only lines with this proposal outcome."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "description": "Results per page, default 50."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "next_cursor from the previous page."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/suspension_history": {
      "post": {
        "operationId": "suspension_history",
        "summary": "History of one suspension line",
        "description": "The full history of one suspension serial since 1 January 2022: each version of the line (codes, description, rate, review date, conditions) with the dates it applied, which amending Council regulation introduced, changed or removed it, and what the latest proposal would do. Call it to show when a suspension started, when its review date moved, or why it ended. Typography-only rewording is not counted as a change. History before 2022 (Regulation (EU) No 1387/2013) is not covered.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "serial"
                ],
                "properties": {
                  "serial": {
                    "type": "string",
                    "maxLength": 12,
                    "description": "Suspension serial number as printed in the annex, for example 0.3454 (3454 is accepted too)."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/changes": {
      "post": {
        "operationId": "changes",
        "summary": "Changes to the suspension annex on one date",
        "description": "Lists what changed in the annex on one effective date: lines added, removed, amended or given a new review date, with counts, 50 per page, optionally for one CN chapter or one kind. Effective dates are each 1 January and 1 July since 2022; 2027-01-01 returns what the pending Commission proposal would change, labelled proposed. Call it with no effective to get the list of dates. Use it to brief a client on a change date or to update an internal tariff table.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "effective": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Effective date, for example 2026-07-01 or 2027-01-01, YYYY-MM-DD."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "added",
                      "removed",
                      "amended",
                      "review_changed"
                    ],
                    "description": "Optional: one kind of change."
                  },
                  "chapter": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "maxLength": 2,
                    "description": "Optional 2-digit CN chapter."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "description": "Results per page, default 50."
                  },
                  "cursor": {
                    "type": "string",
                    "maxLength": 20,
                    "description": "next_cursor from the previous page."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    }
  }
}
