Mobile sales app API lead creation fails with 'Geo Location required' error despite valid coordinates

We’re developing a mobile sales application that creates leads through the Zoho CRM API, but running into a blocking error. When our mobile app submits lead data, the API responds with {"code": "MANDATORY_NOT_FOUND", "message": "required field not found", "details": {"api_name": "Geo_Location__c"}} even though geo location isn’t marked as required in our lead layout.

Our current payload structure:

{
  "data": [{
    "Last_Name": "Johnson",
    "Company": "TechCorp",
    "Mobile": "+1-555-0123",
    "Lead_Source": "Mobile App"
  }]
}

The geo location field API name exists in our CRM, but we’re not sure how to properly include it in the mobile payload or if there’s a specific format required. Additionally, we have custom layouts for mobile users - could layout requirements be enforcing this field differently than the standard web layout? The error only occurs when creating leads through the API, not when creating them manually in the mobile app interface.

Custom layouts for mobile definitely have different field requirements than web layouts. Go to Setup > Customization > Modules > Leads > Page Layouts and check if there’s a mobile-specific layout. Mobile layouts can have fields marked as required that aren’t required in the standard layout. The API respects the layout of the user making the request, so if your API user is assigned the mobile layout, those requirements apply to API calls too.

The ‘Geo Location Required’ error occurs because mobile-specific layouts enforce different field requirements than standard web layouts, and geo fields have strict formatting rules.

Geo Field API Names and Structure: Geo location fields in Zoho use a nested JSON structure with precise coordinate values. The field must include both latitude and longitude in decimal degrees format:

"Geo_Location__c": {
  "latitude": 37.774929,
  "longitude": -122.419418
}

The coordinates must be valid decimal numbers (not strings) within standard ranges: latitude between -90 and 90, longitude between -180 and 180. The field name typically ends with __c for custom geo fields or may be a standard field like Geo_Location depending on your configuration.

Mobile Payload Structure: Your mobile app should capture GPS coordinates from the device’s location services and format them correctly. Here’s a properly structured payload for mobile lead creation:

{
  "data": [{
    "Last_Name": "Johnson",
    "Company": "TechCorp",
    "Mobile": "+1-555-0123",
    "Lead_Source": "Mobile App",
    "Geo_Location__c": {
      "latitude": 37.774929,
      "longitude": -122.419418
    }
  }]
}

Custom Layout Requirements: Mobile layouts often have different mandatory fields than web layouts. To verify which fields are required for mobile API requests:

  1. Check the API user’s assigned layout (Setup > Users > [API User] > Layout Assignment)
  2. Review mobile-specific layout requirements (Setup > Customization > Leads > Page Layouts > Mobile Layout)
  3. Query the layouts API to programmatically determine required fields: `GET /crm/v2/settings/layouts?module=Leads The layouts API response shows field-level requirements per layout, including which fields are mandatory for mobile contexts. If your API user is assigned to a mobile-enabled profile or mobile layout, those requirements override standard layout rules.

For mobile app implementation, implement this approach:

  • Request location permissions when the app launches
  • Cache the last known location in case GPS is unavailable
  • Validate coordinates before sending (check ranges, ensure not null)
  • Handle cases where location services are disabled by either using a default location or conditionally adjusting the lead source to one that doesn’t require geo data
  • Consider using HTML5 Geolocation API for mobile web apps or native location services for native apps

If you need to make geo location optional for certain scenarios, modify the mobile layout field properties or use workflow rules to conditionally populate the field based on lead source or other criteria.

I found the mobile layout configuration and the Geo_Location__c field is indeed marked as required there but not in the standard layout. That explains the error. Now I need to figure out how to capture and format the geo coordinates from our mobile app properly. Should we be using the device’s GPS coordinates directly or is there a specific Zoho format for mobile-generated location data?