10 Essential Concepts to Master the Sage Active Public API

Explore the foundational elements of the Sage Active Public API in this concise guide.
From authentication to data handling, learn the key concepts and best practices that will enhance your API integration and usage.
This video provides a clear overview of the essential aspects needed for effective API implementation and management.

Find here all the main useful information.

Best Practices

A summary of good practices to apply for the use in your applications of Sage Active Public API V2.

Environments

A summary of Available Environment URLs and Their Differences.

MarketPlace

Increase the visibility of your application through the marketplace

API: Authenticate

Sage Active Public API V2 is secured by Oauth 2.0 authentication.
Follow the suggested steps to implement authentication in your application.

User consents

Each user of an application using the API must explicitly give their consent to grant the application the right to access their data.

API Error Management

The error management system in the public API provides feedback on various types of issues encountered during requests.
Errors can be grouped into business logic errors, validation errors, or authorization-related errors.

Operators & keywords for queries

Referencing of the different operators and keywords that can be used for your Sage Active Public API V2 queries.

Understanding DTOs

When working with GraphQL, specifically Hot Chocolate, in the context of Sage Active Public API V2, it’s essential to understand the role and naming convention of Data Transfer Objects (DTOs).
These DTOs facilitate data exchange between client and server and play a critical role in mutations and queries.

API: Pagination

The notion of pagination is fundamental, it is important to know that Sage Active Public API V2 returns a maximum of records for each request.

API: Updating records

In GraphQL, particularly with Hot Chocolate, updating records involves a precise and efficient approach. Let’s explore how modifications and deletions of sub-resources are achieved using the requestedAction field..

GraphQL Complexity Limit

GraphQL queries offer flexibility and customization to users, allowing them to define their own queries.
However, this advantage can also be a potential drawback, as users may execute queries that consume significant resources.
To prevent overloading the GraphQL engine with excessively complex and resource-intensive queries, a complexity limit is enforced on the public GraphQL API

Filtered By Id instead of ById

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 V2 This new approach streamlines the querying process and aligns with the overall GraphQL philosophy.

Users management

User management enables the definition of users, their roles, and their access to businesses (known as organizations in the API context).
The public API considers these roles to authorize or deny access to data based on the current user’s roles.

Benefits of DataLoaders

GraphQL Hot Chocolate DataLoaders offer a powerful solution for efficiently fetching data in GraphQL applications.
By leveraging DataLoaders, developers can significantly reduce the number of database calls, thus minimizing the response time and improving the overall performance of the API.

Aggregations

GraphQL aggregations allow you to compute summarized values over a dataset, such as totals, counts, averages, and grouped values. They provide an efficient way to retrieve structured financial or business insights without requiring extensive data processing on the client side.