Skip to content

Surprise ShipmentResults.RateModifier returned from API #230

@SeanKilleen

Description

@SeanKilleen

We received the below JSON response from a shipment request:

{
    "ShipmentResponse": {
        "Response": {
            "ResponseStatus": {
                "Code": "1",
                "Description": "Success"
            },
            "Alert": [
                {
                    "Code": "121943",
                    "Description": "Invalid Date. Changed to today's date"
                },
                {
                    "Code": "120910",
                    "Description": "TPFCNegotiatedRatesIndicator is applicable only for Third party/Freight Collect shipments."
                }
            ],
            "TransactionReference": {
                "CustomerContext": ""
            }
        },
        "ShipmentResults": {
            "Disclaimer": [
                {
                    "Code": "05",
                    "Description": "Rate excludes VAT. Rate includes a fuel surcharge, but excludes taxes, duties and other charges that may apply to the shipment."
                }
            ],
            "ShipmentCharges": {
                "RateChart": "1",
                "BaseServiceCharge": {
                    "CurrencyCode": "USD",
                    "MonetaryValue": "187.62"
                },
                "TransportationCharges": {
                    "CurrencyCode": "USD",
                    "MonetaryValue": "264.67"
                },
                "ItemizedCharges": [
                    {
                        "Code": "375",
                        "CurrencyCode": "USD",
                        "MonetaryValue": "72.27"
                    },
                    {
                        "Code": "434",
                        "CurrencyCode": "USD",
                        "MonetaryValue": "2.56",
                        "SubType": "Surge_Fee_Commercial"
                    }
                ],
                "ServiceOptionsCharges": {
                    "CurrencyCode": "USD",
                    "MonetaryValue": "0.00"
                },
                "TotalCharges": {
                    "CurrencyCode": "USD",
                    "MonetaryValue": "264.67"
                }
            },
            "NegotiatedRateCharges": {
                "TotalCharge": {
                    "CurrencyCode": "USD",
                    "MonetaryValue": "262.02"
                }
            },
            "RatingMethod": "01",
            "BillableWeightCalculationMethod": "02",
            "BillingWeight": {
                "UnitOfMeasurement": {
                    "Code": "LBS",
                    "Description": "Pounds"
                },
                "Weight": "8.0"
            },
            "ShipmentIdentificationNumber": "1ZXXXXXXXXXXXXXXXX",
            "PackageResults": [
                {
                    "TrackingNumber": "1ZXXXXXXXXXXXXXXXX",
                    "ServiceOptionsCharges": {
                        "CurrencyCode": "USD",
                        "MonetaryValue": "0.00"
                    },
                    "ShippingLabel": {
                        "ImageFormat": {
                            "Code": "ZPL",
                            "Description": "ZPL"
                        },
                        "GraphicImage": "REDACTED_BY_ME",
                        "InternationalSignatureGraphicImage": "REDACTED_BY_ME"
                    }
                }
            ],
            "RateModifier": {
                "ModifierType": "SPM",
                "ModifierDesc": "Customer Solutions Service",
                "Amount": "2.22"
            }
        }
    }
}

Issue

ShipmentResults.RateModifier doesn't exist in any documented place, and the response breaks our processing (we operate in the SAP space and API contracts can have bigger side effects).

Three things wrong with that field vs. the spec

  • Unexpected location — sibling of ShipmentCharges / PackageResults, not under NegotiatedRateCharges or inside a package.
  • Unexpected cardinality — single object, not an array. I think every documented *_RateModifier is type: array.
  • Unexpected missing CurrencyCode — every *_RateModifier schema marks CurrencyCode as required. Our payload only has ModifierType, ModifierDesc, Amount.

Question

I'm trying to understand --

  • Is this an issue on the API side, or is this a missing doc?
  • Is this a intentional change by UPS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions