CanadaPost API has Changed

  • Posts: 39
  • Thank you received: 3
7 years 7 months ago #267537

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6.17

Hi,
We just opened account with Canadapost and learned that they are in the process of changing their APIs. Here is the extract from their email:

The Sell Online program will be decommissioned in the near future, and as such we are no longer creating new accounts.

The Web Developer program has been developed to replace and enhance the offerings of Sell Online.

Not only will your customers be able to choose the speed and cost of delivery, but our APIs will simplify the entire purchase process for both you and your online shoppers. With web services, you can:

- Automate the printing of shipping labels
- Let customers track purchases directly from your website
- Allow shoppers to print return labels from your site
- Give shoppers the option to have purchases delivered to the Post Office of their choice- near home, the office or the cottage


As the result of this change Canada Post plug-in does not work anymore. I am getting Error code: -2001. Message: Merchant CPC Id not found on server. This error has been reported here by others, but nobody explained the reason. Instead of Merchant ID, plugin needs to supply
- API username
- API password
- Customer Number
- User agreement number.

This brings me to my questions: Is Hickashop development team aware about these changes? Are you planning to update Canadapost plugin? If so, what is the ETA?

Thanks.

Last edit: 7 years 7 months ago by lmcbmai.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
7 years 7 months ago #267620

Hello,

As the result of this change Canada Post plug-in does not work anymore. I am getting Error code: -2001. Message: Merchant CPC Id not found on server. This error has been reported here by others, but nobody explained the reason. Instead of Merchant ID, plugin needs to supply
- API username
- API password
- Customer Number
- User agreement number.


It's actually working with our accounts.

This brings me to my questions: Is Hickashop development team aware about these changes? Are you planning to update Canadapost plugin? If so, what is the ETA?

No, we were not aware about the fact that canada post is no longer creating new accounts for that API, but I just added on our TODO list the integration with their new API.

Best regards,
Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 3
7 years 7 months ago #267640

Thanks Mohamed! Everything still works as before for already existing accounts, but all newly created ones are affected.
CanadaPost offers SOAP and REST interfaces, which appear to be pretty well documented on CanadaPost web site. I was able to successfully run rates.wsdl from soapUI tool and got back correct response shown below. Should you need any assistance in obtaining information about new APIs, or if you need testers, I am ready to help.

