Skip to Content
FastracDocs
API reference

Simulate a status (sandbox only)

POST
/b2b/shipments/{shipmentCode}/simulate-status

Sandbox only. Production returns 403.

Pretends that the courier reported an event for one of your sandbox shipments, so you can test your webhook handler and status logic end to end without waiting for a real courier. Use a shipment that already has an airway bill.

statusWebhook sentEffect on the shipment
DRIVER_ASSIGNEDshipment.pending_pickupSample driver details are attached
TRANSITshipment.in_transitStatus becomes IN_TRANSIT
DELIVEREDshipment.deliveredStatus becomes DELIVERED
CANCELLEDnone (use Cancel a shipment to receive shipment.cancelled)Status becomes CANCELLED and the shipment is refunded
RTSshipment.rts_billed if a return fee appliesStatus becomes RTS_DELIVERED (returned to the sender)
AIRWAYBILL_UPDATEDshipment.airway_bill_updatedThe airway bill is replaced by a SIM-… number
PRICE_CHANGEDshipment.price_changedNone: webhook only, sample values (Rp 10.000 → Rp 15.000)
WEIGHT_CHANGEDshipment.measurement_changedNone: webhook only, sample values
RTS_BILLEDshipment.rts_billedNone: webhook only, sample fee Rp 15.000

Requires the CANCEL_ORDER permission.

Authorization

bearerAuth
headerAuthorizationBearer <token>

An access token from the OAuth2 client-credentials grant. Exchange your API key (client_id + client_secret) at the token endpoint and send Authorization: Bearer <access_token>.

Path Parameters

shipmentCode*string

The shipment code from Create an order or List shipments.

Match^SHP-[0-9]{6}-[A-Z0-9]{6}$

Request Body

application/json
  1. body
status*string

The courier event to simulate. See the table above.

Value in"DRIVER_ASSIGNED""TRANSIT""DELIVERED""CANCELLED""RTS""AIRWAYBILL_UPDATED""PRICE_CHANGED""WEIGHT_CHANGED""RTS_BILLED"

Response Body

The event was processed and the webhook queued.

application/json
  1. response
statusCode*integer
message*string
data?null

Always empty.

curl -X POST 'https://sandbox-api.fastrac.example/b2b/shipments/string/simulate-status' \  -H 'Content-Type: application/json' \  -d '{  "status": "DELIVERED"}'
Example Response
{  "statusCode": 200,  "message": "Shipment status simulated successfully."}

Was this page helpful?