我如何使用联邦快递跟踪号下载联邦快递货件标签?

时间:2021-05-11 07:23:42

标签: javascript json api netsuite fedex

我从 Fedex 开发人员指南或从 Fedex 下载的示例代码中找到的所有内容,我在邮递员上尝试过,但失败并显示“身份验证失败”错误。

这是我从 FedEx 开发人员指南中复制的自定义标签条码交易示例的请求,它不起作用,它回复身份验证失败。

                <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                               xmlns:SOAPENC="http://schemas.xmlsoap.org/soap/encoding/"
                               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                               xmlns:m0="http://fedex.com/ws/ship/v25">
                <SOAP-ENV:Body>
                    <ProcessShipmentRequest xmlns="http://fedex.com/ws/ship/v25">
                        <WebAuthenticationDetail>
                            <ParentCredential>
                                <Key>L6SCtxVl6Q7Ld8Ee</Key>
                                <Password>39eerZzmecIe3BlTCT54PmOdE</Password>
                            </ParentCredential>
                            <UserCredential>
                                <Key>L6SCtxVl6Q7Ld8Ee</Key>
                                <Password>39eerZzmecIe3BlTCT54PmOdE</Password>
                            </UserCredential>
                        </WebAuthenticationDetail>
                        <ClientDetail>
                            <AccountNumber>161051624</AccountNumber>
                            <MeterNumber>253182955</MeterNumber>
                        </ClientDetail>
                        <TransactionDetail>
                            <CustomerTransactionId>ProcessShipmentRequest_2264</CustomerTransactionId>
                        </TransactionDetail>
                        <Version>
                            <ServiceId>ship</ServiceId>
                            <Major>25</Major>
                            <Intermediate>0</Intermediate>
                            <Minor>0</Minor>
                        </Version>
                        <RequestedShipment>
                            <ShipTimestamp>2019-01-03T12:34:56-06:00</ShipTimestamp>
                            <DropoffType>REGULAR_PICKUP</DropoffType>
                            <ServiceType>INTERNATIONAL_PRIORITY</ServiceType>
                            <PackagingType>YOUR_PACKAGING</PackagingType>
                            <Shipper>
                                <Contact>
                                    <PersonName>Sender_Name</PersonName>
                                    <CompanyName>WAPISENDER-WBUS1100</CompanyName>
                                    <PhoneNumber>XXXXXXXXXX</PhoneNumber>
                                    <EMailAddress>sender@yahoo.com</EMailAddress>
                                </Contact>
                                <Address>
                                    <StreetLines>Test Sender Address Line1</StreetLines>
                                    <City>MEMPHIS</City>
                                    <StateOrProvinceCode>TN</StateOrProvinceCode>
                                    <PostalCode>38117</PostalCode>
                                    <CountryCode>US</CountryCode>
                                </Address>
                            </Shipper>
                            <Recipient>
                                <Contact>
                                    <PersonName>Recipient_Name</PersonName>
                                    <CompanyName>XXXXXXXX</CompanyName>
                                    <PhoneNumber>XXXXXXXXX</PhoneNumber>
                                    <EMailAddress>recipient@XXXXX.com</EMailAddress>
                                </Contact>
                                <Address>
                                    <StreetLines>Recipient Address Line 1</StreetLines>
                                    <StreetLines>Recipient Address Line 2</StreetLines>
                                    <City>QUITO</City>
                                    <PostalCode>XXXXXX</PostalCode>
                                    <CountryCode>EC</CountryCode>
                                </Address>
                            </Recipient>
                            <ShippingChargesPayment>
                                <PaymentType>SENDER</PaymentType>
                                <Payor>
                                    <ResponsibleParty>
                                        <AccountNumber>161051624</AccountNumber>
                                        <Tins>
                                            <TinType>BUSINESS_STATE</TinType>
                                            <Number>XXXXX</Number>
                                        </Tins>
                                        <Contact>
                                            <ContactId>12345</ContactId>
                                            <PersonName>XXXXXXX</PersonName>
                                        </Contact>
                                    </ResponsibleParty>
                                </Payor>
                            </ShippingChargesPayment>
                            <CustomsClearanceDetail>
                                <DutiesPayment>
                                    <PaymentType>SENDER</PaymentType>
                                    <Payor>
                                        <ResponsibleParty>
                                            <AccountNumber>150067600</AccountNumber>
                                            <Tins>
                                                <TinType>BUSINESS_STATE</TinType>
                                                <Number>XXXXX</Number>
                                            </Tins>
                                            <Contact>
                                                <ContactId>XXXXX</ContactId>
                                                <PersonName>XXXXXX</PersonName>
                                            </Contact>
                                        </ResponsibleParty>
                                    </Payor>
                                </DutiesPayment>
                                <DocumentContent>DOCUMENTS_ONLY</DocumentContent>
                                <CustomsValue>
                                    <Currency>USD</Currency>
                                    <Amount>100.00</Amount>
                                </CustomsValue>
                                <Commodities>
                                    <NumberOfPieces>1</NumberOfPieces>
                                    <Description>ABCD</Description>
                                    <CountryOfManufacture>US</CountryOfManufacture>
                                    <Weight>
                                        <Units>LB</Units>
                                        <Value>1.0</Value>
                                    </Weight>
                                    <Quantity>1</Quantity>
                                    <QuantityUnits>cm</QuantityUnits>
                                    <UnitPrice>
                                        <Currency>USD</Currency>
                                        <Amount>1.000000</Amount>
                                    </UnitPrice>
                                    <CustomsValue>
                                        <Currency>USD</Currency>
                                        <Amount>100.000000</Amount>
                                    </CustomsValue>
                                </Commodities>
                                <ExportDetail>
                                    <ExportComplianceStatement>30.37(f)</ExportComplianceStatement>
                                </ExportDetail>
                            </CustomsClearanceDetail>
                            <LabelSpecification>
                                <LabelFormatType>COMMON2D</LabelFormatType>
                                <ImageType>PNG</ImageType>
                                <LabelStockType>PAPER_7X4.75</LabelStockType>
                            </LabelSpecification>
                            <RateRequestTypes>LIST</RateRequestTypes>
                            <PackageCount>1</PackageCount>
                            <RequestedPackageLineItems>
                                <SequenceNumber>1</SequenceNumber>
                                <Weight>
                                    <Units>LB</Units>
                                    <Value>20.0</Value>
                                </Weight>
                                <Dimensions>
                                    <Length>12</Length>
                                    <Width>12</Width>
                                    <Height>12</Height>
                                    <Units>IN</Units>
                                </Dimensions>
                                <CustomerReferences>
                                    <CustomerReferenceType>CUSTOMER_REFERENCE</CustomerReferenceType>
                                    <Value>TC001_01_PT1_ST01_PK01_SNDUS_RCPCA_POS</Value>
                                </CustomerReferences>
                            </RequestedPackageLineItems>
                        </RequestedShipment>
                    </ProcessShipmentRequest>
                </SOAP-ENV:Body>
            </SOAP-ENV:Envelope>

