Skip to main content

API Documentation

Overview

This API allows you to interface with the Saras Finance Agentic ERP system for process management. The system is secured with Role-Based Access Control (RBAC), so ensure to provide the correct parameters to gain access. Before you make an API call - it is essential that you have the project ready in the platform. And your user credentials haev access to that project setup through API. For the configuration of the project, please contact our support team.

Endpoints

1. Get Process List

Endpoint: GET /v1/process/getProcess Description: Retrieve a list of processes with optional filters. Query Parameters:
  • page (integer, required): Page number for pagination.
  • perPageCount (integer, required): Number of items per page.
  • filters (JSON object, required): Filtering options for the processes.
    • metaDetails__projectId: Project identifier.
    • metaDetails__typeOfProcess: Type of process (e.g., PROCESS).
    • metaDetails__subProcessType: Sub-type of process (e.g., tenderprojects).
Curl Example:
# List all Processes

curl \
    --location\
    'https://<<endpoint>>.sarasfinance.com/v1/process/getProcess\
    ?page=1\
    &perPageCount=60\
    &filters={  \"metaDetails__projectId\": \"procureai\" , \"metaDetails__typeOfProcess\" : \" PROCESS\" , \" metaDetails__subProcessType\" : \"tenderprojects\" }' \
--header 'Authorization: Bearer ••••••'

# List a single Process

curl \
    --location\
    'https://<<endpoint>>.sarasfinance.com/v1/process/getProcess\
    ?page=1\
    &perPageCount=60\
    &filters={ \"id\": \"4802689b-a3d5-46a8-b36e-40c32a823540\",  \"metaDetails__projectId\": \"procureai\" , \"metaDetails__typeOfProcess\" : \" PROCESS\" , \" metaDetails__subProcessType\" : \"tenderprojects\" }' \
--header 'Authorization: Bearer ••••••'


2. Create Process Item

Endpoint: POST /v1/process/createProcess Description: Create a new process item entry in the ERP system. Headers:
  • Content-Type: application/json
  • Authorization: Bearer token for securing the request.
Body Parameters:
  • fields (object): The fields for the process, pass to initialise with values or leave for an empty field process item.
  • metaDetails (object, required): Metadata for the process.
    • typeOfProcess: Type of process (e.g., PROCESS).
    • subProcessType: Sub-type of process (e.g., tenderprojects).
Curl Example:
curl --location 'https://<<endpoint>>.sarasfinance.com/v1/process/createProcess' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ••••••' \
--data '{
    "fields": {
        "year": 2026
    },
    "metaDetails": {
        "projectId": "procureai",
        "typeOfProcess": "PROCESS",
        "subProcessType": "tenderprojects"
    }
}'

3. Update Process Field

Endpoint: GET /v1/process/updateProcessField Description: Update a specific field of a process. Headers:
  • Content-Type: application/json
  • Authorization: Bearer token for securing the request.
Body Parameters:
  • processId (string, required): The unique identifier of the process to update.
  • updates (object, required): The fields to update.
    • Example: year, status, etc.
    • metaDetails (object, required): Metadata for the process.
      • typeOfProcess: Type of process (e.g., PROCESS).
      • projectId: Project identifier (e.g., procureai).
      • subProcessType: Sub-type of process (e.g., tenderprojects).
Curl Example:
curl --location 'https://<<endpoint>>.sarasfinance.com/v1/process/updateProcessField' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ••••••' \
--data '{
    "processId": "5370609e-a64e-4492-b333-279080ee0c1a",
    "updates": {
        "year": "2027"
    },
    "metaDetails": {
        "typeOfProcess": "PROCESS",
        "projectId": "procureai",
        "subProcessType": "tenderprojects"
    }
}'

RBAC Considerations

The ERP system employs strict Role-Based Access Control (RBAC). You must specify the following parameters correctly to avoid exceptions:
  • typeOfProcess
  • projectId
  • subProcessType
Failure to adhere to these RBAC requirements will result in exceptions, and access will be denied.

Conclusion

For any issues or further assistance with the API, please reach out to the support team.