Get the Data for Creating Shipping Labels Using API2Cart

Published 27 July 2020 | Updated 27 July 2020 |

create shipping labels

Shipping labelling is a core element of order fulfillment. Incorrect or missing data on shipping labels can seriously affect the relationship with the customer and ultimately business. For you as a software provider who deals with the creation of shipping labels, correct retrieval of shipping information from your client’s online store is crucial.

But what is a simple way to gather needed information for creating shipping labels? What if your shipping solution needs to get such data from multiple eCommerce platforms?

In this article, we will talk through what info shipping label usually contains and how your shipping software can easily gather needed data from 40+ shopping cart and marketplace through only one integration.

What Is A Shipping Label And What Info It Should Contain?

Shipping Label provides key information to move your package from start destination to its end destination. It consists of things like postal code, country and state, tracking number, shipping date, package quantity and weight, address, barcodes, etc. This is the basic information that is usually displayed on shipping labels. It may differ as each carrier company has its own shipping label template.

Some shipping labels look like:

image source
  1. Shipping address “from” and “to. It also contains the name of the sender and receiver as well as postal code.
  2. Smart label - a new technology that allows to track products thought warehouses, shipping and retail stores.
  3. The first two letters indicate the state, the first three numbers represent the first three digits of the zip code, and the 9-03 indicates a region and district.
  4. Shipping service. It can be “UPS Worldwide Express”, “UPS Next Day Air”, “UPS Express Mail” or any other provided by the carrier.
  5. Tracking number - the number given to the customer to track the location of the package.
  6. Barcode that enables the logistics company to manage the shipment correctly.
  7. Billing option. On this label, "P/P" means pre-paid. It could also say "T/P" for third-party or "F/C" for freight collect.
  8. Any additional information regarding the package.

One of the methods to create shipping labels is by using shipping software. Such type of software enables to generate and print shipping labels for all orders within one solution. To perform this feature shipping software providers have to integrate with carriers, sales channels and other apps.

How to Create Shipping Labels Using API2Cart API Methods

Shipping software can easily perform integration with eCommerce platforms and gather needed data for creating shipping labels via a unified API provided by API2Cart.

API2Cart has already developed integration with over 40 popular shopping carts and marketplaces, so you will have only to establish integration with API2Cart, add your clients' stores (depending on the platform they use) and get needed store info for implementation of your functionality.

Here are some basic API methods that allow to retrieve order data for creating shipping labels:

  • order.info
  • customer.info
  • order.shipment.list

Let’s take a closer look at them.

order.info method

By executing this method you can get the details about an order such as customer’s name, id, email, billing address, shipping address, status, and other related info.

That’s the response structure of order.info method:

overflow


{
  "return_code": int,
  "return_message": string,
  "result":{
    "id": string,
    "order_id": string,
    "customer":[ array
      {
        "id": string,
        "email": string,
        "first_name": string,
        "last_name": string
      }
    ],
    "create_at": string,
    "currency":[ array
      {
        "name": string,
        "iso3": string,
        "code": deprecated,
        "symbol_left": string,
        "symbol_right": string,
        "rate": decimal
      }
    ],
    "billing_address":[ array
      {
        "id": string,
        "type": string,
        "first_name": string,
        "last_name": string,
        "postcode": string,
        "address1": string,
        "address2": string,
        "phone": string,
        "city": string,
        "country":[ array
          {
            "code2": string,
            "code3": string,
            "name": string
          }
        ],
        "state":[ array
          {
            "code": string,
            "name": string
          }
        ],
        "company": string,
        "fax": string,
        "website": string,
        "gender": string,
        "region": string,
        "default": string,
        "tax_id": string
      }
    ],
    "shipping_address":[ array
      {
        "id": string,
        "type": string,
        "first_name": string,
        "last_name": string,
        "postcode": string,
        "address1": string,
        "address2": string,
        "phone": string,
        "city": string,
        "country":[ array
          {
            "code2": string,
            "code3": string,
            "name": string
          }
        ],
        "state":[ array
          {
            "code": string,
            "name": string
          }
        ],
        "company": string,
        "fax": string,
        "website": string,
        "gender": string,
        "region": string,
        "default": string,
        "tax_id": string
      }
    ],
    "payment_method":[ array
      {
        "name": string
      }
    ],
    "shipping_method":[ array
      {
        "name": string
      }
    ],
    "status":[ array
      {
        "id": string,
        "name": string,
        "history":[ array
          {
            "history":[ array
              {
                "id": string,
                "name": string,
                "modified_time": string,
                "notify": string,
                "comment": string
              }
              ...
            ]
          }
        ],
        "refund_info":[ array
          {
            "shipping": decimal,
            "fee": decimal,
            "tax": decimal,
            "total_refunded": decimal,
            "time": string,
            "comment": string,
            "refunded_items":[ array
              {
                "items":[ array
                  {
                    "product_id": string,
                    "variant_id": string,
                    "qty": int,
                    "refund": decimal
                  },
                  ...
                ]
              }
            ]
          }
        ]
      }
    ],
    "totals":[ array
      {
        "total": decimal,
        "subtotal": decimal,
        "shipping": decimal,
        "tax": decimal,
        "discount": decimal,
        "shipping_tax_value": string
      }
    ],
    "total":[array
      {
        "subtotal_ex_tax": decimal,
        "wrapping_ex_tax": decimal,
        "shipping_ex_tax": decimal,
        "total_discount": decimal,
        "total_tax": decimal,
        "total": decimal,
        "additional_attributes": [array
          {
            "shipping_discount_ex_tax": decimal,
            "subtotal_discount_ex_tax": decimal,
            "subtotal_tax": decimal,
            "wrapping_tax": decimal,
            "shipping_tax": decimal
          }
        ]
      }
    ],
    "order_products":[ array
      {
        "product":[ array
          {
            "product_id": string,
            "order_product_id": string,
            "model": string,
            "name": string,
            "price": decimal,
            "quantity": int,
            "total_price": decimal,
            "tax_percent": decimal,
            "tax_value": decimal,
            "variant_id": string
          }
        ]
      }
    ],
    "modified_at": string,
    "finished_time": string,
    "comment": string,
    "store_id": string
  }
}

This method is now supported on more than 35 shopping platforms and marketplaces such as Magento, Shopify, eBay, Amazon and other. You can see more detailed information about order.info method on our documentation.

customer.info method

Using customer.info method you can retrieve all the customers' details such as customer name, phone, shipping address, and other important info to create shipping labels. In the response structure of this method you will see such details:

overflow


{
  "return_code": int,
  "return_message": string,
  "result":{
    "id": string,
    "email": string,
    "first_name": string,
    "last_name": string,
    "created_time": string,
    "modified_time": string,
    "group":[ array
      {
        "id": string,
        "name": string
      }
    ],
    "login": string,
    "last_login": string,
    "birth_day": string,
    "status": int,
    "news_letter_subscription": string,
    "gender": int,
    "website": string,
    "fax": string,
    "company": string,
    "phone": string,
    "ip_address": int,
    "address_book":[ array
      {
        "address":[ array
          {
            "id": int,
            "type": int,
            "first_name": int,
            "last_name": int,
            "postcode": int,
            "address1": int,
            "address2": int,
            "phone": int,
            "city": int,
            "country":[ array
              {
                "code2": int,
                "code3": int,
                "name": int
              }
            ],
            "state":[ array
              {
                "code": int,
                "name": int
              }
            ],
            "company": int,
            "fax": int,
            "website": int,
            "gender": int,
            "region": int,
            "default": int
          },
          ...
        ]
      }
    ]      
  }
}

Customer.info method is also supported on popular eCommerce platforms such as Magento, Shopify, Prestashop and 30+ other platforms. To see more supported parameters and fields of this method visit our documentation.

order.shipment.list method

This method allows to get more detailed info about shipments, order status info and tracking number.

Here is how the response structure of this method looks like:

overflow


{
  "return_code": int,
  "return_message": string,
  "result":{
    "shipment_count": int,
    "shipment":[ array
      {
        "id": string,
        "order_id": string,
        "tracking_numbers":[ array
          {
            "tracking_number": string,
            "carrier_id": string
          },
          ...
        ],
        "created_at": string,
        "items":[ array
          {
            "product":[ array
              {
                "product_id": string,
                "model": string,
                "name": string,
                "price": decimal,
                "quantity": int,
              }
            ]
          }
        ],
      }
      ...
    ]
  }
}

For now this method is supported for 15 popular eCommerce platforms such as WooCommerce, Prestashop, Squarespace, Magento and much more.

What Else Your Shipping Software Can Do Using API2Cart

API2Cart has all the needed methods for your shipping software to perform your core functions. Here is the list of the main features and methods that allow you to implement them.

Inventory Control

Accurate inventory data synchronization is vital for avoiding errors in shipping operations.

  • Product.info method - double check product availability by using product.info method, which returns items’ quantity in stock.
  • Product.update method - automatically update product quantity.

Importing Orders

Two ways to get to know new shopping orders:

First option is to set the webhooks for order.add event to get notified every time the new order is placed. Using webhooks is a much more beneficial way in comparison to polling an API, as it decreases the server load, saves API requests, and provides more up-to-date info.

Another way to track new orders is by executing order.list method once in a while to get list of products to be imported to your system. Filter orders by create time with created_from and created_to parameters.

Add Shipment Statuses

Automatically insert shipment tracking url or update tracking info into the ecommerce store by using order.shipment.tracking.add to seamlessly notify end customers.

Create shipments and add tracking numbers to orders with help of order.shipment.update and order.shipment.add methods.

Use order.update method to update order statuses.

Product Data Uploads

Manage Customer Info

Get all customers info you need via customer.info and customer.list methods.

Via a unified API provided by API2Cart you will be able to integrate and work with online store data from more than 40 eCommerce platforms including PrestaShop, Shopify, Magento, WooCommerce, OpenCart, BigCommerce, and many others. Thus, you will not need to develop separate integrations or take care to develop support for new shopping cart versions when they appear.

If you have any questions connected with shopping platform API integration for shipping software via API2Cart, contact our manager. We provide a FREE 30-days trial for you to test how our service works.