When to use this endpoint

Location_edit updates an area after this fixed projection has populated the map. Use the list endpoint when you need last_edited or a custom projection.

These records represent work areas and map locations, not live user GPS positions or geofence definitions. Read IDs before editing; the stored user column is distinct from user-to-area membership.

Authentication and permissions

Authenticate using signed API-key fields or a logged-in CRM session. All object queries use the authenticated tenant. The handler has no additional page, role or feature check unless stated below.

Sign numeric request values as strings, including nested native arrays; only JSON-encode parameters that explicitly accept JSON text. See Getting started.

Parameters

ParameterTypeRequiredDescription
user_idInteger-compatibleNoRetained by the delegated list call; restricts to user-to-area links, not the location row’s user_id.

Example request

$result = FM_api('Locations_get', []);

Example response

[{"id":"1042","name":"Depot","lat":"54.6","lng":"-5.9","address":null,"user_id":"0","customer_id":"0"}]

Errors and unusual responses

ResponseCondition
{"error":"not logged in"}No authenticated tenant context is available. Invalid signed credentials can be rejected by the dispatcher before the handler runs.

Legacy application errors may be returned with HTTP 200. Check the decoded response for error, not only the HTTP status.

Behaviour and edge cases

  • Delegates to Locations_list with fixed fields id, name, lat, lng, address, user_id, customer_id. Caller-supplied fields are overwritten; changes, last_edited and customer_type are omitted.
  • Because the internal call merges request values, an incoming user_id still filters by many-to-many area assignments. No pagination or ORDER BY is applied; no matches return [].
  • Only non-deleted work areas are read or changed. No department or ownership restriction is applied. CRM1/CRM2 hide Area Settings with feature bit 524288, but these APIs do not enforce that UI restriction.
  • The source search found no direct caller in the mobile JavaScript app or its m/www intermediary for this endpoint.

Side effects

  • Read-only; no object writes, audit entries or notifications are performed.

See it in Fieldmotion

CRM1

Area Settings and Stock storage selectors call Locations_get on opening; filter by that function name.

CRM2

Area Settings initial loading calls Locations_get; filter by that name.

Related endpoints