Concepts and Terminology
Throughout this guide we will be using a number of terms that may not be familiar to you. We have provided a glossary of terms to help you understand the concepts and terminology used in this guide.Address Validation
Address validation is necessary to ensure items will be processed correctly by the carrier and not rejected, returned to sender, or cause excess postage fees upon delivery. It is important to validate both the origin and destination addressed. The typical place for this to be done for optimal user experience for the merchants is to create their mailing address in a shipping administration section of the platform. Similarly for the buyers, it is best to validate addresses when they are filling out their shipping address. Otherwise, the merchant could experience a scenario where they attempt to print a label for an order, and the address validation fails at that point, preventing a label from being generated. This causes inefficiencies in the merchant workflow and can be easily avoided by validating the addresses well ahead of time.Rate Shopping
A partner can offer sellers an advantage in the market by providing more accurate shipping rates at the time of checkout. Once an order has been created, merchants are going to want to choose a shipping service and carrier that meets their requirements for speed and cost. Rate shopping is the act of calling the Shippo /shipments endpoint and examining the object in the returned rates array. Each of these objects represents a unique carrier and service level combination and allows the merchant to select which of these options is optimal for an individual order. Once a rate has been selected that rate can be purchased using the /transactions endpoint.Label Purchase
Once a merchant has made a decision on a rate, the next logical step is to print the label. The label is created by passing the rate’s object_id to the /transactions endpoint. A label URL will be returned in the transaction response which can be surfaced to the merchant for download. An important thing to consider here is allowing your merchants full access to the available label formats. These are described in the API reference below for the /transactions endpoint, but partners will need a place for the user to configure their shipping settings. Since label purchase is a call from the partner’s platform to Shippo, and (usually) from Shippo to the chosen carrier who creates the label, there is a negligible latency in the creation of labels. As such, partners should consider using theasync:true flag in the POST request to /transactions wherever possible to prevent a block in the workflow. An asynchronous request is acknowledged immediately by Shippo and the transaction_created webhook is triggered once the label has been generated by the carrier and passed to Shippo.