Shippo Connector
  • 17 Sep 2022
  • 3 Minutes to read
  • Contributors

Shippo Connector


Article Summary

Integration with Shippo's API

Introduction

Shippo is a multi-carrier shipping API and web-app that includes carriers like USPS, DHL, FedEx amongst many others. Customers can get shipping rates, print labels, automate international documents, track shipments, and facilitate returns.

Purpose

This integration highlights how one can leverage Tulip's HTTP connector functions to integrate with Shippo's API to automate creating shipments, getting a variety of rates from a range of carriers, choosing the best rate & finally creating & printing a shipment label along with the option to track the shipments. All of this can be done from your Tulip Application. Depending on different use cases, integration with Tulip can be leveraged to have control over one's supply-chain operation & have real-time visibility in shipping out packages.

API Doc

Shippo API Documentation

Pre-Requisites

Create an account on Shippo's website & generate API Tokens that would be used as Authorization headers in all the calls made to Shippo's API. Shippo lets you generate a Test & a Live Token. Test token could be leveraged to make test HTTP calls with the API & design your Tulip application, once the app is ready, tokens can be switched & the apps can be deployed in production to generate shipment labels, transactions in real-time.

Tulip Connection Details

Tulip's HTTP connector needs to be configured with the following details in order to establish a connection with Shippo.

  1. Running On: Cloud Connector Host
  2. Host : api.goshippo.com
  3. Port:443
  4. TLS:Yes
  5. Shippo Tokens as Authorization Header can be passed via Connector Function

Connector Function

Create Shipment

Purpose

  1. This connector function creates a new shipment by doing a POST call to Shippo's API with sender details, receiver details & the package details being part of the Request Body.
  2. On successful creation, Shippo returns a JSON object which includes the status of the shipment created along with a choice of rates from different vendors that users can leverage to move forward with & initiate a transaction. Users can select the right rate, have the rate IDs stored in Tulip variables which would be dynamically passed to create the transaction to generate the Shipment label in the corresponding connector function.

Endpoint

  1. HTTP POST call to the endpoint: https://api.goshippo.com:443/shipments/

Authorization Header

In-order to Authenticate with Shippo's API, Shippo's HTTP Token needs to be passed into the request header. Following is the format

Authorization : ShippoToken ()

Required Input

The following are the Input parameters that are passed in the Request Body where JSON is the content type.

  1. Senders Name, Street, City, State, Zip Code, Country.
  2. Receivers Name, Street, City, State, Zip Code, Country
  3. Package's Dimensions - Length, Breadth, Width & Weight

Required Output Extractor

A lot of information is returned for the Shipment object created, however, the important fields to be extracted are mentioned below

  1. Status: Indicates if the Shipment is created successfully
  2. Shipment ID: Can be referenced to get the details of the Shipment created.
  3. Rate Options: Array of objects indicating different options of the rate provided by different vendors. Rate ID is the important key amongst others to be extracted which would be passed to create the actual transaction for this shipment.

Create Transaction

Purpose

  1. This connector function creates the transaction after choosing the vendor & the final rate from the different options that were returned on creating a new shipment in the previous connector function.
  2. A successful transaction is established by doing a POST HTTP call to Shippo's endpoint by passing the ID associated with the rate decided. On a successful call, Shippo returns a JSON object which includes the Status of the transaction, Tracking ID, Shipping Label & the tracking URL amongst other information. The Shipping label returned could directly be printed from the Tulip App itself.

Endpoint

  1. HTTP POST call to the endpoint: https://api.goshippo.com:443/transactions/

Authorization Header

In-order to Authenticate with Shippo's API, Shippo's HTTP Token needs to be passed into the request header. Following is the format

Authorization : ShippoToken ()

Required Input

The following are the Input parameters that are passed in the Request Body where JSON is the content type.

  1. Rate ID: Passing the ID of the rate chosen to move forward with in order to create a successful transaction.

Required Output Extractor

A lot of information is returned for the Shipment object created, however, the important fields to be extracted are mentioned below

  1. Status: Indicates if the transaction is created successfully
  2. Transaction ID: Can be referenced to get the details of the transaction executed.
  3. Tracking Number: To track the shipment
  4. Tracking URL: The chosen vendor's tracking page URL
  5. Label URL: Shipping Label which could be embedded within the Tulip Application for printing

Was this article helpful?