UPS-API / api-documentation

MIT License
32 stars 19 forks source link

Rate: harmonize `Packaging[Type]` / `TotalCharge[s]` [C-0198635563] #86

Closed xerc closed 2 months ago

xerc commented 2 months ago

@ https://onlinetools.ups.com/api/rating/v2403/rate || shop

{"RateRequest":{"Shipment":{"ReferenceNumber":{"Value":"###-###"},"Service":{"Code":"11"},"Package":{"Packaging":{"Code":"02"},"PackageWeight":{"UnitOfMeasurement":{"Code":"KGS"},"Weight":"0.245"},"Dimensions":{"UnitOfMeasurement":{"Code":"CM"},"Length":"3","Height":"34","Width":"34"}},"ShipTo":{"AttentionName":"###","Phone":{"Number":"0"},"Name":"-","Address":{"AddressLine":"### Str. ###","PostalCode":"###","City":"###","CountryCode":"DE"}},"Shipper":{"ShipperNumber":"######","CompanyDisplayableName":"###","AttentionName":"###","Phone":{"Number":"0"},"Name":"###","Address":{"AddressLine":"### Str. ###","PostalCode":"###","City":"###","CountryCode":"DE"}},"PaymentInformation":{"ShipmentCharge":{"Type":"01","BillShipper":{"AccountNumber":"######"}}},"ShipmentRatingOptions":{"NegotiatedRatesIndicator":"Y"},"TaxInformationIndicator":"Y","ItemizedChargesRequestedIndicator":"Y"}}}
{"response":{"errors":[{"code":"111212","message":"The requested Package Type is unavailable for the selected service between the selected locations."}]}}
UPSRahul commented 2 months ago

Hi, since there is an active UPS Help Desk ticket, we have internally forwarded and notified the Help Desk team of this issue. Moving forward, the Help Desk should be able to better support this inquiry.

xerc commented 2 months ago

@UPSRahul ; thanks for the internal speedup (took 25 945 minutes from sending the req. to this answer)

the issue is different spec. for the same thing .. https://github.com/UPS-API/api-documentation/blob/4962e982cfca654bee7fbc4c9a0b80105cf480aa/Rating.yaml#L141-L142 https://github.com/UPS-API/api-documentation/blob/4962e982cfca654bee7fbc4c9a0b80105cf480aa/Shipping.yaml#L703-L704

xerc commented 2 months ago

same diff. @ TotalCharge s? https://github.com/UPS-API/api-documentation/blob/4962e982cfca654bee7fbc4c9a0b80105cf480aa/Shipping.yaml#L9956-L9959 https://github.com/UPS-API/api-documentation/blob/4962e982cfca654bee7fbc4c9a0b80105cf480aa/Shipping.yaml#L10172-L10175

xerc commented 2 months ago

@UPSRahul is this also "not planned"? would be much easier with consistent naming

nightcoding2021 commented 4 weeks ago

OK, so back I'm working again on the JSON API integration.

Lucky someone in this thread flagged this wording difference PackagingType (rating) vs Packaging (shipping). The rating JSON API was returning a misleading error message "The requested Package Type is unavailable for the selected service between the selected locations."

People will now have hardcoded with the different wording. UPS could have the rating API accept either wording moving forward.