type: object
description: |
    A single DHL shipping charge — one row per tracking number on a DHL invoice.
    Created during the upload-CSV flow, upserted on `(invoiceId, trackingNumber)`.
    `feeBreakdown` is parsed from the CSV's miscellaneous fee columns.
required: [id, invoiceId, invoiceNumber, trackingNumber]
properties:
    id: { type: string }
    createdAt: { type: string, format: date-time }
    invoiceId: { type: string }
    invoiceNumber: { type: string }
    trackingNumber: { type: string }
    amount:
        type: number
        description: Pre-fee charge amount.
    currency: { type: string, example: "USD" }
    serviceType:
        type: string
        description: "DHL service code (e.g. `EXPRESS WORLDWIDE`)."
    weight: { type: number, description: Package weight in kg or lb (per CSV). }
    dimensions:
        type: object
        properties:
            length: { type: number }
            width: { type: number }
            height: { type: number }
    description: { type: string }
    origin: { type: string, description: Origin code or city. }
    destination: { type: string, description: Destination code or country. }
    totalCharge:
        type: number
        description: Final charge after surcharges; falls back to `amount + fuelSurcharge` if not in the CSV.
    feeBreakdown:
        type: object
        description: |
            Parsed from miscellaneous CSV columns (`fuelSurcharge`, `weightCharge`,
            `taxAdjustment`, `invoiceFee`, `otherCharges*`, `discount*`, `xc*`).
        properties:
            fuelSurcharge: { type: number }
            weightCharge: { type: number }
            taxAdjustment: { type: number }
            invoiceFee: { type: number }
            otherCharges:
                type: array
                items: { type: number }
            discounts:
                type: array
                items: { type: number }
            extraCharges:
                type: array
                items: { type: number }
example:
    id: "01HZ7890ABC678DEF90GHJKMN"
    createdAt: "2026-04-22T10:14:00.000Z"
    invoiceId: "01HZ12345ABC678DEF90GHJKMN"
    invoiceNumber: "MYBILL-2026-04-USA-001"
    trackingNumber: "9361269903500987654321"
    amount: 86.42
    currency: "USD"
    serviceType: "EXPRESS WORLDWIDE"
    weight: 2.4
    dimensions: { length: 30, width: 25, height: 18 }
    description: "Bigscreen Beyond"
    origin: "USA"
    destination: "DEU"
    totalCharge: 102.18
    feeBreakdown:
        fuelSurcharge: 12.84
        weightCharge: 0
        taxAdjustment: 2.92
        invoiceFee: 0
        otherCharges: []
        discounts: []
        extraCharges: []
