Extraction schema:
{"$defs": {"Address": {"properties": {"address_line_one": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "First (top) line of the printed street address as shown in this party's address block (typically the street number + street name, or a P.O. Box / Suite number printed on the first line). Verbatim; preserve leading zeros, abbreviations (PO BOX, STE, APT), and casing as printed. Do NOT include city, state, or ZIP on this field. Do NOT confuse with address_line_two (second printed street line) or with country names.", "title": "Address Line One"}, "address_line_two": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Second printed line of the street address, if a second street line is shown above the city/state/ZIP row. Use null when only one street line is printed. Do NOT use this to hold city/state/ZIP; those have their own fields. Do NOT confuse with address_line_one.", "title": "Address Line Two"}, "city": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "City name as printed in the 'City' subfield of the party's address block (block 25 for ultimate consignee, block 26 for importer of record). Verbatim casing. For foreign importer addresses where only a foreign city is shown (e.g. BREZOLUPY for a Czech importer), use that foreign city. Do NOT confuse with state, country_of_origin, or foreign_port_of_lading.", "title": "City"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "US state abbreviation as printed in the 'State' subfield of the party's address block (two-letter postal code, e.g. CA, NJ, FL). For foreign parties whose State subfield is blank, return null. Do NOT confuse with country_of_origin (block 10, a country code like CZ/KR/GT) or exporting_country (block 14).", "title": "State"}, "zip_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "ZIP / postal code as printed in the 'Zip' subfield of the party's address block. Verbatim including any 4-digit ZIP+4 suffix and dash (e.g. 92024 or 07631 or 10087-1354). For foreign parties whose Zip subfield is blank, return null. Do NOT confuse with port_code (block 6, a 4-digit CBP code) or with manufacturer_id.", "title": "Zip Code"}}, "title": "Address", "type": "object"}, "Party": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Printed company / individual name on the first line(s) of the party's name-and-address block, before the address lines start. Concatenate the printed name lines with single spaces if multi-line. Verbatim casing (e.g. 'GLOW TUBE RESEARCH', 'Able C&C US, Inc', 'SUCDEN AMERICAS CORP'). Do NOT include the street address. Do NOT confuse Ultimate Consignee (block 25) with Importer of Record (block 26) — they have separate blocks even when populated with the same entity.", "title": "Name"}, "address": {"anyOf": [{"$ref": "#/$defs/Address"}, {"type": "null"}], "default": null, "description": "Address subfields (line_one, line_two, city, state, zip_code) for this party. Read from the same name-and-address block as the name field. Foreign-party fields (e.g. importer of record with a Czech address) may have blank state/zip; return null for those subfields.", "title": "Address"}}, "title": "Party", "type": "object"}, "OtherFee": {"properties": {"fee_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "CBP 3-digit fee class code as printed in the 'Other Fee Summary for Block 39' panel at the bottom-left of page 1, immediately preceding the fee name (e.g. '499' for Merchandise Processing Fee, '501' for Harbor Maintenance Fee, '056' for Cotton Fee, '311' for ADD/CVD cash deposits). Return as a string preserving any leading zeros. Do NOT confuse with HTSUS line numbers (block 27, e.g. '001', '002') or with the HTSUS commodity code (block 29A).", "title": "Fee Code"}, "fee_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Printed fee description shown after the fee_code in the Block 39 'Other Fee Summary' panel (e.g. 'Merchandise Process Fee', 'Merchandise Processing Fee', 'Harbor Maintenance Fee', 'Cotton Fee'). Verbatim, including any abbreviation as printed. Do NOT confuse with the merchandise description in block 28 (which describes the imported goods, e.g. 'WATCH', 'BEAUTY OR MAKE-UP PREPS,OTHER'). POLICY (added 2026-05-18 QA): VERBATIM as printed including any parenthetical fee-code suffix (e.g. PDF 0002 prints 'MPF (499)' and 'HMF (501)' → use exactly those strings, NOT abbreviated 'MPF' / 'HMF'). The parenthetical IS part of the printed fee_name and must be preserved.", "title": "Fee Name"}, "fee_amount": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Dollar amount printed next to the fee in the Block 39 'Other Fee Summary' panel, as a decimal number (e.g. 181.79 for MPF, 65.62 for HMF, 346.32 for HMF on 0018). Preserve cents (two decimals). Do NOT include a dollar sign. Do NOT confuse with the per-line Duty and I.R. Tax dollars/cents in block 34, with block 35 Total Entered Value, or with block 39 Other (the aggregated Other-Fees subtotal).", "title": "Fee Amount"}}, "title": "OtherFee", "type": "object"}, "LineItem": {"properties": {"line_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "3-digit zero-padded line sequence number printed in block 27 (the 'Line No.' column) at the start of this HTSUS line item, e.g. '001', '002', '008', '075'. Verbatim string including leading zeros. Lines run consecutively starting at 001 and continue on continuation sheets. Do NOT confuse with: invoice number (a separate header field on the description column), fee_code (a 3-digit CBP class code for fees in Block 39, e.g. '499'/'501'), or HTSUS chapter prefix (the first 2-4 digits of the HTSUS code in block 29A).", "title": "Line Number"}, "htsus_numbers": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "Ordered list of every HTSUS (Harmonized Tariff Schedule of the United States) classification number printed in column 29A 'A. HTSUS No.' for this line item, top-to-bottom as printed. Each entry MUST preserve the dotted 10-digit form exactly as printed (e.g. '9105.91.8030', '9105.91.8040', '9105.91.8050', '8539.39.9000', '3304.99.5000', '1701.99.5050', '9822.05.20'). A line can have multiple HTSUS numbers (Chapter 91 watches often list 3 sub-codes for movement, case, and battery; Chapter 98 CAFTA preferences add a 9822.xx code; cosmetics lines under Chapter 33 usually have one main 3304.xx code plus the 'MID' code on the next row, which is NOT an HTSUS number). 'MID' rows (e.g. 'MID KRABLCC13SEO', 'MID KRHANCO160KAN') are the manufacturer identification code, captured separately in manufacturer_id_line — do NOT include those in this list. Do NOT confuse with: ADA/CVD case numbers in column 29B (those go in ada_cvd_case_numbers), with manufacturer_id (header block 13), or with port_code.", "title": "Htsus Numbers"}, "ada_cvd_case_numbers": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "Ordered list of ADD (Antidumping Duty) / CVD (Countervailing Duty) case numbers printed in column 29B 'B. ADA/CVD No.' for this line item. ADA/CVD case numbers have a STRICT format: 'A-NNN-NNN' (antidumping) or 'C-NNN-NNN' (countervailing) — a single letter prefix, a hyphen, a 3-digit country code, a hyphen, a 3-digit case number (e.g. 'A-570-901', 'C-570-902', 'A-583-862'). If no ADA/CVD code is printed for the line (column 29B 'B' sub-row is blank), return null or []. None of the three TRAIN PDFs (0001 Czech watches, 0002 Guatemalan sugar, 0018 Korean cosmetics) carry an ADA/CVD case number — for those, return null/[]. Do NOT include the following items in this list (they are NOT ADA/CVD case numbers and appear in DIFFERENT columns): (a) the CHGS C-codes 'C223', 'C8', 'C70', 'C58', 'C20', 'C38', 'C160', 'C85', 'C175', 'C672', 'C1226', 'C8336', etc. — those appear in column 32B, have NO hyphen, are 'C' followed by digits only, and represent the freight/insurance allocation; they belong in chgs_codes. (b) HTSUS numbers (column 29A, dotted 10-digit form like '9105.91.8030'). (c) MID codes (e.g. 'KRABLCC13SEO', captured in manufacturer_id_line). (d) the Chapter 98 'CAFTA' / '9822.05.20' preference codes (those are HTSUS numbers in column 29A). A reliable test: if the candidate does NOT match the regex '^[AC]-[0-9]{3}-[0-9]{3}$', it is NOT an ADA/CVD case number and MUST NOT appear here.", "title": "Ada Cvd Case Numbers"}, "manufacturer_id_line": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Per-line Manufacturer Identification (MID) code when it is printed BELOW the HTSUS number on this specific line (e.g. 'MID KRABLCC13SEO', 'MID KRHANCO160KAN' in CBP 7501 cosmetics filings). The MID is an alphanumeric code (country prefix + abbreviated manufacturer name + city, e.g. KR-ABL-CC-13-SEO). Verbatim including the 'MID ' prefix when present, OR strip the 'MID ' prefix and return only the code — choose strip-prefix (return only the code, e.g. 'KRABLCC13SEO'). Return null if no per-line MID row is printed. Do NOT confuse with the header-level manufacturer_id (block 13) which is the master MID for the entry; the per-line MID may differ when a single entry covers multiple manufacturers.", "title": "Manufacturer Id Line"}, "gross_weight": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "A. Gross Weight as printed in column 30A for this line (the first sub-value in column 30, above 'B. Manifest Qty.'). Include the unit (KG, LB, etc.) when printed (e.g. '74 KG', '319835 KG', '141 KG'). If no explicit unit is printed in the cell, return the bare number string. Lines without their own gross weight (continuation sub-rows printing only Description like 'OTH,MOVE,BAT PR' or 'Merchandise Processing Fee') return null. Do NOT confuse with net_quantity_htsus_units (column 31, the quantity in the HTSUS-required UOM), with manifest_qty (column 30B), or with total entered value (block 35).", "title": "Gross Weight"}, "manifest_quantity": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "B. Manifest Qty. as printed in column 30B for this line (below gross_weight in the same column 30 cell). Include the unit when printed (e.g. '2 CTN', '100 DEG', '28 PK'). 'CTN' = carton, 'DEG' = degree (sugar polarity for raw sugar), 'PK' = package, 'BAG' = bag. Return null when no manifest quantity is printed for the row. Do NOT confuse with net_quantity_htsus_units (column 31) or with gross_weight (column 30A).", "title": "Manifest Quantity"}, "net_quantity_htsus_units": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Net Quantity expressed in the HTSUS-required unit of measure for this line, as printed in column 31 (e.g. '8.00 NO' = 8 numbers (pieces), '38.00 NO', '2.00 NO', '5.00 NO', '74 KG', '100.00 DEG', '28 PK'). Include the unit code (NO/KG/DEG/PK/BAG/etc.) as printed. NO = pieces, KG = kilograms, DEG = degrees Brix (sugar), PK = pack, BAG = bag, M2 = square meters. Return null when no value is printed on the row. Do NOT confuse with manifest_quantity (column 30B) — manifest quantity is the per-package count from the bill of lading, while net quantity is the HTS-mandated UOM that drives the rate calculation.", "title": "Net Quantity Htsus Units"}, "description_of_merchandise": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 28 Description of Merchandise: concatenate, in printed top-to-bottom order, every commodity-description text line printed in block 28 for this HTSUS line item, joined by '; ' (semicolon + single space). Each commodity-description line is the abbreviated/truncated trade description printed alongside the HTSUS-number rows. Examples of lines that ARE commodity descriptions and MUST be concatenated: 'WATCH', 'OTH,MOVE,BAT PR,OPTO ELEC,' (preserve the trailing comma verbatim — do NOT strip it), 'OTH,CASE,BAT POWR,OPTO ELE', 'OTH,BATTERY,W/OPTO ELECTR,' (preserve trailing comma), 'BEAUTY OR MAKE-UP PREPS,OTHER', 'BEAUTY OR MAKEUP,EYE MAKEU', 'BEAUTY/MAKEUP PREPS,LIP', 'BEAUTY/MAKEUP ,ROUGES POWD', 'OTH SGR,CN/BT,N/FV,NCLR,OT', 'OTH SGR,CN/BT, N/FV, NCLR,OT' (preserve embedded whitespace verbatim), 'DISCHARGE LAMP:OTHER NSPF', 'OTHER CLOCK CASES', 'MCH PRT F/8471,CATH,OTHER', 'TEX,<5MM LN,COTTON:WAD,OTH'. EXCLUDE the following rows even when they appear inside Block 28 for the line: (1) invoice-header rows ('Invoice Number: 001 / 20200015', 'Invoice Number 001/US202203-0003', 'Invoice Value USD', 'Total Entered Value (Invoice)', '44437.50 EUR @ 1.181000', 'Invoice/Net Entered: Value', 'US $52480.69'), (2) MID rows ('MID KRABLCC13SEO', 'MID KRHANCO160KAN', 'MID CZGLOTUB90BRE' — those are captured in manufacturer_id_line), (3) fee-allocation rows whose dollar amount belongs in other_fees, NOT in description: 'Merchandise Processing Fee', 'MERCHANDISE PROCESSING FEE', 'Harbor Maintenance Fee', 'HARBOR MAINTENANCE FEE 501', '501 HARBOR MAINTENANCE FEE (HMF)', '056 COTTON FEE', (4) bill-of-lading annotation rows ('M:', 'H:', 'MASTER BILL/AWB', 'HOUSE BILL', 'SUBHOUSE BILL', 'BILL QTY', 'TOTAL: 400 BAG', 'CAFTA,(P+)17011150-2106909', 'NOT RELATED', 'Y', 'N'), and (5) the HTSUS-number rows themselves (those go in htsus_numbers, NOT here). The result is a semicolon+space-joined string of the commercial product descriptions ONLY, verbatim — preserve casing, embedded punctuation (commas, slashes, colons), AND any trailing commas or trailing whitespace exactly as printed. Return null when no description line is printed (extremely rare). Do NOT confuse with fee_name (Block 39 fee panel) or with the importer/consignee name.", "title": "Description Of Merchandise"}, "entered_value_dollars": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "A. Entered Value for this HTSUS line item as printed in column 32A, summed across all the HTSUS sub-codes printed for the line if more than one is present. Whole-dollar US-currency value (e.g. 13794, 9448, 4346, 3590, 1228, 2362, 91779, 1672, 3173). Each entered-value row is printed in 1 USD (no decimal). Sum the dollar values across every column-32A line that belongs to THIS line_number. Do NOT include the 'CHGS' sub-row (which is the freight/insurance/other charges allocated to this line), and do NOT include the 'C8/C20/C223' style code printed under the entered-value (those are the cents-portion CHGS codes, captured in chgs_codes). Do NOT confuse with: block 35 Total Entered Value (the document grand total), with line duty dollars (column 34), or with fee_amount.", "title": "Entered Value Dollars"}, "chgs_codes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "Ordered list of B. CHGS (charges) codes printed in column 32B for this line — typically a 'C' prefix plus 1-4 digits (e.g. 'C223', 'C8', 'C70', 'C58', 'C20', 'C38', 'C6223', 'C1226', 'C8336', 'C2115', 'C85', 'C160'). These C-codes are the international freight and insurance amount (rounded to whole USD) allocated to that HTSUS sub-code's entered value, NOT a duty rate. One C-code typically appears per entered-value row, so a Chapter 91 line with 3 HTSUS sub-codes has 3 C-codes. Include every C-code printed in order. Do NOT include ADA/CVD case numbers (those go in ada_cvd_case_numbers), HTSUS numbers, or the 'NOT RELATED'/'N'/'Y' relationship indicator. POLICY (added 2026-05-18 QA): Each entry MUST match regex ^C[0-9]{1,6}$ (capital 'C' followed by 1-6 digits, NO whitespace). Do NOT include adjacent column-32A entered-value digits (e.g. PDF 0002 line 001 column 32 shows 'C 8336 / 31168' visually but 31168 is the entered_value of the P+ HTSUS sub-row, NOT a CHGS code; correct is chgs_codes=['C8336'], entered_value_dollars=31168).", "title": "Chgs Codes"}, "relationship_indicator": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "C. Relationship indicator printed in column 32C for this HTSUS line. Allowed values: 'NOT RELATED' (verbatim, as printed on 0001 and 0002 lines), 'Y' (yes — buyer and seller related, used on 0018), 'N' (no — not related, used on 0018). When multiple HTSUS sub-rows on a single line all carry the same indicator, return the single value. When the line has no indicator printed, return null. Do NOT confuse with: country_of_origin (block 10), with the 'NO' unit suffix in column 31 ('NO' there means 'number of pieces', NOT 'no/not related'), or with the declaration-block 'OR' boxes.", "title": "Relationship Indicator"}, "htsus_rates": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "Ordered list of A. HTSUS Rate values printed in column 33A for this line — ONE rate per HTSUS sub-code, in the same printed top-to-bottom order as the corresponding htsus_numbers list (so len(htsus_rates) MUST equal len(htsus_numbers)). Read each rate from the SAME printed row as its HTSUS number (column 29A): the rate aligned with '9105.91.8030' belongs to that sub-code, the rate aligned with '9105.91.8040' belongs to that sub-code, etc. EXCLUDE the rate printed adjacent to the merchandise-name HEADER row ('WATCH | FREE', 'BEAUTY OR MAKE-UP PREPS,OTHER | Free') — that is the line's summary/aggregate rate, NOT a per-HTSUS-sub-code rate; it is implied by the per-sub-code rates and MUST NOT appear in this list. EXCLUDE rates printed beside fee-allocation rows: '0.3464%' (MPF rate on the 'Merchandise Processing Fee' row), '0.125%' (HMF rate on the 'Harbor Maintenance Fee' row), '1.087653c/KG' (cotton fee rate), '0.0012500' (per-line HMF rate when printed under column 33B/33C). Preserve the printed form exactly: 'FREE' (verbatim casing as printed — 'FREE' on PDF 0001 line items and PDF 0002, 'Free' with mixed-case on PDF 0018 lines), percentage strings like '6.9%', '5.3%', '2.4%', '5.5%' with the % sign as printed, or the decimal-string form '0.3000' as printed. Lines with 3 HTSUS sub-codes (watches: movement/case/battery) will have 3 entries; lines with 2 HTSUS sub-codes (Chapter 91 movement+case or Chapter 98 CAFTA + base HTS) will have 2; lines with 1 HTSUS sub-code (cosmetics, sugar continuation lines) will have 1. Do NOT confuse with ada_cvd_rates (column 33B) or irc_rates (column 33C).", "title": "Htsus Rates"}, "ada_cvd_rates": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "Ordered list of B. ADA/CVD Rate values printed in column 33B for this line. Symmetric with ada_cvd_case_numbers: this list is populated ONLY when ada_cvd_case_numbers is also populated (a per-line antidumping/countervailing duty case applies). If ada_cvd_case_numbers is null/[] for this line, ada_cvd_rates MUST also be null/[]. None of the three TRAIN PDFs carry an ADA/CVD case, so for all three TRAIN PDFs (and any PDF without an 'A-NNN-NNN' or 'C-NNN-NNN' code in column 29B), return null or [] for this field. Verbatim format including '%' or 'FREE'. Do NOT populate this from: the HTSUS rates (those go in htsus_rates), the MPF rate '0.3464%' or HMF rate '0.125%' (fee-row rates), the per-line HMF rate '0.0012500', or the merchandise-name header 'FREE' (excluded from htsus_rates too).", "title": "Ada Cvd Rates"}, "irc_rates": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "default": null, "description": "Ordered list of C. IRC Rate values printed in column 33C for this line (Internal Revenue Code rate, applied to alcohol, tobacco, fuels). Typically blank for non-IRC commodities; return null or [] when blank. Do NOT include the MPF/HMF fee rates or the HTSUS rate.", "title": "Irc Rates"}, "visa_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "D. Visa No. as printed in column 33D for this line (textile import visa number, when applicable). Most non-textile entries leave this blank — return null. Do NOT confuse with the manufacturer_id, the importer_number, or the reference_number.", "title": "Visa Number"}, "duty_and_tax_amount": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Block 34 'Duty and I.R. Tax' total for this HTSUS line item, expressed as a decimal dollar amount summed across every Block 34 row whose Dollars/Cents pair belongs to this line_number. EXCLUDE the Merchandise Processing Fee and Harbor Maintenance Fee rows printed inside the same line cell — those are captured in the document-level other_fees list (Block 39 panel), NOT here. EXAMPLE: PDF 0001 line 001 shows 47.78 + 17.24 (MPF + HMF — exclude) + 2.40 (HTSUS 9105.91.8030 duty) + 299.87 (HTSUS 9105.91.8040 duty) ⇒ duty_and_tax_amount = 302.27 (2.40 + 299.87). Return null when the line is FREE on every HTSUS sub-code with no I.R. tax (e.g. raw-sugar lines on 0002 where rate is FREE for the 9822.05.20 CAFTA preference) and no merchandise duty is owed. Do NOT confuse with block 37 'Duty', block 38 'Tax', block 39 'Other', or block 40 'Total' (those are document-level summary totals). POLICY (added 2026-05-18 QA): When the printed duty rate is 'FREE' on every Block 34 sub-row for this line and no dollar duty amount is printed, return 0 (NUMERIC zero, NOT null). null is reserved for rows where the cell is absent or unreadable. PDF 0002 lines 001-004 are FREE → all four must be 0.", "title": "Duty And Tax Amount"}}, "title": "LineItem", "type": "object"}}, "properties": {"filer_code_entry_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 1 'Filer Code / Entry No.' as printed in the top-right corner of page 1. A CBP-assigned identifier combining the 3-character filer code, the 7-digit entry sequence, and the 1-character check digit, conventionally written with hyphens (e.g. 'BFH-0005912-8', 'J82-0008331-2', '286-6586645-6'). Preserve hyphens and any leading zeros verbatim. Do NOT confuse with: importer_number (block 23, an IRS/SSN-style identifier like '853-11-1122'), consignee_number (block 22), reference_number (block 24), or broker_importer_file_number (block 43, e.g. '48974 / 00005912').", "title": "Filer Code Entry Number"}, "entry_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 2 Entry Type code as printed (typically 2-digit code, sometimes with a single-letter suffix, e.g. '01', '02 ABI/A', '01 ABI/A'). Verbatim — preserve the trailing ' ABI/A' or other suffixes if printed (the suffix indicates Automated Broker Interface filing track). Do NOT confuse with bond_type (block 5, a single digit), entry_number, or summary_status.", "title": "Entry Type"}, "summary_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 3 Summary Date as printed in the top row. Format MM/DD/YYYY (4-digit year, e.g. '12/16/2020', '10/23/2020 BBA', '05/19/22'). Preserve any trailing tracking annotations printed in the same cell (e.g. 'BBA' on PDF 0002) by including them verbatim with the date. For 2-digit years as printed (e.g. '05/19/22'), keep the printed 2-digit form — do NOT normalize. Do NOT confuse with entry_date (block 7), import_date (block 11), export_date (block 15), or it_date (block 17).", "title": "Summary Date"}, "surety_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 4 Surety No. as printed (a 3-digit CBP-assigned surety code, e.g. '856', '913', '054'). Verbatim including any leading zero. Do NOT confuse with port_code (block 6, a 4-digit code), bond_type (block 5, single digit), or fee_code.", "title": "Surety Number"}, "bond_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 5 Bond Type as printed (a single-digit code, e.g. '9', '8'). Bond type 8 = single transaction, 9 = continuous bond. Verbatim digit string. Do NOT confuse with entry_type (block 2) or with surety_number (block 4).", "title": "Bond Type"}, "port_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 6 Port Code as printed (the 4-digit CBP-assigned port-of-entry numeric code, e.g. '2704' for the Port of Chicago, '4601' for Port of New York/Newark). Verbatim 4-digit string preserving any leading zero. Do NOT confuse with foreign_port_of_lading (block 19) or us_port_of_unlading (block 20).", "title": "Port Code"}, "entry_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 7 Entry Date as printed. Format MM/DD/YYYY (e.g. '12/16/2020', '10/09/2020', '05/09/2022'). The date the merchandise was entered for consumption. Do NOT confuse with summary_date (block 3), import_date (block 11), or export_date (block 15).", "title": "Entry Date"}, "importing_carrier": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 8 Importing Carrier name as printed (typically the vessel/aircraft name or carrier code, e.g. 'YM ENLIGHTENMENT', 'KOBE EXPRESS 0036', 'HYUNDAI HONOUR (HDMU)'). Verbatim including any voyage number or SCAC code in parentheses. Do NOT confuse with exporting_country (block 14) or importer_name (block 26).", "title": "Importing Carrier"}, "mode_of_transport": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 9 Mode of Transport as printed (a 2-digit numeric mode code, e.g. '11' for vessel non-container, '10' for vessel container, '40' for air). Verbatim digit string. Do NOT confuse with port_code (block 6) or country_of_origin (block 10).", "title": "Mode Of Transport"}, "country_of_origin": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 10 Country of Origin as printed (a 2-letter ISO country code, e.g. 'CZ' for Czechia, 'GT' for Guatemala, 'KR' for South Korea). Verbatim 2-letter uppercase. Do NOT confuse with exporting_country (block 14, which may differ from the country of origin when goods are trans-shipped) or with the address state field.", "title": "Country Of Origin"}, "import_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 11 Import Date as printed. Format MM/DD/YYYY (e.g. '12/02/2020', '10/06/2020', '05/11/2022'). The date the importing carrier arrived at the US port of unlading. Do NOT confuse with entry_date (block 7), summary_date (block 3), or export_date (block 15).", "title": "Import Date"}, "bill_of_lading_or_awb_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 12 B/L or AWB No. as printed (bill of lading number for ocean cargo or air waybill number for air cargo, e.g. 'YMLUT936036147', 'HLCU GU2200954426', 'HDMUSELM23731501'). Verbatim, preserving any embedded spaces. Do NOT confuse with manufacturer_id (block 13), it_number (block 16), or filer_code_entry_number (block 1).", "title": "Bill Of Lading Or Awb Number"}, "manufacturer_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 13 Manufacturer ID (MID) as printed at the document-header level. The MID is the CBP-mandated identification code for the foreign manufacturer / shipper, structured as country-code prefix + abbreviated manufacturer name + city abbreviation (e.g. 'CZGLOTUB90BRE' = CZ + GLOTUB + 90 + BRE; 'GTINGMAG22GUA' = GT + INGMAG + 22 + GUA; 'MULTI' when multiple manufacturers ship under one entry). Verbatim uppercase. Do NOT confuse with the per-line manufacturer_id_line in the LineItem, with consignee_number (block 22), or with the importer_number (block 23).", "title": "Manufacturer Id"}, "exporting_country": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 14 Exporting Country as printed (a 2-letter ISO country code from which the goods were exported, e.g. 'CZ', 'GT', 'KR'). Verbatim 2-letter uppercase. May equal country_of_origin or may differ when goods are trans-shipped through a third country. Do NOT confuse with country_of_origin (block 10) or with foreign_port_of_lading.", "title": "Exporting Country"}, "export_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 15 Export Date as printed. Format MM/DD/YYYY (e.g. '11/10/2020', '10/03/2020', '04/03/2022'). The date the merchandise left the foreign port. Do NOT confuse with entry_date (block 7), import_date (block 11), or it_date (block 17).", "title": "Export Date"}, "it_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 16 I.T. No. (In-Transit Number) as printed, when the cargo arrived under an in-bond move. Typically a 9-12 digit numeric string (e.g. '783326132'). Return null if block 16 is blank (no in-bond entry). Verbatim. Do NOT confuse with bill_of_lading_or_awb_number (block 12) or it_date (block 17).", "title": "It Number"}, "it_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 17 I.T. Date (In-Transit date) as printed in MM/DD/YYYY (e.g. '12/02/2020'). Return null if blank. Do NOT confuse with entry_date, import_date, export_date, or summary_date.", "title": "It Date"}, "missing_documents": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 18 Missing Docs code(s) as printed (free-text or a numeric code, e.g. '42879'). Return null when block 18 is blank. Verbatim. Do NOT confuse with it_number (block 16) or visa_number (per-line block 33D).", "title": "Missing Documents"}, "foreign_port_of_lading": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 19 Foreign Port of Lading as printed (the CBP-assigned 5-digit Schedule K foreign port code, e.g. '42879', '20506', '58023'). Verbatim digit string preserving leading zeros. Do NOT confuse with us_port_of_unlading (block 20) or port_code (block 6).", "title": "Foreign Port Of Lading"}, "us_port_of_unlading": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 20 U.S. Port of Unlading as printed (a 4-digit CBP port code for the US port where the cargo was unloaded, e.g. '5301', '2704', '4601'). Verbatim digit string preserving leading zeros. May differ from port_code (block 6) when the entry is filed at a different inland port than the port of arrival. Do NOT confuse with foreign_port_of_lading (block 19) or with the port_code (block 6).", "title": "Us Port Of Unlading"}, "location_of_goods": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 21 Location of Goods / G.O. No. as printed (the FIRMS code or General Order warehouse code where the goods are physically located, e.g. 'Z550', 'Y790 YUSEN TERMINAL INC (LA) E', 'E364/GLOBAL TERMINAL & CON'). Verbatim including any warehouse name appended after the code. Do NOT confuse with foreign_port_of_lading (block 19) or with us_port_of_unlading (block 20).", "title": "Location Of Goods"}, "consignee_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 22 Consignee Number as printed (typically an IRS EIN-formatted number 'NN-NNNNNNN' or 'SAME' if same as importer, e.g. '853-11-1122', '22-201992000', 'SAME'). Verbatim preserving hyphens. Do NOT confuse with importer_number (block 23, separate identifier) or with reference_number (block 24).", "title": "Consignee Number"}, "importer_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 23 Importer Number as printed (the IRS-issued tax ID of the importer of record, formatted 'NN-NNNNNNN' or compressed without hyphens, e.g. '22-201992000', '84-519133400'). Verbatim preserving any hyphens or absence thereof. Do NOT confuse with consignee_number (block 22), reference_number (block 24), or filer_code_entry_number (block 1).", "title": "Importer Number"}, "reference_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 24 Reference Number as printed (broker-internal reference, free-text, e.g. '203901-66670'). Return null when blank. Verbatim. Do NOT confuse with importer_number, consignee_number, or broker_importer_file_number (block 43).", "title": "Reference Number"}, "ultimate_consignee": {"anyOf": [{"$ref": "#/$defs/Party"}, {"type": "null"}], "default": null, "description": "Block 25 Ultimate Consignee Name and Address — the party (typically the US end-buyer) that takes delivery of the merchandise after import. Read the name + address subfields from the LEFT-side block on page 1 labelled 'Ultimate Consignee Name and Address'. Do NOT confuse with importer_of_record (block 26, the RIGHT-side block) — when both blocks contain the same entity verbatim, populate both with that entity.", "title": "Ultimate Consignee"}, "importer_of_record": {"anyOf": [{"$ref": "#/$defs/Party"}, {"type": "null"}], "default": null, "description": "Block 26 Importer of Record Name and Address — the party legally responsible for the entry and for paying duties. Read the name + address subfields from the RIGHT-side block on page 1 labelled 'Importer of Record Name and Address'. May be a foreign manufacturer (e.g. 'GLOW TUBE RESEARCH' in Czechia on PDF 0001), a US importer (e.g. 'SUCDEN AMERICAS CORP' in Miami FL on PDF 0002), or a US subsidiary (e.g. 'Able C&C US, Inc' in Englewood NJ on PDF 0018). Do NOT confuse with ultimate_consignee (block 25, the LEFT-side block). When the importer is foreign, state and zip subfields may be blank — return null for those subfields.", "title": "Importer Of Record"}, "total_entered_value": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Block 35 Total Entered Value as printed in the bottom-center of page 1 (the document-level grand total of all line-item entered values, in USD, with decimals, e.g. 52480.69, 154147.00, 276987.00). Verbatim decimal number; preserve cents. Do NOT include a dollar sign. Do NOT confuse with per-line entered_value_dollars (column 32A on each LineItem), with block 36 Total Other Fees, with block 37 Duty, with block 38 Tax, or with block 40 Total.", "title": "Total Entered Value"}, "total_other_fees": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Block 36 'Total Other Fees' (printed just below block 35 in the same panel, typed in the line beginning with '$' under 'Total Other Fees'). The aggregated dollar total of every fee in the Block 39 Other Fee Summary panel (MPF + HMF + cotton fee + ...). Decimal USD (e.g. 247.41 for 0001, 591.28 for 0002, 346.48 for 0018). Do NOT include a dollar sign. Do NOT confuse with block 35 Total Entered Value or block 39 Other (the same number printed in the CBP-Use-Only TOTALS panel).", "title": "Total Other Fees"}, "ascertained_duty": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Block 37 'Duty' as printed in the CBP USE ONLY / TOTALS panel on the right of page 1 (the ascertained merchandise duty grand total, decimal USD, e.g. 1437.65, 106718.57, 0.00). Do NOT include a dollar sign. Do NOT confuse with block 38 Tax, block 39 Other, block 40 Total, or per-line duty_and_tax_amount.", "title": "Ascertained Duty"}, "ascertained_tax": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Block 38 'Tax' as printed in the CBP USE ONLY / TOTALS panel (the ascertained internal-revenue-code tax grand total, decimal USD, e.g. 0.00). Do NOT confuse with block 37 Duty, block 39 Other, or block 40 Total.", "title": "Ascertained Tax"}, "ascertained_other": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Block 39 'Other' as printed in the CBP USE ONLY / TOTALS panel (the ascertained sum of all 'other fees' — MPF, HMF, cotton fee, etc. — decimal USD, e.g. 247.41 on 0001, 591.28 on 0002, 346.48 on 0018). Typically equals total_other_fees. Do NOT confuse with block 38 Tax, block 37 Duty, or block 40 Total.", "title": "Ascertained Other"}, "ascertained_total": {"anyOf": [{"type": "number"}, {"type": "null"}], "default": null, "description": "Block 40 'Total' as printed in the CBP USE ONLY / TOTALS panel (the ascertained grand total = Duty + Tax + Other, decimal USD, e.g. 1685.06 on 0001, 107309.85 on 0002, 346.48 on 0018). Do NOT confuse with block 35 Total Entered Value, or with any of the individual sub-totals (Duty/Tax/Other).", "title": "Ascertained Total"}, "declarant_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 41 'DECLARANT NAME (Last, First, M.I.)' as printed in the bottom block. Use the typed/printed text in the DECLARANT NAME column ONLY — NOT the handwritten signature. When a single individual name is typed there (e.g. 'Ryan Taylor' on PDF 0001, 'V HERNANDEZ' on PDF 0002), return that name verbatim. When the typed text is a COMPANY name acting as declarant (e.g. 'YUSEN LOGISTICS (AMERICAS) INC.' on PDF 0018) and the signature on the right is an individual (e.g. 'Paul Im'), return the COMPANY name as printed (the printed text in the DECLARANT NAME column), NOT the signature. When both a company name AND a typed individual name appear in the DECLARANT NAME box (rare), concatenate them in printed order with ' / ' between. Verbatim casing. Do NOT confuse with declarant_title (separate column to the right) or with broker_filer_name (block 42). POLICY (added 2026-05-18 QA): Use the TYPED text in column 41 'DECLARANT NAME' box verbatim. The box may contain either a person name (e.g. PDF 0001 'Ryan Taylor', PDF 0002 'V HERNANDEZ', PDF 0016 'May Chen') or a company name acting as declarant via ATTY-IN-FACT (e.g. PDF 0007 'OTX LOGISTICS, INC.', PDF 0018 'YUSEN LOGISTICS (AMERICAS) INC.'); both are valid per CBP filing convention. Do NOT use the handwritten signature or any printed name beneath the signature line — those are the SIGNATURE field, not DECLARANT NAME. broker_filer_name (block 42) is captured separately.", "title": "Declarant Name"}, "declarant_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 41 Declarant Title as printed (the title shown after the declarant name in block 41, e.g. 'ATTY-IN-FACT', 'ATTY IN FACT'). Verbatim uppercase. Do NOT confuse with declarant_name or with broker_filer_name (block 42).", "title": "Declarant Title"}, "declarant_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 41 declaration DATE as printed (the date the declarant signed, MM/DD/YYYY, e.g. '12/16/2020', '10/06/2020', '05/09/2022'). Do NOT confuse with summary_date (block 3) or entry_date (block 7).", "title": "Declarant Date"}, "broker_filer_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 42 broker / filer name as printed in the bottom-left block (the customs broker or self-filer name; first line of block 42, e.g. 'SERVICE SHIPPING INC.', 'AIRPORT CUSTOMS SERVICES INC', 'YUSEN LOGISTICS (AMERICAS) INC.'). Verbatim including any trailing punctuation. Do NOT include the address. Do NOT confuse with importer_of_record.name (block 26) or with declarant_name (block 41).", "title": "Broker Filer Name"}, "broker_filer_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 42 broker / filer phone number as printed (the 'Tel:' or 'PHONE:' line in the broker block, e.g. '847-427-1775', '3104100717', '+13475358063'). Verbatim including any dashes, plus signs, or country prefix. Do NOT confuse with broker_importer_file_number (block 43) or with declarant_date.", "title": "Broker Filer Phone"}, "broker_importer_file_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Block 43 Broker / Importer File No. as printed (the broker-internal file reference for this entry, e.g. '48974 / 00005912', '02.44783 / GU2200954426', 'BNYC0046857 / Ref: US202203-0003/4/5'). Verbatim including spaces, slashes, and any 'Ref:' annotations. Do NOT confuse with filer_code_entry_number (block 1), importer_number (block 23), or reference_number (block 24).", "title": "Broker Importer File Number"}, "other_fees": {"anyOf": [{"items": {"$ref": "#/$defs/OtherFee"}, "type": "array"}, {"type": "null"}], "default": null, "description": "List of every fee row printed in the 'Other Fee Summary for Block 39' panel at the bottom-left of page 1 (one entry per fee_code/fee_name/fee_amount row, e.g. [{'499','Merchandise Process Fee',181.79}, {'501','Harbor Maintenance Fee',65.62}]). Each fee row is the DOCUMENT-LEVEL aggregated fee, NOT a per-line fee. Order top-to-bottom as printed. Do NOT confuse with per-line MPF/HMF rows printed inside Block 34 (which are the per-line fee allocations and are NOT extracted into the line item).", "title": "Other Fees"}, "line_items": {"anyOf": [{"items": {"$ref": "#/$defs/LineItem"}, "type": "array"}, {"type": "null"}], "description": "Ordered list of every HTSUS line item printed on this Entry Summary. MUST include line_number 001 (the FIRST printed line, always present on the cover sheet, even when its merchandise-name header row shows no HTSUS code on the same row because the HTSUS codes are on sub-rows below) through the LAST printed line_number across every Entry Summary Continuation Sheet. One entry per distinct line_number printed in column 27. Multi-row lines (a Chapter 91 watch line printing a 'WATCH' merchandise-name header PLUS 3 HTSUS sub-code rows '9105.91.8030 / .8040 / .8050', or a Chapter 33 cosmetics line printing 'BEAUTY OR MAKE-UP PREPS,OTHER' header PLUS one HTSUS sub-row '3304.99.5000' PLUS one 'MID KRABLCC13SEO' row PLUS one '501 HARBOR MAINTENANCE FEE (HMF)' fee-allocation row) collapse into ONE LineItem with htsus_numbers / chgs_codes / htsus_rates / ada_cvd_rates / irc_rates as ordered lists. DO NOT split a single line_number into multiple LineItems. DO NOT duplicate a line_number across two LineItems. DO NOT include as a separate LineItem: 'Merchandise Processing Fee' / 'MPF' / '499 Merchandise Process Fee', 'Harbor Maintenance Fee' / 'HMF' / '501 HARBOR MAINTENANCE FEE (HMF)' / 'HARBOR MAINTENANCE FEE 501', 'COTTON FEE' / '056 Cotton Fee', the 'Invoice Number: NNN/USNNNNNN' / 'Invoice Value USD' / 'Total Entered Value (Invoice)' / 'M:' / 'H:' / 'MASTER BILL/AWB' / 'HOUSE BILL' / 'SUBHOUSE BILL' / 'BILL QTY' / 'TOTAL: 400 BAG' annotation rows. DO NOT return an empty array or null for this field — every CBP Form 7501 Entry Summary has at least line 001 printed on the cover sheet. PDF 0001 has 8 line_numbers (001-008), PDF 0002 has 4 (001-004), PDF 0018 has 75 (001-075). If you parse this document and produce 0 LineItems, you have FAILED to extract the long-doc list and must retry from page 1. The line_number column (block 27 'Line No.') is the first column of the merchandise table; the line_number is printed once at the start of each line; subsequent sub-code / fee-allocation rows leave column 27 blank.", "title": "Line Items"}}, "title": "CBPForm7501EntrySummary", "type": "object"}

