Customer Registration
1 API call in this section.
Register New Customer
/express-shipping/customer/register?language=enRegister a new customer for express shipping services. If the customer already exists (based on phone number), returns existing customer data and sends a new OTP if not verified. Authentication: - Requires valid Bearer token OR X-API-Key - Bearer token: Authorization: Bearer {{access_token}} - API Key: X-API-Key: {{api_key}} (alternative authentication method) Request Body: - full_name (required): Customer's full name - email (required): Valid email address - phone (required): Phone number in international format (e.g., +919876543210) - delivery_address (required): Comprehensive address object - lat (required): Latitude coordinates (-90 to 90) - lng (required): Longitude coordinates (-180 to 180) - full_address (required): Complete address text - address_line1 (optional): Primary address line - address_line2 (optional): Secondary address line - street (optional): Street name - building (optional): Building name/number - floor (optional): Floor number - city (optional): City name - state (optional): State/Province - country (optional): Country name - postal_code (optional): ZIP/Postal code - notes (optional): Additional delivery notes
1curl --request POST "$ONDI_BASE_URL/express-shipping/customer/register?language=en" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "full_name": "John Doe",7 "email": "john.doe@example.com",8 "phone": "+919876543210",9 "delivery_address": {10 "title": "Home",11 "latitude": 19.076,12 "longitude": 72.8777,13 "full_address": "123 Main Street, Andheri West, Mumbai, Maharashtra 400058, India",14 "address_line1": "123 Main Street",15 "address_line2": "Apt 4B",16 "street": "Main Street",17 "building": "Sunrise Apartments",18 "floor": "4th Floor",19 "city": "Mumbai",20 "state": "Maharashtra",21 "country": "India",22 "postal_code": "400058",23 "notes": "Near the temple, blue building with security guard"24 },25 "tenant_id": "{{tenant_id}}"26}'1{2 "full_name": "John Doe",3 "email": "john.doe@example.com",4 "phone": "+919876543210",5 "delivery_address": {6 "title": "Home",7 "latitude": 19.076,8 "longitude": 72.8777,9 "full_address": "123 Main Street, Andheri West, Mumbai, Maharashtra 400058, India",10 "address_line1": "123 Main Street",11 "address_line2": "Apt 4B",12 "street": "Main Street",13 "building": "Sunrise Apartments",14 "floor": "4th Floor",15 "city": "Mumbai",16 "state": "Maharashtra",17 "country": "India",18 "postal_code": "400058",19 "notes": "Near the temple, blue building with security guard"20 },21 "tenant_id": "{{tenant_id}}"22}Query parameters
languageOptionalen
Preferred language for response messages (en, ar, ku)
Request body fields
full_nameExampleExample field from the request body.
emailExampleExample field from the request body.
phoneExampleExample field from the request body.
delivery_addressExampleExample field from the request body.
delivery_address.titleExampleExample field from the request body.
delivery_address.latitudeExampleExample field from the request body.
delivery_address.longitudeExampleExample field from the request body.
delivery_address.full_addressExampleExample field from the request body.
delivery_address.address_line1ExampleExample field from the request body.
delivery_address.address_line2ExampleExample field from the request body.
delivery_address.streetExampleExample field from the request body.
delivery_address.buildingExampleExample field from the request body.
delivery_address.floorExampleExample field from the request body.
delivery_address.cityExampleExample field from the request body.
delivery_address.stateExampleExample field from the request body.
delivery_address.countryExampleExample field from the request body.
delivery_address.postal_codeExampleExample field from the request body.
delivery_address.notesExampleExample field from the request body.
tenant_idExampleExample field from the request body.
Headers
AuthorizationOptionalBearer {{access_token}}
Content-TypeOptionalapplication/json
Responses
1{2 "success": true,3 "data": {4 "customer_id": "GAL1704067200000",5 "is_new_customer": true,6 "is_verified": false,7 "phone": "+919876543210",8 "full_name": "John Doe",9 "email": "john.doe@example.com"10 },11 "message": "Customer registered successfully. OTP sent to your phone."12}1{2 "success": true,3 "data": {4 "customer_id": "GAL1704067200000",5 "is_new_customer": false,6 "is_verified": true,7 "phone": "+919876543210",8 "full_name": "John Doe",9 "email": "john.doe@example.com"10 },11 "message": "Customer already exists and is verified."12}1{2 "success": false,3 "message": "delivery_address must contain lat, lng, and full_address"4}1{2 "success": false,3 "message": "Missing required fields: full_name, email"4}1{2 "success": false,3 "message": "Invalid coordinates. Latitude must be between -90 and 90, longitude between -180 and 180"4}