Accepting Returns


Unfortunately, situations may arise where you need to accept a return from a customer at your own expense. To facilitate this, FedEx provides the FDXExpressTagRequest call. This call will instruct FedEx to print a shipping label, send an agent to the sender's address (your customer) with the shipping label, and accept the package for shipment with the label they printed. The request is similar to that of a regular shipment, but note that the Origin should be your customer's address, and the Destination should be your address.

Note 

This type of shipment isn't added to accounts by default. You will need to speak to your account manager to request access to this type of shipment; you will also need to email the API support team to get access to this request type via the API.

 $request = <<< XMLREQUEST <?xml version="1.0" encoding="UTF-8" ?> <FDXExpressTagRequest xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:noNamespaceSchemaLocation="FDXExpressTagRequest.xsd">   <RequestHeader>       <AccountNumber>$accountNumber</AccountNumber>       <MeterNumber>$meterNumber</MeterNumber>       <CarrierCode>$carrier</CarrierCode>     </RequestHeader>   <DispatchDate>2006-02-22</DispatchDate>   <LatestPickupTime>16:00:00</LatestPickupTime >   <ReadyTime>12:00:00</ReadyTime>     <Origin>       <Contact>         <PersonName>Chris Shiflett</PersonName>         <CompanyName>Wrox</CompanyName>         <PhoneNumber>6121234567</PhoneNumber>         <E-MailAddress>chriss@preinheimer.com</E-MailAddress>       </Contact>       <Address>         <Line1>37 East 14th St</Line1>         <Line2>Suite 204</Line2>         <City>New York</City>         <StateOrProvinceCode>NY</StateOrProvinceCode>         <PostalCode>10011</PostalCode>         <CountryCode>US</CountryCode>       </Address>     </Origin>     <Destination>       <Contact>         <PersonName>Paul Reinheimer</PersonName>         <CompanyName>Wrox</CompanyName>         <PhoneNumber>5191234567</PhoneNumber>         <E-MailAddress>paul@preinheimer.com</E-MailAddress>       </Contact>       <Address>         <Line1>564 Elm Street</Line1>         <Line2>Little Nook under the stairs</Line2>         <City>NowhereVille</City>         <StateOrProvinceCode>TN</StateOrProvinceCode>         <PostalCode>38017</PostalCode>         <CountryCode>US</CountryCode>       </Address>     </Destination>     <Payment>       <PayorType>RECIPIENT</PayorType>       <AccountNumber>$accountNumber</AccountNumber>     </Payment>   <RMA>     <Number>1234567</Number>   </RMA>   <CourierInstructions>Please knock loudly, bell broken</CourierInstructions>   <CustomerReference>Manuscript Return</CustomerReference>   <CurrencyCode>USD</CurrencyCode>   <Service>STANDARDOVERNIGHT</Service>   <Packaging>FEDEXBOX</Packaging>   <WeightUnits>LBS</WeightUnits>   <Weight>4</Weight>   <DeclaredValue>13</DeclaredValue>   <PackageCount>1</PackageCount> </FDXExpressTagRequest> XMLREQUEST; 

Apart from the address reversal, I've included a few new tags in this request. DispatchDate replaces ShipDate from earlier requests, indicating when FedEx should dispatch a driver to obtain the package. ReadyTime and LatestPickupTime indicate the earliest and latest times the package will be available.

The response is succinct:

 <?xml version="1.0" encoding="UTF-8" ?> <FDXExpressTagReply xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">   <ReplyHeader>    <CustomerTransactionIdentifier>Express Tag Test</CustomerTransactionIdentifier>   </ReplyHeader>   <DispatchConfirmationNumber>00001</DispatchConfirmationNumber>   <Location>HKAA</Location>   <AccessTime>02:00:00</AccessTime>   <CutoffTime>21:00:00</CutoffTime>   <DeliveryCommitmentDate>2004-10-13</DeliveryCommitmentDate>   <DeliveryCommitmentTime>15:00:00</DeliveryCommitmentTime>   <TrackingNumber>301000658338</TrackingNumber> </FDXExpressTagReply> 

Apart from the TrackingNumber (which, just like the tracking number for a regular shipment, can be used to track the package with the FDXTrackRequest call), the response includes information on when FedEx needs the package to be available for pickup. Depending on the pickup location, the times may differ from those specified in your request.




Professional Web APIs with PHP. eBay, Google, PayPal, Amazon, FedEx, Plus Web Feeds
Professional Web APIs with PHP. eBay, Google, PayPal, Amazon, FedEx, Plus Web Feeds
ISBN: 764589547
EAN: N/A
Year: 2006
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net