Context

The shift from specific <object>ById queries to more generalized <object> queries with a where clause for ID filtering marks an significative change in the Sage Active Public API V1.
This new approach streamlines the querying process and aligns with the overall GraphQL philosophy.

Notes:
  • If you have already been using a query with a where clause to filter by ID for retrieving a record, you won’t need to make any changes.
    This method remains effective and in line with the updated querying approach.

  • The latest version of the Postman collection has transitioned from using ById queries to filtered by Id for more streamlined and efficient data retrieval. This update aligns with the current best practices in API querying.

    Download the new Postman collection and explore the updated features: Quick start / 5. Test your first query in Postman.

Advantages of the Change

Recommendation

While <object>ById queries are still functional but deprecated, it is recommended to transition to the new ID-filtered queries for efficiency and future compatibility.

Example: Transitioning from accountingAccountById to ID-Filtered Query

Response Format Changes

The transition from ById to filtered by Id queries in the latest API version brings a notable change in the response format.

The ById queries returned a direct object under the ‘data’ field.

Caution

When transitioning from ById to filtered by Id queries, be aware of the change in the ID parameter’s expected type.

Queries that previously accepted ($id: ID!) now require ($id: UUID!).

This change indicates that the API expects a UUID format for unique identifiers, which is more specific and standardized than the generic ID type.

Exceptions

While the transition from specific <object>ById queries to generalized <object> queries with an ID filter is the recommended approach for most resources in the Sage Active Public API V1, there are some exceptions where this rule does not apply: