Skip to content
Demurrage audit

demurrage.audit

Audit up to 100 U.S. demurrage or detention invoices against 46 CFR Part 541 (2026-11-20), recalculate charges and draft disputes.

POSThttps://api.kanagu.dev/v1/demurrage/audit
Price
$0.50 per invoice, on successful calls only
Without a key
10 free calls per IP per UTC day, shared by REST and MCP.
MCP tool
demurrage.audit at https://api.kanagu.dev/mcp
curl https://api.kanagu.dev/v1/demurrage/audit \
  -H "Content-Type: application/json" \
  -d '{"invoices":[{"structuredFieldsComplete":true,"invoice":{"number":"DD-260529","issuer":"Harbor Shipping","issuerType":"ocean_common_carrier","billedParty":"Atlas Imports","billedPartyType":"other","liabilityBasis":"Consignee under service contract SC-208","direction":"import","chargeType":"demurrage","billsOfLading":["HSUS00814"],"container":"MSCU1234566","dischargePort":"USLAX","invoiceDate":"2026-05-29","dueDate":"2026-06-28","freeDays":2,"freeTimeStart":"2026-05-20","freeTimeEnd":"2026-05-21","availabilityDate":"2026-05-20","chargedDates":["2026-05-22","2026-05-23","2026-05-24","2026-05-25"],"billedDays":4,"ratesCents":[15000,25000],"amountCents":80000,"rateRule":"SC-208 section 12","disputeContact":"billing@example.com","disputeInstructions":"https://example.com/disputes","disputeRequestDays":30,"disputeResolutionDays":30,"certifiesFmcCompliance":true,"certifiesIssuerDidNotContribute":true},"events":{"discharge":"2026-05-19","availability":"2026-05-20","gateOut":"2026-05-25","blockedDays":[{"date":"2026-05-24","reason":"terminal_closed","reference":"Gate schedule"}]},"terms":{"reference":"SC-208 section 12","freeDays":2,"freeDayBasis":"calendar","freeTimeStartsAfter":"availability","chargeDayBasis":"calendar","includeStartDay":true,"includeEndDay":true,"tiers":[{"fromChargedDay":1,"rateCents":15000},{"fromChargedDay":3,"rateCents":25000}]},"evidence":{"liableParty":{"name":"Atlas Imports","reference":"SC-208"}}}]}'
curl https://api.kanagu.dev/v1/demurrage/audit \
  -H "Authorization: Bearer $KANAGU_KEY" \
  -H "Content-Type: application/json" \
  -d '{"invoices":[{"structuredFieldsComplete":true,"invoice":{"number":"DD-260529","issuer":"Harbor Shipping","issuerType":"ocean_common_carrier","billedParty":"Atlas Imports","billedPartyType":"other","liabilityBasis":"Consignee under service contract SC-208","direction":"import","chargeType":"demurrage","billsOfLading":["HSUS00814"],"container":"MSCU1234566","dischargePort":"USLAX","invoiceDate":"2026-05-29","dueDate":"2026-06-28","freeDays":2,"freeTimeStart":"2026-05-20","freeTimeEnd":"2026-05-21","availabilityDate":"2026-05-20","chargedDates":["2026-05-22","2026-05-23","2026-05-24","2026-05-25"],"billedDays":4,"ratesCents":[15000,25000],"amountCents":80000,"rateRule":"SC-208 section 12","disputeContact":"billing@example.com","disputeInstructions":"https://example.com/disputes","disputeRequestDays":30,"disputeResolutionDays":30,"certifiesFmcCompliance":true,"certifiesIssuerDidNotContribute":true},"events":{"discharge":"2026-05-19","availability":"2026-05-20","gateOut":"2026-05-25","blockedDays":[{"date":"2026-05-24","reason":"terminal_closed","reference":"Gate schedule"}]},"terms":{"reference":"SC-208 section 12","freeDays":2,"freeDayBasis":"calendar","freeTimeStartsAfter":"availability","chargeDayBasis":"calendar","includeStartDay":true,"includeEndDay":true,"tiers":[{"fromChargedDay":1,"rateCents":15000},{"fromChargedDay":3,"rateCents":25000}]},"evidence":{"liableParty":{"name":"Atlas Imports","reference":"SC-208"}}}]}'
const res = await fetch("https://api.kanagu.dev/v1/demurrage/audit", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KANAGU_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "invoices": [
      {
        "structuredFieldsComplete": true,
        "invoice": {
          "number": "DD-260529",
          "issuer": "Harbor Shipping",
          "issuerType": "ocean_common_carrier",
          "billedParty": "Atlas Imports",
          "billedPartyType": "other",
          "liabilityBasis": "Consignee under service contract SC-208",
          "direction": "import",
          "chargeType": "demurrage",
          "billsOfLading": [
            "HSUS00814"
          ],
          "container": "MSCU1234566",
          "dischargePort": "USLAX",
          "invoiceDate": "2026-05-29",
          "dueDate": "2026-06-28",
          "freeDays": 2,
          "freeTimeStart": "2026-05-20",
          "freeTimeEnd": "2026-05-21",
          "availabilityDate": "2026-05-20",
          "chargedDates": [
            "2026-05-22",
            "2026-05-23",
            "2026-05-24",
            "2026-05-25"
          ],
          "billedDays": 4,
          "ratesCents": [
            15000,
            25000
          ],
          "amountCents": 80000,
          "rateRule": "SC-208 section 12",
          "disputeContact": "billing@example.com",
          "disputeInstructions": "https://example.com/disputes",
          "disputeRequestDays": 30,
          "disputeResolutionDays": 30,
          "certifiesFmcCompliance": true,
          "certifiesIssuerDidNotContribute": true
        },
        "events": {
          "discharge": "2026-05-19",
          "availability": "2026-05-20",
          "gateOut": "2026-05-25",
          "blockedDays": [
            {
              "date": "2026-05-24",
              "reason": "terminal_closed",
              "reference": "Gate schedule"
            }
          ]
        },
        "terms": {
          "reference": "SC-208 section 12",
          "freeDays": 2,
          "freeDayBasis": "calendar",
          "freeTimeStartsAfter": "availability",
          "chargeDayBasis": "calendar",
          "includeStartDay": true,
          "includeEndDay": true,
          "tiers": [
            {
              "fromChargedDay": 1,
              "rateCents": 15000
            },
            {
              "fromChargedDay": 3,
              "rateCents": 25000
            }
          ]
        },
        "evidence": {
          "liableParty": {
            "name": "Atlas Imports",
            "reference": "SC-208"
          }
        }
      }
    ]
  }),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "demurrage.audit",
    "arguments": {
      "invoices": [
        {
          "structuredFieldsComplete": true,
          "invoice": {
            "number": "DD-260529",
            "issuer": "Harbor Shipping",
            "issuerType": "ocean_common_carrier",
            "billedParty": "Atlas Imports",
            "billedPartyType": "other",
            "liabilityBasis": "Consignee under service contract SC-208",
            "direction": "import",
            "chargeType": "demurrage",
            "billsOfLading": [
              "HSUS00814"
            ],
            "container": "MSCU1234566",
            "dischargePort": "USLAX",
            "invoiceDate": "2026-05-29",
            "dueDate": "2026-06-28",
            "freeDays": 2,
            "freeTimeStart": "2026-05-20",
            "freeTimeEnd": "2026-05-21",
            "availabilityDate": "2026-05-20",
            "chargedDates": [
              "2026-05-22",
              "2026-05-23",
              "2026-05-24",
              "2026-05-25"
            ],
            "billedDays": 4,
            "ratesCents": [
              15000,
              25000
            ],
            "amountCents": 80000,
            "rateRule": "SC-208 section 12",
            "disputeContact": "billing@example.com",
            "disputeInstructions": "https://example.com/disputes",
            "disputeRequestDays": 30,
            "disputeResolutionDays": 30,
            "certifiesFmcCompliance": true,
            "certifiesIssuerDidNotContribute": true
          },
          "events": {
            "discharge": "2026-05-19",
            "availability": "2026-05-20",
            "gateOut": "2026-05-25",
            "blockedDays": [
              {
                "date": "2026-05-24",
                "reason": "terminal_closed",
                "reference": "Gate schedule"
              }
            ]
          },
          "terms": {
            "reference": "SC-208 section 12",
            "freeDays": 2,
            "freeDayBasis": "calendar",
            "freeTimeStartsAfter": "availability",
            "chargeDayBasis": "calendar",
            "includeStartDay": true,
            "includeEndDay": true,
            "tiers": [
              {
                "fromChargedDay": 1,
                "rateCents": 15000
              },
              {
                "fromChargedDay": 3,
                "rateCents": 25000
              }
            ]
          },
          "evidence": {
            "liableParty": {
              "name": "Atlas Imports",
              "reference": "SC-208"
            }
          }
        }
      ]
    }
  }
}
Request body
{
  "invoices": [
    {
      "structuredFieldsComplete": true,
      "invoice": {
        "number": "DD-260529",
        "issuer": "Harbor Shipping",
        "issuerType": "ocean_common_carrier",
        "billedParty": "Atlas Imports",
        "billedPartyType": "other",
        "liabilityBasis": "Consignee under service contract SC-208",
        "direction": "import",
        "chargeType": "demurrage",
        "billsOfLading": [
          "HSUS00814"
        ],
        "container": "MSCU1234566",
        "dischargePort": "USLAX",
        "invoiceDate": "2026-05-29",
        "dueDate": "2026-06-28",
        "freeDays": 2,
        "freeTimeStart": "2026-05-20",
        "freeTimeEnd": "2026-05-21",
        "availabilityDate": "2026-05-20",
        "chargedDates": [
          "2026-05-22",
          "2026-05-23",
          "2026-05-24",
          "2026-05-25"
        ],
        "billedDays": 4,
        "ratesCents": [
          15000,
          25000
        ],
        "amountCents": 80000,
        "rateRule": "SC-208 section 12",
        "disputeContact": "billing@example.com",
        "disputeInstructions": "https://example.com/disputes",
        "disputeRequestDays": 30,
        "disputeResolutionDays": 30,
        "certifiesFmcCompliance": true,
        "certifiesIssuerDidNotContribute": true
      },
      "events": {
        "discharge": "2026-05-19",
        "availability": "2026-05-20",
        "gateOut": "2026-05-25",
        "blockedDays": [
          {
            "date": "2026-05-24",
            "reason": "terminal_closed",
            "reference": "Gate schedule"
          }
        ]
      },
      "terms": {
        "reference": "SC-208 section 12",
        "freeDays": 2,
        "freeDayBasis": "calendar",
        "freeTimeStartsAfter": "availability",
        "chargeDayBasis": "calendar",
        "includeStartDay": true,
        "includeEndDay": true,
        "tiers": [
          {
            "fromChargedDay": 1,
            "rateCents": 15000
          },
          {
            "fromChargedDay": 3,
            "rateCents": 25000
          }
        ]
      },
      "evidence": {
        "liableParty": {
          "name": "Atlas Imports",
          "reference": "SC-208"
        }
      }
    }
  ]
}
Response · 200
{
  "regulation": {
    "version": "2026-11-20",
    "part541": "https://www.ecfr.gov/on/2026-11-20/title-46/chapter-IV/subchapter-B/part-541",
    "incentivePrinciple": "https://www.ecfr.gov/on/2026-11-20/title-46/chapter-IV/subchapter-B/part-545/section-545.5",
    "removedPartyRestriction": "https://www.govinfo.gov/content/pkg/FR-2025-12-29/html/2025-23920.htm"
  },
  "invoices": [
    {
      "invoiceNumber": "DD-260529",
      "container": "MSCU1234566",
      "status": "dispute_identified",
      "paymentObligation": "undetermined",
      "issuanceDeadline": {
        "basis": "events_and_terms",
        "startDate": "2026-05-25",
        "deadline": "2026-06-24"
      },
      "calculation": {
        "chargeableDays": 4,
        "charges": [
          {
            "date": "2026-05-22",
            "rateCents": 15000
          },
          {
            "date": "2026-05-23",
            "rateCents": 15000
          },
          {
            "date": "2026-05-24",
            "rateCents": 25000
          },
          {
            "date": "2026-05-25",
            "rateCents": 25000
          }
        ],
        "unbilledChargeableDates": [],
        "amountCents": 80000,
        "overchargeCents": 0
      },
      "dayLedger": [
        {
          "date": "2026-05-20",
          "kind": "excluded",
          "cause": "free_time"
        },
        {
          "date": "2026-05-21",
          "kind": "excluded",
          "cause": "free_time"
        },
        {
          "date": "2026-05-22",
          "kind": "chargeable",
          "cause": "import_demurrage"
        },
        {
          "date": "2026-05-23",
          "kind": "chargeable",
          "cause": "import_demurrage"
        },
        {
          "date": "2026-05-24",
          "kind": "chargeable",
          "cause": "import_demurrage"
        },
        {
          "date": "2026-05-25",
          "kind": "chargeable",
          "cause": "import_demurrage"
        }
      ],
      "findings": [
        {
          "code": "charged_on_blocked_day",
          "effect": "potential_dispute",
          "location": "events.blockedDays.0",
          "expected": "Cargo could be retrieved on a billed date.",
          "actual": "2026-05-24: terminal_closed (Gate schedule).",
          "section": "46 CFR 545.5(c)(2)(i)",
          "source": "https://www.ecfr.gov/on/2026-11-20/title-46/chapter-IV/subchapter-B/part-545/section-545.5"
        }
      ],
      "disputeLetter": "To Harbor Shipping (billing@example.com)\n\nSubject: Dispute of demurrage invoice DD-260529 for container MSCU1234566\n\nI am requesting mitigation, refund or waiver under 46 CFR 541.8 for the following reasons.\n\n- 46 CFR 545.5(c)(2)(i), events.blockedDays.0. Expected: Cargo could be retrieved on a billed date. Actual: 2026-05-24: terminal_closed (Gate schedule). (https://www.ecfr.gov/on/2026-11-20/title-46/chapter-IV/subchapter-B/part-545/section-545.5)\n\nPlease review these grounds, adjust or waive the affected charge as appropriate, and refund any overpayment.\n\nAtlas Imports"
    }
  ]
}

Request body

application/json

invoicesarray of objectrequired
invoices[].invoiceobjectrequired
One invoice for one container and charge type. Extract required information from all sections and attachments before omitting an absent field.
invoices[].invoice.numberstring (max 400 chars)
invoices[].invoice.issuerstring (max 400 chars)
invoices[].invoice.issuerType"ocean_common_carrier" | "marine_terminal_operator" | "nvocc" | "other"required
invoices[].invoice.billedPartystring (max 400 chars)
invoices[].invoice.billedPartyType"ocean_common_carrier" | "marine_terminal_operator" | "nvocc" | "other"required
invoices[].invoice.liabilityBasisstring (max 400 chars)
invoices[].invoice.direction"import" | "export"required
invoices[].invoice.chargeType"demurrage" | "detention"required
invoices[].invoice.billsOfLadingarray of string (max 400 chars)
invoices[].invoice.containerstring (max 400 chars)
invoices[].invoice.dischargePortstring (max 400 chars)
invoices[].invoice.invoiceDatestring
Local calendar date, year 1000–2999.
invoices[].invoice.dueDatestring
Local calendar date, year 1000–2999.
invoices[].invoice.freeDaysinteger (0 to 730)
invoices[].invoice.freeTimeStartstring
Local calendar date, year 1000–2999.
invoices[].invoice.freeTimeEndstring
Local calendar date, year 1000–2999.
invoices[].invoice.availabilityDatestring
Local calendar date, year 1000–2999.
invoices[].invoice.earliestReturnDatestring
Local calendar date, year 1000–2999.
invoices[].invoice.chargedDatesarray of string
invoices[].invoice.billedDaysinteger (0 to 730)
invoices[].invoice.ratesCentsarray of integer (0 to 1000000000000)
Daily rates applied to the billed dates, in USD cents.
invoices[].invoice.amountCentsinteger (0 to 1000000000000)
USD cents.
invoices[].invoice.rateRulestring (max 400 chars)
invoices[].invoice.disputeContactstring (max 400 chars)
invoices[].invoice.disputeInstructionsstring (max 400 chars)
Dispute method shown on the invoice. Include the public website address or the destination of any QR code or digital watermark.
invoices[].invoice.disputeRequestDaysinteger (0 to 730)
invoices[].invoice.disputeResolutionDaysinteger (0 to 730)
invoices[].invoice.certifiesFmcComplianceboolean
invoices[].invoice.certifiesIssuerDidNotContributeboolean
invoices[].invoice.correctsWrongBilledPartyboolean
invoices[].invoice.documentTextstring (max 32000 chars)
Text from the invoice and its attachments. Labeled dates in this text are hints for review. Enter structured dates in ISO YYYY-MM-DD format.
invoices[].invoice.notesstring (max 400 chars)
Additional free-text notes about the invoice.
invoices[].structuredFieldsCompleteboolean
Set to true after confirming that the structured fields capture all relevant information from the invoice, its attachments, shipment records, and the applicable tariff. Without this confirmation, any non-empty free text requires review, including invoice identifiers, names, text fields, and evidence references.
invoices[].eventsobject
Import demurrage runs from discharge or availability to gate-out. Import detention defaults to gate-out through empty return. Export demurrage starts at full gate-in and uses the tariff's exportDemurrage rules. Export detention defaults to empty pickup through full gate-in.
invoices[].events.dischargestring
Local calendar date, year 1000–2999.
invoices[].events.availabilitystring
Local calendar date, year 1000–2999.
invoices[].events.earliestReturnstring
Published earliest receipt date (ERD) for the export booking, from an independent record. Actual gate-in may precede it.
invoices[].events.erdChangesarray of object
Published terminal ERD changes for this export detention shipment, in announcement order. For a same-day pickup or return, include the change only if announced while the shipper held the container. Use an empty array if records confirm no change.
invoices[].events.erdChanges[].announcedOnstringrequired
Facility-local date the terminal publicly announced the change.
invoices[].events.erdChanges[].previousErdstringrequired
Local calendar date, year 1000–2999.
invoices[].events.erdChanges[].newErdstringrequired
Local calendar date, year 1000–2999.
invoices[].events.gateOutstring
Local calendar date, year 1000–2999.
invoices[].events.emptyReturnstring
Local calendar date, year 1000–2999.
invoices[].events.emptyPickupstring
Export equipment pickup.
invoices[].events.fullGateInstring
Delivery of the full export container to the terminal.
invoices[].events.vesselLoadstring
Export container loaded on vessel.
invoices[].events.loadedOnOriginalVesselboolean
Whether loading records confirm the container loaded on the originally scheduled vessel and voyage. Without this fact, a documented roll indicates a missed original voyage. Departure dates alone do not identify the voyage.
invoices[].events.cargoCutoffstring
Last date for full gate-in on the originally booked export voyage.
invoices[].events.scheduledSailDatestring
Scheduled departure date of the originally booked vessel.
invoices[].events.actualSailDatestring
Actual departure date of the vessel carrying this container.
invoices[].events.rollsarray of object
Documented, non-overlapping periods attributable to an export vessel roll. Start and end dates are inclusive.
invoices[].events.rolls[].startDatestringrequired
Local calendar date, year 1000–2999.
invoices[].events.rolls[].endDatestringrequired
Local calendar date, year 1000–2999.
invoices[].events.rolls[].responsibility"carrier" | "customer" | "unknown"required
invoices[].events.rolls[].resolutionDatestring | null
Date the customer resolved the cause. Null means the cause was still unresolved at the end of the roll period.
invoices[].events.rolls[].newScheduledSailDatestring
Scheduled departure of the replacement vessel booked on startDate. Supply each replacement schedule when the tariff uses a scheduled sailing cutoff.
invoices[].events.lateDocumentationarray of object
Documented periods when the shipper's late paperwork delayed an export container. Start and end dates are inclusive.
invoices[].events.lateDocumentation[].startDatestringrequired
Local calendar date, year 1000–2999.
invoices[].events.lateDocumentation[].endDatestringrequired
Local calendar date, year 1000–2999.
invoices[].events.blockedDaysarray of object
Days of verified full-day inability to move this container for this charge, including lack of any authorized alternate facility or appointment.
invoices[].events.blockedDays[].datestringrequired
Local calendar date, year 1000–2999.
invoices[].events.blockedDays[].reason"terminal_closed" | "container_unavailable" | "appointment_unavailable"required
invoices[].events.blockedDays[].referencestring (max 400 chars)
invoices[].termsobject
invoices[].terms.referencestring (max 400 chars)required
Applicable tariff, contract or terminal schedule reference.
invoices[].terms.freeDaysinteger (0 to 730)required
invoices[].terms.freeDayBasis"calendar" | "business"required
invoices[].terms.freeTimeStartsAfter"discharge" | "availability" | "gate_in" | "empty_pickup"
Tariff milestone for starting free time. gate_in uses events.fullGateIn and empty_pickup uses events.emptyPickup. If omitted for import demurrage, compare discharge and availability when both are recorded. Other charges use their default milestones.
invoices[].terms.countBlockedFreeDaysboolean
Whether verified blocked days count toward free time. Defaults to true for calendar-day free time and false for business-day free time.
invoices[].terms.chargeDayBasis"calendar" | "business"required
invoices[].terms.countBlockedChargeDaysboolean
Whether verified blocked days count after free time under the tariff. Defaults to true for calendar-day charges and false for business-day charges.
invoices[].terms.includeStartDaybooleanrequired
True to begin counting on the milestone date, false to begin the following day.
invoices[].terms.includeEndDaybooleanrequired
Whether the day the charge period ends can be charged.
invoices[].terms.exportDemurrageobject
Export demurrage rules transcribed from the supplied tariff for the circumstances of this shipment.
invoices[].terms.exportDemurrage.chargeableCausesarray of object
Complete list of causes the tariff permits after free time. An empty array means none apply. Omit if the tariff is unclear. Days with conflicting chargeable causes require review.
invoices[].terms.exportDemurrage.endsAt"vessel_load" | "scheduled_sail" | "earlier_of_load_and_scheduled_sail" | "actual_sail"
Tariff milestone ending export demurrage. Supply when recording a scheduled or actual departure date. Without either date, the default is vessel load.
invoices[].terms.exportDetentionobject
invoices[].terms.exportDetention.extendFreeTimeOnErdChangebooleanrequired
Whether the tariff adds working days from the previous ERD through the day before the new ERD for a postponement announced while the shipper holds the container within free time.
invoices[].terms.weekendarray of integer (1 to 7)
ISO weekday numbers excluded in business-day mode.
invoices[].terms.usHolidays"US" | string
Include national or state public holidays in business-day mode. Dataset covers 2020–2035.
invoices[].terms.holidaysarray of string
Additional holidays excluded in business-day mode.
invoices[].terms.tiersarray of objectrequired
invoices[].terms.tiers[].fromChargedDayinteger (1 to 730)required
invoices[].terms.tiers[].rateCentsinteger (0 to 1000000000000)required
USD cents.
invoices[].evidenceobject
Independent records for checking stated invoice details. Use the same names, reference and dispute details where they match. Certification booleans describe whether the certified facts are true.
invoices[].evidence.billsOfLadingarray of string (max 400 chars)
invoices[].evidence.containerstring (max 400 chars)
invoices[].evidence.dischargePortstring (max 400 chars)
invoices[].evidence.invoiceDatestring
Local calendar date, year 1000–2999.
invoices[].evidence.dueDatestring
Local calendar date, year 1000–2999.
invoices[].evidence.disputeContactstring (max 400 chars)
invoices[].evidence.disputeInstructionsstring (max 400 chars)
Dispute method shown on the invoice. Include the public website address or the destination of any QR code or digital watermark.
invoices[].evidence.certifiesFmcComplianceboolean
invoices[].evidence.certifiesIssuerDidNotContributeboolean
invoices[].evidence.liablePartyobject
Use the same legal entity names as on the invoice when they match.
invoices[].evidence.liableParty.namestring (max 400 chars)required
invoices[].evidence.liableParty.referencestring (max 400 chars)required
Independent evidence identifying the sole party liable for this charge.
invoices[].evidence.liableParty.basisstring (max 400 chars)
Liability basis documented by the independent evidence.
invoices[].evidence.upstreamInvoiceDatestring
Issue date of the invoice received by the NVOCC.
invoices[].evidence.lastIncurredDatestring
Independently documented last date this charge was incurred.
invoices[].evidence.agreedResolutionDaysinteger (0 to 730)
A longer resolution period agreed by both parties.

Response

200 · application/json

regulationobjectrequired
regulation.versionstring (date)required
regulation.part541string (uri)required
regulation.incentivePrinciplestring (uri)required
regulation.removedPartyRestrictionstring (uri)required
invoicesarray of objectrequired
invoices[].invoiceNumberstring | nullrequired
invoices[].containerstring | nullrequired
invoices[].status"no_findings" | "needs_review" | "dispute_identified"required
invoices[].paymentObligation"eliminated" | "grounds_for_dispute" | "undetermined"required
Elimination requires a conclusive defect and either an input with only structured values or structuredFieldsComplete set to true. Unconfirmed free text yields grounds_for_dispute with needs_review.
invoices[].issuanceDeadlineobject | nullrequired
invoices[].calculationobject | nullrequired
Recalculation of billed dates under the supplied tariff or contract. Unbilled chargeable dates do not affect the calculated amount or overcharge.
invoices[].dayLedgerarray of object
Day-by-day tariff attribution for the audited period and any billed dates outside it. A needs_review entry can leave the calculation or issuance deadline unresolved.
invoices[].calculationAlternativesarray of object
Amounts under each possible start event when the tariff milestone is unspecified and the schedules differ.
invoices[].calculationAlternatives[].freeTimeStartsAfter"discharge" | "availability" | "gate_in" | "empty_pickup"required
invoices[].calculationAlternatives[].amountCentsinteger (-9007199254740991 to 9007199254740991) | nullrequired
Recalculated amount for billed dates. Null when billed dates were not supplied.
invoices[].findingsarray of objectrequired
invoices[].findings[].codestringrequired
invoices[].findings[].effect"no_payment_obligation" | "potential_dispute" | "needs_review"required
invoices[].findings[].locationstringrequired
Field path relative to the corresponding invoices array entry.
invoices[].findings[].expectedstringrequired
invoices[].findings[].actualstringrequired
invoices[].findings[].sectionstringrequired
invoices[].findings[].sourcestring (uri)required
invoices[].disputeLetterstring | nullrequired
Requests clarification when paymentObligation is grounds_for_dispute.

