Couriers and services
The difference between a courier and a service, how to list them, and the codes, types, vehicles and package types you send.
- Product
- APIShipping Engine API
- Section
- Core concepts
- Reading time
- 6 min read
In short
- A courier is a company, such as JNE or Lalamove. A service is one of its products, such as JNE Reguler or JNE YES.
- You choose couriers in a rate request with
courierCode. Each rate you get back is for one service. - Instant couriers also need a vehicle. Each service sets its own rules: COD, pickup, drop-off, volumetric divisor and how long its rates last.
Courier and service
| Courier | Service | |
|---|---|---|
| What | The company that carries the parcel | One delivery product of that courier |
| Example | JNE | JNE Reguler, JNE YES |
| Identified by | courierCode | serviceName on a rate; code and id in the service list |
| You choose it | In the rate request (courierCode) | By picking one of the returned rates |
You never send a service code when booking. The service is locked into the rate, and you book the rate
with its shippingRateCode. See How shipping rates work.
List couriers
GET /b2b/courier/all returns every courier, with its logo and
whether it can take shipments right now. It needs the READ_SHIPPING_RATES permission.
| Query | Values |
|---|---|
type | INSTANT or REGULAR (EXPRESS is read as REGULAR) |
search | Part of the courier's name or code |
isEnabled | true or false |
curl -s "$FASTRAC_API/b2b/courier/all?type=INSTANT" \
-H "Authorization: Bearer $FASTRAC_TOKEN"{
"statusCode": 200,
"message": "Couriers retrieved successfully.",
"data": [
{
"code": "LALAMOVE",
"name": "Lalamove",
"isEnabled": true,
"hasEnabledServices": true,
"isOperational": true,
"logoUrl": "https://…/lalamove.png",
"supportedCourierTypes": ["INSTANT"]
}
]
}isOperational is true when the courier is enabled and has at least one enabled service. Use it
to decide which couriers to show. The list is cached for up to 15 minutes, so changes can take that
long to appear.
List a courier's services
GET /b2b/courier/service?courier_code=JNE returns the
courier's services and their settings.
{
"statusCode": 200,
"message": "Courier services retrieved successfully.",
"data": {
"courierCode": "JNE",
"isEnabled": true,
"supportedTypes": ["REGULAR"],
"services": [
{
"id": 12,
"code": "REG",
"name": "JNE Reguler",
"type": "REGULAR",
"vehicle": null,
"etdMinimumDay": 2,
"etdMaximumDay": 3,
"isEnabled": true,
"volumetricConversion": 6000,
"shippingRateTtlSeconds": 900
}
]
}
}An unknown code returns 400 Invalid courier_code 'X'.
Service settings
| Field | Meaning |
|---|---|
type | The speed class. See Service types. |
vehicle | For instant services, the vehicle this service uses. null for regular services. |
etdMinimumDay, etdMaximumDay | The courier's delivery estimate, in days. |
isEnabled | Whether the service is offered at the moment. |
volumetricConversion | The divisor for volumetric weight: length × width × height ÷ divisor. See Packages. |
shippingRateTtlSeconds | How long a rate for this service stays valid, in seconds. 900 is 15 minutes. |
Whether a service supports COD, pickup or drop-off depends on the service and route, so it
comes back on each rate: isSupportCod, isSupportPickup and isSupportDropOff.
Courier codes
| Code | Courier | Type | Needs vehicle |
|---|---|---|---|
JNE | JNE | Regular | No |
JNT | J&T Express | Regular | No |
SPX | SPX (Shopee Express) | Regular | No |
SAP | SAP Express | Regular | No |
NINJA | Ninja Xpress | Regular | No |
IDX | ID Express | Regular | No |
ANTERAJA | Anteraja | Regular | No |
LION | Lion Parcel | Regular | No |
BLITZ | Blitz | Instant | No |
PAXEL | Paxel | Instant | Yes |
LALAMOVE | Lalamove | Instant | Yes |
GRAB | GrabExpress | Instant | Yes |
DASH | Dash | Instant | Yes |
In a rate request you can also use a group code: REGULAR, INSTANT or ALL. See
Choosing couriers. The couriers available to your account can
change; use GET /b2b/courier/all as the live list, and see
Couriers for per-courier details.
Service types
type | Typical delivery |
|---|---|
INSTANT | Within hours, usually within one city, by a driver. |
SAMEDAY | The same day. |
NEXTDAY | The next day. |
REGULAR | 1 to 7 days. Most e-commerce shipments. |
CARGO | Several days. For heavy or bulky parcels, cheaper per kilogram. |
Vehicles
Instant couriers send a driver, so you choose a vehicle in the rate request with vehicle. The
parcel must fit the vehicle's size and weight limits; a larger parcel needs a larger vehicle.
GET /public/vehicles lists every vehicle with its limits (no token needed):
{
"statusCode": 200,
"message": "Vehicles retrieved successfully.",
"data": [
{ "code": "bike", "name": "Motorcycle", "length": 50, "width": 50, "height": 50, "weight": 20000 },
{ "code": "car", "name": "Car", "length": 150, "width": 80, "height": 80, "weight": 100000 }
]
}Lengths are in centimetres and weight is the maximum load in grams. Send the code in upper case
in rate requests, for example "vehicle": "BIKE".
| Common codes | Vehicle |
|---|---|
BIKE, EBIKE | Motorcycle, electric motorcycle. Small parcels and documents. |
CAR, SEDAN, MPV | Cars, for larger or several parcels. |
VAN | Van. |
PICKUP_BAK, PICKUP_BOX | Pickup trucks, open or closed. |
Larger trucks (ENGKEL_…, CDD_…, FUSO_…) | Heavy and bulky loads. |
Not every courier offers every vehicle. The list is the full catalogue; check the courier's rates for the vehicle you want.
Package types
GET /b2b/order/category-item returns content categories (no
token needed). Send the chosen id as packageTypeId on a package in the rate request. Some services
refuse certain categories.
{
"statusCode": 200,
"message": "Request successful.",
"data": [
{ "id": "8", "category": "Frozen" }
]
}id comes back as a string; packageTypeId takes it as a number.
Common mistakes
Hard-coding the courier list
Couriers and services are switched on and off over time. Read GET /b2b/courier/all (cached on your
side for a few minutes) instead of a fixed list, and handle a courier with no rates.
Assuming every service supports COD or pickup
Check isSupportCod, isSupportPickup and isSupportDropOff on each rate before you offer the option
to your customer.
Was this page helpful?