Ask for a location or delivery address in WhatsApp
Use Orbit’s WhatsApp interactive messages when your next step needs a customer’s current location or a delivery address. The customer can share the information without leaving the conversation, and the reply arrives in the same conversation thread. Before you begin, connect a WhatsApp Business Account and make sure the customer has messaged your business within the last 24 hours. These messages are free-form interactive messages, so they do not need a template submission or review.1. Choose an endpoint
Orbit exposes both endpoints underhttps://api.orbit.devotel.io/api/v1/whatsapp and authenticates them with your X-API-Key header.
Request the customer’s location
CallPOST /messages/send-location-request with a short prompt. Orbit sends Meta an interactive location_request_message, and WhatsApp displays a Send location button. When the customer accepts, Meta sends a plain location inbound message containing coordinates.
Request a delivery address
CallPOST /messages/send-address-request with the customer’s market in country. WhatsApp displays its structured address form for that market. The completed form arrives as an interactive inbound message with type: "address_message".
Both routes are owner-admin sends and are limited to WhatsApp. They are not interchangeable with SMS or another messaging channel.
2. Request bodies and validation
Both requests requireto and body:
The location request has no other fields:
Example with a pre-filled delivery form:
3. Read the reply in your webhook
Subscribe tomessage.received and use the inbound payload to update the same conversation. Orbit threads both reply types into the conversation inbox; see add a topic to the inbox for inbox routing and topic handling.
Location reply
A location reply is a plainlocation message, not an interactive reply. Read latitude and longitude from message.location:
Delivery-address reply
An address reply is an interactive message withtype: "address_message". Meta’s exact field names depend on country. Your integration should accept the fields returned for that market. A normalized example looks like this:
address, in_pin_code, building_name, landmark_area, state, or zip_code instead of street and postcode. Preserve the returned field names when you store or forward the address. Do not assume every market returns the same set.
4. Use customer data only for the requested action
Ask for a location or delivery address only when you expect to use it for that conversation, such as locating a pickup point or fulfilling an order. Explain why you need it, collect only the fields required for that purpose, and apply your tenant’s retention and deletion controls. Do not save, enrich, profile, or mine location and address data for unrelated purposes.5. Try each request with curl
Replace the API key and recipient with your values. Run these calls while the customer’s 24-hour window is open.Location request
message.received consumer receives the location payload shown above.
Delivery-address request
message.received consumer receives an address_message payload with the returned street, city, postcode, country, and any other market-specific fields, as shown above.
6. Handle denials and unsupported channels
- Customer declines or dismisses the control: treat the reply as absent. Do not repeatedly ask. Offer a clear alternative, such as asking the customer to type the information or contact support.
- The customer sends a different WhatsApp reply: keep the conversation open and ask a focused follow-up rather than assuming that the location or address was shared.
- The destination is SMS: SMS cannot render WhatsApp location-request buttons or address forms. Detect the channel before sending and use a plain-text fallback that asks the customer to reply with the required address or a map link. Do not send a WhatsApp interactive payload through an SMS route.
- The 24-hour window is closed: the API rejects the free-form interactive send. Use an approved WhatsApp template to ask the customer to reply, then send the location or address request after the window reopens. See WhatsApp’s 24-hour freeform window.
See also
- Get started with WhatsApp
- WhatsApp’s 24-hour freeform window
- WhatsApp Flows for multi-screen forms