Skip to main content

List a customer's locations

GEThttps://api.fieldtask.example/public/v1/customers/{customer_id}/locations
Permissions
customer_locations:read, customers:read
Pagination
Cursor, up to 100 per page

Returns one customer's service locations, oldest first by default, one page at a time.

Put the customer's ID in the path: GET /public/v1/customers/{customer_id}/locations. Locations of an archived customer are listed as usual. If the customer doesn't exist, belongs to another organization or was deleted in FieldTask, the response is 404 resource_not_found. A customer with no locations returns an empty list.

Lists show current data, so a location created or changed while you page through may or may not appear. Deleted locations aren't included.

Permissions​

PermissionDependency in the permission map
customer_locations:readDepends on customers:read
customers:readNo dependencies

Request​

Responses​

OK

Response Headers
    Cache-Control

    Responses must not be cached.

    X-Request-ID

    Server-generated request correlation ID.

Filtering and pagination​

The customer in the path is the only filter. There's no search by name or address, and locations can't be looked up by external_reference. To find a location, list the customer's locations and compare names and addresses.

  • page_size sets the number of locations per page, from 1 to 100. The default is 25.
  • ordering is created_at (oldest first, the default) or -created_at (newest first).
  • When page.has_more is true, request page.next_page_url with the same Authorization header. It keeps your page size and ordering. It's null on the last page.
  • If you build URLs yourself, pass page.next_cursor as cursor and keep every other parameter and the customer unchanged. Cursors expire within 24 hours and only work with the query, customer and connection that produced them.

See Pagination.

Location fields​

FieldWhat it holds
customer_idThe customer the location belongs to.
name, addressThe location's label and street address.
latitude, longitudeThe location's position, or both null when it isn't known. A location created without coordinates gets them once FieldTask has looked up the address, where that's enabled.
radiusThe geofence radius around the location, in metres, whatever distance unit your organization displays. Older locations may have null.
is_defaultWhether this is the customer's default location. At most one of a customer's locations is the default; a customer's first location becomes it.
revisionIncluded only where FieldTask has enabled change tracking for locations.

FieldTask can also withhold a field everywhere until it's published for your environment. Only id is always present, so handle missing fields rather than failing.

A location's address is separate from the customer's primary_address. See The customer's primary address.

Errors​

StatuscodeMeaningWhat to do
400invalid_queryThe query string has an unknown, repeated or invalid parameter. external_reference isn't accepted here.Send only page_size, ordering and cursor, each once.
400invalid_cursorThe cursor is malformed, was changed, or belongs to a different query, connection or page size.Use next_page_url or the cursor exactly as returned, with the same query. To change the query, start again without a cursor.
401invalid_tokenThe bearer token is missing, malformed, expired, revoked or issued for a different resource (for example an MCP sign-in).Send a current REST API token or REST OAuth access token as Authorization: Bearer ….
403api_access_not_enabledFieldTask hasn't enabled API access for this organization, or has disabled it.An owner or admin requests access in Settings → API connections.
403insufficient_scopeThe connection lacks a permission this request needs. error.code is missing_permission.Add the permission named in error.message to the connection.
404resource_not_foundThe customer in the path doesn't exist, belongs to another organization or was deleted, or the URL is wrong.Check the customer ID with GET /public/v1/customers, the API origin and the path.
405method_not_allowedThis path doesn't accept the HTTP method, or the create isn't enabled in this environment. The Allow header lists the methods that are.Use a method listed in Allow.
429rate_limit_exceededToo many requests in the current minute, or too many concurrent requests, for the organization or connection.Wait for Retry-After seconds, then retry.
429daily_quota_exceededThe organization or connection has used its daily allowance for this kind of request. Allowances reset at 00:00 UTC.Wait for Retry-After seconds, or check remaining allowance in Settings → API connections.
503temporarily_unavailableThe service couldn't complete the request.Retry with exponential backoff. Retry creates with the same key and body.