Skip to main content

Customer Registration

1 API call in this section.

Register New Customer​

Express Shipping / Customer / Customer Registration
POST/express-shipping/customer/register

Register 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.

  • Requires valid Bearer token OR X-API-Key

  • Bearer token: Authorization: Bearer {{access_token}}

  • API Key: X-API-Key: {{api_key}} (alternative authentication method)

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages (en, ar, ku)

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
full_nameRequiredstring

Customer's full name

emailRequiredstring

Valid email address

phoneRequiredstring

Phone number in international format (e.g., +919876543210)

delivery_addressRequiredobject

Comprehensive address object

delivery_address.titlestring—
delivery_address.latitudenumber—
delivery_address.longitudenumber—
delivery_address.full_addressRequiredstring

Complete address text

delivery_address.address_line1Optionalstring

Primary address line

delivery_address.address_line2Optionalstring

Secondary address line

delivery_address.streetOptionalstring

Street name

delivery_address.buildingOptionalstring

Building name/number

Show 9 more body fields

Additional body parameters

ParameterTypeDescription
delivery_address.floorOptionalstring

Floor number

delivery_address.cityOptionalstring

City name

delivery_address.stateOptionalstring

State/Province

delivery_address.countryOptionalstring

Country name

delivery_address.postal_codeOptionalstring

ZIP/Postal code

delivery_address.notesOptionalstring

Additional delivery notes

tenant_idstring—
delivery_address.latRequiredstring

Latitude coordinates (-90 to 90)

delivery_address.lngRequiredstring

Longitude coordinates (-180 to 180)

Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/express-shipping/customer/register?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "full_name": "John Doe",6  "email": "john.doe@example.com",7  "phone": "+919876543210",8  "delivery_address": {9    "title": "Home",10    "latitude": 19.076,11    "longitude": 72.8777,12    "full_address": "123 Main Street, Andheri West, Mumbai, Maharashtra 400058, India",13    "address_line1": "123 Main Street",14    "address_line2": "Apt 4B",15    "street": "Main Street",16    "building": "Sunrise Apartments",17    "floor": "4th Floor",18    "city": "Mumbai",19    "state": "Maharashtra",20    "country": "India",21    "postal_code": "400058",22    "notes": "Near the temple, blue building with security guard"23  },24  "tenant_id": "{{tenant_id}}"25}'

Replace {{placeholders}} with your own values before sending.

Response examples

200OK
Response body
json
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}