This guide provides instructions on how to integrate with the USPS tracking API using your sub-API key.
https://my.labelscheap.com/
GET /api/generate_tracking.php
| Parameter | Type | Description |
|---|---|---|
| user_name | String | The username associated with the API key. |
| api_key | String | The valid API key provided to the user. |
| class | String | The class of tracking (e.g., ground_advantage, priority). |
| count | Integer | The number of tracking numbers to generate. |
curl -X GET
"https://my.labelscheap.com/api/generate_tracking.php?user_name=johndoe&api_key=abc123&class=ground_advantage&count=5"
$api_url = "https://my.labelscheap.com/api/generate_tracking.php";
$params = [
'user_name' => 'johndoe',
'api_key' => 'abc123',
'class' => 'ground_advantage',
'count' => 5
];
$url = $api_url . '?' . http_build_query($params);
$response = file_get_contents($url);
$data = json_decode($response, true);
print_r($data);
import requests
url = "https://my.labelscheap.com/api/generate_tracking.php"
params = {
'user_name': 'johndoe',
'api_key': 'abc123',
'class': 'ground_advantage',
'count': 5
}
response = requests.get(url, params=params)
print(response.json())
fetch("https://my.labelscheap.com/api/generate_tracking.php?user_name=johndoe&api_key=abc123&class=ground_advantage&count=5")
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const axios = require('axios');
const params = {
user_name: 'johndoe',
api_key: 'abc123',
class: 'ground_advantage',
count: 5
};
axios.get('https://my.labelscheap.com/api/generate_tracking.php', { params })
.then(response => console.log(response.data))
.catch(error => console.error('Error:', error));
Dim client As New WebClient()
Dim url As String = "https://my.labelscheap.com/api/tracking.php?user_name=johndoe&class=rollo&service=ground_advantage&api_key=abc123"
Dim response As String = client.DownloadString(url)
Console.WriteLine(response)
{
"tracking_numbers" :
[
"XXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXX",
"XXXXXXXXXXXXXXXXXXX"
]
}
user_name does not match any entry in the users table.current_balance is less than 1.user_id will be updated from the user profile page.| Service | Slug |
|---|---|
| Priority | priority |
| Ground Advantage | ground_advantage |
| Priority Express | priority_express |
| First Class | first_class |
| Vendor |
|---|
| Shippo (shippo) |
| Rollo (rollo) |
| Easyship(easyship) |
| Easypost(easypost) |
| EVS (evs) |
| Pitney Bowes (pitneybowes) |
| Vendor | Slug |
|---|---|
| Shippo | priority |
| Shippo | ground_advantage |
| Shippo | priority_express |
| Rollo | ground_advantage |
| Rollo | priority |
| Easyship | priority |
| Easyship | ground_advantage |
| Easypost | first_class |
| Easypost | priority_express |
| EVS | priority |
| EVS | ground_advantage |
| Pitney Bowes | priority_express |
| Pitney Bowes | first_class |
| ATFM | ground_advantage |
| Preshipment | preship |
If you have any questions, feel free to contact our support team!