Overview
When a customer places an order through a merchant that uses OpenBorder for international shipping, the order is automatically processed by the OpenBorder platform. OpenBorder generates and stores the shipping label associated with the order, making it available for retrieval through the Get Label API. When the order is ready for fulfillment, the fulfillment partner can request the label from OpenBorder and use it to complete the shipping workflow. This integration method allows partners to incorporate OpenBorder labels into their existing fulfillment processes with minimal changes to their infrastructure.Workflow Example
Authentication
The Get Label API uses Bearer token authentication. A valid Bearer token must be included in theAuthorization header of every API request.
Production API credentials are provided by OpenBorder. To obtain a production Bearer token, contact your OpenBorder representative.
For testing purposes, you may use the following sandbox token:
The sandbox token can only be used against the test merchant and does not provide access to production data.
Request
The Get Label API supports two request types, depending on how the order is being fulfilled:
- If the fulfillment partner is fulfilling the entire order in a single shipment, only the
orderNumberfield is required in the request. - If the fulfillment partner is fulfilling only a subset of the items in an order, the request must include the
skusfield and the additional conditionally required fields. OpenBorder will generate a label for the specified items only. This is referred to as a split shipment. Because the order is fulfilled across multiple shipments, a separate label is generated for each shipment.
Request Examples
zpl field. When zpl is set, the label is returned in ZPL (Zebra Programming Language) format. If the zpl field is omitted, OpenBorder returns the label in the carrier’s default format, which may be either PDF or PNG depending on the carrier.
Response Examples
Upon a successful request, the API returns one or more label URLs, along with the shipment’s tracking code and tracking URL. In case of error, an error status will be returned with a brief description of the error.Possible Error States
Invalid Order Number
HTTP Status:200
Response:
This error occurs when the
orderNumber in the request payload is incorrect or does not belong to the merchant associated with the API key. OpenBorder tries to match the order in our system, but cannot resolve it, thus triggering an error.
Solution:Verify that:
- The
orderNumbermatches a valid order number in Shopify. - The merchant associated with the order is linked to the API key being used.
- The request is using the correct API key.
Invalid Request Payload
HTTP Status:400
Response:
This error occurs when an
orderNumber is not included in the request payload. This is the main field OpenBorder uses to match the applicable Shopify order, so it must be included in every request.
Solution:Verify that:
- The
orderNumberfield is included in the request payload, and is populated with a correct order number.
Testing
You can use the following sample orders to test the Get Label API in the sandbox environment:#OBTEST1094#OBTEST1111#OBTEST1115#OBTEST1159
#OBTEST1159:
