{
  "tool_id": "art-474-validate-mt700-lc-fields",
  "note": "Vectors reproduce tools/420-mt700-lc-field-validator.html's own worked-example placeholder inputs (Field 20/40A/32B/44A/44B/45A/46A/50/59 placeholder text) verbatim -- tool<->kernel parity is the gate. golden_hash empty until first `node golden-parity.test.mjs --update`.",
  "vectors": [
    {
      "name": "clean-compliant",
      "policy_parameters": {
        "fields": {
          "field_20": "LC2024/001234",
          "field_40A": "IRREVOCABLE",
          "field_31C": "260901",
          "field_31D_date": "261231",
          "field_31D_place": "LONDON, UNITED KINGDOM",
          "field_32B": "USD 500000.00",
          "field_41_bank": "ANY BANK",
          "field_41_by": "BY NEGOTIATION",
          "field_42": "",
          "field_43P": "ALLOWED",
          "field_43T": "NOT ALLOWED",
          "field_44A": "SHANGHAI, CHINA",
          "field_44B": "ROTTERDAM, NETHERLANDS",
          "field_44C": "261201",
          "field_45A": "ELECTRONIC COMPONENTS AS PER PROFORMA INVOICE NO. PI-2024-001, CIF ROTTERDAM",
          "field_46A": "SIGNED COMMERCIAL INVOICE IN TRIPLICATE\nFULL SET CLEAN ON BOARD BILLS OF LADING\nPACKING LIST IN TRIPLICATE\nCERTIFICATE OF ORIGIN",
          "field_48": "21",
          "field_49": "CONFIRM",
          "field_50": "ABC IMPORT CO, 123 MAIN ST, NEW YORK",
          "field_59": "XYZ EXPORT LTD, 45 HARBOUR RD, SHANGHAI"
        },
        "as_of_date": "260801"
      },
      "output_payload": {
        "score": 96,
        "verdict": "compliant",
        "compliant": true,
        "error_count": 0,
        "warning_count": 1,
        "errors": [],
        "warnings": [
          {
            "field": "46A",
            "message": "Field 46A: Transport document (B/L, AWB) not detected -- typically required.",
            "citation": "UCP 600 Art.19-25"
          }
        ],
        "field_results": [
          {
            "field": "20",
            "label": "DC Number",
            "value": "LC2024/001234",
            "status": "ok",
            "rule": "Max 16 chars, A-Z 0-9 / -",
            "issue": ""
          },
          {
            "field": "40A",
            "label": "Form of DC",
            "value": "IRREVOCABLE",
            "status": "ok",
            "rule": "ICC-recognised form",
            "issue": ""
          },
          {
            "field": "31C",
            "label": "Date of Issue",
            "value": "260901",
            "status": "ok",
            "rule": "Valid YYMMDD",
            "issue": ""
          },
          {
            "field": "31D Date",
            "label": "Date of Expiry",
            "value": "261231",
            "status": "ok",
            "rule": "After issue date",
            "issue": ""
          },
          {
            "field": "31D Place",
            "label": "Place of Expiry",
            "value": "LONDON, UNITED KINGDOM",
            "status": "ok",
            "rule": "Place specified",
            "issue": ""
          },
          {
            "field": "32B",
            "label": "Currency/Amount",
            "value": "USD 500000.00",
            "status": "ok",
            "rule": "Valid CCY + amount",
            "issue": ""
          },
          {
            "field": "41 Bank",
            "label": "Available With",
            "value": "ANY BANK",
            "status": "ok",
            "rule": "Bank specified",
            "issue": ""
          },
          {
            "field": "41 By",
            "label": "Available By",
            "value": "BY NEGOTIATION",
            "status": "ok",
            "rule": "Valid payment method",
            "issue": ""
          },
          {
            "field": "42",
            "label": "Drafts At",
            "value": "(not required)",
            "status": "skip",
            "rule": "N/A for Payment/Negotiation",
            "issue": ""
          },
          {
            "field": "43P",
            "label": "Partial Shipments",
            "value": "ALLOWED",
            "status": "ok",
            "rule": "Valid value",
            "issue": ""
          },
          {
            "field": "43T",
            "label": "Transhipment",
            "value": "NOT ALLOWED",
            "status": "ok",
            "rule": "Valid value",
            "issue": ""
          },
          {
            "field": "44A",
            "label": "Port of Loading",
            "value": "SHANGHAI, CHINA",
            "status": "ok",
            "rule": "Specified",
            "issue": ""
          },
          {
            "field": "44B",
            "label": "Port of Discharge",
            "value": "ROTTERDAM, NETHERLANDS",
            "status": "ok",
            "rule": "Specified",
            "issue": ""
          },
          {
            "field": "44C",
            "label": "Latest Shipment",
            "value": "261201",
            "status": "ok",
            "rule": "Valid date sequence",
            "issue": ""
          },
          {
            "field": "45A",
            "label": "Description of Goods",
            "value": "ELECTRONIC COMPONENTS AS PER PROFORMA IN...",
            "status": "ok",
            "rule": "Goods described with Incoterm",
            "issue": ""
          },
          {
            "field": "46A",
            "label": "Documents Required",
            "value": "SIGNED COMMERCIAL INVOICE IN TRIPLICATE\nFULL SET C...",
            "status": "ok",
            "rule": "Invoice + transport doc + packing list expected",
            "issue": "1 common doc(s) not detected"
          },
          {
            "field": "48",
            "label": "Presentation Period",
            "value": "21 days",
            "status": "ok",
            "rule": "Within UCP 600 Art.14(c) limit",
            "issue": ""
          },
          {
            "field": "49",
            "label": "Confirmation",
            "value": "CONFIRM",
            "status": "ok",
            "rule": "Valid instruction",
            "issue": ""
          },
          {
            "field": "50",
            "label": "Applicant",
            "value": "ABC IMPORT CO, 123 MAIN ST, NEW YORK",
            "status": "ok",
            "rule": "Specified",
            "issue": ""
          },
          {
            "field": "59",
            "label": "Beneficiary",
            "value": "XYZ EXPORT LTD, 45 HARBOUR RD, SHANGHAI",
            "status": "ok",
            "rule": "Specified",
            "issue": ""
          }
        ]
      },
      "golden_hash": "47a2c4d711f946ef1ba76bbd69bdeab765918f335d8cf5f8a87fee6640adb2aa"
    },
    {
      "name": "mostly-missing-bad-expiry",
      "policy_parameters": {
        "fields": {
          "field_20": "",
          "field_40A": "",
          "field_31C": "260901",
          "field_31D_date": "260801",
          "field_31D_place": "",
          "field_32B": "XYZ 500000.00",
          "field_41_bank": "",
          "field_41_by": "",
          "field_42": "",
          "field_43P": "",
          "field_43T": "",
          "field_44A": "",
          "field_44B": "",
          "field_44C": "",
          "field_45A": "",
          "field_46A": "",
          "field_48": "45",
          "field_49": "",
          "field_50": "",
          "field_59": ""
        },
        "as_of_date": "260801"
      },
      "output_payload": {
        "score": 15,
        "verdict": "non_compliant",
        "compliant": false,
        "error_count": 12,
        "warning_count": 5,
        "errors": [
          {
            "field": "20",
            "message": "Field 20 (DC Number) is missing.",
            "citation": "UCP 600 Art.1 / MT700 mandatory"
          },
          {
            "field": "40A",
            "message": "Field 40A (Form of DC) is missing.",
            "citation": "UCP 600 Art.3 / MT700 mandatory"
          },
          {
            "field": "31D Date",
            "message": "Field 31D: Expiry date must be after the issue date (Field 31C).",
            "citation": "UCP 600 Art.6(a)"
          },
          {
            "field": "31D Place",
            "message": "Field 31D: Place of Expiry is required.",
            "citation": "UCP 600 Art.6(a)(ii)"
          },
          {
            "field": "32B",
            "message": "Field 32B: \"XYZ\" is not a recognised ISO 4217 currency code.",
            "citation": "ISO 4217"
          },
          {
            "field": "41 Bank",
            "message": "Field 41: Available With (bank) is missing.",
            "citation": "UCP 600 Art.6(b)"
          },
          {
            "field": "41 By",
            "message": "Field 41: Available By (payment method) is missing.",
            "citation": "UCP 600 Art.6(b)"
          },
          {
            "field": "45A",
            "message": "Field 45A (Description of Goods) is missing.",
            "citation": "UCP 600 Art.18(a)(iii) / MT700 mandatory"
          },
          {
            "field": "46A",
            "message": "Field 46A (Documents Required) is missing.",
            "citation": "UCP 600 Art.18 / MT700 mandatory"
          },
          {
            "field": "49",
            "message": "Field 49 (Confirmation Instructions) is missing.",
            "citation": "MT700 mandatory / UCP 600 Art.8"
          },
          {
            "field": "50",
            "message": "Field 50 (Applicant) is missing.",
            "citation": "MT700 mandatory"
          },
          {
            "field": "59",
            "message": "Field 59 (Beneficiary) is missing.",
            "citation": "MT700 mandatory"
          }
        ],
        "warnings": [
          {
            "field": "43P",
            "message": "Field 43P (Partial Shipments) not specified -- defaults to ALLOWED under UCP 600.",
            "citation": "UCP 600 Art.31(a)"
          },
          {
            "field": "43T",
            "message": "Field 43T (Transhipment) not specified -- defaults to ALLOWED under UCP 600 Art.19-25.",
            "citation": "UCP 600 Art.20(c)"
          },
          {
            "field": "44A",
            "message": "Field 44A (Port of Loading) not specified.",
            "citation": "ISBP 821 / operational best practice"
          },
          {
            "field": "44B",
            "message": "Field 44B (Port of Discharge) not specified.",
            "citation": "ISBP 821 / operational best practice"
          },
          {
            "field": "48",
            "message": "Field 48: Presentation period is 45 days -- UCP 600 Art.14(c) sets a maximum of 21 days. Presentation after 21 days may be rejected.",
            "citation": "UCP 600 Art.14(c)"
          }
        ],
        "field_results": [
          {
            "field": "20",
            "label": "DC Number",
            "value": "(empty)",
            "status": "err",
            "rule": "Max 16 chars, A-Z 0-9 / -",
            "issue": "Missing mandatory field"
          },
          {
            "field": "40A",
            "label": "Form of DC",
            "value": "(empty)",
            "status": "err",
            "rule": "IRREVOCABLE | IRREVOCABLE TRANSFERABLE | IRREVOCABLE STANDBY",
            "issue": "Missing"
          },
          {
            "field": "31C",
            "label": "Date of Issue",
            "value": "260901",
            "status": "ok",
            "rule": "Valid YYMMDD",
            "issue": ""
          },
          {
            "field": "31D Date",
            "label": "Date of Expiry",
            "value": "260801",
            "status": "err",
            "rule": "Must be after Field 31C",
            "issue": "Expiry <= Issue date"
          },
          {
            "field": "31D Place",
            "label": "Place of Expiry",
            "value": "(empty)",
            "status": "err",
            "rule": "Place text required",
            "issue": "Missing"
          },
          {
            "field": "32B",
            "label": "Currency/Amount",
            "value": "XYZ 500000.00",
            "status": "err",
            "rule": "Valid ISO 4217 code",
            "issue": "Unknown currency"
          },
          {
            "field": "41 Bank",
            "label": "Available With",
            "value": "(empty)",
            "status": "err",
            "rule": "Bank name or ANY BANK",
            "issue": "Missing"
          },
          {
            "field": "41 By",
            "label": "Available By",
            "value": "(empty)",
            "status": "err",
            "rule": "BY PAYMENT/ACCEPTANCE/NEGOTIATION/DEF PAYMENT",
            "issue": "Missing"
          },
          {
            "field": "42",
            "label": "Drafts At",
            "value": "(not required)",
            "status": "skip",
            "rule": "N/A for Payment/Negotiation",
            "issue": ""
          },
          {
            "field": "43P",
            "label": "Partial Shipments",
            "value": "(empty)",
            "status": "warn",
            "rule": "ALLOWED | NOT ALLOWED",
            "issue": "Not specified"
          },
          {
            "field": "43T",
            "label": "Transhipment",
            "value": "(empty)",
            "status": "warn",
            "rule": "ALLOWED | NOT ALLOWED",
            "issue": "Not specified"
          },
          {
            "field": "44A",
            "label": "Port of Loading",
            "value": "(empty)",
            "status": "warn",
            "rule": "Recommended",
            "issue": "Not specified"
          },
          {
            "field": "44B",
            "label": "Port of Discharge",
            "value": "(empty)",
            "status": "warn",
            "rule": "Recommended",
            "issue": "Not specified"
          },
          {
            "field": "44C",
            "label": "Latest Shipment",
            "value": "(not specified)",
            "status": "skip",
            "rule": "Optional -- may use 44D period instead",
            "issue": ""
          },
          {
            "field": "45A",
            "label": "Description of Goods",
            "value": "(empty)",
            "status": "err",
            "rule": "Required -- describe goods clearly",
            "issue": "Missing"
          },
          {
            "field": "46A",
            "label": "Documents Required",
            "value": "(empty)",
            "status": "err",
            "rule": "Required",
            "issue": "Missing"
          },
          {
            "field": "48",
            "label": "Presentation Period",
            "value": "45 days",
            "status": "warn",
            "rule": "UCP 600 max is 21 days",
            "issue": "Exceeds 21-day rule"
          },
          {
            "field": "49",
            "label": "Confirmation",
            "value": "(empty)",
            "status": "err",
            "rule": "CONFIRM | MAY ADD | WITHOUT",
            "issue": "Missing"
          },
          {
            "field": "50",
            "label": "Applicant",
            "value": "(empty)",
            "status": "err",
            "rule": "Required",
            "issue": "Missing"
          },
          {
            "field": "59",
            "label": "Beneficiary",
            "value": "(empty)",
            "status": "err",
            "rule": "Required",
            "issue": "Missing"
          }
        ]
      },
      "golden_hash": "3bc8ebef669c46f261581319a0a1d73511b8e14d0e38fdab05106bedac881667"
    }
  ]
}
