API integration details


Vinit

2025-12-19 07:47:21


    StrategicERP – API Integration Documentation

    Incoming and Outgoing API Processes

     


    1. Overview

    StrategicERP supports two-way API integration to enable structured data exchange between the ERP and external systems. The integration framework is managed through the API Integration Master under the Admin module, where users can configure mappings, authentication, data transformation logic, and validation rules.

    The ERP supports two categories of API communication:

    • Incoming API – External System → StrategicERP
       

    • Outgoing API – StrategicERP → External System
       

    Both types use JSON-based communication and allow full customization of request/response handling, mapping structures, and logs.

    Screenshot Reference:

    • Screenshot 1: API Integration Master Form


    2. Authentication Methods

    StrategicERP supports secure authorization methods that external applications must use while calling the ERP APIs:

    2.1. API Key

    x-api-key: YOUR_API_KEY

     

    2.2. Bearer Token

    Authorization: Bearer <token>

     

    Authentication parameters are configured under:
    Admin → API Integration → Header Configuration

     


    3. Incoming API (External System → ERP)

    3.1. Purpose

    Incoming APIs allow external systems to push structured data into StrategicERP. Typical use cases include:

    • Vendor master creation
       

    • Lead and enquiry entry
       

    • Invoice updates
       

    • Attendance and biometric data imports
       

    • Material receipt posting
       

     


    3.2. Endpoint

    POST https://<client>.strategicerpcloud.com/api/v1/integration/incoming

     

     


    3.3. Sample Request Body

    {

      "vendorName": "ABC Suppliers",

      "gstNumber": "27ABCDE1234F1Z5",

      "contactPerson": "Ramesh Sharma",

      "mobile": "9876543210",

      "email": "abc@xyz.com",

      "city": "Mumbai"

    }

     

     


    3.4. Field Mapping (API Parameters → ERP Fields)

    Incoming mappings are defined in:
    Admin → API Integration → Incoming Mapping List

    API Parameter

    ERP Field

    Validation

    Required

    vendorName

    Vendor_Name

    Cannot be empty

    Yes

    gstNumber

    GST_No

    Regex + uniqueness

    Yes

    mobile

    Phone_No

    Format check

    No

    email

    Email

    Email format

    No

    city

    City

    Must exist in master

    No

    Screenshot References:

    • Screenshot 2: Incoming Mapping List
       

    • Screenshot 3: Incoming Parameter Mapping Screen
       

     


    3.5. Validation Rules

    The ERP validates:

    • Mandatory fields
       

    • Data types (string, number, date)
       

    • Duplicate entries (GST, mobile number, unique identifiers)
       

    • Master data consistency
       

    • Existing workflow rules
       

    If validation fails, ERP denies the record insertion/update.

     


    3.6. Return Status Logic

    Status Value

    Meaning

    SUCCESS

    Record inserted/updated

    FAILED

    Validation failure

    DUPLICATE

    Duplicate found; operation skipped

    Configured in:
    API Integration → Return Status Rules

     


    3.7. ERP Response

    Success

    {

      "status": "success",

      "message": "Record saved successfully",

      "recordId": "VEND-1023"

    }

     

    Error

    {

      "status": "error",

      "errorCode": "INVALID_GST",

      "message": "GST number is invalid"

    }

     

     


    3.8. Testing Incoming API

    The API Integration Form supports:

    • Sample JSON testing
       

    • Data parsing preview
       

    • Field-wise mapping validation
       

    • Display of final processed results
       

    • “Show Data / Test” execution for dry run
       

     


    3.9. Error Handling

    Error Code

    Meaning

    400

    Invalid or missing parameters

    401

    Authentication failure

    404

    API endpoint or mapping not found

    409

    Duplicate record

    500

    Internal server error

    Logs available under:
    API Logs → Incoming Logs

     


    4. Outgoing API (ERP → External System)

    4.1. Purpose

    Outgoing APIs allow StrategicERP to push ERP-generated data to external systems like:

    • Accounting software
       

    • CRM systems
       

    • Vendor and payment portals
       

    • Mobile apps
       

    • Government portals
       

     


    4.2. Endpoint

    POST https://external-system.com/api/v1/receive-data

     

    Configured in:
    Admin → API Integration → Outgoing API Settings

     


    4.3. Sample Request (Sent by ERP)

    {

      "invoiceNumber": "INV/2025/0045",

      "invoiceDate": "2025-12-12",

      "amount": 85000,

      "customerName": "ABC Infrastructure",

      "projectCode": "PRJ-102",

      "gstNumber": "27ABCDE1234F1Z5"

    }

     

     


    4.4. Field Mapping (ERP Fields → External API Parameters)

    Defined in:
    Admin → API Integration → Outgoing Mapping List

    ERP Field Name

    Outgoing Parameter

    Data Type

    Required

    Invoice_No

    invoiceNumber

    String

    Yes

    Invoice_Date

    invoiceDate

    Date

    Yes

    Total_Amount

    amount

    Number

    Yes

    Client_Name

    customerName

    String

    No

    Project_Code

    projectCode

    String

    No

    GST_No

    gstNumber

    String

    No

    Screenshot References:

    • Screenshot 4: Outgoing Mapping Configuration
       

    • Screenshot 5: Outgoing API Trigger Settings
       

     


    4.5. Trigger Mechanisms

    Event-Based

    Triggered automatically when certain ERP transactions occur, such as:

    • Invoice approval
       

    • Vendor creation
       

    • GRN posting
       

    Manual Push

    Users can send data manually via “Send to API” button.

    Scheduler-Based

    Automated jobs run at defined intervals to push queued data.

     


    4.6. Response Handling from External System

    Success

    {

      "status": "success",

      "referenceId": "EXT-88341"

    }

     

    ERP logs store:

    • Status
       

    • Reference ID
       

    • Timestamp
       

    Failure

    {

      "status": "error",

      "message": "Duplicate invoice found"

    }

     

    ERP logs show:

    • Error details
       

    • Retry eligibility
       

    • Record movement to Failed Queue, if enabled
       

     


    4.7. Error Handling

    Error Code

    Meaning

    400

    Invalid or missing parameter

    401

    Authentication failure

    404

    API endpoint not found

    409

    Duplicate data

    500

    External system error

    Logs available under:
    API Logs → Outgoing Logs

     


    4.8. Testing Outgoing API

    The ERP testing panel allows:

    • Selecting a sample ERP record
       

    • Generating outgoing JSON as per mapping
       

    • Executing the API call
       

    • Viewing response logs including:
       

      • Request JSON
         

      • Response JSON
         

      • Status code
         

      • Timestamp
         

     


    5. Summary of Differences

    Feature

    Incoming API

    Outgoing API

    Data Direction

    External → ERP

    ERP → External

    Who Initiates

    External System

    StrategicERP

    Mapping Used

    Incoming Mapping

    Outgoing Mapping

    Typical Uses

    Vendor, leads, attendance

    Invoice sync, vendor sync

    Validation Performed

    ERP

    External system

    Trigger

    Always external

    Event, manual, scheduler

     


    In a Nutshell – StrategicERP API Integration Knowledge Base (Compressed Summary)

    Overview

    ERP supports both incoming and outgoing APIs.
    Screenshot references:

    • Screenshot 1: API Integration Form
       

    Authentication

    • API Key
       

    • Bearer Token
       

    Configured under Header Configuration.

    Incoming API

    External → ERP
    Endpoint: POST https://<client>.strategicerpcloud.com/api/v1/integration/incoming

    Screenshots:

    • Screenshot 2: Incoming Mapping List
       

    • Screenshot 3: Incoming Parameter Mapping
       

    Includes:

    • Full field mapping
       

    • Validation rules
       

    • Return status logic
       

    • Success & error responses
       

    Outgoing API

    ERP → External
    Endpoint: POST https://external-system.com/api/v1/receive-data

    Screenshots:

    • Screenshot 4: Outgoing Mapping
       

    • Screenshot 5: API Trigger Settings
       

    Includes:

    • Mapping
       

    • Triggers
       

    • Response handling
       

    • Log structure
       

    Common Error Codes

    400, 401, 404, 409, 500
    Logs in API Logs → Incoming/Outgoing














     

    Screenshots


     

    Screenshot 1

     

    Screenshot 2 

     

    Screenshot 3 


     

    Screenshot 4 

     





     




    Related Articles