Fedex PHP soap api with multiple service types?

2019-04-30 05:39发布

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?

1条回答
相关推荐>>
2楼-- · 2019-04-30 05:54

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.

查看更多
登录 后发表回答