Skip to Content
FastracDocs

Book an instant courier

Send a same-day delivery with a motorbike or car, at a time you choose, and follow the driver.

Product
APIShipping Engine API
Section
Guides
Reading time
7 min read

Goal: book an instant courier (Lalamove, GrabExpress, Paxel, Dash or Blitz) that picks the parcel up within the hour or at a time you choose, and show your customer who the driver is.

Before you start:

  • You can book a regular shipment. Instant booking uses the same endpoints with a few extra fields.
  • You have the coordinates (latitude and longitude) of the pickup point and of every drop-off point. Instant couriers price by distance.
  • Your API key has READ_SHIPPING_RATES and CREATE_ORDER.
  1. Pick a vehicle the parcel fits

    Instant couriers need a vehicle. List the vehicles and their limits (no token needed):

    curl -s "$FASTRAC_API/public/vehicles"
    InboundResponse (example values)
    {
      "statusCode": 200,
      "message": "Vehicles retrieved successfully.",
      "data": [
        { "code": "BIKE", "name": "Motor", "length": 40, "width": 40, "height": 40, "weight": 20000 }
      ]
    }

    length, width and height are in cm and weight in grams. Pick the smallest vehicle that holds the whole parcel: the total weight must not exceed weight, and every package must fit the vehicle in some orientation. A parcel that doesn't fit is refused when you create the order, for example Total package weight (25000g) exceeds the maximum capacity of vehicle 'Motor' (20000g).

  2. Quote with coordinates, vehicle and (optionally) a time

    Request rates with courierCode: "INSTANT" to ask every instant courier, or a single code such as LALAMOVE. Add coordinate to the origin and every destination, and vehicle. insurance is optional for instant couriers.

    To book for later, add scheduledAt. Leave it out for as soon as possible.

    curl -s -X POST "$FASTRAC_API/b2b/shipping-rate" \
      -H "Authorization: Bearer $FASTRAC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "origin": {
          "fullAddress": "Jl. Tebet Raya No. 12, Jakarta Selatan",
          "subdistrictId": "3174091001",
          "coordinate": { "latitude": -6.2262, "longitude": 106.8530 }
        },
        "destinations": [{
          "fullAddress": "Jl. Kemang Raya No. 5, Jakarta Selatan",
          "subdistrictId": "3174071004",
          "coordinate": { "latitude": -6.2607, "longitude": 106.8137 }
        }],
        "courierCode": "INSTANT",
        "vehicle": "BIKE",
        "scheduledAt": "2026-11-21T14:00:00+07:00",
        "packages": [{
          "itemValue": 150000, "isGlassware": false, "weight": 1500,
          "dimension": { "length": 25, "width": 20, "height": 15 }
        }]
      }'

    Rate coordinates are numbers. Remember the scheduledAt you sent: you need it again in the next step.

  3. Create the order with the same schedule

    Instant shipments default to PICKUP. Send the sender's coordinate (as strings in the order) and, if you quoted a time, the same time as shippingOptions.schedule:

    curl -s -X POST "$FASTRAC_API/b2b/orders" \
      -H "Authorization: Bearer $FASTRAC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
        "shipments": [{
          "shippingRateCode": "SR-LM4X8B2Q",
          "sender": {
            "name": "Toko Contoh",
            "email": "[email protected]",
            "phoneNumber": "081234567890",
            "coordinate": { "latitude": "-6.2262", "longitude": "106.8530" }
          },
          "receivers": [{
            "name": "Sari Wijaya", "phoneNumber": "081311112222",
            "addressNote": "Lobby tower B, titip satpam", "label": "Kantor", "stopSequence": 1
          }],
          "shippingOptions": { "fulfillmentMethod": "PICKUP", "schedule": "2026-11-21T14:00:00+07:00" }
        }]
      }'

    How the order's schedule is treated depends on the courier:

    CourierPickup timeIf the order sends a different time
    LALAMOVE, DASH, BLITZFixed by the quote. The courier books exactly the quoted time, or as soon as possible if you quoted without scheduledAt.Rejected with code PICKUP_SCHEDULE_NOT_QUOTED. Send the same time, or none.
    GRAB, PAXELTaken from the order's schedule.The order's time is used.
    PICKUP_SCHEDULE_NOT_QUOTED
    {
      "statusCode": 400,
      "code": "PICKUP_SCHEDULE_NOT_QUOTED",
      "message": "Jadwal pickup tidak sesuai dengan ongkir yang dipilih. Hitung ulang ongkir dengan jadwal tersebut, atau pesan tanpa jadwal untuk pickup secepatnya.",
      "quotedScheduledAt": "2026-11-21T14:00:00+07:00",
      "requestedScheduledAt": "2026-11-21T15:00:00+07:00"
    }

    To change the time, quote again with the new scheduledAt and book with the new rate code.

    The response has pickupSchedule: { "scheduledAt": "2026-11-21T14:00:00+07:00", "asSoonAsPossible": false }, or { "scheduledAt": null, "asSoonAsPossible": true } for an immediate pickup.

  4. Show the driver to your customer

    Once a driver accepts the job, Shipping Engine knows their name, phone number and licence plate. Get them in any of these ways:

    SourceFields
    Webhook shipment.pending_pickup (also sent when a driver is assigned)data.driver_name, data.driver_phone, data.driver_license_plate, data.tracking_link
    GET /b2b/shipments/track/{code}driver.name, driver.phone, driver.licensePlate, trackingUrl
    GET /b2b/shipments/{code}/detailsdriverDetails.name, driverDetails.phone, driverDetails.licensePlate
    curl -s "$FASTRAC_API/b2b/shipments/track/SHP-261121-K7P3Q2" \
      -H "Authorization: Bearer $FASTRAC_TOKEN"
    InboundResponse (trimmed)
    {
      "statusCode": 200,
      "data": {
        "currentStatus": "PENDING_PICKUP",
        "trackingUrl": "https://…",
        "courier": "Lalamove",
        "service": "Lalamove Motor",
        "driver": { "name": "Andi", "phone": "+6281355556666", "licensePlate": "B 1234 XYZ" }
      }
    }

    Driver fields stay null until the courier assigns someone. The trackingUrl of an instant courier often shows the driver on a live map, so it is the best thing to show your customer.

  5. Handle a failed pickup

    Sometimes no driver takes the job, or the courier gives up on it.

    CourierWhat you seeWhat to do
    LALAMOVEStatus PROBLEM_SHIPMENT, webhook shipment.pickup_failed.Cancel the shipment to get the refund, then quote and book again.
    DASHStatus CANCELLED (failed pickup). The price is refunded to your balance.Quote and book again.
    BLITZStatus stays PENDING_PICKUP while Blitz retries the pickup.Wait. A final failure moves it to PROBLEM_SHIPMENT.
    OthersStatus PROBLEM_SHIPMENT, webhook shipment.problem_detected.Check the shipment. Cancel and rebook if it doesn't recover, or contact support.

Timing at a glance

MomentRule
Quote → orderBook before validUntil. Lalamove also checks its own quote when you pay: an expired Lalamove quote fails with Payment failed, but order … was created successfully. Reason: Tarif LALAMOVE untuk pesanan ini sudah kedaluwarsa…. Quote again.
Scheduled pickupAt least 15 minutes ahead, Jakarta time. A scheduled quote that is now less than 15 minutes away is rejected with PICKUP_SCHEDULE_EXPIRED: quote again.
As soon as possibleLeave out scheduledAt and schedule. The courier starts looking for a driver as soon as the order is created.

Checklist

  • Send coordinates for the pickup point and every drop-off.
  • Pick a vehicle the parcel fits, using GET /public/vehicles.
  • For Lalamove, Dash and Blitz, send the quoted scheduledAt as schedule, or none.
  • Book right after quoting; instant quotes are short-lived.
  • Show trackingUrl and driver details once shipment.pending_pickup arrives.
  • Watch for shipment.pickup_failed and PROBLEM_SHIPMENT, and rebook.

Was this page helpful?

On this page