background image

Our Work

API Integration




Shipping can post a major challenge for e-commerce vendors. This piece details how Warp integrated WooCommerce with NZ Post to streamline operations

API Integration

The Assignment

The client contacted Warp to improve their e-commerce website's checkout process by integrating with NZ Post's digital services.

Specifically, they wanted to build on the presentation of shipping options based on customer destination and cart contents.






What is an API and how does it work?


An API (Application Programming Interface) enables two applications to communicate. In this integration, the e-commerce website connects with NZ Post’s systems.

NZ Post offers several APIs; however, for this article, we will be looking into two APIs: the Shipping Options API, which lists shipping choices based on package details, and the Address Check API, which verifies that shipping addresses are correct.





Leveraging APIs to improve the checkout experience


While these API services can greatly enhance an ecommerce website, leveraging them may not always prove straightforward. This is where our expertise comes in.

The client had recently switched to NZ Post as their delivery provider and approached Warp with the intention of further integrating NZ Post’s digital services.

Their goal was to improve the checkout process on their site. More specifically, they wanted to present customers with shipping options at the checkout stage based on their destination and the contents of their cart.

This was implemented as a WordPress plugin for their existing WooCommerce website. Below are a few key components of this integration



API Integration


Key Component 1: Address auto-completion


To ensure that the address sent to the Shipping Options API was correct, an address autocompletion module was implemented. As a user begins typing their address, a list of the closest matches is retrieved using the Address Check API and presented in a dropdown list.

Upon selecting an option, additional address details such as the suburb, region, and postcode are also retrieved. Once the address is confirmed, it, along with the estimated package dimensions, is sent to the Shipping Options API. Depending on the region and whether the address is rural, the appropriate shipping options are determined and presented to the user.

By leveraging NZ Post's database, we were able to make the checkout process more seamless and reduce the rate of address entry errors by customers.



API Integration


Key Component 2: Automatic parcel size estimation


NZ Post offers several different parcel sizes, each at varying costs. A key requirement from the client was that only the most suitable parcel size and price should be displayed to the customer.

During the implementation of the Shipping Options API, we faced a limitation where the API only permitted queries for total package dimensions (i.e., total height, length, and width).

To address this, we developed a system to estimate the best-fit parcel based on the items in the user’s cart. This involved creating a 'virtual parcel' from the cart items. The dimensions of this 'virtual parcel' were then sent to the Shipping Options API, which returned the most appropriate shipping option. As these options are sourced directly from NZ Post, the rates provided are guaranteed to be current and accurate.























Why choose
Warp Speed Computers?


Why choose Warp Speed Computers?

Comprehensive Expertise Under One Roof

With Warp, clients benefit from the convenience of accessing a diverse range of expertise all from a single source.

From software development to IT consulting and beyond, our team offers a multitude of skills to meet various business needs.

Why choose Warp Speed Computers?

Tailored Solutions for Every Challenge

At Warp, we understand that each client and their challengers are unique.

That's why we pride ourselves on delivering customer solutions designed specifically to address the individual needs and goals of our clients, ensuring optimal results every time.

Why choose Warp Speed Computers?

Dedicated Service and Ongoing Support

We are committed to prividing exceptional service from the initial consultation through to ongoing support.

With a service-oriented approach, we prioritize client satisfaction and offer continuous support to ensure their success in the long run.

Ready to Start?


Take the next step forward by clicking below to schedule a consultation or view more about how we can assist with your business' growth.



Contact Us View More of our work