Log InGet demo

Carrier

Endpoints for managing carriers in the system.

# Endpoints

  • GET/carriers# Retrieve a list of all carriers with pagination support.
  • GET/carrier/{carrier_id}# Retrieve details of a specific carrier by ID.
  • POST/carrier# Create a new carrier.
  • POST/carrier/check-configuration# Check the configuration for a specific carrier type.
  • PUT/carrier/{carrier_id}# Update the details of an existing carrier by ID.
  • DELETE/carrier/{carrier_id}# Delete a carrier by ID.

Carrier

id

The unique identifier of the carrier.

team_id

The team ID associated with the carrier.

name

The name of the carrier.

carrier

The carrier service (e.g., DPD, SEUR, CTT).

country

The country where the carrier operates.

region

The region where the carrier operates.

data

Carrier pricing data including cost range and currency.

created_at

The date and time when the carrier was created.

{} The Carrier resource
1{
2 "id": "clz2j73q20007x15qrl33auat",
3 "team_id": "clymtb8g90000maj34h0mwyc5",
4 "name": "Main",
5 "carrier": "DPD",
6 "country": "Portugal",
7 "region": "Mainland",
8 "data": [
9 {
10 "to": 0.5,
11 "from": 0,
12 "costs": 2.99,
13 "currency": "EUR"
14 },
15 {
16 "to": 1,
17 "from": 0.5,
18 "costs": 4.99,
19 "currency": "EUR"
20 }
21 ],
22 "created_at": "2024-07-26T10:00:04.250Z"
23}
get

Get List of Carriers

Retrieve a list of all carriers with pagination support.

cURL
curl -X GET "https://api.omnilabs.sh/carriers?page=1&take=5" -H "Authorization: Bearer {{BEARER_TOKEN}}"

Parameters

pagenumberoptional

The page number for pagination.

takenumberoptional

The number of carriers to return per page.

Response
{
"data": [
{
"id": "clz2j73q20007x15qrl33auat",
"team_id": "clymtb8g90000maj34h0mwyc5",
"name": "Main",
"carrier": "DPD",
"country": "Portugal",
"region": "Mainland",
"data": [
{
"to": 0.5,
"from": 0,
"costs": 2.99,
"currency": "EUR"
},
{
"to": 1,
"from": 0.5,
"costs": 4.99,
"currency": "EUR"
}
],
"created_at": "2024-07-26T10:00:04.250Z"
}
],
"total": 1,
"take": 5,
"current_page": 1,
"last_page": 1
}
get

Get Carrier by ID

Retrieve details of a specific carrier by its ID.

cURL
curl -X GET "https://api.omnilabs.sh/carrier/clyil4sjp0001nzjoajj7p7ae" -H "Authorization: Bearer {{BEARER_TOKEN}}"

Parameters

carrier_idstringrequired

The unique ID of the carrier.

Response
{
"id": "clz2j73q20007x15qrl33auat",
"team_id": "clymtb8g90000maj34h0mwyc5",
"name": "Main",
"carrier": "SEUR",
"country": "Spain",
"region": "Mainland",
"data": [
{
"to": 0.5,
"from": 0,
"costs": 2.99,
"currency": "EUR"
},
{
"to": 1,
"from": 0.5,
"costs": 4.99,
"currency": "EUR"
}
],
"created_at": "2024-07-26T10:00:04.250Z"
}
post

Create a Carrier

Create a new carrier with its name, carrier service, country, region, and pricing data.

cURL
curl -X POST "https://api.omnilabs.sh/carrier" -H "Authorization: Bearer {{BEARER_TOKEN}}" -H "Content-Type: application/json" -d '{"name": "Main", "carrier": "CTT", "country": "USA", "region": "Honolulu", "data": [{"from": 0, "to": 0.5, "costs": 2.99, "currency": "EUR"}, {"from": 0.5, "to": 1.0, "costs": 4.99, "currency": "EUR"}], "configuration": "Base64 string"}'

Parameters

namestringrequired

The name of the carrier.

carrierstringrequired

The carrier service (e.g., CTT, DPD, SEUR).

countrystringrequired

The country where the carrier operates.

regionstringrequired

The region where the carrier operates.

dataarrayrequired

Carrier pricing data with weight ranges and costs.

configurationstringrequired

The Base64 encoded configuration for the carrier.

Response
"ok"
post

Check Carrier Configuration

Check the configuration for a specific carrier type.

cURL
curl -X POST "https://api.omnilabs.sh/carrier/check-configuration" -H "Authorization: Bearer {{BEARER_TOKEN}}" -H "Content-Type: application/json" -d '{"type": "CTT", "configuration": "Base64 string"}'

Parameters

typestringrequired

The carrier type (e.g., CTT, DPD, SEUR, DHL).

configurationstringrequired

The Base64 encoded configuration for the carrier.

Response
"ok"
put

Update Carrier Details

Update the details of an existing carrier by ID.

cURL
curl -X PUT "https://api.omnilabs.sh/carrier/clz2j73q20007x15qrl33auat" -H "Authorization: Bearer {{BEARER_TOKEN}}" -H "Content-Type: application/json" -d '{"name": "Main", "carrier": "DPD", "country": "Portugal", "region": "Mainland", "data": [{"from": 0, "to": 0.5, "costs": 2.99, "currency": "EUR"}, {"from": 0.5, "to": 1.0, "costs": 4.99, "currency": "EUR"}]}'

Parameters

namestringrequired

The name of the carrier.

carrierstringrequired

The carrier service (e.g., DPD, SEUR).

countrystringrequired

The country where the carrier operates.

regionstringrequired

The region where the carrier operates.

dataarrayrequired

Carrier pricing data with weight ranges and costs.

Response
"ok"
delete

Delete a Carrier

Delete a specific carrier by ID.

cURL
curl -X DELETE "https://api.omnilabs.sh/carrier/clzb6xjwy000prn94f0m8v21f" -H "Authorization: Bearer {{BEARER_TOKEN}}"

Parameters

carrier_idstringrequired

The unique ID of the carrier.

Response
"ok"
ยฉ Omnilabs 2026. All rights reserved.