Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fedex PHP soap api with multiple service types?

i am using fedex soap api for retrieving shipping rates, but in ServiceType i am able to send only one type i.e. PRIORITY_OVERNIGHT, how can i send multiple Services in one request like GROUND_HOME_DELIVERY, INTERNATIONAL_ECONOMY, PRIORITY_OVERNIGHT,STANDARD_OVERNIGHT?

like image 276
Vinod Puliyadi Avatar asked Jul 19 '12 14:07

Vinod Puliyadi


1 Answers

You can omit the $request['RequestedShipment']['ServiceType'] from the request and FedEx will return all available shipping methods. You'll then need to loop through the $response->RateReplyDetails array to extract each shipping method.

Keep in mind that the package type i.e. $request['RequestedShipment']['PackagingType'] will limit the shipping methods returned. The value YOUR_PACKAGING should return all of the methods, while others such as FEDEX_BOX only returns overnight and 2 day options (at least for me). However this may sometimes affect the price too.

like image 120
andyg5000 Avatar answered Sep 29 '22 23:09

andyg5000