AGIR REST API

Created by Virtual Agent, Modified on Wed, 07 Jun 2023 at 06:05 PM by Virtual Agent

With our REST API´s you can create new processes, update data, send data to other applications in an integrated and secure way. The process of authentication is a pre-requisite before using our API’s. This authentication is a bearer token. The bearer token is obtained by following a specific procedure that involves creating an entry in the "APIKey" SQL table. 

 

To get started, you need to create an entry in the APIKey table. Here are the details of the columns in the APIKey table: 

 

  • KeyName: This column stores the name of the company. You should populate this column with the name of the respective company. 

  • KeyCode: This column stores an alphanumeric code with 40 characters. The code should only contain alphanumeric characters and no special characters. This will be your bearer token. 

  • KeyAPI: This column stores the characters "Agir." This value is a constant and should be the same for all entries in the table. 

 

The request must include the bearer token in the "Authorization" header of their API requests. The header should follow the format: "Bearer [token]" where [token] represents the extracted bearer token value which is the “KeyCode”. 

 

  

 

Ready to Use API´s

 

POST wkf_val  

This endpoint fills information to a record.

Example: define a supplier VAT Number

 

Parameters: 

id (INT): ID of Agir record 

fields (json): Key corresponds to field name and value corresponds to the value that you want to insert. 


Example: 

{ 

    id:23381, 

    fields:{ 

        NameOfContact:"Peter Silva", 

        EmailOfContact:"petersilva@iqa.pt", 

        DateOfOcurrance:"06/06/2023" 

    } 

} 

 

  

 

 

GET wkf_val  

This endpoint retrieves information from a record. A json object will be returned where the key is the name of the field and the value is the correspondent value. 

Example: Get a supplier VAT Number

 

Parameters: 

id (INT): ID of Agir record 

fields (String Array, OPTIONAL) : Names of fields, if this parameter is not added all values from record will be returned 


Example: 

{ 

    id:23381, 

    fields:["NameOfContact","EmailOfContact","DateOfOcurrance"] 

} 

 

  



POST doc_acknowledge  

With this endpoint is possible to set a document acknowledgment. For more information regarding this feature please read our tutorial on Reading acknowledgment request  

Example: Set document X as acknowledged by user Y

 

Parameters: 

userID (INT): ID of Agir user, this is optional if instead of id you provide the parameter “username” 

username (string): Agir username, this is optional if an userID was provided 

documentID (INT): ID of the document in Agir, this is optional if you provide the parameter “code” 

code (string): Code of the document in Agir, this is optional if an documentID was provided 

 

Example: 

{ 

    userID:148, 

    username:"pedrosilva", 

    documentID:2601, 

    code:"Desp. Aut-28" 

} 

 

  

POST wkf_new  

With this endpoint is possible to create Agir workflow records.  

Example: Create a new customer complaint

 


Parameters: 

wkf  (INT): ID of Agir workflow 

inter (INT Array): An array of Agir users ID, this value will dictate which users will receive the workflow task 

title (string): Title of the new record 

fields (json): Key corresponds to field name and value corresponds to the value that you want to insert. 

 

Example: 

 

{ 

    wkf:278, 

    inter:[148], 

    title:"This is an API test", 

    fields:{ 

        NameOfContact:"Peter Silva", 

        EmailOfContact:"petersilva@iqa.pt", 

        DateOfOcurrance:"06/06/2023" 

    } 

} 

  


POST sql_view  

With this endpoint is possible to get the information from any Agir SQL view, this is useful to get workflow information in mass as well as any specific information that might be important. The creation of the view is usually done by IQA 

Example: Total number of complaints from last year


Parameters: 

viewname  (JSON): The key should be “viewname” and the value should be the view name in string. Please contact us if you need a specific view or if the current view does not return all the required information. 

 

Example: 

{viewname:"WKF_ActionPlan"} 

 







Customized API´s


In addition to the ready-to-use native APIs described above, during the implementation of AGIR we can develop new APIs for specific uses and scopes. This is an activity that we typically develop during the design and implementation phases of our projects. If necessary, please contact our technical team. Together, we will be able to develop the integration model that best serves  your organization.









Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article