TrustColdDevelopers
Trips›Create a trip

Create a trip

Book a refrigerated trip. Place = list and/or optional address. Idempotency-Key on every create.

Run this from your browser — add your free test keys.
curl -X POST https://trustcoldeg.com/api/v1/b2b/trips \
  -H "Authorization: Bearer CLIENT_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ORDER-10025" \
  -d '{"vehicle_type":"reefer_tank","trip_date":"2026-12-20","from_governorate":"القاهرة","from_area":"مدينة نصر","to_governorate":"الإسكندرية","to_area":"سموحة"}'

Trip created

{
  "data": {
    "id": 10025,
    "code": "TRUST10025",
    "status": "pending",
    "status_label": "Pending",
    "deleted": false,
    "deleted_at": null,
    "from": "القاهرة / مدينة نصر",
    "to": "الإسكندرية / سموحة",
    "from_lat": 30.0561,
    "from_lng": 31.3301,
    "to_lat": 31.2156,
    "to_lng": 29.9553,
    "trip_date": "2026-12-20",
    "vehicle_type": "reefer_tank",
    "vehicle_type_name": "Refrigerated tank truck",
    "vehicle_type_name_ar": "سيارة دبابة مبردة",
    "vehicle_type_name_en": "Refrigerated tank truck",
    "notes": null,
    "revenue": 4800.0,
    "deposit_status": "pending",
    "deposit_amount": 480.0,
    "payment_url": "https://trustcoldeg.com/book/pay/TOKEN",
    "collected": false,
    "driver_name": null,
    "tracking_url": "https://trustcoldeg.com/track/trip/TOKEN",
    "created_at": "2026-12-18T09:12:44+02:00",
    "updated_at": "2026-12-18T09:12:44+02:00"
  }
}

Same Idempotency-Key, different body

{
  "message": "This idempotency key was already used with different data."
}

Validation failed

{
  "message": "The selected vehicle type is invalid.",
  "errors": {
    "vehicle_type": ["The selected vehicle type is invalid."]
  }
}

Key points

  • Required — vehicle_type and trip_date (YYYY-MM-DD, past allowed).
  • Places — Governorate+area, or typed address / Maps URL, or both. Address alone is valid.
  • Deposit — If payment_url is set, open that TrustCold page. Never collect cards.
  • Retries — Same Idempotency-Key + same JSON returns the original trip, not a duplicate.

JSON body. Pickup and drop-off are governorate + area, or a typed address / Google Maps URL in the same list, or both (see Match the booking form). Extra drop-offs go in to_points. Total drop-offs cannot exceed max_delivery_stops.

If the partner types an address or pastes a Maps URL and does not choose from the list, still create the trip and quote the fare. Do not show a map.

If the client requires a deposit, the response includes payment_url. Open that TrustCold page; do not send card data. If no deposit is due, payment_url is null and the trip is booked immediately.

FieldRequiredDescription
vehicle_typeYescode from GET /vehicle-types
trip_dateYesYYYY-MM-DD. Past dates are allowed
from_governorate / from_areaOne pickup methodCatalog names from GET /locations
from_addressOne pickup methodTyped address or pasted Maps URL, same pickup list — enough without the dropdown
to_governorate / to_areaOne drop-off methodCatalog names
to_addressOne drop-off methodTyped address or pasted Maps URL, same drop-off list — enough without the dropdown
to_pointsNoExtra stops: governorate+area, optional address
notesNoUp to 1000 characters

Address or Maps URL only (no list)

curl -X POST https://trustcoldeg.com/api/v1/b2b/trips \
  -H "Authorization: Bearer CLIENT_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ORDER-10026" \
  -d '{"vehicle_type":"reefer_tank","trip_date":"2026-12-20","from_address":"https://maps.app.goo.gl/pickup","to_address":"Smouha, Alexandria"}'

201 with {"data": { …trip }}. TrustCold prices the trip and returns a trip code.