<soapenv:Envelope xmlns:tns="http://www.canadapost.ca/ws/soap/ship/rate/v3" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <tns:get-rates-response>
         <price-quotes>
            <price-quote>
               <service-code>DOM.EP</service-code>
               <service-name>Expedited Parcel</service-name>
               <price-details>
                  <base>12.63</base>
                  <taxes>
                     <gst percent="5.000">0.68</gst>
                     <pst percent="9.975">1.35</pst>
                     <hst>0.00</hst>
                  </taxes>
                  <due>15.61</due>
                  <options>
                     <option>
                        <option-code>DC</option-code>
                        <option-name>Delivery confirmation</option-name>
                        <option-price>0</option-price>
                     </option>
                  </options>
                  <adjustments>
                     <adjustment>
                        <adjustment-code>FUELSC</adjustment-code>
                        <adjustment-name>Fuel surcharge</adjustment-name>
                        <adjustment-cost>0.95</adjustment-cost>
                        <qualifier>
                           <percent>7.5</percent>
                        </qualifier>
                     </adjustment>
                  </adjustments>
               </price-details>
               <weight-details/>
               <service-standard>
                  <am-delivery>false</am-delivery>
                  <guaranteed-delivery>true</guaranteed-delivery>
                  <expected-transit-time>2</expected-transit-time>
                  <expected-delivery-date>2017-04-20</expected-delivery-date>
               </service-standard>
            </price-quote>
            <price-quote>
               <service-code>DOM.PC</service-code>
               <service-name>Priority</service-name>
               <price-details>
                  <base>28.50</base>
                  <taxes>
                     <gst percent="5.000">1.53</gst>
                     <pst percent="9.975">3.06</pst>
                     <hst>0.00</hst>
                  </taxes>
                  <due>35.23</due>
                  <options>
                     <option>
                        <option-code>DC</option-code>
                        <option-name>Delivery confirmation</option-name>
                        <option-price>0</option-price>
                     </option>
                  </options>
                  <adjustments>
                     <adjustment>
                        <adjustment-code>FUELSC</adjustment-code>
                        <adjustment-name>Fuel surcharge</adjustment-name>
                        <adjustment-cost>2.14</adjustment-cost>
                        <qualifier>
                           <percent>7.5</percent>
                        </qualifier>
                     </adjustment>
                  </adjustments>
               </price-details>
               <weight-details/>
               <service-standard>
                  <am-delivery>false</am-delivery>
                  <guaranteed-delivery>true</guaranteed-delivery>
                  <expected-transit-time>1</expected-transit-time>
                  <expected-delivery-date>2017-04-19</expected-delivery-date>
               </service-standard>
            </price-quote>
            <price-quote>
               <service-code>DOM.RP</service-code>
               <service-name>Regular Parcel</service-name>
               <price-details>
                  <base>12.63</base>
                  <taxes>
                     <gst percent="5.000">0.68</gst>
                     <pst percent="9.975">1.35</pst>
                     <hst>0.00</hst>
                  </taxes>
                  <due>15.61</due>
                  <options>
                     <option>
                        <option-code>DC</option-code>
                        <option-name>Delivery confirmation</option-name>
                        <option-price>0</option-price>
                        <qualifier>
                           <included>true</included>
                        </qualifier>
                     </option>
                  </options>
                  <adjustments>
                     <adjustment>
                        <adjustment-code>FUELSC</adjustment-code>
                        <adjustment-name>Fuel surcharge</adjustment-name>
                        <adjustment-cost>0.95</adjustment-cost>
                        <qualifier>
                           <percent>7.5</percent>
                        </qualifier>
                     </adjustment>
                  </adjustments>
               </price-details>
               <weight-details/>
               <service-standard>
                  <am-delivery>false</am-delivery>
                  <guaranteed-delivery>false</guaranteed-delivery>
                  <expected-transit-time>3</expected-transit-time>
                  <expected-delivery-date>2017-04-21</expected-delivery-date>
               </service-standard>
            </price-quote>
            <price-quote>
               <service-code>DOM.XP</service-code>
               <service-name>Xpresspost</service-name>
               <price-details>
                  <base>16.09</base>
                  <taxes>
                     <gst percent="5.000">0.87</gst>
                     <pst percent="9.975">1.73</pst>
                     <hst>0.00</hst>
                  </taxes>
                  <due>19.90</due>
                  <options>
                     <option>
                        <option-code>DC</option-code>
                        <option-name>Delivery confirmation</option-name>
                        <option-price>0</option-price>
                     </option>
                  </options>
                  <adjustments>
                     <adjustment>
                        <adjustment-code>FUELSC</adjustment-code>
                        <adjustment-name>Fuel surcharge</adjustment-name>
                        <adjustment-cost>1.21</adjustment-cost>
                        <qualifier>
                           <percent>7.5</percent>
                        </qualifier>
                     </adjustment>
                  </adjustments>
               </price-details>
               <weight-details/>
               <service-standard>
                  <am-delivery>false</am-delivery>
                  <guaranteed-delivery>true</guaranteed-delivery>
                  <expected-transit-time>1</expected-transit-time>
                  <expected-delivery-date>2017-04-19</expected-delivery-date>
               </service-standard>
            </price-quote>
         </price-quotes>
      </tns:get-rates-response>
   </soapenv:Body>
</soapenv:Envelope>

Thanks.
B.G.

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 3
7 years 7 months ago #267643
Last edit: 7 years 7 months ago by lmcbmai.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 7 months ago #267646

Hello,

Thanks for the links ; we already had them when we created the task in the TODO list.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 3
7 years 7 months ago #267980

Hi Jerome,

Could you please tell roughly when updated Canadapost plugin may be ready? Are we talking about few weeks, or few months? I just need to plan my project accordingly and make sure my client has right expectations on Canadapost availability.

Thanks.
Best regards,
B.G.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 7 months ago #267986

Hello,

Well, my current goal is to release a first version of the plugin with the "rates" feature.
The idea it to have something available in weeks than months.
Afterwards, thanks to the Canada Post API now available, to implement more advanced features like the generation of the tracking codes.
Right now, I think that the plugin would be a paid plugin which could have his own circle of life thanks to the users feedback and wishes.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 3
7 years 6 months ago #268088

Would be nice to keep "basic" plugin free and include all the advanced features into the paid version. I hope that is what you meant.

Thanks.
Best regards,
B.G.

Last edit: 7 years 6 months ago by lmcbmai.

Please Log in or Create an account to join the conversation.

  • Posts: 39
  • Thank you received: 3
7 years 6 months ago #268420

My client did not want to wait for "weeks" and I ended up rewriting Canadapost plugin myself. It just retrieves rates, but that's fine. Also added caching as in UPS plugin, otherwise it was sending out 4 identical API calls instead of one. Attached image shows the result of my efforts.

Attachments:
Last edit: 7 years 6 months ago by lmcbmai.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 6 months ago #268421

Thanks for the heads up


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum