Skip to content

docs: document gps_device_capture for FLCRM-20930 - #86

Open
sjperaltas wants to merge 2 commits into
v2from
issue/FLCRM-20930-update-api-dev-docs
Open

docs: document gps_device_capture for FLCRM-20930#86
sjperaltas wants to merge 2 commits into
v2from
issue/FLCRM-20930-update-api-dev-docs

Conversation

@sjperaltas

@sjperaltas sjperaltas commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

What?

  • FLCRM-20930
  • Document gps_device_capture on Records API v2 (properties table plus create/update/PATCH examples)
  • Add Query API examples for _gps_device_capture JSONB filters (->> and @>)
  • Document change-geometry optional event.gpsData and point integrators to persisted gps_device_capture
  • Add OpenAPI request/response examples only (schema already shipped in api: add gps device capture to records schema #75)

Why?

  • Integrators need payload and query examples to map GPS device metadata from custom integrations
  • api#75 added the schema but not Records/Query/Data Events docs
  • Ticket "Search API" is the Query API; change-geometry now includes event data that was undocumented

Testing

  • Please stress test your changes by updating cypress:repeat in package.json with your spec name, then run ./utils/run-against {namespace} repeat.
    • N/A. This change is documentation in fulcrumapp/api; no Cypress specs were added or changed.
  • How do you run the test?
    1. From reference/, run npx --yes rdme openapi validate rest-api.json.
    2. Confirm reference/rest-api.json parses as JSON and has no RAW_BODY keys.
  • Are any config changes needed for the test?
    • No.
  • What steps would one perform to manually test this change?
    1. Open Records intro and confirm gps_device_capture is in the properties table, including that null clears the value.
    2. Open create/update/PATCH examples and confirm a Trimble-style gps_device_capture payload with nested GeoJSON geometry.
    3. Open Query intro and confirm _gps_device_capture JSONB examples: filter by device_name with ->> and by fix_type with @>.
    4. Open Data Events change-geometry / ON docs and confirm event.value is GeoJSON and event.gpsData is optional (keys may differ by platform).
    5. Confirm published docs do not mention geometry_matches_capture.
  • What areas or workflows could this change effect?
    • Records API v2 docs, Query API docs, Data Events change-geometry, and ReadMe rendering of rest-api.json examples.

Add Records, Query, Data Events, and OpenAPI examples for GPS device
capture. OpenSpec change lives in openspec/changes/document-gps-device-capture.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 27, 2026 18:31
@sjperaltas
sjperaltas requested review from a team as code owners August 27, 2026 18:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Documents gps_device_capture end-to-end across Records API v2, Query API, and Data Events, and adds OpenAPI examples to help integrators map and query external GPS receiver metadata (FLCRM-20930).

Changes:

  • Adds gps_device_capture to Records API docs (properties + create/update/PATCH examples) and OpenAPI example payloads.
  • Documents Query API _gps_device_capture (jsonb) with JSON operator examples (->> and @>).
  • Updates Data Events change-geometry docs to mention event.value GeoJSON and optional event.gpsData.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
reference/rest-api.json Adds request/response examples that include gps_device_capture.
reference/RECORDS/records-intro.md Documents gps_device_capture in the record properties table and adds an example.
reference/RECORDS/records-create.md Adds gps_device_capture to create examples across languages.
reference/RECORDS/records-update.md Adds gps_device_capture to update examples across languages.
reference/RECORDS/records-partial-update.md Adds a PATCH example and notes about clearing via null.
reference/QUERY/query-intro.md Adds _gps_device_capture column doc + SQL JSONB query examples.
docs/DATA EVENTS/data-events-reference/index.md Expands change-geometry docs and includes an example event payload with optional gpsData.
docs/DATA EVENTS/data-events-reference/data-events-on.md Updates change-geometry callback docs to describe event.value and optional event.gpsData.
openspec/changes/document-gps-device-capture/* Adds OpenSpec proposal/design/spec + task checklist for the doc change.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread reference/rest-api.json Outdated
"With GPS device capture": {
"value": {
"record": {
"form_id": "aa9816b6-ebec-4f14-88df-7v5844c2237d",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the invalid form_id aa9816b6-ebec-4f14-88df-7v5844c2237d with aa9816b6-ebec-4f14-88df-775844c2237d in all OpenAPI examples.

Comment thread reference/RECORDS/records-create.md
Comment thread reference/RECORDS/records-update.md
Comment thread reference/QUERY/query-intro.md
}
```

A `change-geometry` event uses `value` for the GeoJSON geometry. When external GPS metadata is available, `gpsData` is a top-level sibling of `value`. Keys inside `gpsData` vary by device and client.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Labeled the JSON as an illustrative example, not a canonical schema, and added a placeholder key so gpsData is not read as a closed key list.

Comment thread reference/RECORDS/records-intro.md Outdated
| horizontal\_accuracy | number | no | yes | Accuracy of the latitude and longitude in meters. |
| vertical\_accuracy | number | no | yes | Accuracy of the altitude value in meters. |
| geometry | GeoJSON | no | no | Point, LineString or Polygon of the record. [See below](https://docs.fulcrumapp.com/reference/records-intro#using-the-new-geometry-field) |
| gps\_device\_capture | object | no | no | Flexible GPS receiver metadata captured with the record. Common keys include `device_name`, `manufacturer`, `fix_type`, `satellite_count`, `hdop`, `vdop`, `pdop`, and `geometry` (GeoJSON). Additional device-specific keys are allowed. Send `null` on create/update to clear the value. |

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the properties table to say send null on write (create/update/PATCH).

Align example coordinates, fix invalid form_id UUID, clarify null-on-write,
label gpsData as illustrative, and guard satellite_count SQL casts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 27, 2026 22:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Comment thread reference/rest-api.json
Comment on lines +61 to +67
"gpsData": {
"deviceName": "Trimble R2",
"fixType": "RTK",
"satellites": 14,
"hdop": 0.8,
"...": "additional device-specific keys"
}
@@ -89,6 +89,26 @@ See the examples below for valid and invalid usages of this endpoint.
}
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants