Create a Label

Before you begin

  • Sign up for a ShipCaddie account if you haven’t already
  • Obtain an access token
  • Obtain a Carrier Client Contract ID
  • To make an API call you have a few options
    – You can use our API reference docs to make a live call or download our SDK’s for your preferred language.
    – Alternatively, you can use a third party tool such as Postman or Curl if these tools are your preference.

Creating a shipping label requires the following steps:

  1. Prepare your request
  2. Send the request
  3. Obtain the label

Step 1: Preparing your request

API Endpoint

To create a label, simply send an HTTP POST request to: https://api.shipcaddie.com/api/v2.1/getshippinglabels. For simplicity, we refer to this as /v2.1/getshippinglabels

Authentication

All ShipCaddie API endpoints will require authentication through an Access Token. This is how we know who is making the call. If you don’t have an Access Token refer to our guide: How to Obtain an Access Token. Include your Access Token in the start of your request body.

Requested Body

The body of your HTTP request is where you’ll enter all of your details about the shipping label that you want to create, such as “from” and “to” addresses, and information pertaining to the package such as weight and dimensions.

ParameterValue
accessToken YTcWPmtxXW6ENMvnbxxp…
carrierClientContractId1234
carrierServiceLevelId1115 
Ship from addressShipCaddie 
2600 Executive Pkwy, #160 
Lehi, UT 84043 
844-381-7447 
Ship to address Jane Doe 
2605 Executive Pkwy, #160 
Lehi, UT 84043 
Package weight0.4 lbs 
Package dimensions5 x 4 x 12 inches 
Requested Body Example

Below is an example of what our create label request body will look like with all of the information listed above: 


{ 
  "accessToken": "YTcWPmtxXW6ENMvnbxxp…", 
  "shipment": { 
    }, 
    "carrierClientContractId": 1234, 
    "carrierServiceLevelId": 1115, 
    "addressFrom": { 
      "companyName": "ShipCaddie", 
      "address1": "2600 Executive Pkwy", 
      "address2": "#160", 
      "city": "Lehi", 
      "stateOrProvince": "UT", 
      "postalCode": "84043", 
      "countryCode": "US", 
      "phoneNumber": "(844)381-7447" 
    }, 
    "addressTo": { 
      "attentionOf": "Jane Doe", 
      "address1": "2605 Executive Pkwy", 
      "address2": "#160", 
      "city": "Lehi", 
      "stateOrProvince": "UT", 
      "postalCode": "84043", 
      "countryCode": "US" 
    }, 
    "parcels": [ 
      { 
        "weightInPounds": 0.4, 
        "lengthInInches": 5, 
        "widthInInches": 4, 
        "heightInInches": 12 
        } 
    ] 
} 

If your request was successful, you’ll receive an HTTP 200 response that looks similar to this: 

Step 2: Sending the request

Now let’s put all the information from Step 1 together using your preferred method mentioned at the start of this guide. The example below includes all the information previously mentioned in Step 1: 

Next you have a few options. Using our API Reference Docs  you can fill in the information above into the “Explorer” tab located in the middle pane, or for Curl and other language method examples select the language option within our reference docs. 

Alternatively you can paste the following json example into a third party tool such as Postman. 

{ 
  "accessToken": "YTcWPmtxXW6ENMvnbxxp…", 
  "shipment": { 
    }, 
    "carrierClientContractId": 1234, 
    "carrierServiceLevelId": 1115, 
    "addressFrom": { 
      "companyName": "ShipCaddie", 
      "address1": "2600 Executive Pkwy", 
      "address2": "#160", 
      "city": "Lehi", 
      "stateOrProvince": "UT", 
      "postalCode": "84043", 
      "countryCode": "US", 
      "phoneNumber": "(844)381-7447" 
    }, 
    "addressTo": { 
      "attentionOf": "Jane Doe", 
      "address1": "2605 Executive Pkwy", 
      "address2": "#160", 
      "city": "Lehi", 
      "stateOrProvince": "UT", 
      "postalCode": "84043", 
      "countryCode": "US" 
    }, 
    "parcels": [ 
      { 
        "weightInPounds": 0.4, 
        "lengthInInches": 5, 
        "widthInInches": 4, 
        "heightInInches": 12 
        } 
    ] 
} 

If your request was successful, you’ll receive an HTTP 200 response that looks similar to this: 

{ 
    "labels": [ 
        { 
            "parcelIndex": 1, 
            "printFormat": 1, 
            "base64Label": "iVBORw0KGg...", 
            "labelKey": "12380356_12381171_shp_a43a4a16c8a14a0aadb830f8beb3006c", 
            "trackingNumber": "9405500895239064615632", 
            "labelURL": "https://idrivelogs.blob.core.windows.net/label/12380356_12381171_shp_a43a4a16c8a14a0aadb830f8beb3006c.png" 
        } 
    ], 
    "shipmentID": 12380356, 
    "carrier": "USPS", 
    "serviceLevel": "Priority Mail", 
    "totalAmount": 7.16, 
    "error": { 
        "details": [], 
        "hasError": false 
    } 
} 

ShipCaddies responses include the following information: 

  • Label cost 
  • A link to download the label 
  • A base 64 string 
  • Carrier 
  • Service level 
  • Print Format 
  • Tracking number 

Step 3: Obtain your label

Now that you’ve completed Step 2, you’ll receive an HTTP response that includes all the label details. Among these details are some URLs to download the label in various formats.

ShipCaddie has a total of 15 different print format options that are available through our API, simply specify your requested format in your API body request with the parameter “printFormat” . These URLs are just like any other URLs, in that you can paste them into a browser to download the file.. 

Congratulations! You’ve now created your first ShipCaddie label! Check out our Full Reference API Documentation. 

Powered by BetterDocs

Leave A Comment

Go to Top