TrustColdDevelopers
Catalog›Pickup and drop-off

Pickup and drop-off

Catalog + UI contract. Two cards. One stacked list each. Address is optional. No map.

Run this from your browser — add your free test keys.
curl "https://trustcoldeg.com/api/v1/b2b/locations/search?q=Nasr+City" \
  -H "Authorization: Bearer CLIENT_KEY" \
  -H "Accept: application/json" \
  -H "Accept-Language: ar"
Response 200 · Fields are abridged; ui labels are also returned
{
  "data": {
    "modes": [
      { "id": "dropdown", "required": false, "fields": ["from_governorate", "from_area", "to_governorate", "to_area"] },
      { "id": "address", "required": false, "fields": ["from_address", "to_address"], "same_list": true,
        "search": "https://trustcoldeg.com/api/v1/b2b/locations/search" }
    ],
    "governorates": [
      {
        "name": "القاهرة",
        "label": "Cairo",
        "name_ar": "القاهرة",
        "name_en": "Cairo",
        "regions": [
          { "name": "مدينة نصر", "label": "Nasr City", "name_ar": "مدينة نصر", "name_en": "Nasr City" }
        ]
      }
    ],
    "max_delivery_stops": 3,
    "search_url": "https://trustcoldeg.com/api/v1/b2b/locations/search",
    "quote_url": "https://trustcoldeg.com/api/v1/b2b/quote",
    "ui": { "layout": "paired_cards", "show_map": false, "sides": [ "…" ], "list": { "fields": [ "…" ] } }
  }
}

Key points

  • List — Governorate, then area from governorates[].regions. Send name (the catalog values are Arabic strings).
  • Optional address — Same list: type an address or paste a Google Maps URL. Enough alone to quote and book.
  • No map — Do not render a map tab or pin. Search exists only to resolve typed text or a Maps link.
  • Quote after change — Call POST /quote when place or vehicle changes. Fare is integer EGP, locked by TrustCold.

Catalog and UI for pickup and drop-off. Each side is one stacked list: Governorate, then Area, then an optional field to type an address or paste a Google Maps URL. Do not show a map. See Match the booking form.

  1. List (optional if address is sent). Governorate, then a dependent area from this catalog. Display name_en or name_ar. Send name — catalog values are Arabic strings, for example القاهرة (Cairo).
  2. Address or Google Maps URL (optional if list is sent). Same card, same list. Typed place or a pasted Maps URL in from_address / to_address. Enough on its own to quote and book. GET /locations/search?q= can resolve the text.
Do not render a map. Either Governorate/Area or a typed address / Maps URL is enough. If the partner types an address or pastes a Maps link without choosing from the list, TrustCold still accepts it and quotes the fare.

Call POST /quote after the place or vehicle type changes. The fare is calculated by TrustCold (truck-legal route, locked to closed hundreds of EGP).

FieldDescription
modesTwo objects, dropdown and address, each with its id, required (false) and the request fields it fills. Either is enough, same list
uiLayout and labels for two cards (sides: pickup, drop-off) and the list fields in order: governorate, area, optional address. Each has label, label_ar, label_en
governorates[].nameValue to send
governorates[].labelLabel for the current language
governorates[].name_ar / name_enFixed labels
governorates[].regionsAreas in that governorate, each an object with name (send this), label, name_ar, name_en. Empty means the whole governorate is allowed
search_urlOptional typeahead and Maps-link resolve
quote_urlFare after the place changes
max_delivery_stopsDrop-off cap for this client, including the first stop

Search (optional address field)

GET

/locations/search?q=

Also accepts a pasted Google Maps URL in q. Use this for the optional address field on the same list as Governorate / Area.

Search response

Up to a few matches. Use governorate and area to fill the list, or send the address text as from_address / to_address. Labels follow Accept-Language.

Response 200
{
  "ok": true,
  "results": [
    {
      "label": "Nasr City",
      "address": "Nasr City, Cairo, 11765, Egypt",
      "lat": 30.0521177,
      "lng": 31.3422045,
      "governorate": "Cairo",
      "area": "Nasr City",
      "source": "nominatim"
    }
  ]
}