Acumatica API Integration Guide: How to use Acumatica API a beginner’s guide in 2024(Wed

Join WhatsApp Group Join Now
Join Telegram Group Join Now
Join Instagram Group Join Now

Acumatica API Integration Guide: if you’re utilizing Acumatica and seeking to automate tasks or integrate it with other applications, exploring the Acumatica API could be highly beneficial. Acumatica’s Cloud ERP APIs enable seamless integration with external systems and applications. These APIs, facilitated through web services, empower external applications to access data records from Acumatica, manipulate them as needed, save changes, and even create new or updated records.

Understanding Acumatica API Integration

The Acumatica API provides developers and system integrators access to two types of interfaces: screen-based and contract-based APIs, both of which are built on SOAP protocols.

REST API: This API allows users to interact with Acumatica data using common HTTP methods such as GET, POST, PUT, and DELETE. It offers straightforward and flexible ways to manipulate Acumatica data, making it easier to integrate with external systems.

Contract-Based API: This API offers functionalities for creating contracts and executing operations within the Acumatica ERP system. It enables users to perform complex operations and forecast actions securely and robustly.

The Contract-Based API is particularly suited for accessing Acumatica data and executing intricate operations with enhanced security measures.

How to Get Started with Acumatica API

20240321 111708 0000
Acumatica Cloud ERP Platform
Join Our WhatsApp Group WhatsApp Join Our WhatsApp Group
20240321 111950 0000

Screen-based Web Services API

Screen-based APIs in Acumatica ERP are specifically designed to interact with all forms within the system directly. Each element on the forms, such as text boxes, combo boxes, or table columns, is associated with a corresponding web services API class and property. These properties have names similar to the elements they represent on the form.

Here’s how to utilize the screen-based APIs:

Step 1: Log into Acumatica

Once logged in, you can access the data on the forms using simple web services. The screen class of the API methods for working with all Acumatica ERP forms is readily available.

Step 2: Determine the form a method accesses.

You can determine the form a method accesses by examining the prefix in the method’s name, which represents the form ID. For instance, the Export() method used to export data from stock items on the inventory form IN202500 is called IN202500 Export().

Screen-based APIs are a distinctive feature of Acumatica, providing significant value with their rich capabilities and flexibility. However, they are closely tied to the user interface and may require adjustments if changes occur in the screen layout.

Contract-based Web Services API

Today, I’d like to discuss the new Contract-Based Web Services API introduced in Acumatica version 5.3. Here are the main differences between the previous Screen-Based API and the new Contract-Based API:

1. Enhanced Stability: – With the Screen-Based API, developers had to directly reference field and action names from the Acumatica UI. However, any changes to field names or their positions could disrupt existing integrations. The Contract-Based API introduces an intermediate layer between the UI and integration code, providing more stability. Minor changes in the Acumatica UI are less likely to break existing integrations.

2. Improved Ease of Use: – The new API simplifies integration tasks, requiring fewer lines of code to accomplish the same tasks. Additionally, it offers a more intuitive interface, making it easier for developers to write code and understand the API’s functionalities.

3. Better Adaptation to REST: – The previous API had limitations in its adaptation to REST standards. However, the Contract-Based API aligns with the industry trend towards RESTful architectures, offering greater compatibility with RESTful practices.Now, with the introduction of the Contract-Based API, developers have access to an intermediate layer called “Endpoint.” The default (built-in) endpoint is suitable for most common tasks, but for more complex or specific logic, developers have two options:

1. Configure a new endpoint within the Acumatica user interface. This option is fast and flexible but may require additional support.

2. Request additional logic to be added to the default endpoint by contacting Acumatica support. While this process may take longer, it offers easier use and support in the long run.

20240321 112948 0000

The Endpoint in Acumatica’s Contract-Based Web Services API encompasses various components including screens, linked/detail contents, fields, and actions. Each of these elements is associated with specific names that are expanded through web services, facilitating programmable interactions.

These items are closely linked to corresponding elements within the Acumatica user interface. Here’s a breakdown of each component within the Endpoint:

1. Screens: These represent different forms or views within the Acumatica UI, such as inventory management screens, sales order screens, or customer information screens.

2. Linked/Detail Contents: These are related data elements displayed within a screen, often presented as linked records or details associated with a main record. For example, in a sales order screen, linked detail contents might include line items or shipping details.

3. Fields: Fields are individual data fields within a screen or linked/detail content, containing specific pieces of information like item names, quantities, prices, or customer details.

4. Actions: Actions refer to functionalities or operations that can be performed within a screen or linked/detail content. Examples include saving data, submitting forms, updating records, or executing specific processes.

By utilizing the Contract-Based Web Services API to access and interact with these elements, developers can automate processes, integrate Acumatica with external systems, and develop custom functionalities tailored to their business requirements.

20240321 113421 0000

Once all the necessary components are mapped, you can begin utilizing the web service.

In this example, I will demonstrate how to access Stock Items through the API. For my specific task, utilizing the default endpoint is sufficient, so I will proceed with it.

20240321 113816 0000

By clicking on “View Endpoint Service,” you will access the web service definition containing all available methods. At this juncture, the crucial detail you require is the URL of the web service.

20240321 114105 0000

This URL will be utilized in Visual Studio or any other development environment to import the web service definition.

20240321 114320 0000

Lastly, don’t forget to enable cookies and increase the request limit as part of the preparation process.

20240321 114548 0000

Now we can start development.

You can access the code example by clicking on the following link: [Code Example]

The traditional web services API will continue to be supported and maintained, but it’s advisable to develop new projects using the contract-based web services API. Eventually, it may become mandatory for solution certification, possibly within the next year.

For existing projects, migration to the new API can be done gradually, allowing you to blend both technologies within the same product. Sharing session cookies can help streamline the process and prevent the need for multiple logins.

Wishing you a smooth and successful integration journey!

Leave a comment

Join WhatsApp Group Join Now
Join Telegram Group Join Now
Join Instagram Group Join Now