Get full job history for specific technician via API

I need to retrieve the complete work order history for a specific technician via the FieldPulse API. Specifically, I am interested in understanding the following:

  1. What is the recommended endpoint and query pattern for filtering work orders by assignee (i.e., assignee_id)? The documentation suggests GET /v1/work_orders?assignee_id={id}, but I am uncertain whether this returns all historical records or only those in non-terminal states.
  2. How does pagination behave when filtering by assignee? I have observed cursor-based pagination in other list endpoints, but I need confirmation on whether the cursor parameter is stable across filter combinations, particularly when the underlying dataset may be receiving concurrent updates.
  3. Is there a mechanism to retrieve associated metadata—e.g., customer details, location coordinates, completion timestamps—without issuing N+1 requests? The documentation mentions an expand parameter, but its supported values are not exhaustively enumerated.
  4. What are the failure modes and edge cases I should account for? Specifically:
    • How does the API handle requests for a technician ID that has been deactivated or reassigned?
    • Is there a maximum lookback period for historical data, and if so, is this configurable per tenant?
    • Are there rate-limiting considerations specific to filtered queries versus unfiltered list requests?

For context, my use case involves generating quarterly performance reports that aggregate job completion metrics per technician. I am less concerned with real-time consistency than with completeness and accuracy of the historical record. I have confirmed that my API key has work_orders:read and technicians:read scopes.

Any clarification on the query parameters, expansion capabilities, and documented constraints would be appreciated. If there are relevant RFCs or specification documents I should consult, please reference them directly.

Parents
  • Hey Omar — good questions, let me work through these. The filtering behavior here is... let's call it "documented optimistically," so I get why the uncertainty.

    1. Endpoint and filter behavior

    GET /v1/work_orders?assignee_id={technician_id} does return all work orders where that technician is the assignee, regardless of status. That includes completed, cancelled, archived — everything. The "non-terminal states only" thing is a rumor I think started because the mobile app defaults to filtering for open jobs. The API doesn't.

    2. Pagination stability

    Yeah, cursor-based with cursor and limit. The cursor is stable for the duration of your paginated fetch unless you're sorting by a mutable field like updated_at. Sort by created_at:asc or id:asc and you're fine. Concurrent updates won't shift your window.

    3. Expansions

    Supported expansions for work orders:

    GET /v1/work_orders?assignee_id=usr_abc123&expand=customer,location,checklist_responses

    That gets you the full customer object, location with coordinates, and checklist data in one shot. technician is redundant here since you're filtering by assignee, but it works.

    4. Edge cases

    • Deactivated technicians: API returns their historical work orders normally. The technician object in the response will have status: "inactive".
    • No lookback limit that I'm aware of, though very old records (pre-2022) may have incomplete completed_at timestamps due to a migration quirk.
    • Rate limits: Filtered queries count the same against your bucket. The 429 backoff applies per-token, not per query type.

    Pro tip: If you're doing quarterly aggregations, consider the API rate limits and batch your requests. For large date ranges, I've seen people hit limits by being too granular.

    Let me know if you want a sample script — I have a Python pattern for this exact report use case.

  • Eli, thank you for the detailed response. A few follow-up clarifications:

    Regarding the expand parameter: is assignee_history supported for work orders that have been reassigned? I.e., if technician A was originally assigned, then the work order was reassigned to technician B, does a query filtered for technician A still return that work order? My testing suggests "no," which would imply that the current assignee_id is the only indexed field for this filter.

    Additionally, you mention created_at:asc for stable pagination. The API documentation lists sort as accepting created_at, updated_at, scheduled_date, and priority, but does not explicitly confirm that :asc and :desc suffixes are supported. Can you confirm the exact syntax?

    The sample script would be appreciated, particularly if it handles the cursor extraction and exponential backoff pattern.

Reply
  • Eli, thank you for the detailed response. A few follow-up clarifications:

    Regarding the expand parameter: is assignee_history supported for work orders that have been reassigned? I.e., if technician A was originally assigned, then the work order was reassigned to technician B, does a query filtered for technician A still return that work order? My testing suggests "no," which would imply that the current assignee_id is the only indexed field for this filter.

    Additionally, you mention created_at:asc for stable pagination. The API documentation lists sort as accepting created_at, updated_at, scheduled_date, and priority, but does not explicitly confirm that :asc and :desc suffixes are supported. Can you confirm the exact syntax?

    The sample script would be appreciated, particularly if it handles the cursor extraction and exponential backoff pattern.

Children
No Data