Expected output:
{"filer_code_entry_number": "9NK-0010492-5", "entry_type": "01 ABI/A", "summary_date": "08/21/19 048", "surety_number": "054", "bond_type": "8", "port_code": "4601", "entry_date": "08/12/19", "importing_carrier": "OOCL BERLIN", "mode_of_transport": "11", "country_of_origin": "CN", "import_date": "08/13/19", "bill_of_lading_or_awb_number": "EGLV149902606378", "manufacturer_id": "CNSHEXIN201SHE", "exporting_country": "CN", "export_date": "07/13/19", "it_number": null, "it_date": null, "missing_documents": null, "foreign_port_of_lading": "57078", "us_port_of_unlading": "4601", "location_of_goods": "E364", "consignee_number": "SAME", "importer_number": "47-553472400", "reference_number": null, "ultimate_consignee": {"name": null, "address": {"address_line_one": null, "address_line_two": null, "city": null, "state": "DE", "zip_code": null}}, "importer_of_record": {"name": "EAGLE TRADING USA LLC", "address": {"address_line_one": "717 N UNION ST STE#98", "address_line_two": null, "city": "WILMINGTON", "state": "DE", "zip_code": "19805"}}, "total_entered_value": 12751.0, "total_other_fees": 60.11, "ascertained_duty": 1165.95, "ascertained_tax": 0.0, "ascertained_other": 60.11, "ascertained_total": 1226.06, "declarant_name": "May Chen", "declarant_title": "BROKER", "declarant_date": "08/09/19", "broker_filer_name": "ABILITY CUSTOMS BROKERS", "broker_filer_phone": "5103475555", "broker_importer_file_number": "10492 xxx/Paperless", "other_fees": [{"fee_code": "499", "fee_name": "Merchandise Processing Fee", "fee_amount": 44.16}, {"fee_code": "501", "fee_name": "Harbor Maintenance Fee", "fee_amount": 15.95}], "line_items": [{"line_number": "001", "htsus_numbers": ["9903.88.03", "7326.90.8688"], "ada_cvd_case_numbers": null, "manufacturer_id_line": null, "gross_weight": "319kg", "manifest_quantity": null, "net_quantity_htsus_units": "150 KG", "description_of_merchandise": "ARTICLE OF CHINA,US NTE 20; ARTICLES OF IRON/STEEL:NSP", "entered_value_dollars": 576, "chgs_codes": ["C57"], "relationship_indicator": "NOT RELATED", "htsus_rates": ["25.0%", "2.90%"], "ada_cvd_rates": null, "irc_rates": null, "visa_number": null, "duty_and_tax_amount": 80.35}]}