Try it

demurrage.audit

$0.50/invoice

No key needed · 10 free calls per IP per day

Response

Run the request to see the live response here.

Errors

Errors are JSON {"error":{"code","message"}}. An operation may add its own 400 codes; the message says what to fix.

StatusCode and meaning
400invalid_input

The body does not match the request schema. The message names each field.

400invalid_json

The body is missing or is not valid JSON.

400invalid_idempotency_key

Idempotency-Key must be 1–128 visible ASCII characters.

401invalid_api_key

The Bearer key is missing, malformed, invalid or inactive.

402free_allowance_exhausted

This month's free usage is used up and the account has no subscription. Subscribe from the dashboard, or wait for the next UTC month; Retry-After gives the seconds left.

404not_found

No operation at this path.

409idempotency_conflict

The Idempotency-Key was already used with a different body.

413payload_too_large

JSON bodies may be at most 64 KiB.

429trial_limit

The anonymous trial allows 10 calls per IP per UTC day, shared by REST and MCP. Retry-After gives the seconds left.

500internal_error

The call failed on our side. It is not billed; retry with the same Idempotency-Key.

JSON Schema

Request schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "invoices": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "invoice": {
            "type": "object",
            "properties": {
              "number": {
                "type": "string",
                "maxLength": 400
              },
              "issuer": {
                "type": "string",
                "maxLength": 400
              },
              "issuerType": {
                "type": "string",
                "enum": [
                  "ocean_common_carrier",
                  "marine_terminal_operator",
                  "nvocc",
                  "other"
                ]
              },
              "billedParty": {
                "type": "string",
                "maxLength": 400
              },
              "billedPartyType": {
                "type": "string",
                "enum": [
                  "ocean_common_carrier",
                  "marine_terminal_operator",
                  "nvocc",
                  "other"
                ]
              },
              "liabilityBasis": {
                "type": "string",
                "maxLength": 400
              },
              "direction": {
                "type": "string",
                "enum": [
                  "import",
                  "export"
                ]
              },
              "chargeType": {
                "type": "string",
                "enum": [
                  "demurrage",
                  "detention"
                ]
              },
              "billsOfLading": {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 400
                }
              },
              "container": {
                "type": "string",
                "maxLength": 400
              },
              "dischargePort": {
                "type": "string",
                "maxLength": 400
              },
              "invoiceDate": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "dueDate": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "freeDays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 730
              },
              "freeTimeStart": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "freeTimeEnd": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "availabilityDate": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "earliestReturnDate": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "chargedDates": {
                "maxItems": 730,
                "type": "array",
                "items": {
                  "type": "string",
                  "allOf": [
                    {
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    {
                      "pattern": "^[12]"
                    }
                  ],
                  "description": "Local calendar date, year 1000–2999."
                }
              },
              "billedDays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 730
              },
              "ratesCents": {
                "description": "Daily rates applied to the billed dates, in USD cents.",
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1000000000000,
                  "description": "USD cents."
                }
              },
              "amountCents": {
                "type": "integer",
                "minimum": 0,
                "maximum": 1000000000000,
                "description": "USD cents."
              },
              "rateRule": {
                "type": "string",
                "maxLength": 400
              },
              "disputeContact": {
                "type": "string",
                "maxLength": 400
              },
              "disputeInstructions": {
                "description": "Dispute method shown on the invoice. Include the public website address or the destination of any QR code or digital watermark.",
                "type": "string",
                "maxLength": 400
              },
              "disputeRequestDays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 730
              },
              "disputeResolutionDays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 730
              },
              "certifiesFmcCompliance": {
                "type": "boolean"
              },
              "certifiesIssuerDidNotContribute": {
                "type": "boolean"
              },
              "correctsWrongBilledParty": {
                "type": "boolean"
              },
              "documentText": {
                "description": "Text from the invoice and its attachments. Labeled dates in this text are hints for review. Enter structured dates in ISO YYYY-MM-DD format.",
                "type": "string",
                "maxLength": 32000
              },
              "notes": {
                "description": "Additional free-text notes about the invoice.",
                "type": "string",
                "maxLength": 400
              }
            },
            "required": [
              "issuerType",
              "billedPartyType",
              "direction",
              "chargeType"
            ],
            "additionalProperties": false,
            "description": "One invoice for one container and charge type. Extract required information from all sections and attachments before omitting an absent field."
          },
          "structuredFieldsComplete": {
            "description": "Set to true after confirming that the structured fields capture all relevant information from the invoice, its attachments, shipment records, and the applicable tariff. Without this confirmation, any non-empty free text requires review, including invoice identifiers, names, text fields, and evidence references.",
            "type": "boolean"
          },
          "events": {
            "description": "Import demurrage runs from discharge or availability to gate-out. Import detention defaults to gate-out through empty return. Export demurrage starts at full gate-in and uses the tariff's exportDemurrage rules. Export detention defaults to empty pickup through full gate-in.",
            "type": "object",
            "properties": {
              "discharge": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "availability": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "earliestReturn": {
                "description": "Published earliest receipt date (ERD) for the export booking, from an independent record. Actual gate-in may precede it.",
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ]
              },
              "erdChanges": {
                "description": "Published terminal ERD changes for this export detention shipment, in announcement order. For a same-day pickup or return, include the change only if announced while the shipper held the container. Use an empty array if records confirm no change.",
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "announcedOn": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Facility-local date the terminal publicly announced the change."
                    },
                    "previousErd": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    },
                    "newErd": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    }
                  },
                  "required": [
                    "announcedOn",
                    "previousErd",
                    "newErd"
                  ],
                  "additionalProperties": false
                }
              },
              "gateOut": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "emptyReturn": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "emptyPickup": {
                "description": "Export equipment pickup.",
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ]
              },
              "fullGateIn": {
                "description": "Delivery of the full export container to the terminal.",
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ]
              },
              "vesselLoad": {
                "description": "Export container loaded on vessel.",
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ]
              },
              "loadedOnOriginalVessel": {
                "description": "Whether loading records confirm the container loaded on the originally scheduled vessel and voyage. Without this fact, a documented roll indicates a missed original voyage. Departure dates alone do not identify the voyage.",
                "type": "boolean"
              },
              "cargoCutoff": {
                "description": "Last date for full gate-in on the originally booked export voyage.",
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ]
              },
              "scheduledSailDate": {
                "description": "Scheduled departure date of the originally booked vessel.",
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ]
              },
              "actualSailDate": {
                "description": "Actual departure date of the vessel carrying this container.",
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ]
              },
              "rolls": {
                "description": "Documented, non-overlapping periods attributable to an export vessel roll. Start and end dates are inclusive.",
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "startDate": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    },
                    "endDate": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    },
                    "responsibility": {
                      "type": "string",
                      "enum": [
                        "carrier",
                        "customer",
                        "unknown"
                      ]
                    },
                    "resolutionDate": {
                      "description": "Date the customer resolved the cause. Null means the cause was still unresolved at the end of the roll period.",
                      "anyOf": [
                        {
                          "type": "string",
                          "allOf": [
                            {
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                            },
                            {
                              "pattern": "^[12]"
                            }
                          ],
                          "description": "Local calendar date, year 1000–2999."
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "newScheduledSailDate": {
                      "description": "Scheduled departure of the replacement vessel booked on startDate. Supply each replacement schedule when the tariff uses a scheduled sailing cutoff.",
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ]
                    }
                  },
                  "required": [
                    "startDate",
                    "endDate",
                    "responsibility"
                  ],
                  "additionalProperties": false
                }
              },
              "lateDocumentation": {
                "description": "Documented periods when the shipper's late paperwork delayed an export container. Start and end dates are inclusive.",
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "startDate": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    },
                    "endDate": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    }
                  },
                  "required": [
                    "startDate",
                    "endDate"
                  ],
                  "additionalProperties": false
                }
              },
              "blockedDays": {
                "default": [],
                "description": "Days of verified full-day inability to move this container for this charge, including lack of any authorized alternate facility or appointment.",
                "maxItems": 730,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "terminal_closed",
                        "container_unavailable",
                        "appointment_unavailable"
                      ]
                    },
                    "reference": {
                      "type": "string",
                      "maxLength": 400
                    }
                  },
                  "required": [
                    "date",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "terms": {
            "type": "object",
            "properties": {
              "reference": {
                "type": "string",
                "minLength": 1,
                "maxLength": 400,
                "description": "Applicable tariff, contract or terminal schedule reference."
              },
              "freeDays": {
                "type": "integer",
                "minimum": 0,
                "maximum": 730
              },
              "freeDayBasis": {
                "type": "string",
                "enum": [
                  "calendar",
                  "business"
                ]
              },
              "freeTimeStartsAfter": {
                "description": "Tariff milestone for starting free time. gate_in uses events.fullGateIn and empty_pickup uses events.emptyPickup. If omitted for import demurrage, compare discharge and availability when both are recorded. Other charges use their default milestones.",
                "type": "string",
                "enum": [
                  "discharge",
                  "availability",
                  "gate_in",
                  "empty_pickup"
                ]
              },
              "countBlockedFreeDays": {
                "description": "Whether verified blocked days count toward free time. Defaults to true for calendar-day free time and false for business-day free time.",
                "type": "boolean"
              },
              "chargeDayBasis": {
                "type": "string",
                "enum": [
                  "calendar",
                  "business"
                ]
              },
              "countBlockedChargeDays": {
                "description": "Whether verified blocked days count after free time under the tariff. Defaults to true for calendar-day charges and false for business-day charges.",
                "type": "boolean"
              },
              "includeStartDay": {
                "type": "boolean",
                "description": "True to begin counting on the milestone date, false to begin the following day."
              },
              "includeEndDay": {
                "type": "boolean",
                "description": "Whether the day the charge period ends can be charged."
              },
              "exportDemurrage": {
                "description": "Export demurrage rules transcribed from the supplied tariff for the circumstances of this shipment.",
                "type": "object",
                "properties": {
                  "chargeableCauses": {
                    "description": "Complete list of causes the tariff permits after free time. An empty array means none apply. Omit if the tariff is unclear. Days with conflicting chargeable causes require review.",
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "early_receipt"
                            },
                            "requiresOriginalVessel": {
                              "default": true,
                              "description": "Whether early receipt requires loading on the originally scheduled vessel and voyage. Set to false if the tariff permits the charge regardless of voyage.",
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false,
                          "description": "Charge dates before the published ERD when full gate-in preceded that ERD and the original-vessel condition is met."
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "shipper_roll"
                            },
                            "maxDaysAfterResolution": {
                              "description": "Calendar days chargeable after the shipper resolves the cause. Omit for an uncapped rule.",
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 730
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false,
                          "description": "Charge days attributable to a documented customer-caused roll. With a scheduled sailing cutoff, this can include days before the roll, after free time, on the affected booking."
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "late_documentation"
                            }
                          },
                          "required": [
                            "kind"
                          ],
                          "additionalProperties": false,
                          "description": "Charge dates attributable to the shipper's late documentation."
                        }
                      ]
                    }
                  },
                  "endsAt": {
                    "description": "Tariff milestone ending export demurrage. Supply when recording a scheduled or actual departure date. Without either date, the default is vessel load.",
                    "type": "string",
                    "enum": [
                      "vessel_load",
                      "scheduled_sail",
                      "earlier_of_load_and_scheduled_sail",
                      "actual_sail"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "exportDetention": {
                "type": "object",
                "properties": {
                  "extendFreeTimeOnErdChange": {
                    "type": "boolean",
                    "description": "Whether the tariff adds working days from the previous ERD through the day before the new ERD for a postponement announced while the shipper holds the container within free time."
                  }
                },
                "required": [
                  "extendFreeTimeOnErdChange"
                ],
                "additionalProperties": false
              },
              "weekend": {
                "default": [
                  6,
                  7
                ],
                "description": "ISO weekday numbers excluded in business-day mode.",
                "maxItems": 7,
                "type": "array",
                "items": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 7
                }
              },
              "usHolidays": {
                "description": "Include national or state public holidays in business-day mode. Dataset covers 2020–2035.",
                "anyOf": [
                  {
                    "type": "string",
                    "const": "US"
                  },
                  {
                    "type": "string",
                    "pattern": "^US-[A-Z]{2}$"
                  }
                ]
              },
              "holidays": {
                "default": [],
                "description": "Additional holidays excluded in business-day mode.",
                "maxItems": 100,
                "type": "array",
                "items": {
                  "type": "string",
                  "allOf": [
                    {
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    },
                    {
                      "pattern": "^[12]"
                    }
                  ],
                  "description": "Local calendar date, year 1000–2999."
                }
              },
              "tiers": {
                "minItems": 1,
                "maxItems": 32,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "fromChargedDay": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 730
                    },
                    "rateCents": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000000000000,
                      "description": "USD cents."
                    }
                  },
                  "required": [
                    "fromChargedDay",
                    "rateCents"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "reference",
              "freeDays",
              "freeDayBasis",
              "chargeDayBasis",
              "includeStartDay",
              "includeEndDay",
              "tiers"
            ],
            "additionalProperties": false
          },
          "evidence": {
            "description": "Independent records for checking stated invoice details. Use the same names, reference and dispute details where they match. Certification booleans describe whether the certified facts are true.",
            "type": "object",
            "properties": {
              "billsOfLading": {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 400
                }
              },
              "container": {
                "type": "string",
                "maxLength": 400
              },
              "dischargePort": {
                "type": "string",
                "maxLength": 400
              },
              "invoiceDate": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "dueDate": {
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ],
                "description": "Local calendar date, year 1000–2999."
              },
              "disputeContact": {
                "type": "string",
                "maxLength": 400
              },
              "disputeInstructions": {
                "description": "Dispute method shown on the invoice. Include the public website address or the destination of any QR code or digital watermark.",
                "type": "string",
                "maxLength": 400
              },
              "certifiesFmcCompliance": {
                "type": "boolean"
              },
              "certifiesIssuerDidNotContribute": {
                "type": "boolean"
              },
              "liableParty": {
                "description": "Use the same legal entity names as on the invoice when they match.",
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  },
                  "reference": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400,
                    "description": "Independent evidence identifying the sole party liable for this charge."
                  },
                  "basis": {
                    "description": "Liability basis documented by the independent evidence.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 400
                  }
                },
                "required": [
                  "name",
                  "reference"
                ],
                "additionalProperties": false
              },
              "upstreamInvoiceDate": {
                "description": "Issue date of the invoice received by the NVOCC.",
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ]
              },
              "lastIncurredDate": {
                "description": "Independently documented last date this charge was incurred.",
                "type": "string",
                "allOf": [
                  {
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  {
                    "pattern": "^[12]"
                  }
                ]
              },
              "agreedResolutionDays": {
                "description": "A longer resolution period agreed by both parties.",
                "type": "integer",
                "minimum": 0,
                "maximum": 730
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "invoice"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "invoices"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "invoices": [
        {
          "structuredFieldsComplete": true,
          "invoice": {
            "number": "DD-260529",
            "issuer": "Harbor Shipping",
            "issuerType": "ocean_common_carrier",
            "billedParty": "Atlas Imports",
            "billedPartyType": "other",
            "liabilityBasis": "Consignee under service contract SC-208",
            "direction": "import",
            "chargeType": "demurrage",
            "billsOfLading": [
              "HSUS00814"
            ],
            "container": "MSCU1234566",
            "dischargePort": "USLAX",
            "invoiceDate": "2026-05-29",
            "dueDate": "2026-06-28",
            "freeDays": 2,
            "freeTimeStart": "2026-05-20",
            "freeTimeEnd": "2026-05-21",
            "availabilityDate": "2026-05-20",
            "chargedDates": [
              "2026-05-22",
              "2026-05-23",
              "2026-05-24",
              "2026-05-25"
            ],
            "billedDays": 4,
            "ratesCents": [
              15000,
              25000
            ],
            "amountCents": 80000,
            "rateRule": "SC-208 section 12",
            "disputeContact": "billing@example.com",
            "disputeInstructions": "https://example.com/disputes",
            "disputeRequestDays": 30,
            "disputeResolutionDays": 30,
            "certifiesFmcCompliance": true,
            "certifiesIssuerDidNotContribute": true
          },
          "events": {
            "discharge": "2026-05-19",
            "availability": "2026-05-20",
            "gateOut": "2026-05-25",
            "blockedDays": [
              {
                "date": "2026-05-24",
                "reason": "terminal_closed",
                "reference": "Gate schedule"
              }
            ]
          },
          "terms": {
            "reference": "SC-208 section 12",
            "freeDays": 2,
            "freeDayBasis": "calendar",
            "freeTimeStartsAfter": "availability",
            "chargeDayBasis": "calendar",
            "includeStartDay": true,
            "includeEndDay": true,
            "tiers": [
              {
                "fromChargedDay": 1,
                "rateCents": 15000
              },
              {
                "fromChargedDay": 3,
                "rateCents": 25000
              }
            ]
          },
          "evidence": {
            "liableParty": {
              "name": "Atlas Imports",
              "reference": "SC-208"
            }
          }
        }
      ]
    }
  ]
}
Response schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "regulation": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
        },
        "part541": {
          "type": "string",
          "format": "uri"
        },
        "incentivePrinciple": {
          "type": "string",
          "format": "uri"
        },
        "removedPartyRestriction": {
          "type": "string",
          "format": "uri"
        }
      },
      "required": [
        "version",
        "part541",
        "incentivePrinciple",
        "removedPartyRestriction"
      ],
      "additionalProperties": false
    },
    "invoices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "invoiceNumber": {
            "type": [
              "string",
              "null"
            ]
          },
          "container": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "no_findings",
              "needs_review",
              "dispute_identified"
            ]
          },
          "paymentObligation": {
            "type": "string",
            "enum": [
              "eliminated",
              "grounds_for_dispute",
              "undetermined"
            ],
            "description": "Elimination requires a conclusive defect and either an input with only structured values or structuredFieldsComplete set to true. Unconfirmed free text yields grounds_for_dispute with needs_review."
          },
          "issuanceDeadline": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "basis": {
                    "type": "string"
                  },
                  "startDate": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "deadline": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  }
                },
                "required": [
                  "basis",
                  "startDate",
                  "deadline"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "calculation": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "chargeableDays": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "charges": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "date": {
                          "type": "string",
                          "format": "date",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        "rateCents": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "cause": {
                          "description": "The tariff-authorized cause attributed to this export demurrage day.",
                          "type": "string",
                          "enum": [
                            "early_receipt",
                            "shipper_roll",
                            "late_documentation"
                          ]
                        }
                      },
                      "required": [
                        "date",
                        "rateCents"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "unbilledChargeableDates": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "date",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                    }
                  },
                  "amountCents": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "overchargeCents": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "chargeableDays",
                  "charges",
                  "unbilledChargeableDates",
                  "amountCents",
                  "overchargeCents"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Recalculation of billed dates under the supplied tariff or contract. Unbilled chargeable dates do not affect the calculated amount or overcharge."
          },
          "dayLedger": {
            "description": "Day-by-day tariff attribution for the audited period and any billed dates outside it. A needs_review entry can leave the calculation or issuance deadline unresolved.",
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    },
                    "kind": {
                      "type": "string",
                      "const": "chargeable"
                    },
                    "cause": {
                      "type": "string",
                      "enum": [
                        "early_receipt",
                        "shipper_roll",
                        "late_documentation",
                        "import_demurrage",
                        "import_detention",
                        "export_detention"
                      ]
                    }
                  },
                  "required": [
                    "date",
                    "kind",
                    "cause"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    },
                    "kind": {
                      "type": "string",
                      "const": "excluded"
                    },
                    "cause": {
                      "type": "string",
                      "enum": [
                        "before_period",
                        "after_period",
                        "start_day_excluded",
                        "free_time",
                        "non_business_day",
                        "blocked_day",
                        "carrier_roll",
                        "no_chargeable_cause"
                      ]
                    }
                  },
                  "required": [
                    "date",
                    "kind",
                    "cause"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "allOf": [
                        {
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                        },
                        {
                          "pattern": "^[12]"
                        }
                      ],
                      "description": "Local calendar date, year 1000–2999."
                    },
                    "kind": {
                      "type": "string",
                      "const": "needs_review"
                    },
                    "cause": {
                      "type": "string",
                      "enum": [
                        "missing_sail_date",
                        "multiple_chargeable_causes"
                      ]
                    }
                  },
                  "required": [
                    "date",
                    "kind",
                    "cause"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "calculationAlternatives": {
            "description": "Amounts under each possible start event when the tariff milestone is unspecified and the schedules differ.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "freeTimeStartsAfter": {
                  "type": "string",
                  "enum": [
                    "discharge",
                    "availability",
                    "gate_in",
                    "empty_pickup"
                  ]
                },
                "amountCents": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Recalculated amount for billed dates. Null when billed dates were not supplied."
                }
              },
              "required": [
                "freeTimeStartsAfter",
                "amountCents"
              ],
              "additionalProperties": false
            }
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "effect": {
                  "type": "string",
                  "enum": [
                    "no_payment_obligation",
                    "potential_dispute",
                    "needs_review"
                  ]
                },
                "location": {
                  "type": "string",
                  "description": "Field path relative to the corresponding invoices array entry."
                },
                "expected": {
                  "type": "string"
                },
                "actual": {
                  "type": "string"
                },
                "section": {
                  "type": "string"
                },
                "source": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "code",
                "effect",
                "location",
                "expected",
                "actual",
                "section",
                "source"
              ],
              "additionalProperties": false
            }
          },
          "disputeLetter": {
            "description": "Requests clarification when paymentObligation is grounds_for_dispute.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "invoiceNumber",
          "container",
          "status",
          "paymentObligation",
          "issuanceDeadline",
          "calculation",
          "findings",
          "disputeLetter"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "regulation",
    "invoices"
  ],
  "additionalProperties": false
}