This guide provides instructions on how to integrate with the USPS tracking API using your sub-API key.
https://my.labelscheap.com/
GET /api/track.php
| user_name | The username associated with the API key. |
| tracking | The USPS tracking number to be queried. |
| api_key | The valid API key provided to the user. |
curl -X GET "https://my.labelscheap.com/api/track.php?user_name=johndoe&tracking=123456789&api_key=abc123"
// Prepare the API endpoint and parameters
$api_url = "my.labelscheap.com/api.php";
$params = [
'user_name' => 'johndoe',
'tracking' => '123456789',
'api_key' => 'abc123'
];
// Build the URL with parameters
$url = $api_url . '?' . http_build_query($params);
// Fetch the response
$response = file_get_contents($url);
// Decode the response
$data = json_decode($response, true);
// Output the result
print_r($data);
import requests
# Prepare the API endpoint and parameters
url = "my.labelscheap.com/api.php"
params = {
'user_name': 'johndoe',
'tracking': '123456789',
'api_key': 'abc123'
}
# Send GET request
response = requests.get(url, params=params)
# Print the response in JSON format
print(response.json())
fetch("https://my.labelscheap.com/api/tracking.php?user_name=johndoe&tracking=123456789&api_key=abc123")
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const axios = require('axios');
const params = {
user_name: 'johndoe',
tracking: '123456789',
api_key: 'abc123'
};
axios.get('https://my.labelscheap.com/api/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&tracking=123456789&api_key=abc123"
Dim response As String = client.DownloadString(url)
Console.WriteLine(response)
user_name does not match any entry in the users table.current_balance is less than 1.tracking number does not exist or is not valid in the USPS system.user_id will be updated from the user profile page.If you have any questions, feel free to contact our support team!