Acumatica has robust API integration platform including REST API & ODATA. The following chart provides details:
ODATA – GI Based
Screen ID: SM208000
Generic Inquiry allows creating data views/queries through forms within the instance, which can then be exposed to API. More details on the setup can be found here.
Example Use-Case: Complex GI data i.e., complex query to retrieve the data that should be exposed via API & also exported as Excel or viewed on the ERP
ODATA DAC Based
DAC based ODATA calls allows to retrieve data from the DACs and also retrieved related data.
Example call: {{instance}}/t/<TenantName>/api/odata/dac
Example Use-Case: Integrating with POWER_BI reports or new reporting system for financial analysis
More details on this and filtering capacities for ODATA can be found on the help article
Retrieving Removed Records
In addition to retrieving existing records, Acumatica also allows keeping track of deleted ones. This helps ensure integrating systems are up to date. The article provides more details on how to retrieve deleted records.
Contract-Based REST API
Using REST API, we will be able to retrieve, create and update records in the ERP and also execute actions on the screens through the API. In addition to this, files and images can be attached to records to through API. To achieve this, Acumatica has pre-built default endpoints and also allows extending/adding to the default endpoint, any custom fields or new entities. Lastly, the data can be filtered, retrieved in batches or even a single record can be pulled.
Quick Example:
Retrieve all records: {{instance}}/entity/Default/24.200.001/SalesOrder
Retrieve one record: {{instance}}/entity/Default/24.200.001/SalesOrder/a6295b33-c7f6-e811-b817-00155d408001
Here the first calls retrives all the sales order in the system and the second one retrieves an single Sales Order with a GUID – a6295b33-c7f6-e811-b817-00155d408001
View all available endpoints
The pre-defined endpoints can be found on the Web Services Endpoint – SM2070PL Screen or it can retrieved through API. This article should be of help.
Rest API Versions
Filtering & Pagination
Why we need it: To avoid timeout errors & increase performance
Major filtering technique:
- $expand
- $filter
- $top
- $skip
Example: $filter= ‘LastModifiedDateTime’ gt ‘2024-02-18T23%3A59%3A59.999%2B04%3A00’
This allows users to retrieve data since the last sync. More details
Executing Actions through API
Actions such as “Release” in Bills and Adjustments can be executed through API. This should be post call. More details
Retrieving data from Report
Data from reports can be retrieved through API. More details
Example:
POST {{instance}}/entity/Report/0001/CashAccountSummary
Request Body:
{
“CompanyBranch”: {“value”: “SOFT”},
“IncludeNonClearedTransactions”: {“value”: true}
}
Extend Default endpoint and create new endpoint
Screen: SM207000
In case custom fields and new screens are added to the instance, the details specific to these can be added to the default endpoint. Also, details which are not present in the default endpoint can be added to the extended endpoints. More details and how to create and utilize these custom extended endpoints can be found here
Make custom endpoint shareable / Add to a customization package
Screen: SM204505
Makes the REST API sharable through customization projects. More details
Push Notification
Screen ID: Push Notifications (SM302000)
Push notifications allow external applications to track data changes in Acumatica
Push notifications allow external applications
- To send notifications about changes in particular data.
- To implement real-time synchronization of changes in the data in Acumatica ERP with the data in an external system.
To configure Acumatica ERP to send push notifications for a query that is defined as a class in the source code of the application—that is, for a built-in definition of the query. More details
Webhooks
Screen: Webhooks (SM304000)
A webhook helps you to integrate external applications that provide data in their own format and need to submit this data to Acumatica ERP. The data can be mapped to relevant records within Acumatica. More details
Authentication & Authorization
Using OAUTH & OPENID framework for login to Acumatica. It is best to design the integration using this framework to avoid technical debt and ensure security. The are multiple authorization flows to be used and when to use is detailed below. More information on configuration and usage can be found here
Screen used: SM303010
Changing business date & Branch when using API
By using PX-CbApiBusinessDate & PX-CbApiBranch Header values, we can change the current business date and the branch the API is using. This is needed when the current date and branch is influences the functionality. This allows set the branch permissions and date eg., bill generation date. More details
Localized data retrieval
As long as a locale language is defined in the instance, details can be retrieved in another locale through API. More details
Example call: {{instance}}/entity/Default/24.200.001/StockItem?$expand=Translations
User permissions :
Setting such as Maximum Number of Web Services API Users, Maximum Number of Web Services API Requests per Minute & licensing restrictions can be accessed/ reviewed through the instance.
Screen ID: SM604000
Further reading:
Training: I – courses for web services
Help articles with Examples