---
title: "Create a label"
url: "https://docs.unified.to/shipping/label/Create_a_label"
description: "API reference for Create a label. Launch multiple pre-built Label integrations today with zero maintenance — all through a single API."
generated_at: "2026-05-29T17:54:06.915Z"
---
# Create a label

 POST/shipping/{connection\_id}/label

## Parameters

**fields**string array 

id

created\_at

updated\_at

shipment\_id

tracking\_number

label\_url

label\_format

status

is\_voided

label\_cost

label\_cost\_currency

rate\_id

service\_code

raw

Fields to return

**raw**string 

Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar

**connection\_id**string  required 

ID of the connection

## Payload

**id**string 

Unique identifier for this label object

**created\_at**date 

The date that this label object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**updated\_at**date 

The last date that this label object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**shipment\_id**string 

Reference to the shipment

**tracking\_number**string 

Tracking number for the shipment

**label\_url**string 

URL to download the label

**label\_format** enum

Valid values:

 "PDF" 

 "PNG" 

 "ZPL" 

 "EPL2" 

 "PDF\_4X6" 

Format of the label (PDF, PNG, ZPL, EPL2)

**status** enum

Valid values:

 "PENDING" 

 "PROCESSING" 

 "IN\_TRANSIT" 

 "DELIVERED" 

 "EXCEPTION" 

Status of the label

**is\_voided**boolean 

Whether label has been voided

**label\_cost**number 

Cost to purchase label

**label\_cost\_currency**string 

**rate\_id**string 

Rate used for this label; points to ShippingRate

**service\_code**string 

Service code used

**raw**any 

The raw data returned by the integration for this label

## Returns

[ShippingLabel](/shipping/label/model)

**id**string 

Unique identifier for this label object

**created\_at**date 

The date that this label object was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**updated\_at**date 

The last date that this label object was updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)

**shipment\_id**string 

Reference to the shipment

**tracking\_number**string 

Tracking number for the shipment

**label\_url**string 

URL to download the label

**label\_format** enum

Valid values:

 "PDF" 

 "PNG" 

 "ZPL" 

 "EPL2" 

 "PDF\_4X6" 

Format of the label (PDF, PNG, ZPL, EPL2)

**status** enum

Valid values:

 "PENDING" 

 "PROCESSING" 

 "IN\_TRANSIT" 

 "DELIVERED" 

 "EXCEPTION" 

Status of the label

**is\_voided**boolean 

Whether label has been voided

**label\_cost**number 

Cost to purchase label

**label\_cost\_currency**string 

**rate\_id**string 

Rate used for this label; points to ShippingRate

**service\_code**string 

Service code used

**raw**any 

The raw data returned by the integration for this label

## Code Samples

### Node.js SDK

```
import { UnifiedTo } from '@unified-api/typescript-sdk';

const sdk = new UnifiedTo({
    security: {
        jwt: '<YOUR_API_KEY_HERE>',
    },
});

const connectionId = '5de520f96e439b002043d8dc';

const results = await sdk.shipping.createShippingLabel({ connectionId, shippingLabel: { }, 
    fields: '',
    raw: '',
 });
```

### Node.js (axios)

```
const options = {
  method: 'POST',
  url: 'https://api.unified.to/shipping/5de520f96e439b002043d8dc/label',
  headers: {
    authorization: 'bearer .....'
  },
  data: undefined,
  params: {
    fields: '',
    raw: '',
  }
};

const results = await axios.request(options);
```

### Java

```
AsyncHttpClient client = new DefaultAsyncHttpClient();

client.prepare("POST", "https://api.unified.to/shipping/5de520f96e439b002043d8dc/label?fields=&raw=")
  .setHeader("accept", "application/json")
  .setHeader("authorization", ".....")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
```

### Go

```
import (
	"fmt"
	"net/http"
	"io/ioutil"
)

url := `https://api.unified.to/shipping/5de520f96e439b002043d8dc/label?fields=&raw=

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("accept", "application/json")
req.Header.Add("authorization", ".....")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
```

### Python

```
import requests

url = "https://api.unified.to/shipping/5de520f96e439b002043d8dc/label?fields=&raw="

headers = {
    "accept": "application/json",
    "authorization": "....."
}

response = requests.post(url, headers=headers)
```

### PHP

```
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.unified.to/shipping/5de520f96e439b002043d8dc/label?fields=&raw=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "accept: application/json",
    "authorization: ....."
  ],
]);
```

### Ruby

```
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.unified.to/shipping/5de520f96e439b002043d8dc/label?fields=&raw=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = '....'

response = http.request(request)
puts response.read_body
```

### cURL

```
curl --request POST \
  --url 'https://api.unified.to/shipping/5de520f96e439b002043d8dc/label?fields=&raw=' \
  --header 'accept: application/json' \
  --header 'authorization: .....'
```
