How to add a Delivering API in my adalo's application

GoodMorning,

I am trying to add a delivering method in my adalo’s application but i don’t know how to do that, i don’t understand how Make works too

Thanks in adavance,

Structure (no external APIs)

Collections

  • Users

  • role: customer | delivery person | admin

  • name, phone, verified document (bool)

  • area_base (neighborhood/zone)

  • is_available (bool) — only for delivery person

  • last_lat, last_lng (optional, via location component)

  • Orders

  • customer (rel. User), customer_address (rel. Address)

  • subtotal

  • delivery_zone (rel. Zone) / distance_bucket (e.g., “0–3 km”, “3–6 km”)

  • shipping_price

  • status: pendingassigningacceptedpickupen routedeliveredcompleted

  • delivery person (rel. User)

  • hold_until (datetime) — anti-double-acceptance lock

  • proof_photo (image), signature_name (text), delivered_at

  • Addresses

  • user, label (“House”), street, number, neighborhood, city, zip code, ref

  • Zones (if using zone pricing)

  • name (“Centro”, “Zona Sul”), zip_start, zip_end or list of neighborhoods

  • PricingRules

  • type: zone or distance

  • zone (rel. Zone) or distance_bucket

  • base_price, additional (optional), min_price

  • Earnings

  • delivery person, order, amount, fee_platform, status: pending | released | paid

Pricing (without distance via API)

Choose a model:

  1. By Zone: link the order to a Zone by neighborhood/ZIP code → pull PricingRules.base_price.
  2. By Distance Range (manual): customer chooses a range (“0–3 km”, “3–6 km”) at checkout; you link it to a PricingRule.

Tip: start with Zone (simple and reliable). Then, if desired, add distance ranges.

Flows

1) Customer Checkout

  1. Customer chooses address → app identifies zone (by ZIP code/neighborhood) or requests the distance_bucket.
  2. Calculate shipping_price: search in PricingRules and save it to Orders.
  3. Create order with status = pending.

2) Assignment to the delivery person (without Make)

  • “Upcoming Orders” screen (Delivery Person): Orders list with:

  • status = pending or assigning

  • delivery_zone == deliveryperson.base_area

  • hold_until empty or less than now (released)

  • “Accept” button:

  1. If hold_until empty/expired → arrow:
  • deliveryperson = Current User
  • status = accepts
  • hold_until = now + 3 min (collection window)
  1. If already occupied, display a warning and remove from the list.

Alternative: dispatch screen (admin) with a manual “Assign” button for an available delivery person (filter is_available = true and same base_area).

3) Pickup and Route

  • Delivery person sees “My Deliveries”:

  • accepts“Start Pickup” button → pickup status

  • “Out for delivery”en_route status (optional: update last_lat/lng via the location component when the screen opens)

  • Customer tracks status on a “My Orders” screen.

4) Delivery and Proof

  • “Delivered” button (Delivery person):

  • takes a proof photo and/or collects signature_name

  • records delivered_at, status deliveredcompleted

  • creates Earnings (value = shipping_price – fee_platform)

5) Delivery Person Financial

  • “Earnings” screen:

  • adds Earnings by period, status

  • admin changes status to paid when paying (external transfer).

Screens (minimum)

Customer

  • Cart → Address → Select shipping (zone or distance) → Checkout (shows shipping_price) → My Orders (status).

Delivery Person

  • Login (role check) → Switch Available (is_available)
  • Upcoming Orders (filter by zone + hold) → Accept
  • My Deliveries: Actions (Pickup → En route → Delivered with photo/signature)
  • Earnings

Admin

  • Dispatch (pending list + assign)
  • Zones and PricingRules Table
  • Earnings Table (mark paid)

Useful Rules and Locks in Adalo

  • Anti-double acceptance: use hold_until + “if empty or expired” condition.
  • Availability: only list orders if deliveryperson.is_available = true.
  • Zone: define the base_area of the delivery person; combine with the delivery_zone of the order. * Audit: Save status transitions in an “OrderLogs” collection (optional).

Optional extras (still only Adalo)

  • Customer ↔ Delivery Person Chat (Messages collection) within the order.
  • “Call/WhatsApp” button on the delivery card.
  • Evaluation (delivery person rating per order).