【发布时间】:2019-05-20 18:24:43
【问题描述】:
我正在尝试获取两个地点之间的包裹的运费。 在请求数组中,我创建了正确的结构并在正确的位置提供了 NumberOfPieces。
stdClass Object
(
//OTHER ELEMENTS REDACTED HERE
[RequestedShipment] => stdClass Object
(
[Commodities] => Array
(
[NumberOfPieces] => 1
[Description] => Dog Meat
[CountryOfManufacture] => US
[Weight] => Array
(
[Units] => LB
[Value] => 20
)
[Quantity] => 1
[QuantityUnits] => EA
[UnitPrice] => Array
(
[Currency] => USD
[Amount] => 20
)
[CustomsValue] => Array
(
[Currency] => USD
[Amount] => 100
)
)
现在,问题是,API 的响应说我输入了无效的计件数。
stdClass Object
(
[HighestSeverity] => ERROR
[Notifications] => stdClass Object
(
[Severity] => ERROR
[Source] => crs
[Code] => 546
[Message] => Invalid piece count.
[LocalizedMessage] => Invalid piece count.
)
[Version] => stdClass Object
(
[ServiceId] => crs
[Major] => 16
[Intermediate] => 0
[Minor] => 0
)
)
我曾尝试在网上搜索可能的解决方案,但徒劳无功。有什么帮助吗?
【问题讨论】: