{
  "openapi": "3.1.0",
  "info": {
    "title": "Lagmark",
    "version": "0.1.0",
    "description": "Is this jurisdiction on the EU tax blacklist, and on the German, Dutch and Spanish defensive lists, on a given date: every answer cites the act."
  },
  "servers": [
    {
      "url": "https://lagmark.bulkhead.solutions"
    }
  ],
  "security": [
    {
      "bearer": []
    },
    {}
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/v1/tools/list_status": {
      "post": {
        "operationId": "list_status",
        "summary": "Is a jurisdiction on the lists on a date",
        "description": "Whether one jurisdiction is on each covered list on one date: EU Annex I (from Dec 2017), German StAbwV (texts from 21 Dec 2023, earlier dates from the 'seit' dates those texts state), Dutch withholding-tax and CFC lists (non-cooperative and low-tax, from 2020 or 2021), Dutch public CbCR lists, and the Spanish list (from 11 Feb 2023). Each status is listed, not_listed, listed_regime_only (Spain lists one harmful regime, not the whole jurisdiction), not_yet_in_force or unknown, with the instrument, article, URL and in-force date behind it, the EU reason text, and lists_disagree when the lists differ. summary is one sentence to quote. Call it for a single payment, counterparty or entity check. Do not call it for a whole list (list_members) or a CbCR (cbcr_separate_jurisdictions). It cannot know facts about the payment or entity, other countries' lists, or amendments after its data version. It returns list facts with their sources, not tax advice on consequences.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "jurisdiction"
                ],
                "properties": {
                  "jurisdiction": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Jurisdiction as an ISO 3166 alpha-2 code (PA, VG, RU, TC) or a name in English, German, Dutch or Spanish (Panama, Turks- und Caicosinseln, Britse Maagdeneilanden, Islas Caimán)."
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Date YYYY-MM-DD, from 2017-01-01. Defaults to today."
                  },
                  "measures": {
                    "type": [
                      "array",
                      "string"
                    ],
                    "maxItems": 10,
                    "maxLength": 300,
                    "items": {
                      "type": "string",
                      "enum": [
                        "eu-annex-1",
                        "eu-annex-2",
                        "de-stabwv",
                        "nl-cfc-ncj",
                        "nl-wht-ncj",
                        "nl-cfc-lowtax",
                        "nl-wht-lowtax",
                        "nl-cbcr-ncj",
                        "nl-cbcr-cooperative",
                        "es-ncj"
                      ]
                    },
                    "description": "Limit to these measures, as a list or one comma-separated string: eu-annex-1, eu-annex-2, de-stabwv, nl-cfc-ncj, nl-wht-ncj, nl-cfc-lowtax, nl-wht-lowtax, nl-cbcr-ncj, nl-cbcr-cooperative, es-ncj. Defaults to all."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/divergence": {
      "post": {
        "operationId": "divergence",
        "summary": "Where the lists disagree on a date",
        "description": "On one date, every jurisdiction that the EU Annex I, the German StAbwV, the Dutch withholding-tax, CFC and public CbCR non-cooperative lists or the Spanish list name, with each list's status side by side, which national lists differ from the EU list, and the EU's last change for that jurisdiction. Columns name the instrument in force for each list, including the Council list the German text is keyed to. Set only_disagreements false to see agreements too (at most about 40 rows). Call it to explain why two sources give different answers, or to review exposure across countries. Use list_status for one jurisdiction. Differences are reported, never resolved; it does not say which list governs a transaction. It returns list facts with their sources, not tax advice on consequences.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "date": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Date YYYY-MM-DD, from 2017-01-01. Defaults to today."
                  },
                  "only_disagreements": {
                    "type": "boolean",
                    "description": "true (default) returns only jurisdictions where the lists disagree."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/list_members": {
      "post": {
        "operationId": "list_members",
        "summary": "Every jurisdiction on one list on a date",
        "description": "The full list of one measure on one date, with codes, the names as the text writes them, 'seit' dates (Germany), scope (Spain) and dates of application, plus the instrument, its in-force date and the rule that dates it. Measures: eu-annex-1 (EU list, Annex I); eu-annex-2 (EU Annex II (context)); de-stabwv (DE StAbwV); nl-cfc-ncj (NL CFC, EU-listed states); nl-wht-ncj (NL withholding tax, EU-listed states); nl-cfc-lowtax (NL CFC, low-tax states); nl-wht-lowtax (NL withholding tax, low-tax states); nl-cbcr-ncj (NL public CbCR, non-cooperative); nl-cbcr-cooperative (NL public CbCR, cooperative (grey) to show separately); es-ncj (ES jurisdicciones no cooperativas). eu-annex-2 is context: being named there is not a listing. Call it to load or check a screening table. Use list_status for one jurisdiction across all lists. Lists are short (at most about 60 entries). It returns list facts with their sources, not tax advice on consequences.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "measure"
                ],
                "properties": {
                  "measure": {
                    "type": "string",
                    "enum": [
                      "eu-annex-1",
                      "eu-annex-2",
                      "de-stabwv",
                      "nl-cfc-ncj",
                      "nl-wht-ncj",
                      "nl-cfc-lowtax",
                      "nl-wht-lowtax",
                      "nl-cbcr-ncj",
                      "nl-cbcr-cooperative",
                      "es-ncj"
                    ],
                    "description": "Which list."
                  },
                  "date": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Date YYYY-MM-DD, from 2017-01-01. Defaults to today."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    },
    "/v1/tools/cbcr_separate_jurisdictions": {
      "post": {
        "operationId": "cbcr_separate_jurisdictions",
        "summary": "Jurisdictions to show separately in a public CbCR",
        "description": "Which non-EU jurisdictions a public country-by-country (income tax information) report filed in a member state must show separately for a financial year: the non-cooperative list (article 1) and the cooperative jurisdictions on the EU grey list for two consecutive 1 March dates (article 2), with the regulation and its in-force date. Covers the Netherlands only. Pass financial_year_start as the first day of the financial year or a year; as_of shows what had been designated on a past date, because the Dutch list for a year is published months into that year. Call it when preparing or checking a public CbCR. It does not decide whether a group is in scope or what figures to report. It returns list facts with their sources, not tax advice on consequences.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "member_state",
                  "financial_year_start"
                ],
                "properties": {
                  "member_state": {
                    "type": "string",
                    "maxLength": 40,
                    "description": "Member state whose rules apply: NL (Netherlands). Others are not covered yet."
                  },
                  "financial_year_start": {
                    "type": [
                      "string",
                      "integer"
                    ],
                    "maxLength": 10,
                    "description": "First day of the financial year, YYYY-MM-DD, or a year such as 2026 (read as 1 January)."
                  },
                  "as_of": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Optional date at which to read the designation, YYYY-MM-DD. Defaults to today."
                  }
                }
              }
            }
          }
        },
        "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_since": {
      "post": {
        "operationId": "changes_since",
        "summary": "List changes since a date",
        "description": "Every addition, removal or change of scope on the covered lists that took effect after a date, oldest first, each with the instrument, its in-force date, and for Germany any earlier 'no longer since' date the text states. Filter by measures or one jurisdiction. Pages of up to 200; pass next_cursor while has_more is true. Call it to poll for updates (the lists move a few times a year) or to answer what changed in a period. Use jurisdiction_history for one jurisdiction's full timeline. It returns list facts with their sources, not tax advice on consequences.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "since"
                ],
                "properties": {
                  "since": {
                    "type": "string",
                    "maxLength": 10,
                    "description": "Return changes that took effect after this date, YYYY-MM-DD."
                  },
                  "measures": {
                    "type": [
                      "array",
                      "string"
                    ],
                    "maxItems": 10,
                    "maxLength": 300,
                    "items": {
                      "type": "string",
                      "enum": [
                        "eu-annex-1",
                        "eu-annex-2",
                        "de-stabwv",
                        "nl-cfc-ncj",
                        "nl-wht-ncj",
                        "nl-cfc-lowtax",
                        "nl-wht-lowtax",
                        "nl-cbcr-ncj",
                        "nl-cbcr-cooperative",
                        "es-ncj"
                      ]
                    },
                    "description": "Limit to these measures, as a list or one comma-separated string: eu-annex-1, eu-annex-2, de-stabwv, nl-cfc-ncj, nl-wht-ncj, nl-cfc-lowtax, nl-wht-lowtax, nl-cbcr-ncj, nl-cbcr-cooperative, es-ncj. Defaults to all."
                  },
                  "jurisdiction": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Optional: only this jurisdiction (code or name)."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 200,
                    "description": "Changes 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/jurisdiction_history": {
      "post": {
        "operationId": "jurisdiction_history",
        "summary": "One jurisdiction's timeline on every list",
        "description": "For one jurisdiction, the periods it was listed, not listed or unknown on each covered list, with the instrument that opened each period. Call it to answer since when, or until when, a jurisdiction was on a list, or whether it was ever listed. Use list_status for a single date. It returns list facts with their sources, not tax advice on consequences.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "jurisdiction"
                ],
                "properties": {
                  "jurisdiction": {
                    "type": "string",
                    "maxLength": 80,
                    "description": "Jurisdiction as an ISO 3166 alpha-2 code (PA, VG, RU, TC) or a name in English, German, Dutch or Spanish (Panama, Turks- und Caicosinseln, Britse Maagdeneilanden, Islas Caimán)."
                  },
                  "measures": {
                    "type": [
                      "array",
                      "string"
                    ],
                    "maxItems": 10,
                    "maxLength": 300,
                    "items": {
                      "type": "string",
                      "enum": [
                        "eu-annex-1",
                        "eu-annex-2",
                        "de-stabwv",
                        "nl-cfc-ncj",
                        "nl-wht-ncj",
                        "nl-cfc-lowtax",
                        "nl-wht-lowtax",
                        "nl-cbcr-ncj",
                        "nl-cbcr-cooperative",
                        "es-ncj"
                      ]
                    },
                    "description": "Limit to these measures, as a list or one comma-separated string: eu-annex-1, eu-annex-2, de-stabwv, nl-cfc-ncj, nl-wht-ncj, nl-cfc-lowtax, nl-wht-lowtax, nl-cbcr-ncj, nl-cbcr-cooperative, es-ncj. Defaults to all."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid key"
          },
          "429": {
            "description": "Limit reached"
          }
        }
      }
    }
  }
}
