Advertisement
yefrem

Fedex API requests

Mar 26th, 2013
565
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 8.88 KB | None | 0 0
  1. <!-- Pickup Availability Request -->
  2. <?xml version="1.0" encoding="UTF-8"?>
  3. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/pickup/v3">
  4.   <SOAP-ENV:Body>
  5.     <ns1:PickupAvailabilityRequest>
  6.       <ns1:WebAuthenticationDetail>
  7.         <ns1:UserCredential>
  8.           <ns1:Key>...</ns1:Key>
  9.           <ns1:Password>...</ns1:Password>
  10.         </ns1:UserCredential>
  11.       </ns1:WebAuthenticationDetail>
  12.       <ns1:ClientDetail>
  13.         <ns1:AccountNumber>...</ns1:AccountNumber>
  14.         <ns1:MeterNumber>...</ns1:MeterNumber>
  15.       </ns1:ClientDetail>
  16.       <ns1:TransactionDetail>
  17.         <ns1:CustomerTransactionId>*** Pickup Availability Request v3 using PHP ***</ns1:CustomerTransactionId>
  18.       </ns1:TransactionDetail>
  19.       <ns1:Version>
  20.         <ns1:ServiceId>disp</ns1:ServiceId>
  21.         <ns1:Major>3</ns1:Major>
  22.         <ns1:Intermediate>0</ns1:Intermediate>
  23.         <ns1:Minor>0</ns1:Minor>
  24.       </ns1:Version>
  25.       <ns1:PickupAddress>
  26.         <ns1:StreetLines>...</ns1:StreetLines>
  27.         <ns1:City>...</ns1:City>
  28.         <ns1:StateOrProvinceCode>CA</ns1:StateOrProvinceCode>
  29.         <ns1:PostalCode>90247</ns1:PostalCode>
  30.         <ns1:CountryCode>US</ns1:CountryCode>
  31.       </ns1:PickupAddress>
  32.       <ns1:PickupRequestType>SAME_DAY</ns1:PickupRequestType>
  33.       <ns1:DispatchDate>2013-04-02</ns1:DispatchDate>
  34.       <ns1:PackageReadyTime>13:00:00</ns1:PackageReadyTime>
  35.       <ns1:CustomerCloseTime>20:00:00</ns1:CustomerCloseTime>
  36.       <ns1:Carriers>FDXG</ns1:Carriers>
  37.       <ns1:ShipmentAttributes>
  38.         <ns1:Dimensions>
  39.           <ns1:Length>150</ns1:Length>
  40.           <ns1:Width>150</ns1:Width>
  41.           <ns1:Height>150</ns1:Height>
  42.           <ns1:Units>CM</ns1:Units>
  43.         </ns1:Dimensions>
  44.         <ns1:Weight>
  45.           <ns1:Units>LB</ns1:Units>
  46.           <ns1:Value>90</ns1:Value>
  47.         </ns1:Weight>
  48.       </ns1:ShipmentAttributes>
  49.     </ns1:PickupAvailabilityRequest>
  50.   </SOAP-ENV:Body>
  51. </SOAP-ENV:Envelope>
  52.  
  53. <!-- Pickup Availability response -->
  54. <?xml version="1.0" encoding="UTF-8"?>
  55. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  56.   <env:Header xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  57.   <soapenv:Body>
  58.     <v3:PickupAvailabilityReply xmlns:v3="http://fedex.com/ws/pickup/v3">
  59.       <v3:HighestSeverity xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">SUCCESS</v3:HighestSeverity>
  60.       <v3:Notifications xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  61.         <v3:Severity>SUCCESS</v3:Severity>
  62.         <v3:Source>disp</v3:Source>
  63.         <v3:Code>0000</v3:Code>
  64.         <v3:Message>Success</v3:Message>
  65.         <v3:LocalizedMessage>Success</v3:LocalizedMessage>
  66.       </v3:Notifications>
  67.       <ns1:TransactionDetail xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/pickup/v3">
  68.         <ns1:CustomerTransactionId>*** Pickup Availability Request v3 using PHP ***</ns1:CustomerTransactionId>
  69.       </ns1:TransactionDetail>
  70.       <ns1:Version xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/pickup/v3">
  71.         <ns1:ServiceId>disp</ns1:ServiceId>
  72.         <ns1:Major>3</ns1:Major>
  73.         <ns1:Intermediate>0</ns1:Intermediate>
  74.         <ns1:Minor>0</ns1:Minor>
  75.       </ns1:Version>
  76.       <v3:RequestTimestamp xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">2013-03-26T11:58:37</v3:RequestTimestamp>
  77.       <v3:Options xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  78.         <v3:Carrier>FDXG</v3:Carrier>
  79.         <v3:ScheduleDay>SAME_DAY</v3:ScheduleDay>
  80.         <v3:Available>true</v3:Available>
  81.         <v3:PickupDate>2013-04-02</v3:PickupDate>
  82.         <v3:CutOffTime>16:00:00</v3:CutOffTime>
  83.         <v3:AccessTime>PT2H0M</v3:AccessTime>
  84.         <v3:ResidentialAvailable>true</v3:ResidentialAvailable>
  85.       </v3:Options>
  86.       <v3:Options xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  87.         <v3:Carrier>FDXG</v3:Carrier>
  88.         <v3:ScheduleDay>SAME_DAY</v3:ScheduleDay>
  89.         <v3:Available>true</v3:Available>
  90.         <v3:PickupDate>2013-04-03</v3:PickupDate>
  91.         <v3:CutOffTime>16:00:00</v3:CutOffTime>
  92.         <v3:AccessTime>PT2H0M</v3:AccessTime>
  93.         <v3:ResidentialAvailable>true</v3:ResidentialAvailable>
  94.       </v3:Options>
  95.       <v3:Options xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  96.         <v3:Carrier>FDXG</v3:Carrier>
  97.         <v3:ScheduleDay>SAME_DAY</v3:ScheduleDay>
  98.         <v3:Available>true</v3:Available>
  99.         <v3:PickupDate>2013-04-04</v3:PickupDate>
  100.         <v3:CutOffTime>16:00:00</v3:CutOffTime>
  101.         <v3:AccessTime>PT2H0M</v3:AccessTime>
  102.         <v3:ResidentialAvailable>true</v3:ResidentialAvailable>
  103.       </v3:Options>
  104.     </v3:PickupAvailabilityReply>
  105.   </soapenv:Body>
  106. </soapenv:Envelope>
  107.  
  108. <!-- Pickup Request -->
  109. <?xml version="1.0" encoding="UTF-8"?>
  110. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/pickup/v3">
  111.   <SOAP-ENV:Body>
  112.     <ns1:CreatePickupRequest>
  113.       <ns1:WebAuthenticationDetail>
  114.         <ns1:UserCredential>
  115.           <ns1:Key>...</ns1:Key>
  116.           <ns1:Password>...</ns1:Password>
  117.         </ns1:UserCredential>
  118.       </ns1:WebAuthenticationDetail>
  119.       <ns1:ClientDetail>
  120.         <ns1:AccountNumber>...</ns1:AccountNumber>
  121.         <ns1:MeterNumber>...</ns1:MeterNumber>
  122.       </ns1:ClientDetail>
  123.       <ns1:TransactionDetail>
  124.         <ns1:CustomerTransactionId>*** Create Pickup Request v3 using PHP ***</ns1:CustomerTransactionId>
  125.       </ns1:TransactionDetail>
  126.       <ns1:Version>
  127.         <ns1:ServiceId>disp</ns1:ServiceId>
  128.         <ns1:Major>3</ns1:Major>
  129.         <ns1:Intermediate>0</ns1:Intermediate>
  130.         <ns1:Minor>0</ns1:Minor>
  131.       </ns1:Version>
  132.       <ns1:OriginDetail>
  133.         <ns1:UseAccountAddress>true</ns1:UseAccountAddress>
  134.         <ns1:PickupLocation>
  135.           <ns1:Contact>
  136.             <ns1:PersonName>...</ns1:PersonName>
  137.             <ns1:CompanyName>...</ns1:CompanyName>
  138.             <ns1:PhoneNumber>...</ns1:PhoneNumber>
  139.           </ns1:Contact>
  140.           <ns1:Address>
  141.             <ns1:StreetLines>...</ns1:StreetLines>
  142.             <ns1:City>...</ns1:City>
  143.             <ns1:StateOrProvinceCode>CA</ns1:StateOrProvinceCode>
  144.             <ns1:PostalCode>90247</ns1:PostalCode>
  145.             <ns1:CountryCode>US</ns1:CountryCode>
  146.           </ns1:Address>
  147.         </ns1:PickupLocation>
  148.         <ns1:PackageLocation>FRONT</ns1:PackageLocation>
  149.         <ns1:BuildingPartDescription>3B</ns1:BuildingPartDescription>
  150.         <ns1:ReadyTimestamp>2013-04-02T13:00:00</ns1:ReadyTimestamp>
  151.         <ns1:CompanyCloseTime>20:00:00</ns1:CompanyCloseTime>
  152.       </ns1:OriginDetail>
  153.       <ns1:PackageCount>2</ns1:PackageCount>
  154.       <ns1:TotalWeight>
  155.         <ns1:Units>LB</ns1:Units>
  156.         <ns1:Value>90</ns1:Value>
  157.       </ns1:TotalWeight>
  158.       <ns1:CarrierCode>FDXG</ns1:CarrierCode>
  159.     </ns1:CreatePickupRequest>
  160.   </SOAP-ENV:Body>
  161. </SOAP-ENV:Envelope>
  162.  
  163. <!-- Pickup Response -->
  164. <?xml version="1.0" encoding="UTF-8"?>
  165. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  166.   <env:Header xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
  167.   <soapenv:Body>
  168.     <v3:CreatePickupReply xmlns:v3="http://fedex.com/ws/pickup/v3">
  169.       <v3:HighestSeverity xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">ERROR</v3:HighestSeverity>
  170.       <v3:Notifications xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  171.         <v3:Severity>ERROR</v3:Severity>
  172.         <v3:Source>disp</v3:Source>
  173.         <v3:Code>5044</v3:Code>
  174.         <v3:Message>Ready Time after Cutoff Time</v3:Message>
  175.         <v3:LocalizedMessage>Ready Time after Cutoff Time</v3:LocalizedMessage>
  176.       </v3:Notifications>
  177.       <ns1:TransactionDetail xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/pickup/v3">
  178.         <ns1:CustomerTransactionId>*** Create Pickup Request v3 using PHP ***</ns1:CustomerTransactionId>
  179.       </ns1:TransactionDetail>
  180.       <ns1:Version xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://fedex.com/ws/pickup/v3">
  181.         <ns1:ServiceId>disp</ns1:ServiceId>
  182.         <ns1:Major>3</ns1:Major>
  183.         <ns1:Intermediate>0</ns1:Intermediate>
  184.         <ns1:Minor>0</ns1:Minor>
  185.       </ns1:Version>
  186.     </v3:CreatePickupReply>
  187.   </soapenv:Body>
  188. </soapenv:Envelope>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement