changedOutput schema / properties / result / anyOf
Previous value: -[
- {
- "additionalProperties": false,
- "description": "GET /api/reference/validate-customs-code/{customs_code} — a validated\ncustoms code with its description hierarchy. Also one batch item's\nsuccess shape.",
- "properties": {
- "customs_code": {
- "description": "The validated, normalised customs code.",
- "type": "string"
- },
- "customs_code_label": {
- "default": "",
- "description": "The code's display label (the deepest level's text).",
- "type": "string"
- },
- "has_subcodes": {
- "default": false,
- "description": "Whether the code has children in the current CN edition.",
- "type": "boolean"
- },
- "in_current_cn": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For digit codes: whether the current CN edition lists the code. False for a code known only from its recorded history (expired or abolished)."
- },
- "in_eurostat_api": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For residual spellings: whether Eurostat's API serves the code as a PRODUCT value (XX codes only)."
- },
- "interpreted_from": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The raw input, when it was reformatted into customs_code (always the input as typed, never a note)."
- },
- "levels": {
- "description": "The code's CN description hierarchy (one entry per ancestor level), in the requested language.",
- "items": {
- "additionalProperties": false,
- "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
- "properties": {
- "customs_code": {
- "description": "The level's customs code.",
- "type": "string"
- },
- "is_catch_all": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True for a catch-all ('other') level."
- },
- "residual": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True for the synthetic level of a residual spelling."
- },
- "segment": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True for a historical segment's own definition."
- },
- "siblings": {
- "anyOf": [
- {
- "items": {
- "additionalProperties": false,
- "properties": {
- "customs_code": {
- "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
- "type": "string"
- },
- "text": {
- "type": "string"
- }
- },
- "required": [
- "customs_code",
- "text"
- ],
- "type": "object"
- },
- "type": "array"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a catch-all level, the ordinary siblings it excludes."
- },
- "text": {
- "description": "The level's label, in the requested language.",
- "type": "string"
- },
- "untranslated": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True when the label fell back to English."
- },
- "window": {
- "anyOf": [
- {
- "additionalProperties": false,
- "description": "The validity window of one customs-code segment (one definition).",
- "properties": {
- "valid_from": {
- "description": "First day of the window, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "Last day of the window, ISO date; null while in force."
- }
- },
- "required": [
- "valid_from",
- "valid_to"
- ],
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
- }
- },
- "required": [
- "customs_code",
- "text"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "residual_customs_codes": {
- "anyOf": [
- {
- "items": {
- "additionalProperties": false,
- "description": "One sub-code or residual customs code row, shared by breakdown views\n(``subcode-compare``, ``concentration-compare``, ``volatility``) and\nvalidation responses (``ValidateCustomsCodeResponse.residual_customs_codes``).",
- "properties": {
- "basket_key": {
- "description": "The key of this row's basket in the payload's per-sub-code maps: the sub-code (read over the parent piece's window), or the entered basket's label.",
- "type": "string"
- },
- "customs_code": {
- "description": "The sub-code (or residual spelling).",
- "type": "string"
- },
- "in_eurostat_api": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a residual row: whether Eurostat's API serves the spelling as a PRODUCT value (XX codes only)."
- },
- "label": {
- "description": "The label of the row's (latest) definition, in the requested language when recorded.",
- "type": "string"
- },
- "residual_kind": {
- "anyOf": [
- {
- "enum": [
- "xx",
- "letter"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a residual row: 'xx' or 'letter'. Residual rows explain the gap between the sub-codes and the parent, and are pinned outside the top-N ranking."
- },
- "residual_reason": {
- "anyOf": [
- {
- "enum": [
- "A",
- "B",
- "C",
- "E",
- "F",
- "I",
- "M",
- "P",
- "R",
- "S",
- "T",
- "V",
- "W",
- "Y"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a letter code or reason group: the reason letter (S, Y, E, I, …)."
- },
- "residual_spelling": {
- "anyOf": [
- {
- "enum": [
- "xx",
- "letter",
- "reason_group"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a residual row: 'xx', 'letter' or 'reason_group'."
- },
- "segments": {
- "description": "The definitions in force during the basket's window (empty for residual rows and for validation rows).",
- "items": {
- "additionalProperties": false,
- "description": "One recorded definition of a customs code: a fact of the\nclassification metadata, with its window and its own label.",
- "properties": {
- "customs_code": {
- "description": "The customs code the segment defines.",
- "type": "string"
- },
- "kind": {
- "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
- "enum": [
- "cn",
- "residual_xx",
- "letter_coded",
- "chapter_00",
- "other"
- ],
- "type": "string"
- },
- "label": {
- "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
- "type": "string"
- },
- "label_lang": {
- "description": "The label's language (English when the requested one is not recorded for this definition).",
- "enum": [
- "bg",
- "cs",
- "da",
- "de",
- "el",
- "en",
- "es",
- "et",
- "fi",
- "fr",
- "ga",
- "hr",
- "hu",
- "it",
- "lt",
- "lv",
- "mt",
- "nl",
- "pl",
- "pt",
- "ro",
- "sk",
- "sl",
- "sv"
- ],
- "type": "string"
- },
- "untranslated": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True when the label fell back to English."
- },
- "valid_from": {
- "description": "First day of the segment's validity window, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "Last day of the window, ISO date; null for a segment still in force."
- }
- },
- "required": [
- "customs_code",
- "valid_from",
- "valid_to",
- "kind",
- "label",
- "label_lang"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "untranslated": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True when the label fell back to English."
- }
- },
- "required": [
- "basket_key",
- "customs_code",
- "label",
- "segments"
- ],
- "type": "object"
- },
- "type": "array"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Residual customs codes related to this code: those directly under a digit code (its XX code plus one reason group per reason letter), or the letter codes inside a reason group."
- },
- "residual_kind": {
- "anyOf": [
- {
- "enum": [
- "xx",
- "letter"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Residual class for residual spellings: 'xx' or 'letter' (reason groups report 'letter', the class of the codes they group)."
- },
- "residual_reason": {
- "anyOf": [
- {
- "enum": [
- "A",
- "B",
- "C",
- "E",
- "F",
- "I",
- "M",
- "P",
- "R",
- "S",
- "T",
- "V",
- "W",
- "Y"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The reason letter of a letter code or reason group (S, Y, E, I, …)."
- },
- "residual_spelling": {
- "anyOf": [
- {
- "enum": [
- "xx",
- "letter",
- "reason_group"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The residual spelling's exact shape: 'xx', 'letter' or 'reason_group'."
- },
- "segment_history": {
- "anyOf": [
- {
- "items": {
- "additionalProperties": false,
- "description": "Every recorded definition of one customs code (the CN classification\nfiles), independent of the current edition.",
- "properties": {
- "customs_code": {
- "description": "The base customs code.",
- "type": "string"
- },
- "metadata_generation": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "description": "The classification snapshot the history comes from."
- },
- "segments": {
- "description": "The definitions, oldest first.",
- "items": {
- "additionalProperties": false,
- "description": "One recorded definition of a customs code with its direct recorded\nlinks (``SegmentHistoryPayload.segments``).",
- "properties": {
- "customs_code": {
- "description": "The customs code the segment defines.",
- "type": "string"
- },
- "kind": {
- "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
- "enum": [
- "cn",
- "residual_xx",
- "letter_coded",
- "chapter_00",
- "other"
- ],
- "type": "string"
- },
- "label": {
- "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
- "type": "string"
- },
- "label_lang": {
- "description": "The label's language (English when the requested one is not recorded for this definition).",
- "enum": [
- "bg",
- "cs",
- "da",
- "de",
- "el",
- "en",
- "es",
- "et",
- "fi",
- "fr",
- "ga",
- "hr",
- "hu",
- "it",
- "lt",
- "lv",
- "mt",
- "nl",
- "pl",
- "pt",
- "ro",
- "sk",
- "sl",
- "sv"
- ],
- "type": "string"
- },
- "recorded_links": {
- "additionalProperties": false,
- "description": "Direct correspondence edges recorded for this exact definition. An empty list means no recorded direct link -- not that the code never changed (headings have no edges of their own).",
- "properties": {
- "predecessors": {
- "description": "Edges recorded into this segment.",
- "items": {
- "additionalProperties": false,
- "description": "One recorded predecessor/successor edge of an exact segment.",
- "properties": {
- "customs_code": {
- "description": "The other segment's customs code.",
- "type": "string"
- },
- "marker": {
- "description": "Eurostat's relation marker, as recorded.",
- "type": "string"
- },
- "match": {
- "description": "'matched' when the endpoint resolves to a recorded segment by its full window, 'unmatched' otherwise (never attached to a guessed segment).",
- "enum": [
- "matched",
- "unmatched"
- ],
- "type": "string"
- },
- "valid_from": {
- "description": "The other segment's window start, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "The other segment's window end, ISO date; null when open."
- }
- },
- "required": [
- "customs_code",
- "valid_from",
- "valid_to",
- "marker",
- "match"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "successors": {
- "description": "Edges recorded from this segment.",
- "items": {
- "additionalProperties": false,
- "description": "One recorded predecessor/successor edge of an exact segment.",
- "properties": {
- "customs_code": {
- "description": "The other segment's customs code.",
- "type": "string"
- },
- "marker": {
- "description": "Eurostat's relation marker, as recorded.",
- "type": "string"
- },
- "match": {
- "description": "'matched' when the endpoint resolves to a recorded segment by its full window, 'unmatched' otherwise (never attached to a guessed segment).",
- "enum": [
- "matched",
- "unmatched"
- ],
- "type": "string"
- },
- "valid_from": {
- "description": "The other segment's window start, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "The other segment's window end, ISO date; null when open."
- }
- },
- "required": [
- "customs_code",
- "valid_from",
- "valid_to",
- "marker",
- "match"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "required": [
- "successors",
- "predecessors"
- ],
- "type": "object"
- },
- "untranslated": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True when the label fell back to English."
- },
- "valid_from": {
- "description": "First day of the segment's validity window, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "Last day of the window, ISO date; null for a segment still in force."
- }
- },
- "required": [
- "customs_code",
- "valid_from",
- "valid_to",
- "kind",
- "label",
- "label_lang",
- "recorded_links"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "required": [
- "customs_code",
- "metadata_generation",
- "segments"
- ],
- "type": "object"
- },
- "type": "array"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Every recorded definition of the code, with direct recorded links; null when no classification history is recorded for it. Use these windows to compose windowed pieces (the basket request form)."
- }
- },
- "required": [
- "customs_code"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "description": "The comma-separated batch path of validate-customs-code: each item a\nsuccess or an error.",
- "properties": {
- "results": {
- "description": "The results, one per input item, in input order.",
- "items": {
- "anyOf": [
- {
- "additionalProperties": false,
- "description": "GET /api/reference/validate-customs-code/{customs_code} — a validated\ncustoms code with its description hierarchy. Also one batch item's\nsuccess shape.",
- "properties": {
- "customs_code": {
- "description": "The validated, normalised customs code.",
- "type": "string"
- },
- "customs_code_label": {
- "default": "",
- "description": "The code's display label (the deepest level's text).",
- "type": "string"
- },
- "has_subcodes": {
- "default": false,
- "description": "Whether the code has children in the current CN edition.",
- "type": "boolean"
- },
- "in_current_cn": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For digit codes: whether the current CN edition lists the code. False for a code known only from its recorded history (expired or abolished)."
- },
- "in_eurostat_api": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For residual spellings: whether Eurostat's API serves the code as a PRODUCT value (XX codes only)."
- },
- "interpreted_from": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The raw input, when it was reformatted into customs_code (always the input as typed, never a note)."
- },
- "levels": {
- "description": "The code's CN description hierarchy (one entry per ancestor level), in the requested language.",
- "items": {
- "additionalProperties": false,
- "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
- "properties": {
- "customs_code": {
- "description": "The level's customs code.",
- "type": "string"
- },
- "is_catch_all": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True for a catch-all ('other') level."
- },
- "residual": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True for the synthetic level of a residual spelling."
- },
- "segment": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True for a historical segment's own definition."
- },
- "siblings": {
- "anyOf": [
- {
- "items": {
- "additionalProperties": false,
- "properties": {
- "customs_code": {
- "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
- "type": "string"
- },
- "text": {
- "type": "string"
- }
- },
- "required": [
- "customs_code",
- "text"
- ],
- "type": "object"
- },
- "type": "array"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a catch-all level, the ordinary siblings it excludes."
- },
- "text": {
- "description": "The level's label, in the requested language.",
- "type": "string"
- },
- "untranslated": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True when the label fell back to English."
- },
- "window": {
- "anyOf": [
- {
- "additionalProperties": false,
- "description": "The validity window of one customs-code segment (one definition).",
- "properties": {
- "valid_from": {
- "description": "First day of the window, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "Last day of the window, ISO date; null while in force."
- }
- },
- "required": [
- "valid_from",
- "valid_to"
- ],
- "type": "object"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
- }
- },
- "required": [
- "customs_code",
- "text"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "residual_customs_codes": {
- "anyOf": [
- {
- "items": {
- "additionalProperties": false,
- "description": "One sub-code or residual customs code row, shared by breakdown views\n(``subcode-compare``, ``concentration-compare``, ``volatility``) and\nvalidation responses (``ValidateCustomsCodeResponse.residual_customs_codes``).",
- "properties": {
- "basket_key": {
- "description": "The key of this row's basket in the payload's per-sub-code maps: the sub-code (read over the parent piece's window), or the entered basket's label.",
- "type": "string"
- },
- "customs_code": {
- "description": "The sub-code (or residual spelling).",
- "type": "string"
- },
- "in_eurostat_api": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a residual row: whether Eurostat's API serves the spelling as a PRODUCT value (XX codes only)."
- },
- "label": {
- "description": "The label of the row's (latest) definition, in the requested language when recorded.",
- "type": "string"
- },
- "residual_kind": {
- "anyOf": [
- {
- "enum": [
- "xx",
- "letter"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a residual row: 'xx' or 'letter'. Residual rows explain the gap between the sub-codes and the parent, and are pinned outside the top-N ranking."
- },
- "residual_reason": {
- "anyOf": [
- {
- "enum": [
- "A",
- "B",
- "C",
- "E",
- "F",
- "I",
- "M",
- "P",
- "R",
- "S",
- "T",
- "V",
- "W",
- "Y"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a letter code or reason group: the reason letter (S, Y, E, I, …)."
- },
- "residual_spelling": {
- "anyOf": [
- {
- "enum": [
- "xx",
- "letter",
- "reason_group"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "For a residual row: 'xx', 'letter' or 'reason_group'."
- },
- "segments": {
- "description": "The definitions in force during the basket's window (empty for residual rows and for validation rows).",
- "items": {
- "additionalProperties": false,
- "description": "One recorded definition of a customs code: a fact of the\nclassification metadata, with its window and its own label.",
- "properties": {
- "customs_code": {
- "description": "The customs code the segment defines.",
- "type": "string"
- },
- "kind": {
- "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
- "enum": [
- "cn",
- "residual_xx",
- "letter_coded",
- "chapter_00",
- "other"
- ],
- "type": "string"
- },
- "label": {
- "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
- "type": "string"
- },
- "label_lang": {
- "description": "The label's language (English when the requested one is not recorded for this definition).",
- "enum": [
- "bg",
- "cs",
- "da",
- "de",
- "el",
- "en",
- "es",
- "et",
- "fi",
- "fr",
- "ga",
- "hr",
- "hu",
- "it",
- "lt",
- "lv",
- "mt",
- "nl",
- "pl",
- "pt",
- "ro",
- "sk",
- "sl",
- "sv"
- ],
- "type": "string"
- },
- "untranslated": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True when the label fell back to English."
- },
- "valid_from": {
- "description": "First day of the segment's validity window, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "Last day of the window, ISO date; null for a segment still in force."
- }
- },
- "required": [
- "customs_code",
- "valid_from",
- "valid_to",
- "kind",
- "label",
- "label_lang"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "untranslated": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True when the label fell back to English."
- }
- },
- "required": [
- "basket_key",
- "customs_code",
- "label",
- "segments"
- ],
- "type": "object"
- },
- "type": "array"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Residual customs codes related to this code: those directly under a digit code (its XX code plus one reason group per reason letter), or the letter codes inside a reason group."
- },
- "residual_kind": {
- "anyOf": [
- {
- "enum": [
- "xx",
- "letter"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Residual class for residual spellings: 'xx' or 'letter' (reason groups report 'letter', the class of the codes they group)."
- },
- "residual_reason": {
- "anyOf": [
- {
- "enum": [
- "A",
- "B",
- "C",
- "E",
- "F",
- "I",
- "M",
- "P",
- "R",
- "S",
- "T",
- "V",
- "W",
- "Y"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The reason letter of a letter code or reason group (S, Y, E, I, …)."
- },
- "residual_spelling": {
- "anyOf": [
- {
- "enum": [
- "xx",
- "letter",
- "reason_group"
- ],
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "The residual spelling's exact shape: 'xx', 'letter' or 'reason_group'."
- },
- "segment_history": {
- "anyOf": [
- {
- "items": {
- "additionalProperties": false,
- "description": "Every recorded definition of one customs code (the CN classification\nfiles), independent of the current edition.",
- "properties": {
- "customs_code": {
- "description": "The base customs code.",
- "type": "string"
- },
- "metadata_generation": {
- "anyOf": [
- {
- "type": "integer"
- },
- {
- "type": "null"
- }
- ],
- "description": "The classification snapshot the history comes from."
- },
- "segments": {
- "description": "The definitions, oldest first.",
- "items": {
- "additionalProperties": false,
- "description": "One recorded definition of a customs code with its direct recorded\nlinks (``SegmentHistoryPayload.segments``).",
- "properties": {
- "customs_code": {
- "description": "The customs code the segment defines.",
- "type": "string"
- },
- "kind": {
- "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
- "enum": [
- "cn",
- "residual_xx",
- "letter_coded",
- "chapter_00",
- "other"
- ],
- "type": "string"
- },
- "label": {
- "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
- "type": "string"
- },
- "label_lang": {
- "description": "The label's language (English when the requested one is not recorded for this definition).",
- "enum": [
- "bg",
- "cs",
- "da",
- "de",
- "el",
- "en",
- "es",
- "et",
- "fi",
- "fr",
- "ga",
- "hr",
- "hu",
- "it",
- "lt",
- "lv",
- "mt",
- "nl",
- "pl",
- "pt",
- "ro",
- "sk",
- "sl",
- "sv"
- ],
- "type": "string"
- },
- "recorded_links": {
- "additionalProperties": false,
- "description": "Direct correspondence edges recorded for this exact definition. An empty list means no recorded direct link -- not that the code never changed (headings have no edges of their own).",
- "properties": {
- "predecessors": {
- "description": "Edges recorded into this segment.",
- "items": {
- "additionalProperties": false,
- "description": "One recorded predecessor/successor edge of an exact segment.",
- "properties": {
- "customs_code": {
- "description": "The other segment's customs code.",
- "type": "string"
- },
- "marker": {
- "description": "Eurostat's relation marker, as recorded.",
- "type": "string"
- },
- "match": {
- "description": "'matched' when the endpoint resolves to a recorded segment by its full window, 'unmatched' otherwise (never attached to a guessed segment).",
- "enum": [
- "matched",
- "unmatched"
- ],
- "type": "string"
- },
- "valid_from": {
- "description": "The other segment's window start, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "The other segment's window end, ISO date; null when open."
- }
- },
- "required": [
- "customs_code",
- "valid_from",
- "valid_to",
- "marker",
- "match"
- ],
- "type": "object"
- },
- "type": "array"
- },
- "successors": {
- "description": "Edges recorded from this segment.",
- "items": {
- "additionalProperties": false,
- "description": "One recorded predecessor/successor edge of an exact segment.",
- "properties": {
- "customs_code": {
- "description": "The other segment's customs code.",
- "type": "string"
- },
- "marker": {
- "description": "Eurostat's relation marker, as recorded.",
- "type": "string"
- },
- "match": {
- "description": "'matched' when the endpoint resolves to a recorded segment by its full window, 'unmatched' otherwise (never attached to a guessed segment).",
- "enum": [
- "matched",
- "unmatched"
- ],
- "type": "string"
- },
- "valid_from": {
- "description": "The other segment's window start, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "The other segment's window end, ISO date; null when open."
- }
- },
- "required": [
- "customs_code",
- "valid_from",
- "valid_to",
- "marker",
- "match"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "required": [
- "successors",
- "predecessors"
- ],
- "type": "object"
- },
- "untranslated": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "True when the label fell back to English."
- },
- "valid_from": {
- "description": "First day of the segment's validity window, ISO date.",
- "type": "string"
- },
- "valid_to": {
- "anyOf": [
- {
- "type": "string"
- },
- {
- "type": "null"
- }
- ],
- "description": "Last day of the window, ISO date; null for a segment still in force."
- }
- },
- "required": [
- "customs_code",
- "valid_from",
- "valid_to",
- "kind",
- "label",
- "label_lang",
- "recorded_links"
- ],
- "type": "object"
- },
- "type": "array"
- }
- },
- "required": [
- "customs_code",
- "metadata_generation",
- "segments"
- ],
- "type": "object"
- },
- "type": "array"
- },
- {
- "type": "null"
- }
- ],
- "default": null,
- "description": "Every recorded definition of the code, with direct recorded links; null when no classification history is recorded for it. Use these windows to compose windowed pieces (the basket request form)."
- }
- },
- "required": [
- "customs_code"
- ],
- "type": "object"
- },
- {
- "additionalProperties": false,
- "description": "One batch item's failure shape.",
- "properties": {
- "customs_code": {
- "description": "The input item as typed.",
- "type": "string"
- },
- "error": {
- "additionalProperties": false,
- "description": "Why it failed.",
- "properties": {
- "detail": {
- "description": "The error message.",
- "type": "string"
- },
- "status": {
- "description": "The HTTP status the single-code endpoint would have returned.",
- "type": "integer"
- }
- },
- "required": [
- "status",
- "detail"
- ],
- "type": "object"
- }
- },
- "required": [
- "customs_code",
- "error"
- ],
- "type": "object"
- }
- ]
- },
- "type": "array"
- }
- },
- "required": [
- "results"
- ],
- "type": "object"
- }
-]New value: +[
+ {
+ "additionalProperties": false,
+ "description": "GET /api/reference/validate-customs-code/{customs_code} — a validated\ncustoms code with its description hierarchy. Also one batch item's\nsuccess shape.",
+ "properties": {
+ "customs_code": {
+ "description": "The validated, normalised customs code.",
+ "type": "string"
+ },
+ "customs_code_label": {
+ "default": "",
+ "description": "The code's display label (the deepest level's text).",
+ "type": "string"
+ },
+ "has_subcodes": {
+ "default": false,
+ "description": "Whether the code has children in the current CN edition.",
+ "type": "boolean"
+ },
+ "in_current_cn": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For digit codes: whether the current CN edition lists the code. False for a code known only from its recorded history (expired or abolished)."
+ },
+ "in_eurostat_api": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For residual spellings: whether Eurostat's API serves the code as a PRODUCT value (XX codes only)."
+ },
+ "interpreted_from": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The raw input, when it was reformatted into customs_code (always the input as typed, never a note)."
+ },
+ "levels": {
+ "description": "The code's CN description hierarchy (one entry per ancestor level), in the requested language.",
+ "items": {
+ "additionalProperties": false,
+ "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
+ "properties": {
+ "customs_code": {
+ "description": "The level's customs code.",
+ "type": "string"
+ },
+ "is_catch_all": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True for a catch-all ('other') level."
+ },
+ "residual": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True for the synthetic level of a residual spelling."
+ },
+ "segment": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True for a historical segment's own definition."
+ },
+ "siblings": {
+ "anyOf": [
+ {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "customs_code": {
+ "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "customs_code",
+ "text"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a catch-all level, the ordinary siblings it excludes."
+ },
+ "text": {
+ "description": "The level's label, in the requested language.",
+ "type": "string"
+ },
+ "untranslated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True when the label fell back to English."
+ },
+ "window": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "description": "The validity window of one customs-code segment (one definition).",
+ "properties": {
+ "valid_from": {
+ "description": "First day of the window, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Last day of the window, ISO date; null while in force."
+ }
+ },
+ "required": [
+ "valid_from",
+ "valid_to"
+ ],
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
+ }
+ },
+ "required": [
+ "customs_code",
+ "text"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "residual_customs_codes": {
+ "anyOf": [
+ {
+ "items": {
+ "additionalProperties": false,
+ "description": "One sub-code or residual customs code row, shared by breakdown views\n(``subcode-compare``, ``concentration-compare``, ``volatility``) and\nvalidation responses (``ValidateCustomsCodeResponse.residual_customs_codes``).",
+ "properties": {
+ "basket_key": {
+ "description": "The key of this row's basket in the payload's per-sub-code maps: the sub-code (read over the parent piece's window), or the entered basket's label.",
+ "type": "string"
+ },
+ "customs_code": {
+ "description": "The sub-code (or residual spelling).",
+ "type": "string"
+ },
+ "in_eurostat_api": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a residual row: whether Eurostat's API serves the spelling as a PRODUCT value (XX codes only)."
+ },
+ "label": {
+ "description": "The label of the row's (latest) definition, in the requested language when recorded.",
+ "type": "string"
+ },
+ "residual_kind": {
+ "anyOf": [
+ {
+ "enum": [
+ "xx",
+ "letter"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a residual row: 'xx' or 'letter'. Residual rows explain the gap between the sub-codes and the parent, and are pinned outside the top-N ranking."
+ },
+ "residual_reason": {
+ "anyOf": [
+ {
+ "enum": [
+ "A",
+ "B",
+ "C",
+ "E",
+ "F",
+ "I",
+ "M",
+ "P",
+ "R",
+ "S",
+ "T",
+ "V",
+ "W",
+ "Y"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a letter code or reason group: the reason letter (S, Y, E, I, …)."
+ },
+ "residual_spelling": {
+ "anyOf": [
+ {
+ "enum": [
+ "xx",
+ "letter",
+ "reason_group"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a residual row: 'xx', 'letter' or 'reason_group'."
+ },
+ "segments": {
+ "description": "The definitions in force during the basket's window (empty for residual rows and for validation rows).",
+ "items": {
+ "additionalProperties": false,
+ "description": "One recorded definition of a customs code: a fact of the\nclassification metadata, with its window and its own label.",
+ "properties": {
+ "customs_code": {
+ "description": "The customs code the segment defines.",
+ "type": "string"
+ },
+ "kind": {
+ "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
+ "enum": [
+ "cn",
+ "residual_xx",
+ "letter_coded",
+ "chapter_00",
+ "other"
+ ],
+ "type": "string"
+ },
+ "label": {
+ "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
+ "type": "string"
+ },
+ "label_lang": {
+ "description": "The label's language (English when the requested one is not recorded for this definition).",
+ "enum": [
+ "bg",
+ "cs",
+ "da",
+ "de",
+ "el",
+ "en",
+ "es",
+ "et",
+ "fi",
+ "fr",
+ "ga",
+ "hr",
+ "hu",
+ "it",
+ "lt",
+ "lv",
+ "mt",
+ "nl",
+ "pl",
+ "pt",
+ "ro",
+ "sk",
+ "sl",
+ "sv"
+ ],
+ "type": "string"
+ },
+ "untranslated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True when the label fell back to English."
+ },
+ "valid_from": {
+ "description": "First day of the segment's validity window, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Last day of the window, ISO date; null for a segment still in force."
+ }
+ },
+ "required": [
+ "customs_code",
+ "valid_from",
+ "valid_to",
+ "kind",
+ "label",
+ "label_lang"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "untranslated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True when the label fell back to English."
+ }
+ },
+ "required": [
+ "basket_key",
+ "customs_code",
+ "label",
+ "segments"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Residual customs codes related to this code: those directly under a digit code (its XX code plus one reason group per reason letter), or the letter codes inside a reason group."
+ },
+ "residual_kind": {
+ "anyOf": [
+ {
+ "enum": [
+ "xx",
+ "letter"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Residual class for residual spellings: 'xx' or 'letter' (reason groups report 'letter', the class of the codes they group)."
+ },
+ "residual_reason": {
+ "anyOf": [
+ {
+ "enum": [
+ "A",
+ "B",
+ "C",
+ "E",
+ "F",
+ "I",
+ "M",
+ "P",
+ "R",
+ "S",
+ "T",
+ "V",
+ "W",
+ "Y"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The reason letter of a letter code or reason group (S, Y, E, I, …)."
+ },
+ "residual_spelling": {
+ "anyOf": [
+ {
+ "enum": [
+ "xx",
+ "letter",
+ "reason_group"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The residual spelling's exact shape: 'xx', 'letter' or 'reason_group'."
+ },
+ "segment_history": {
+ "anyOf": [
+ {
+ "items": {
+ "additionalProperties": false,
+ "description": "Every recorded definition of one customs code (the CN classification\nfiles), independent of the current edition.",
+ "properties": {
+ "customs_code": {
+ "description": "The base customs code.",
+ "type": "string"
+ },
+ "metadata_generation": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The classification snapshot the history comes from."
+ },
+ "segments": {
+ "description": "The definitions, oldest first.",
+ "items": {
+ "additionalProperties": false,
+ "description": "One recorded definition of a customs code with its direct recorded\nlinks (``SegmentHistoryPayload.segments``).",
+ "properties": {
+ "customs_code": {
+ "description": "The customs code the segment defines.",
+ "type": "string"
+ },
+ "kind": {
+ "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
+ "enum": [
+ "cn",
+ "residual_xx",
+ "letter_coded",
+ "chapter_00",
+ "other"
+ ],
+ "type": "string"
+ },
+ "label": {
+ "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
+ "type": "string"
+ },
+ "label_lang": {
+ "description": "The label's language (English when the requested one is not recorded for this definition).",
+ "enum": [
+ "bg",
+ "cs",
+ "da",
+ "de",
+ "el",
+ "en",
+ "es",
+ "et",
+ "fi",
+ "fr",
+ "ga",
+ "hr",
+ "hu",
+ "it",
+ "lt",
+ "lv",
+ "mt",
+ "nl",
+ "pl",
+ "pt",
+ "ro",
+ "sk",
+ "sl",
+ "sv"
+ ],
+ "type": "string"
+ },
+ "recorded_links": {
+ "additionalProperties": false,
+ "description": "Direct correspondence edges recorded for this exact definition. An empty list means no recorded direct link -- not that the code never changed (headings have no edges of their own).",
+ "properties": {
+ "predecessors": {
+ "description": "Edges recorded into this segment.",
+ "items": {
+ "additionalProperties": false,
+ "description": "One recorded predecessor/successor edge of an exact segment.",
+ "properties": {
+ "customs_code": {
+ "description": "The other segment's customs code.",
+ "type": "string"
+ },
+ "marker": {
+ "description": "Eurostat's relation marker, as recorded.",
+ "type": "string"
+ },
+ "match": {
+ "description": "'matched' when the endpoint resolves to a recorded segment by its full window, 'unmatched' otherwise (never attached to a guessed segment).",
+ "enum": [
+ "matched",
+ "unmatched"
+ ],
+ "type": "string"
+ },
+ "valid_from": {
+ "description": "The other segment's window start, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The other segment's window end, ISO date; null when open."
+ }
+ },
+ "required": [
+ "customs_code",
+ "valid_from",
+ "valid_to",
+ "marker",
+ "match"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "successors": {
+ "description": "Edges recorded from this segment.",
+ "items": {
+ "additionalProperties": false,
+ "description": "One recorded predecessor/successor edge of an exact segment.",
+ "properties": {
+ "customs_code": {
+ "description": "The other segment's customs code.",
+ "type": "string"
+ },
+ "marker": {
+ "description": "Eurostat's relation marker, as recorded.",
+ "type": "string"
+ },
+ "match": {
+ "description": "'matched' when the endpoint resolves to a recorded segment by its full window, 'unmatched' otherwise (never attached to a guessed segment).",
+ "enum": [
+ "matched",
+ "unmatched"
+ ],
+ "type": "string"
+ },
+ "valid_from": {
+ "description": "The other segment's window start, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The other segment's window end, ISO date; null when open."
+ }
+ },
+ "required": [
+ "customs_code",
+ "valid_from",
+ "valid_to",
+ "marker",
+ "match"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "successors",
+ "predecessors"
+ ],
+ "type": "object"
+ },
+ "untranslated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True when the label fell back to English."
+ },
+ "valid_from": {
+ "description": "First day of the segment's validity window, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Last day of the window, ISO date; null for a segment still in force."
+ }
+ },
+ "required": [
+ "customs_code",
+ "valid_from",
+ "valid_to",
+ "kind",
+ "label",
+ "label_lang",
+ "recorded_links"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "customs_code",
+ "metadata_generation",
+ "segments"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Every recorded definition of the code, with direct recorded links; null when no classification history is recorded for it. Use these windows to compose windowed pieces (the basket request form)."
+ }
+ },
+ "required": [
+ "customs_code",
+ "levels",
+ "customs_code_label",
+ "has_subcodes",
+ "interpreted_from",
+ "residual_kind",
+ "residual_spelling",
+ "residual_reason",
+ "in_eurostat_api",
+ "residual_customs_codes",
+ "in_current_cn",
+ "segment_history"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "description": "The comma-separated batch path of validate-customs-code: each item a\nsuccess or an error.",
+ "properties": {
+ "results": {
+ "description": "The results, one per input item, in input order.",
+ "items": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "description": "GET /api/reference/validate-customs-code/{customs_code} — a validated\ncustoms code with its description hierarchy. Also one batch item's\nsuccess shape.",
+ "properties": {
+ "customs_code": {
+ "description": "The validated, normalised customs code.",
+ "type": "string"
+ },
+ "customs_code_label": {
+ "default": "",
+ "description": "The code's display label (the deepest level's text).",
+ "type": "string"
+ },
+ "has_subcodes": {
+ "default": false,
+ "description": "Whether the code has children in the current CN edition.",
+ "type": "boolean"
+ },
+ "in_current_cn": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For digit codes: whether the current CN edition lists the code. False for a code known only from its recorded history (expired or abolished)."
+ },
+ "in_eurostat_api": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For residual spellings: whether Eurostat's API serves the code as a PRODUCT value (XX codes only)."
+ },
+ "interpreted_from": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The raw input, when it was reformatted into customs_code (always the input as typed, never a note)."
+ },
+ "levels": {
+ "description": "The code's CN description hierarchy (one entry per ancestor level), in the requested language.",
+ "items": {
+ "additionalProperties": false,
+ "description": "One level of a customs code's description hierarchy, chapter first\n(``ComextNomenclature.get_description_levels``, plus the synthetic\nlevels of residual spellings and the dated levels of former editions).\n\nThe optional flags are sparse on the wire: present when true, absent\notherwise (the shape of the nomenclature layer's raw dicts).",
+ "properties": {
+ "customs_code": {
+ "description": "The level's customs code.",
+ "type": "string"
+ },
+ "is_catch_all": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True for a catch-all ('other') level."
+ },
+ "residual": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True for the synthetic level of a residual spelling."
+ },
+ "segment": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True for a historical segment's own definition."
+ },
+ "siblings": {
+ "anyOf": [
+ {
+ "items": {
+ "additionalProperties": false,
+ "properties": {
+ "customs_code": {
+ "description": "A canonical customs code, TOTAL, or a supported residual spelling.",
+ "type": "string"
+ },
+ "text": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "customs_code",
+ "text"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a catch-all level, the ordinary siblings it excludes."
+ },
+ "text": {
+ "description": "The level's label, in the requested language.",
+ "type": "string"
+ },
+ "untranslated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True when the label fell back to English."
+ },
+ "window": {
+ "anyOf": [
+ {
+ "additionalProperties": false,
+ "description": "The validity window of one customs-code segment (one definition).",
+ "properties": {
+ "valid_from": {
+ "description": "First day of the window, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Last day of the window, ISO date; null while in force."
+ }
+ },
+ "required": [
+ "valid_from",
+ "valid_to"
+ ],
+ "type": "object"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a level read from a dated edition (a former definition, or one of its ancestors as that edition had them): the validity window of the definition shown. Absent for current-edition levels."
+ }
+ },
+ "required": [
+ "customs_code",
+ "text"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "residual_customs_codes": {
+ "anyOf": [
+ {
+ "items": {
+ "additionalProperties": false,
+ "description": "One sub-code or residual customs code row, shared by breakdown views\n(``subcode-compare``, ``concentration-compare``, ``volatility``) and\nvalidation responses (``ValidateCustomsCodeResponse.residual_customs_codes``).",
+ "properties": {
+ "basket_key": {
+ "description": "The key of this row's basket in the payload's per-sub-code maps: the sub-code (read over the parent piece's window), or the entered basket's label.",
+ "type": "string"
+ },
+ "customs_code": {
+ "description": "The sub-code (or residual spelling).",
+ "type": "string"
+ },
+ "in_eurostat_api": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a residual row: whether Eurostat's API serves the spelling as a PRODUCT value (XX codes only)."
+ },
+ "label": {
+ "description": "The label of the row's (latest) definition, in the requested language when recorded.",
+ "type": "string"
+ },
+ "residual_kind": {
+ "anyOf": [
+ {
+ "enum": [
+ "xx",
+ "letter"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a residual row: 'xx' or 'letter'. Residual rows explain the gap between the sub-codes and the parent, and are pinned outside the top-N ranking."
+ },
+ "residual_reason": {
+ "anyOf": [
+ {
+ "enum": [
+ "A",
+ "B",
+ "C",
+ "E",
+ "F",
+ "I",
+ "M",
+ "P",
+ "R",
+ "S",
+ "T",
+ "V",
+ "W",
+ "Y"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a letter code or reason group: the reason letter (S, Y, E, I, …)."
+ },
+ "residual_spelling": {
+ "anyOf": [
+ {
+ "enum": [
+ "xx",
+ "letter",
+ "reason_group"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "For a residual row: 'xx', 'letter' or 'reason_group'."
+ },
+ "segments": {
+ "description": "The definitions in force during the basket's window (empty for residual rows and for validation rows).",
+ "items": {
+ "additionalProperties": false,
+ "description": "One recorded definition of a customs code: a fact of the\nclassification metadata, with its window and its own label.",
+ "properties": {
+ "customs_code": {
+ "description": "The customs code the segment defines.",
+ "type": "string"
+ },
+ "kind": {
+ "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
+ "enum": [
+ "cn",
+ "residual_xx",
+ "letter_coded",
+ "chapter_00",
+ "other"
+ ],
+ "type": "string"
+ },
+ "label": {
+ "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
+ "type": "string"
+ },
+ "label_lang": {
+ "description": "The label's language (English when the requested one is not recorded for this definition).",
+ "enum": [
+ "bg",
+ "cs",
+ "da",
+ "de",
+ "el",
+ "en",
+ "es",
+ "et",
+ "fi",
+ "fr",
+ "ga",
+ "hr",
+ "hu",
+ "it",
+ "lt",
+ "lv",
+ "mt",
+ "nl",
+ "pl",
+ "pt",
+ "ro",
+ "sk",
+ "sl",
+ "sv"
+ ],
+ "type": "string"
+ },
+ "untranslated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True when the label fell back to English."
+ },
+ "valid_from": {
+ "description": "First day of the segment's validity window, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Last day of the window, ISO date; null for a segment still in force."
+ }
+ },
+ "required": [
+ "customs_code",
+ "valid_from",
+ "valid_to",
+ "kind",
+ "label",
+ "label_lang"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "untranslated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True when the label fell back to English."
+ }
+ },
+ "required": [
+ "basket_key",
+ "customs_code",
+ "label",
+ "segments"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Residual customs codes related to this code: those directly under a digit code (its XX code plus one reason group per reason letter), or the letter codes inside a reason group."
+ },
+ "residual_kind": {
+ "anyOf": [
+ {
+ "enum": [
+ "xx",
+ "letter"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Residual class for residual spellings: 'xx' or 'letter' (reason groups report 'letter', the class of the codes they group)."
+ },
+ "residual_reason": {
+ "anyOf": [
+ {
+ "enum": [
+ "A",
+ "B",
+ "C",
+ "E",
+ "F",
+ "I",
+ "M",
+ "P",
+ "R",
+ "S",
+ "T",
+ "V",
+ "W",
+ "Y"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The reason letter of a letter code or reason group (S, Y, E, I, …)."
+ },
+ "residual_spelling": {
+ "anyOf": [
+ {
+ "enum": [
+ "xx",
+ "letter",
+ "reason_group"
+ ],
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "The residual spelling's exact shape: 'xx', 'letter' or 'reason_group'."
+ },
+ "segment_history": {
+ "anyOf": [
+ {
+ "items": {
+ "additionalProperties": false,
+ "description": "Every recorded definition of one customs code (the CN classification\nfiles), independent of the current edition.",
+ "properties": {
+ "customs_code": {
+ "description": "The base customs code.",
+ "type": "string"
+ },
+ "metadata_generation": {
+ "anyOf": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The classification snapshot the history comes from."
+ },
+ "segments": {
+ "description": "The definitions, oldest first.",
+ "items": {
+ "additionalProperties": false,
+ "description": "One recorded definition of a customs code with its direct recorded\nlinks (``SegmentHistoryPayload.segments``).",
+ "properties": {
+ "customs_code": {
+ "description": "The customs code the segment defines.",
+ "type": "string"
+ },
+ "kind": {
+ "description": "The classification row's kind ('cn', 'residual_xx', 'letter_coded').",
+ "enum": [
+ "cn",
+ "residual_xx",
+ "letter_coded",
+ "chapter_00",
+ "other"
+ ],
+ "type": "string"
+ },
+ "label": {
+ "description": "The segment's own label (the definition in force during its window), in the requested language when available.",
+ "type": "string"
+ },
+ "label_lang": {
+ "description": "The label's language (English when the requested one is not recorded for this definition).",
+ "enum": [
+ "bg",
+ "cs",
+ "da",
+ "de",
+ "el",
+ "en",
+ "es",
+ "et",
+ "fi",
+ "fr",
+ "ga",
+ "hr",
+ "hu",
+ "it",
+ "lt",
+ "lv",
+ "mt",
+ "nl",
+ "pl",
+ "pt",
+ "ro",
+ "sk",
+ "sl",
+ "sv"
+ ],
+ "type": "string"
+ },
+ "recorded_links": {
+ "additionalProperties": false,
+ "description": "Direct correspondence edges recorded for this exact definition. An empty list means no recorded direct link -- not that the code never changed (headings have no edges of their own).",
+ "properties": {
+ "predecessors": {
+ "description": "Edges recorded into this segment.",
+ "items": {
+ "additionalProperties": false,
+ "description": "One recorded predecessor/successor edge of an exact segment.",
+ "properties": {
+ "customs_code": {
+ "description": "The other segment's customs code.",
+ "type": "string"
+ },
+ "marker": {
+ "description": "Eurostat's relation marker, as recorded.",
+ "type": "string"
+ },
+ "match": {
+ "description": "'matched' when the endpoint resolves to a recorded segment by its full window, 'unmatched' otherwise (never attached to a guessed segment).",
+ "enum": [
+ "matched",
+ "unmatched"
+ ],
+ "type": "string"
+ },
+ "valid_from": {
+ "description": "The other segment's window start, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The other segment's window end, ISO date; null when open."
+ }
+ },
+ "required": [
+ "customs_code",
+ "valid_from",
+ "valid_to",
+ "marker",
+ "match"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ "successors": {
+ "description": "Edges recorded from this segment.",
+ "items": {
+ "additionalProperties": false,
+ "description": "One recorded predecessor/successor edge of an exact segment.",
+ "properties": {
+ "customs_code": {
+ "description": "The other segment's customs code.",
+ "type": "string"
+ },
+ "marker": {
+ "description": "Eurostat's relation marker, as recorded.",
+ "type": "string"
+ },
+ "match": {
+ "description": "'matched' when the endpoint resolves to a recorded segment by its full window, 'unmatched' otherwise (never attached to a guessed segment).",
+ "enum": [
+ "matched",
+ "unmatched"
+ ],
+ "type": "string"
+ },
+ "valid_from": {
+ "description": "The other segment's window start, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "The other segment's window end, ISO date; null when open."
+ }
+ },
+ "required": [
+ "customs_code",
+ "valid_from",
+ "valid_to",
+ "marker",
+ "match"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "successors",
+ "predecessors"
+ ],
+ "type": "object"
+ },
+ "untranslated": {
+ "anyOf": [
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "True when the label fell back to English."
+ },
+ "valid_from": {
+ "description": "First day of the segment's validity window, ISO date.",
+ "type": "string"
+ },
+ "valid_to": {
+ "anyOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Last day of the window, ISO date; null for a segment still in force."
+ }
+ },
+ "required": [
+ "customs_code",
+ "valid_from",
+ "valid_to",
+ "kind",
+ "label",
+ "label_lang",
+ "recorded_links"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "customs_code",
+ "metadata_generation",
+ "segments"
+ ],
+ "type": "object"
+ },
+ "type": "array"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "default": null,
+ "description": "Every recorded definition of the code, with direct recorded links; null when no classification history is recorded for it. Use these windows to compose windowed pieces (the basket request form)."
+ }
+ },
+ "required": [
+ "customs_code",
+ "levels",
+ "customs_code_label",
+ "has_subcodes",
+ "interpreted_from",
+ "residual_kind",
+ "residual_spelling",
+ "residual_reason",
+ "in_eurostat_api",
+ "residual_customs_codes",
+ "in_current_cn",
+ "segment_history"
+ ],
+ "type": "object"
+ },
+ {
+ "additionalProperties": false,
+ "description": "One batch item's failure shape.",
+ "properties": {
+ "customs_code": {
+ "description": "The input item as typed.",
+ "type": "string"
+ },
+ "error": {
+ "additionalProperties": false,
+ "description": "Why it failed.",
+ "properties": {
+ "detail": {
+ "description": "The error message.",
+ "type": "string"
+ },
+ "status": {
+ "description": "The HTTP status the single-code endpoint would have returned.",
+ "type": "integer"
+ }
+ },
+ "required": [
+ "status",
+ "detail"
+ ],
+ "type": "object"
+ }
+ },
+ "required": [
+ "customs_code",
+ "error"
+ ],
+ "type": "object"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "results"
+ ],
+ "type": "object"
+ }
+]