Retrieve shipping details
curl --request GET \
--url https://api.teleship.com/api/shipments/labels/{shipmentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.teleship.com/api/shipments/labels/{shipmentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.teleship.com/api/shipments/labels/{shipmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.teleship.com/api/shipments/labels/{shipmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.teleship.com/api/shipments/labels/{shipmentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.teleship.com/api/shipments/labels/{shipmentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teleship.com/api/shipments/labels/{shipmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
],
"shipment": {
"shipmentId": "<string>",
"trackingNumber": "<string>",
"shipDate": "2024-01-01T00:00:00.00Z",
"estimatedDelivery": "2024-01-01T00:00:00.00Z",
"documents": [
{
"format": "PDF",
"url": "https://api.teleship.com/api/shipments/labels/f5233746-71d4-4b05-bf63-56f4abaed5f6/label.pdf",
"base64String": "JVBERi0xLjQKJQlJbTgKMSAwIG9iago8PSplbiAkZwoKCSvQ=="
}
],
"shipTo": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "US"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>"
},
"shipFrom": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>"
},
"weight": {
"value": "1.0",
"unit": "kg"
},
"dimensions": {
"length": "40.0",
"width": "30.0",
"height": "16.0",
"unit": "cm"
},
"packageType": "parcel",
"commodities": [
{
"title": "<string>",
"quantity": 1,
"value": {
"amount": "15.0",
"currency": "GBP"
},
"unitWeight": {
"value": "1.0",
"unit": "kg"
},
"description": "<string>",
"hsCode": "<string>",
"predictedHsCode": "<string>",
"predictedTaxCode": "<string>",
"sku": "<string>",
"category": "<string>",
"imageUrl": "<string>",
"productUrl": "<string>",
"productId": "<string>",
"variantId": "<string>",
"compliance": {
"isControlGood": true,
"controlType": "HealthRegulated",
"regulatoryAgency": "FDA",
"regulatoryProgram": "Food Safety",
"regulatoryCategoryCode": "21-CFR-XYZ",
"EIN": "<string>",
"iossNumber": "<string>",
"importLicenseNumber": "<string>",
"certificationType": "CE",
"certificationReference": "CE-DECL-12345"
},
"dutiesAndTaxes": [
"<string>"
],
"metadata": {}
}
],
"customs": {
"invoiceNumber": "<string>",
"invoiceDate": "2023-11-07T05:31:56Z",
"orderId": "<string>",
"orderTotalValue": {
"amount": "15.0",
"currency": "GBP"
},
"certified": true,
"signedBy": "<string>",
"EORI": "<string>",
"IOSS": "<string>",
"VAT": "<string>",
"EIN": "<string>",
"VOECNUMBER": "<string>",
"SWISSVAT": "<string>",
"KAR_VAT": "<string>",
"CA_GST": "<string>",
"AU_GST": "<string>",
"NZ_GST": "<string>",
"JPConsumptionTax": "<string>",
"GPSRContactInfo": "<string>",
"importerOfRecord": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"stateTaxId": "<string>",
"countryTaxId": "<string>"
}
},
"rate": {
"price": "10.59",
"currency": "GBP",
"transit": 5,
"estimatedDelivery": "2024-01-01T00:00:00.00Z",
"service": {
"name": "<string>",
"code": "<string>",
"transit": 123,
"checkoutName": "<string>",
"description": "<string>",
"dispatchDays": 1,
"includeFirstMile": false,
"isActive": true,
"config": {
"isPostal": true
},
"id": "<string>"
},
"charges": [
{
"name": "base",
"amount": 22.77,
"currency": "GBP"
},
{
"name": "Duty",
"amount": 1.2,
"currency": "GBP"
},
{
"name": "VAT",
"amount": 0.5,
"currency": "GBP"
}
]
},
"scaleWeight": {
"value": "1.0",
"unit": "kg"
},
"dimWeight": {
"value": "1.0",
"unit": "kg"
},
"billWeight": {
"value": "1.0",
"unit": "kg"
},
"events": [
{
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"location": "<string>"
}
],
"surcharges": [
{
"id": "<string>",
"type": "<string>",
"name": "<string>",
"amount": 123,
"metadata": {},
"shipmentId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"taxesCollectionId": "<string>"
}
],
"trackingURL": "https://teleship.com/tracking?trackingNumber=1234567890",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"returnTo": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>"
},
"billTo": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"stateTaxId": "<string>",
"countryTaxId": "<string>"
},
"description": "<string>",
"additionalServices": {
"signatureRequired": true,
"deliveryWarranty": true,
"deliveryPUDO": true,
"lowCarbon": true
},
"actualBillWeight": {
"value": "1.0",
"unit": "kg"
},
"actualScaleWeight": {
"value": "1.0",
"unit": "kg"
},
"actualDimensions": {
"length": "40.0",
"width": "30.0",
"height": "16.0",
"unit": "cm"
},
"customerReference": "<string>",
"commercialInvoiceReference": "<string>",
"metadata": {},
"firstMile": {
"carrier": "<string>",
"trackingNumber": "<string>",
"trackingUrl": "<string>"
},
"lastMile": {
"carrier": "<string>",
"trackingNumber": "<string>",
"trackingUrl": "<string>"
},
"dropOffLocation": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"stateTaxId": "<string>",
"countryTaxId": "<string>"
}
}
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}Shipping services
Retrieve shipping details
Retrieve detailed information about a specific shipment, including:
- Tracking status and history
- Estimated and actual delivery dates
- Downloadable shipping documents (labels, invoices)
- Service and package details
Use this endpoint to: Display shipment progress to customers or for internal tracking and auditing.
GET
/
api
/
shipments
/
labels
/
{shipmentId}
Retrieve shipping details
curl --request GET \
--url https://api.teleship.com/api/shipments/labels/{shipmentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.teleship.com/api/shipments/labels/{shipmentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.teleship.com/api/shipments/labels/{shipmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.teleship.com/api/shipments/labels/{shipmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.teleship.com/api/shipments/labels/{shipmentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.teleship.com/api/shipments/labels/{shipmentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.teleship.com/api/shipments/labels/{shipmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
],
"shipment": {
"shipmentId": "<string>",
"trackingNumber": "<string>",
"shipDate": "2024-01-01T00:00:00.00Z",
"estimatedDelivery": "2024-01-01T00:00:00.00Z",
"documents": [
{
"format": "PDF",
"url": "https://api.teleship.com/api/shipments/labels/f5233746-71d4-4b05-bf63-56f4abaed5f6/label.pdf",
"base64String": "JVBERi0xLjQKJQlJbTgKMSAwIG9iago8PSplbiAkZwoKCSvQ=="
}
],
"shipTo": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "US"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>"
},
"shipFrom": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>"
},
"weight": {
"value": "1.0",
"unit": "kg"
},
"dimensions": {
"length": "40.0",
"width": "30.0",
"height": "16.0",
"unit": "cm"
},
"packageType": "parcel",
"commodities": [
{
"title": "<string>",
"quantity": 1,
"value": {
"amount": "15.0",
"currency": "GBP"
},
"unitWeight": {
"value": "1.0",
"unit": "kg"
},
"description": "<string>",
"hsCode": "<string>",
"predictedHsCode": "<string>",
"predictedTaxCode": "<string>",
"sku": "<string>",
"category": "<string>",
"imageUrl": "<string>",
"productUrl": "<string>",
"productId": "<string>",
"variantId": "<string>",
"compliance": {
"isControlGood": true,
"controlType": "HealthRegulated",
"regulatoryAgency": "FDA",
"regulatoryProgram": "Food Safety",
"regulatoryCategoryCode": "21-CFR-XYZ",
"EIN": "<string>",
"iossNumber": "<string>",
"importLicenseNumber": "<string>",
"certificationType": "CE",
"certificationReference": "CE-DECL-12345"
},
"dutiesAndTaxes": [
"<string>"
],
"metadata": {}
}
],
"customs": {
"invoiceNumber": "<string>",
"invoiceDate": "2023-11-07T05:31:56Z",
"orderId": "<string>",
"orderTotalValue": {
"amount": "15.0",
"currency": "GBP"
},
"certified": true,
"signedBy": "<string>",
"EORI": "<string>",
"IOSS": "<string>",
"VAT": "<string>",
"EIN": "<string>",
"VOECNUMBER": "<string>",
"SWISSVAT": "<string>",
"KAR_VAT": "<string>",
"CA_GST": "<string>",
"AU_GST": "<string>",
"NZ_GST": "<string>",
"JPConsumptionTax": "<string>",
"GPSRContactInfo": "<string>",
"importerOfRecord": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"stateTaxId": "<string>",
"countryTaxId": "<string>"
}
},
"rate": {
"price": "10.59",
"currency": "GBP",
"transit": 5,
"estimatedDelivery": "2024-01-01T00:00:00.00Z",
"service": {
"name": "<string>",
"code": "<string>",
"transit": 123,
"checkoutName": "<string>",
"description": "<string>",
"dispatchDays": 1,
"includeFirstMile": false,
"isActive": true,
"config": {
"isPostal": true
},
"id": "<string>"
},
"charges": [
{
"name": "base",
"amount": 22.77,
"currency": "GBP"
},
{
"name": "Duty",
"amount": 1.2,
"currency": "GBP"
},
{
"name": "VAT",
"amount": 0.5,
"currency": "GBP"
}
]
},
"scaleWeight": {
"value": "1.0",
"unit": "kg"
},
"dimWeight": {
"value": "1.0",
"unit": "kg"
},
"billWeight": {
"value": "1.0",
"unit": "kg"
},
"events": [
{
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"description": "<string>",
"location": "<string>"
}
],
"surcharges": [
{
"id": "<string>",
"type": "<string>",
"name": "<string>",
"amount": 123,
"metadata": {},
"shipmentId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"taxesCollectionId": "<string>"
}
],
"trackingURL": "https://teleship.com/tracking?trackingNumber=1234567890",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"returnTo": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>"
},
"billTo": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"stateTaxId": "<string>",
"countryTaxId": "<string>"
},
"description": "<string>",
"additionalServices": {
"signatureRequired": true,
"deliveryWarranty": true,
"deliveryPUDO": true,
"lowCarbon": true
},
"actualBillWeight": {
"value": "1.0",
"unit": "kg"
},
"actualScaleWeight": {
"value": "1.0",
"unit": "kg"
},
"actualDimensions": {
"length": "40.0",
"width": "30.0",
"height": "16.0",
"unit": "cm"
},
"customerReference": "<string>",
"commercialInvoiceReference": "<string>",
"metadata": {},
"firstMile": {
"carrier": "<string>",
"trackingNumber": "<string>",
"trackingUrl": "<string>"
},
"lastMile": {
"carrier": "<string>",
"trackingNumber": "<string>",
"trackingUrl": "<string>"
},
"dropOffLocation": {
"name": "<string>",
"address": {
"line1": "",
"city": "",
"postcode": "",
"country": "GB"
},
"email": "<string>",
"phone": "<string>",
"company": "<string>",
"stateTaxId": "<string>",
"countryTaxId": "<string>"
}
}
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}Was this page helpful?
⌘I