从UPS API获取实际包装重量

时间:2013-09-19 13:44:23

标签: php api ups

这里有人熟悉UPS API吗?我正在试图弄清楚如何从包裹中扫描UPS时获得实际包装重量,我正在使用UPS Tracking api,下面我有API的示例输出。

我的问题是,它显示了您在创建运输标签时输入的重量,而不是包裹的实际重量。

有什么想法吗?

Array
(
    [TRACKRESPONSE] => Array
        (
            [RESPONSE] => Array
                (
                    [TRANSACTIONREFERENCE] => Array
                        (
                            [XPCIVERSION] => 1.0
                        )

                    [RESPONSESTATUSCODE] => 1
                    [RESPONSESTATUSDESCRIPTION] => Success
                )

            [SHIPMENT] => Array
                (
                    [SHIPPER] => Array
                        (
                            [SHIPPERNUMBER] => XXXXX
                            [ADDRESS] => Array
                                (
                                    [ADDRESSLINE1] => 1 Main St.
                                    [CITY] => Sometown
                                    [STATEPROVINCECODE] => XX
                                    [POSTALCODE] => 0000   0000
                                    [COUNTRYCODE] => US
                                )

                        )

                    [SHIPTO] => Array
                        (
                            [ADDRESS] => Array
                                (
                                    [CITY] => SOMECITY
                                    [STATEPROVINCECODE] => XX
                                    [POSTALCODE] => 00000
                                    [COUNTRYCODE] => US
                                )

                        )

                    [SHIPMENTWEIGHT] => Array
                        (
                            [UNITOFMEASUREMENT] => Array
                                (
                                    [CODE] => LBS
                                )

                            [WEIGHT] => 33.00
                        )

                    [SERVICE] => Array
                        (
                            [CODE] => 003
                            [DESCRIPTION] => GROUND
                        )

                    [SHIPMENTIDENTIFICATIONNUMBER] => 1ZAXXXXXXXXXXXXXX
                    [PICKUPDATE] => 20130917
                    [PACKAGE] => Array
                        (
                            [TRACKINGNUMBER] => 1ZAXXXXXXXXXXXXXX
                            [ACTIVITY] => Array
                                (
                                    [ACTIVITYLOCATION] => Array
                                        (
                                            [ADDRESS] => Array
                                                (
                                                    [CITY] => SOMECITY
                                                    [STATEPROVINCECODE] => XX
                                                    [POSTALCODE] => 00000
                                                    [COUNTRYCODE] => US
                                                )

                                            [CODE] => M7
                                            [DESCRIPTION] => RECEIVER
                                            [SIGNEDFORBYNAME] => SOMEONE
                                        )

                                    [STATUS] => Array
                                        (
                                            [STATUSTYPE] => Array
                                                (
                                                    [CODE] => D
                                                    [DESCRIPTION] => DELIVERED
                                                )

                                            [STATUSCODE] => Array
                                                (
                                                    [CODE] => KB
                                                )

                                        )

                                    [DATE] => 20130918
                                    [TIME] => 120100
                                )

                            [PACKAGEWEIGHT] => Array
                                (
                                    [UNITOFMEASUREMENT] => Array
                                        (
                                            [CODE] => LBS
                                        )

                                    [WEIGHT] => 33.00
                                )

                        )

                )

        )

)

1 个答案:

答案 0 :(得分:1)

UPS不输出扫描包的重量,抱歉,但您无法显示他们未在API中提供的数据。