这里是我要求通过单号跟踪货件,回复成功。

                    <?xml version="1.0" encoding="UTF-8"?>
                <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v19="http://fedex.com/ws/track/v19">
                    <soapenv:Header />
                    <soapenv:Body>
                        <v19:TrackRequest>
                            <v19:WebAuthenticationDetail>
                                <v19:UserCredential>
                                    <v19:Key>L6SCtxVl6Q7Ld8Ee</v19:Key>
                                    <v19:Password>39eerZzmecIe3BlTCT54PmOdE</v19:Password>
                                </v19:UserCredential>
                            </v19:WebAuthenticationDetail>
                            <v19:ClientDetail>
                                <v19:AccountNumber>161051624</v19:AccountNumber>
                                <v19:MeterNumber>253182955</v19:MeterNumber>
                            </v19:ClientDetail>
                            <v19:TransactionDetail>
                                <v19:CustomerTransactionId>Track By Number_v19</v19:CustomerTransactionId>
                                <v19:Localization>
                                    <v19:LanguageCode>EN</v19:LanguageCode>
                                    <v19:LocaleCode>US</v19:LocaleCode>
                                </v19:Localization>
                            </v19:TransactionDetail>
                            <v19:Version>
                                <v19:ServiceId>trck</v19:ServiceId>
                                <v19:Major>19</v19:Major>
                                <v19:Intermediate>0</v19:Intermediate>
                                <v19:Minor>0</v19:Minor>
                            </v19:Version>
                            <v19:SelectionDetails>
                                <v19:CarrierCode>FDXE</v19:CarrierCode>
                                <v19:PackageIdentifier>
                                    <v19:Type>TRACKING_NUMBER_OR_DOORTAG</v19:Type>
                                    <v19:Value>913564932694</v19:Value>
                                </v19:PackageIdentifier>
                                <v19:ShipmentAccountNumber />
                                <v19:SecureSpodAccount />
                            </v19:SelectionDetails>
                        </v19:TrackRequest>
                    </soapenv:Body>
                </soapenv:Envelope>

0 个答案:

没有答案