0

我对联邦快递费率服务请求有疑问。我需要从fedex 获得周六递送费率。我怎样才能得到这个?我正在使用python-fedex模块。

我试过使用

rate_request.RequestedShipment.ServiceType = None
rate_request.VariableOptions = 'SATURDAY_DELIVERY'

与其他参数。请给我一些提示。我只是坚持下去。

4

3 回答 3

1

i dont know with that module. but a saturday delivery rate request looks like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://fedex.com/ws/rate/v13">
   <SOAP-ENV:Body>
      <RateRequest>
         <WebAuthenticationDetail>
            <UserCredential>
               <Key></Key>
               <Password/>
            </UserCredential>
         </WebAuthenticationDetail>
         <ClientDetail>
            <AccountNumber></AccountNumber>
            <MeterNumber></MeterNumber>
         </ClientDetail>
         <TransactionDetail>
            <CustomerTransactionId>RateRequest_Condor_Sat_Del</CustomerTransactionId>
         </TransactionDetail>
         <Version>
            <ServiceId>crs</ServiceId>
            <Major>13</Major>
            <Intermediate>0</Intermediate>
            <Minor>0</Minor>
         </Version>
         <RequestedShipment>
            <ShipTimestamp>2012-08-17T09:30:47-05:00</ShipTimestamp>
            <DropoffType>REGULAR_PICKUP</DropoffType>
            <ServiceType>FIRST_OVERNIGHT</ServiceType>
            <PackagingType>YOUR_PACKAGING</PackagingType>
            <TotalWeight>
               <Units>LB</Units>
               <Value>50.0</Value>
            </TotalWeight>
            <Shipper>
               <AccountNumber></AccountNumber>
               <Contact>
                  <CompanyName>FedEx-WAPI</CompanyName>
                  <PhoneNumber>1234567890</PhoneNumber>
               </Contact>
               <Address>
                  <StreetLines>SN2000 Test Meter 8</StreetLines>
                  <StreetLines>10 Fedex Parkway</StreetLines>
                  <City>COLORADO SPRINGS</City>
                  <StateOrProvinceCode>CO</StateOrProvinceCode>
                  <PostalCode>80915</PostalCode>
                  <CountryCode>US</CountryCode>
               </Address>
            </Shipper>
            <Recipient>
               <AccountNumber></AccountNumber>
               <Contact>
                  <PersonName>Recipient Contact</PersonName>
                  <PhoneNumber>1234567890</PhoneNumber>
               </Contact>
               <Address>
                  <StreetLines>Recipient Address Line 1</StreetLines>
                  <StreetLines>Recipient Address Line 2</StreetLines>
                  <City>Minneapolis</City>
                  <StateOrProvinceCode>MN</StateOrProvinceCode>
                  <PostalCode>55411</PostalCode>
                  <CountryCode>US</CountryCode>
               </Address>
            </Recipient>
            <ShippingChargesPayment>
               <PaymentType>SENDER</PaymentType>
               <Payor>
                  <ResponsibleParty>
                     <AccountNumber></AccountNumber>
                     <Tins>
                        <TinType>BUSINESS_STATE</TinType>
                        <Number>123456</Number>
                     </Tins>
                  </ResponsibleParty>
               </Payor>
            </ShippingChargesPayment>
            <SpecialServicesRequested>
               <SpecialServiceTypes>SATURDAY_DELIVERY</SpecialServiceTypes>
            </SpecialServicesRequested>
            <LabelSpecification>
               <LabelFormatType>COMMON2D</LabelFormatType>
               <ImageType>PNG</ImageType>
               <LabelStockType>PAPER_4X6</LabelStockType>
            </LabelSpecification>
            <RateRequestTypes>ACCOUNT</RateRequestTypes>
            <PackageCount>1</PackageCount>
            <RequestedPackageLineItems>
               <SequenceNumber>1</SequenceNumber>
               <GroupPackageCount>1</GroupPackageCount>
               <Weight>
                  <Units>LB</Units>
                  <Value>20.0</Value>
               </Weight>
               <Dimensions>
                  <Length>12</Length>
                  <Width>12</Width>
                  <Height>12</Height>
                  <Units>IN</Units>
               </Dimensions>
               <ContentRecords>
                  <PartNumber>123445</PartNumber>
                  <ItemNumber>kjdjalsro1262739827</ItemNumber>
                  <ReceivedQuantity>12</ReceivedQuantity>
                  <Description>ContentDescription</Description>
               </ContentRecords>
            </RequestedPackageLineItems>
         </RequestedShipment>
      </RateRequest>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

where ShipmentSpecialServiceType is the important part to define -page 37 of the developer manual-:

Identifies the collection of special services requested by the shipper and offered by FedEx. the shipper requests a special service requiring additional data (such as C.O.D.), the special service type must be present in the SpecialServiceTypes collection, and the supporting detail must be provided in the appropriate sub-object (such as CodDetail).

于 2013-08-31T19:35:10.760 回答
0

我会看看 Shiprush SDK。它有一个 SOAP 入口点,您可以为 Fedex 和其他运营商评分和发货。(他们支持它。)

于 2015-01-14T21:15:08.653 回答
0

rate_request.derivedData.commitDetail.proofOfDeliveryDayOfWeek='SATURDAY'

这将解决您的 python-fedex 问题

于 2020-07-27T17:48:51.713 回答