Device App Locations
The Device App Locations API
enables tracking and management of mobile app location data from devices within your organization. This endpointprovides access to locationrecordsdatawithwithinfilteringyourcapabilitiesorganization'sbaseddeviceonmanagementmodificationsystem.timestampsThese endpoints allow you to retrieve detailed information about physical locations where devices are deployed, including address details, geographic coordinates, andsupportsorganizationalpaginationmetadata. This is essential forhandlingassetlargetracking,datasetsgeographicefficiently.reporting, and location-based device management.
Base URL: https://gate.zequenze.com/api/v1
Authentication: All endpoints require a Bearer token:
Authorization: Bearer <your-api-token>
Overview
The Device App Locations API is designed for organizations that need to trackmanage and monitor location data from mobile applications installed on managed devices. This API category serves as a central repository forretrieve location information collectedfor fromdevice variousdeployment appstracking. acrossLocations represent physical sites, offices, warehouses, or any other places where your deviceorganization's fleet.devices are installed or managed.
Key Capabilities:Features:
RetrieveGeographic Data Management: Store complete address information with latitude/longitude coordinates
Common IntegrationUse Scenarios:Cases:
Security monitoring systems that need to verifyBuilding devicelocationsinventory dashboards with geographic visualizationComplianceGeneratingreportinglocation-based reports fordevicesassetthatmanagement
The API usesfollows aRESTful standard REST architectureprinciples with JSONpaginated responses andfor supports query-based filtering to help you retrieve exactly the locationefficient data youretrieval, needmaking withoutit unnecessarysuitable overhead.for both small-scale queries and large enterprise deployments.
Endpoints
GET /device_app_locations/
Description: Retrieves a paginated list of all locationlocations recordswithin fromyour applications on monitored devices.organization. This endpoint allowsreturns youcomprehensive location data including address information, geographic coordinates, and organizational metadata. Use this to access historical and currentbuild location data,selectors, filtergenerate bygeographic modificationreports, timestamps,or andsynchronize handlelocation largedata datasetswith throughexternal pagination controls.systems.
Use Cases:
GeneratePopulatecompliancedropdownreportsmenus for device assignment forms
Full URL Example:
https://gate.zequenze.com/api/v1/device_app_locations/?last_change__gte=2024-01-15T10:00:00Z&limit=50&offset=0&last_change__gte=2024-01-01T00:00:00Z
Parameters:
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
| last_change__gte | string | query | No | Filter |
| limit | integer | query | No | Number of results to return per |
| offset | integer | query | No | The initial index from which to return |
cURL Example:
curl -X GET "https://gate.zequenze.com/api/v1/device_app_locations/?last_change__gte=2024-01-15T10:00:00Zlimit=10&limit=25"offset=0" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json"
Example Response:
{
"count": 1247,125,
"next": "https://gate.zequenze.com/api/v1/device_app_locations/?limit=2510&offset=25"10",
"previous": null,
"results": [
{
"id": 15842,1,
"device_id": "DEV-2024-001",
"device_name": "iPhone 15 - John Doe",
"app_name"name": "Corporate Mobile App"Headquarters",
"app_package"short_name": "com.company.mobile"hq-main",
"is_active": true,
"description": "Main corporate office building with executive offices and IT infrastructure",
"organization_id": "org_abc123def456",
"thumbnail": "https://gate.zequenze.com/media/locations/hq_thumb.jpg",
"address": "1234 Business Ave, Suite 100",
"reference": "Building A - Main Entrance",
"city": "San Francisco",
"postal_code": "94105",
"state": "California",
"region": "West Coast",
"country_code": "US",
"latitude": 40.7128,"37.7749",
"longitude": "-74.0060,122.4194",
"accuracy": 5.2,
"altitude": 10.5,
"timestamp"created": "2024-01-15T14:23:17Z"15T10:30:00Z",
"last_change": "2024-01-15T14:23:20Z",
"location_method": "GPS",
"address": "123 Business St, New York, NY 10001",
"is_mock_location": false,
"battery_level": 78,
"network_type": "WiFi"03-10T14:22:33Z"
},
{
"id": 15841,2,
"device_id"name": "DEV-2024-002"Manufacturing Plant - Phoenix",
"device_name"short_name": "Samsung Galaxy S24 - Jane Smith"mfg-phoenix",
"app_name"is_active": true,
"description": "FieldPrimary Servicemanufacturing App"facility for hardware production",
"app_package"organization_id": "com.company.fieldservice"org_abc123def456",
"thumbnail": "https://gate.zequenze.com/media/locations/phoenix_plant.jpg",
"address": "5678 Industrial Blvd",
"reference": "Plant #1",
"city": "Phoenix",
"postal_code": "85001",
"state": "Arizona",
"region": "Southwest",
"country_code": "US",
"latitude": 34.0522,"33.4484",
"longitude": "-118.2437,112.0740",
"accuracy": 3.8,
"altitude": 71.3,
"timestamp"created": "2024-01-15T14:20:45Z"20T09:15:00Z",
"last_change": "2024-01-15T14:20:48Z",
"location_method": "GPS",
"address": "456 Client Ave, Los Angeles, CA 90028",
"is_mock_location": false,
"battery_level": 92,
"network_type": "4G"02-28T11:45:12Z"
}
]
}
Response Codes:
| Status | Description |
|---|---|
| 200 | Success - Returns paginated location data |
| 401 | Unauthorized - Invalid or missing |
Common Use Cases
Use Case 1: Real-TimeBuilding a Location-Based Device Dashboard
Retrieve all active locations to populate a geographic dashboard showing device distribution across your organization's sites. Use the is_active=true filter and combine with device APIs to show real-time asset allocation.
Use Case 2: Synchronizing Location MonitoringData for Reports
Monitor recent location changes across all devices by usingUse the last_change__gte parameter withto afetch recentonly timestamp.locations Thismodified issince idealyour last sync, enabling efficient incremental updates for securityexternal dashboardsreporting thatsystems need to show current device positions and detect unusual movement patterns.
Use Case 2: Compliance Reporting
Generate periodic reports by fetching locationor data for specific time periods. Combine timestamp filtering with pagination to process large datasets efficiently for compliance documentation and audit trails.warehouses.
Use Case 3: GeofenceCreating ViolationLocation DetectionHierarchies
Regularly pollLeverage the APIregion and organizational structure to build hierarchical location trees for recentmulti-level location updatesreporting and cross-referencedevice coordinatesmanagement against predefinedacross geographic boundariesregions toor identifybusiness devices that have moved outside approved areas.units.
Use Case 4: AssetMobile TrackingApp IntegrationLocation Selection
IntegrateUse the short_name field to create user-friendly location dataselectors intoin assetmobile managementapplications, systemswhile bymaintaining periodicallythe syncingfull deviceaddress positions,information enablingfor betterdetailed inventory managementviews and theftnavigation prevention for mobile device fleets.features.
Use Case 5: BusinessCompliance Intelligenceand AnalyticsAsset Tracking
ExportCombine location data forwith analysisdevice ofinformation employeeto mobilitygenerate patterns,compliance clientreports visitshowing optimization,exactly where sensitive equipment is deployed, including full address details and operationalgeographic efficiencycoordinates improvementsfor inaudit field service operations.purposes.
Best Practices
-
ImplementPaginationEfficientStrategy:Polling:Always implement pagination for large location datasets. Start with reasonable page sizes (20-50 items) and adjust based on your application's performance requirements.
Incremental Sync: Use the last_change__gte parameter withto yourimplement efficient synchronization processes. Store the last successful sync timestamp and only fetch modified records to avoidminimize retrievingAPI duplicate datacalls and reduceimprove API calls.performance.
OptimizeCaching Pagination:Considerations: ChooseLocation appropriatedata typically limitvalueschanges basedinfrequently, onmaking yourit processing capacity. Smaller batches (20-50) provide better responsiveness, while larger batches (up to 100) reduce total API callsideal for bulkcaching. operations.Cache location lists for 15-30 minutes in most applications, but always respect the last_change timestamp for cache invalidation.
HandleGeographic RateData Limits:Handling: ImplementAlways exponentialvalidate backofflatitude/longitude whenvalues receivingbefore 429using responses,them andin considermapping cachingapplications. locationSome datalocations locallymay tonot reducehave APIprecise dependencycoordinates, forso frequentimplement accessfallback patterns.strategies using address geocoding.
ValidateError LocationHandling: Accuracy:Implement Checkretry thelogic for accuracyfieldnetwork andfailures, but is_mock_locationflagavoid toaggressive filterretries outon low-quality401/403 locationresponses. dataLog thatall mightAPI affectresponses yourfor analysisdebugging, orbut compliancenever reporting.log authentication tokens.
Monitor Data Freshness:Security Compare timestamp (when location was recorded) vs last_change (when record was modified) to understand data latency and ensure your monitoring systems account for potential delays.
Secure Token Management:: Store API tokens securely and implementrotate tokenthem rotation.regularly. ConsiderNever usingexpose tokens in client-side code or public repositories. Use environment variables or secure credential management systems rather than hardcoding tokens.systems.