Closed DemigodCode closed 1 year ago
in the v1.0.2 i see arrays on containers in the response. Looks like ups dev team fixed it. Please check and let us know.
Yes, there are containers, but these containers are empty, cause if you create one single package in a shipment, it returns the package property instead of an array of packages. It's still not working. Same error as before.
https://github.com/UPS-API/api-documentation/issues/3#issuecomment-1798198715
I have an ongoing discussion with UPS about that and others too.
The PackageResults Property of ShipmentResults can be an array of PackageResults or just the properties of an PackageResults-Object
Single:
"PackageResults": { "TrackingNumber": "1ZXXXXXXXXXXXXXXXX", "ServiceOptionsCharges": { "CurrencyCode": "USD", "MonetaryValue": "0.00" }, "ShippingLabel": { "ImageFormat": { "Code": "ZPL", "Description": "ZPL" }, "GraphicImage": "" } }
Multiple:
"PackageResults": [ { "TrackingNumber": "1ZXXXXXXXXXXXXXXXX", "ServiceOptionsCharges": { "CurrencyCode": "USD", "MonetaryValue": "0.00" }, "ShippingLabel": { "ImageFormat": { "Code": "ZPL", "Description": "ZPL" }, "GraphicImage": "" } }, { "TrackingNumber": "1ZXXXXXXXXXXXXXXXX", "ServiceOptionsCharges": { "CurrencyCode": "USD", "MonetaryValue": "0.00" }, "ShippingLabel": { "ImageFormat": { "Code": "ZPL", "Description": "ZPL" }, "GraphicImage": "" } } ]
The swagger generated classes do not support this and currently only array as PackageResults are supported.