Title: fetchRates
Last modified: August 14, 2023

---

# fetchRates

 *  [stone1dev](https://wordpress.org/support/users/stone1dev/)
 * (@stone1dev)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/fetchrates/)
 *     ```wp-block-code
       I have two requests
       1.
       '{"from":{"company":"Test Supplies","address1":"Test street ","city":"Test city","state":"ON","country":"CA","zip":"XXXXXX"},"to":{"company":null,"address1":"1437 C\u00f4te Joyeuse","city":"St Apollinaire","state":"QC","country":"CA","zip":"XXXXX"},"currency":"CAD","unit":"METRIC","expectedShipDate":"XXXXXX","packageType":"PACKAGE","storeIdentifier":"example.info","packages":[{"shopifyProductId":8591,"shopifyVariantId":0,"weight":0,"quantity":1},{"shopifyProductId":8561,"shopifyVariantId":0,"weight":0,"quantity":49}]}'
   
       2.
       '{"from":{"company":"Test Supplies","address1":"Test street ","city":"Test city","state":"ON","country":"CA","zip":"XXXXXX"},"to":{"company":null,"address1":"1437 C\u00f4te Joyeuse","city":"St Apollinaire","state":"QC","country":"CA","zip":"XXXXX"},"currency":"CAD","unit":"METRIC","expectedShipDate":"XXXXXX","packageType":"PACKAGE","storeIdentifier":"example.info","packages":[{"shopifyProductId":8591,"shopifyVariantId":0,"weight":0,"quantity":1},{"shopifyProductId":8561,"shopifyVariantId":0,"weight":0,"quantity":50}]}'
   
       the only difference between them is the quantity of the product.
   
       At the first request it returns rates, but at the second nothing
   
       1. 
   
       array (
       'response' =>
       (object) array(
       'data' =>
       (object) array(
       'rates' =>
       array (
       0 =>
       (object) array(
       'serviceName' => 'Standard',
       'carrierName' => 'UPS',
       'serviceCode' => '604',
       'totalCharge' => 85.43,
       'estTransitDays' => '2',
       'description' => 'Rate details',
       'currency' => 'CAD',
       ),
       1 =>
       (object) array(
       'serviceName' => 'Ground',
       'carrierName' => 'Canpar',
       'serviceCode' => '4500',
       'totalCharge' => 184.31,
       'estTransitDays' => '1',
       'description' => 'Rate details',
       'currency' => 'CAD',
       ),
       2 =>
       (object) array(
       'serviceName' => 'Expedited',
       'carrierName' => 'UPS',
       'serviceCode' => '601',
       'totalCharge' => 1018.01,
       'estTransitDays' => '2',
       'description' => 'Rate details',
       'currency' => 'CAD',
       ),
       3 =>
       (object) array(
       'serviceName' => 'UPS Saver',
       'carrierName' => 'UPS',
       'serviceCode' => '607',
       'totalCharge' => 1203.01,
       'estTransitDays' => '2',
       'description' => 'Rate details',
       'currency' => 'CAD',
       ),
       4 =>
       (object) array(
       'serviceName' => 'Express',
       'carrierName' => 'UPS',
       'serviceCode' => '600',
       'totalCharge' => 1585.15,
       'estTransitDays' => '2',
       'description' => 'Rate details',
       'currency' => 'CAD',
       ),
       ),
       ),
       'message' => 'Rates fetched successfully',
       'success' => true,
       ),
       'httpResponseCode' => 200,
       )
   
       2.
   
       array (
         'response' => 
         (object) array(
            'data' => 
           (object) array(
              'rates' => 
             array (
             ),
           ),
            'message' => 'Rates fetched successfully',
            'success' => true,
         ),
         'httpResponseCode' => 200,
       )
   
       what could be the matter?
       ```
   

The topic ‘fetchRates’ is closed to new replies.

 * ![](https://ps.w.org/eshipper-commerce/assets/icon-256x256.png?rev=2896604)
 * [eShipper Commerce](https://wordpress.org/plugins/eshipper-commerce/)
 * [Support Threads](https://wordpress.org/support/plugin/eshipper-commerce/)
 * [Active Topics](https://wordpress.org/support/plugin/eshipper-commerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/eshipper-commerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/eshipper-commerce/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [stone1dev](https://wordpress.org/support/users/stone1dev/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/fetchrates/)
 * Status: not resolved