Skip to Content
FastracDocs

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

CourierService
WhatThe company that carries the parcelOne delivery product of that courier
ExampleJNEJNE Reguler, JNE YES
Identified bycourierCodeserviceName on a rate; code and id in the service list
You choose itIn 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.

QueryValues
typeINSTANT or REGULAR (EXPRESS is read as REGULAR)
searchPart of the courier's name or code
isEnabledtrue or false
curl -s "$FASTRAC_API/b2b/courier/all?type=INSTANT" \
  -H "Authorization: Bearer $FASTRAC_TOKEN"
InboundResponse (trimmed)
{
  "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.

InboundResponse (trimmed)
{
  "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

FieldMeaning
typeThe speed class. See Service types.
vehicleFor instant services, the vehicle this service uses. null for regular services.
etdMinimumDay, etdMaximumDayThe courier's delivery estimate, in days.
isEnabledWhether the service is offered at the moment.
volumetricConversionThe divisor for volumetric weight: length × width × height ÷ divisor. See Packages.
shippingRateTtlSecondsHow 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

CodeCourierTypeNeeds vehicle
JNEJNERegularNo
JNTJ&T ExpressRegularNo
SPXSPX (Shopee Express)RegularNo
SAPSAP ExpressRegularNo
NINJANinja XpressRegularNo
IDXID ExpressRegularNo
ANTERAJAAnterajaRegularNo
LIONLion ParcelRegularNo
BLITZBlitzInstantNo
PAXELPaxelInstantYes
LALAMOVELalamoveInstantYes
GRABGrabExpressInstantYes
DASHDashInstantYes

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

typeTypical delivery
INSTANTWithin hours, usually within one city, by a driver.
SAMEDAYThe same day.
NEXTDAYThe next day.
REGULAR1 to 7 days. Most e-commerce shipments.
CARGOSeveral 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):

InboundResponse (trimmed)
{
  "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 codesVehicle
BIKE, EBIKEMotorcycle, electric motorcycle. Small parcels and documents.
CAR, SEDAN, MPVCars, for larger or several parcels.
VANVan.
PICKUP_BAK, PICKUP_BOXPickup 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.

InboundResponse (trimmed)
{
  "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?

On this page