List Clients
const options = {
method: 'GET',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'x-user-id': '<x-user-id>'
}
};
fetch('https://api.dcycle.io/api/v1/logistics/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/api/v1/logistics/clients"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"x-user-id": "<x-user-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/api/v1/logistics/clients \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--header 'x-user-id: <x-user-id>'{
"clients": [
{}
]
}List Clients
Get the list of logistics clients with registered shipments
GET
/
api
/
v1
/
logistics
/
clients
List Clients
const options = {
method: 'GET',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'x-user-id': '<x-user-id>'
}
};
fetch('https://api.dcycle.io/api/v1/logistics/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/api/v1/logistics/clients"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"x-user-id": "<x-user-id>"
}
response = requests.get(url, headers=headers)
print(response.text)curl --request GET \
--url https://api.dcycle.io/api/v1/logistics/clients \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--header 'x-user-id: <x-user-id>'{
"clients": [
{}
]
}List Logistics Clients
Legacy API. This page documents the previous version of the API. For new
integrations use List Clients instead. Mind the
response shape: this endpoint returns
{"clients": [...]} and the current one returns a
plain array.Request
Headers
string
required
Your API key for authenticationExample:
sk_live_1234567890abcdefstring
required
Your organization UUIDExample:
ff4adcc7-8172-45fe-9cf1-e90a6de53aa9string
required
Your user UUIDExample:
a1b2c3d4-e5f6-7890-abcd-ef1234567890Response
array
Array of unique client namesExample:
["Correos Express", "DHL", "SEUR"]Example
curl -X GET "https://api.dcycle.io/api/v1/logistics/clients" \
-H "Authorization: Bearer ${DCYCLE_API_KEY}" \
-H "x-organization-id: ${DCYCLE_ORG_ID}" \
-H "x-user-id: ${DCYCLE_USER_ID}"
import requests
import os
api_key = os.getenv("DCYCLE_API_KEY")
org_id = os.getenv("DCYCLE_ORG_ID")
headers = {
"Authorization": f"Bearer {api_key}",
"x-organization-id": org_id,
"x-user-id": user_id
}
response = requests.get(
"https://api.dcycle.io/api/v1/logistics/clients",
headers=headers
)
clients = response.json()
print(f"Clients: {', '.join(clients)}")
const axios = require('axios');
const apiKey = process.env.DCYCLE_API_KEY;
const orgId = process.env.DCYCLE_ORG_ID;
const headers = {
'Authorization': `Bearer ${apiKey}`,
'x-organization-id': orgId,
'x-user-id': userId
};
axios.get(
'https://api.dcycle.io/api/v1/logistics/clients',
{ headers }
)
.then(response => {
console.log('Clients:', response.data.join(', '));
})
.catch(error => console.error(error));
Successful Response
[
"Correos Express",
"DHL",
"SEUR",
"MRW"
]
Use Cases
Verify Upload
After uploading a CSV, verify that the client appears in the list:# Upload CSV
upload_csv("correos_shipments.csv")
# Wait for processing
time.sleep(30)
# Verify
clients = get_clients()
if "Correos Express" in clients:
print("✅ Upload processed successfully")
else:
print("⚠️ Client not available yet, wait longer")
Populate UI Selector
// Get clients for a dropdown
const clients = await getClients();
const selectElement = document.getElementById('client-selector');
clients.forEach(client => {
const option = document.createElement('option');
option.value = client;
option.text = client;
selectElement.add(option);
});
Validate Client Name
Before generating a report, verify that the client exists:def generate_report(client_name, start_date, end_date):
# Validate that the client exists
available_clients = get_clients()
if client_name not in available_clients:
raise ValueError(
f"Client '{client_name}' not found. "
f"Available: {', '.join(available_clients)}"
)
# Generate report
return get_report(client_name, start_date, end_date)
Notes
The client list is dynamically generated based on the shipments you’ve uploaded. If you just completed an upload, wait a few seconds for processing to finish.
Client names are case-sensitive.
"Correos Express" and "correos express" are considered different.Related Endpoints
Get Report
Generate report for a client
Upload CSV
Upload bulk shipments
Was this page helpful?