NAV Navbar
shell
  • Introduction
  • Authentication
  • Investors
  • Investment Accounts
  • Orders
  • Instant Redemption
  • Plans
  • Transactions
  • File Operations
  • Investor Reports
  • Simulation (Early access)
  • MasterData
  • Helper API
  • Mandates
  • Payments
  • KYC Checks
  • KYC Requests
  • Files
  • Errors
  • Introduction

    The FP API is designed to be easily predictable and have consistency across all the resources. It accepts json in the request body and returns a json representation of the resource. We use standard HTTP response codes and HTTP verbs.

    You can access FP API in sandbox and production modes separately. Use the following base URLs:
    Sandbox (for testing): https://s.finprim.com
    Production (for live transactions): https://api.fintechprimitives.com

    Authentication

    FP API uses bearer auth to authenticate all the api calls. You need to send the following header in all your api calls along with your token:

    Authorization: Bearer TOKEN

    Replace TOKEN with the token received from the login api

    APIs:

    POST /api/auth/tenant/login

    POST /api/auth/admin/login (only for sandbox)

    Generate a tenant token

    curl -X POST "{base_url}/api/auth/tenant/login"
      -H "
        Authorization: api_key_id:HMAC_TOKEN
        MFProDate: 20150830T123600Z
        x-tenant-id: tenant_name
        Content-Type: application/json
      "
    

    Response:

    {
      "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyIiwic2NvcGVzIjpbInVzZXIiXSwiaXNzIjoiY3licmlsbGEtYXV0aCIsImlhdCI6MTUwMDQ3MzUxOSwiZXhwIjoxNTAwNDc1MzE5fQ.3_l86DYlmBphZuikVh4F0fHlf-4YG48xk2X__8AkdWc"
    }
    

    POST /api/auth/tenant/login

    Returns a token that can be used as a bearer token for all the api calls.

    Headers

    You need to send the following headers:

    Header Value
    Authorization key:hmac. key is the FP api key id and hmac is the code generated
    MFProDate Timestamp used during HMAC generation in yyyyMMdd'T'HHmmssZ
    x-tenant-id FP tenant_name
    Content-Type application/json

    The HMAC generation procedure is as follows.

    HMAC Token Generation

    Generate payload to sign

    
    Generated payload will be like
    
    "POST" + "\n" +
    md5("") + "\n" +
    "d41d8cd98f00b204e9800998ecf8427e" + "\n" +
    "application/json" + "\n" +
    "20150830T123600Z" + "\n" +
    "/api/auth/tenant/login"
    

    Generate the payload to be signed in below format:

    Request Method + "\n" + body + "\n" + type + "\n" + date + "\n" + request-URI

    In the tenant login, body will be md5 of content-body which is md5(""), date is passed as header params in the request and is called MFProDate

    The format for the MFProDate header is "yyyyMMdd'T'HHmmssZ"

    Signing the payload

    Below are the steps to sign the payload :

    Step 1

    Sign the payload using HmacSHA256 algorithm and secret_key

    Step 2

    Step 2.1

    Base64 encode the above generated data and sign the data with secret_key provided by FintechPrimitives.

    The two parameters which vary in the above steps are payload and secret_key. And below is the whole process of signing

    signed_payload = Base64_StrictEncode(Hmac_SHA256(secret_key, Base64_StrictEncode(payload)))

    payload is the data generated in generate payload step.

    secret_key is the key which will be shared to each tenant either via mail or some other communication mechanism

    Step 2.2

    Format the MFProDate used in generate payload step step in YYYYMMDD format and sign it with the result of step 1 (signed_payload).

    signed_date = Base64_StrictEncode(Hmac_SHA256(signed_payload, MFProDate_IN_YYYYMMDD_FORMAT))

    The signed_payload is used as KEY to sign MFProDate_IN_YYYYMMDD_FORMAT using Hmac_SHA256 algorithm.

    Step 2.3

    Use the signed_date generated in step2 to sign the tenant_name provided by FintechPrimitives

    signed_tenant_name = Base64_StrictEncode(Hmac_SHA256(signed_date, tenant_name)

    Step 2.4

    Use signed_tenant_name generated in step3 to sign the string mfprocybrilla.

    final_hmac_token = Base64_StrictEncode(Hmac_SHA256(signed_tenant_name, "mfprocybrilla"))

    Tenant login code references.

    RESPONSE

    Returns a token that can be used as a bearer token for all the api calls.

    Generate an admin token

    curl -X POST "{base_url}/api/auth/admin/login"
      -H "
        Content-Type: application/json
        x-tenant-id: tenant_name
      "
       -d '{json_request}'
    

    JSON Request:

    {
      "email": "abcdef@cybrilla.com",
      "password": "password"
    }
    

    JSON Response:

    {
      "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyIiwic2NvcGVzIjpbInVzZXIiXSwiaXNzIjoiY3licmlsbGEtYXV0aCIsImlhdCI6MTUwMDQ3MzUxOSwiZXhwIjoxNTAwNDc1MzE5fQ.3_l86DYlmBphZuikVh4F0fHlf-4YG48xk2X__8AkdWc"
    }
    

    POST /api/auth/admin/login

    Returns a token that can be used as a bearer token for all the api calls.

    Headers

    You need to send the following headers:

    Header Value
    x-tenant-id FP tenant_name
    Content-Type application/json

    Attributes

    Attribute Mandatory Type Comments
    email yes string The email id of the admin account
    password yes string The password associated with the admin account

    RESPONSE

    Returns a token that can be used as a bearer token for all the api calls.

    Investors

    Investor holds the personal, demographic and financial information about your customer. The API allows you to create, update an investor and also list investors.

    Endpoints:

    POST /api/onb/investors
    POST /api/onb/investors/:id
    GET /api/onb/investors/:id
    GET /api/onb/investors
    GET /api/onb/investors/search

    Create an investor

    curl -X POST "{base_url}/api/onb/investors"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '{json_request}'
    

    JSON Request

    {
      "display_name": "tony",
      "perm_addr_is_corres_addr": true,
      "ip_address": "192.168.29.100",
      "bank_accounts": [
        {
          "account_holder_name": "tony",
          "number": "00000001234455",
          "primary_account": true,
          "type": "SAVINGS",
          "ifsc_code": "ICIC0000611",
          "cancelled_cheque": "3867a9c6-8a7c-4605-a31d-98367e8972b4"
        }
      ],
      "contact_detail": {
        "email": "mfp@cybrilla.com",
        "isd_code": "91",
        "mobile": "9008580644"
      },
      "fatca_detail": {
        "country_of_birth_ansi_code": "IN",
        "no_other_tax_residences": true,
        "source_of_wealth": "business",
        "gross_annual_income": 100000
      },
      "nomination": {
        "skip_nomination": false,
        "nominee1": {
          "allocation_percentage": 100,
          "date_of_birth": "1990-10-10",
          "name": "nandam",
          "relationship": "spouse"
        }
      },
      "kyc_identity_detail": {
        "pan_number": "AFZPN3001P",
        "country_of_citizenship_ansi_code": "IN",
        "date_of_birth": "1980-10-10",
        "father_or_spouse_name": "tonys wife",
        "kyc_relation": "spouse",
        "gender": "female",
        "marital_status": "single",
        "name": "tony Soprano ms",
        "occupation": "BUSINESS",
        "residential_status": "resident_individual",
        "pep_exposed": false,
        "pep_related": false,
        "signature": "beed6916-cec6-4f4f-bcc8-ed4d93b55660"
      },
      "correspondence_address": {
        "line1": "1082 harlur road",
        "pincode": "560102"
      }
    }
    

    JSON Reponse

    {
      "id": 1,
      "display_name": "tony",
      "perm_addr_is_corres_addr": true,
      "ip_address": "192.168.1.1",
      "created_at": "2018-05-22T10:14:19.072Z",
      "updated_at": "2018-05-22T10:14:19.072Z",
      "meta": null,
      "nomination": {
        "skip_nomination": false,
        "nominee1": {
          "date_of_birth": "1990-10-10",
          "name": "Tony Stark",
          "relationship": "nandam",
          "guardian_name": null,
          "guardian_relationship": null,
          "allocation_percentage": 100
        },
        "nominee2": null,
        "nominee3": null
      },
      "contact_detail": {
        "email": "mfp@cybrilla.com",
        "isd_code": 91,
        "mobile": "9008580644",
        "office_telephone_no": null,
        "residence_telephone_no": null
      },
      "fatca_detail": {
        "country_of_birth_ansi_code": "IN",
        "source_of_wealth": "BUSINESS",
        "first_trc_ansi_code": null,
        "first_trc_taxid_type": null,
        "first_trc_taxid_number": null,
        "second_trc_ansi_code": null,
        "second_trc_taxid_type": null,
        "second_trc_taxid_number": null,
        "third_trc_ansi_code": null,
        "third_trc_taxid_type": null,
        "third_trc_taxid_number": null,
        "gross_annual_income": 1000000,
        "no_other_tax_residences": true
      },
      "kyc_identity_detail": {
        "name": "tony Soprano ms",
        "father_or_spouse_name": "tonys wife",
        "mothers_name": null,
        "ckyc_number": null,
        "kyc_relation": "spouse",
        "date_of_birth": "1980-10-10",
        "marital_status": "MARRIED",
        "pan_number": "AFZPN3001P",
        "gender": "female",
        "occupation": "BUSINESS",
        "residential_status": "RESIDENT_INDIVIDUAL",
        "country_of_citizenship_ansi_code": "IN",
        "pan_exempt": false,
        "pep_exposed": false,
        "pep_related": false,
        "guardian_relationship": null,
        "guardian_name": null,
        "guardian_date_of_birth": null,
        "guardian_pan_number": null,
        "signature": "beed6916-cec6-4f4f-bcc8-ed4d93b55660"
      },
      "bank_accounts": [
        {
          "id": 1,
          "account_holder_name": "tony",
          "type": "SAVINGS",
          "primary_account": true,
          "number": "00000001214415",
          "created_at": "2019-05-22T10:14:19.082Z",
          "updated_at": "2019-05-22T10:14:19.082Z",
          "branch": {
            "ifsc_code": "ICIC0000611",
            "micr_code": null,
            "branch_name": "GUDIVADA",
            "bank_name": "ICICI BANK LIMITED",
            "branch_address": "ICICI BANK LTD , D NO11218, NENIPLAZA, ELURU ROAD, GUDIVADA 521301",
            "contact": null,
            "city": "GUDIVADA",
            "district": "KRISHNA",
            "state": "ANDHRA PRADESH"
          },
          "cancelled_cheque": "3867a9c6-8a7c-4605-a31d-98367e8972b4"
        }
      ],
      "correspondence_address": {
        "line1": "1082 road",
        "line2": null,
        "line3": null,
        "type": "CORRESPONDENCE",
        "zipcode": "560112",
        "city": "Bengaluru",
        "state": "KARNATAKA",
        "country_ansi_code": "IN"
      },
      "_links": [
        {
          "href": "{base_url}/onb/investors/229",
          "rel": "self",
          "method": "GET"
        },
        {
          "href": "{base_url}/onb/investors/229",
          "rel": "update",
          "method": "POST"
        }
      ]
    }
    

    POST /api/onb/investors

    Create a new investor so you can allow him to make investments and see reports. The information from the investor object is used while creating a new folio.

    Parameters

    Name Mandatory type Comments
    display_name no string
    perm_addr_is_corres_addr yes boolean flag to determine if permanent_address is same as correspondence_address
    bank_accounts yes array of objects this is a list of banks accounts that can be added for the investor. You can mark only one account as Primary. For more details please refer bank account parameters.
    contact_detail yes object contact details of the investor
    fatca_detail yes object FATCA details of the investor
    nomination yes object nominee details of the investor
    kyc_identity_detail yes object identity details of the investor for KYC and Registration with AMCs
    correspondence_address yes object
    permanent_address no object mandatory if perm_addr_is_corres_addr is false
    overseas_address no object mandatory for NRI investor
    ip_address no string 192.099.10.10

    BankAccount params

    Name Mandatory type Comments
    account_holder_name yes string name of the bank account holder
    number yes string bank account number
    primary_account yes boolean whether the bank_account is primary or not
    type yes enum select one from - "SAVINGS", "CURRENT", "NRE", "NRO"
    ifsc_code yes select one of the ifsc code from ifsc codes api
    cancelled_cheque no string File Id of uploaded cancelled cheque image using files api. Mandatory to create Investment Account when order gateway provider is BSE

    ContactDetail params

    Name Mandatory type Comments
    email yes string email ID of the investor to be reported to AMC
    isd_code yes string ISD code of the mobile / telephone number
    mobile yes string mobile number of the investor
    office_telephone_no no string
    residence_telephone_no no string

    FatcaDetail params

    Name Mandatory type Comments
    country_of_birth_ansi_code yes string ANSI code of the country, eg ANSI code of India is IN
    no_other_tax_residences yes boolean flag to determine if the investor is a tax-resident in countries other than India. If set to false, atleast one tax residency details is mandatory.
    source_of_wealth yes enum values permitted: SALARY, BUSINESS, GIFT, ANCESTRAL_PROPERTY, RENTAL_INCOME, PRIZE_MONEY, ROYALTY, OTHERS
    gross_annual_income yes integer should be greater than zero
    first_trc_ansi_code no string ANSI code of the tax residency country. Mandatory if no_other_tax_residences is false
    first_trc_taxid_type no string type of tax identification (SSN Card etc..). Mandatory if first_trc_ansi_code is given
    first_trc_taxid_number no string number of the tax identification (SSN etc..). Mandatory if first_trc_ansi_code is given
    second_trc_ansi_code no string ansi code of the tax residency country
    second_trc_taxid_type no string type of tax identification (SSN Card etc..). Mandatory if second_trc_ansi_code is given
    second_trc_taxid_number no string number of the tax identification (SSN etc..). Mandatory if second_trc_ansi_code is given
    third_trc_ansi_code no string ansi code of the tax residency country
    third_trc_taxid_type no string type of tax identification (SSN Card etc..). Mandatory if third_trc_ansi_code is given
    third_trc_taxid_number no string number of the tax identification (SSN etc..). Mandatory if third_trc_ansi_code is given

    Nomination params

    Name Mandatory type Comments
    skip_nomination yes boolean Flag to determine is the investor wants to declare nominee
    nominee1 no object mandatory if skip_nomination is false
    nominee2 no object mandatory if allocation percentage of nominee1 is less than 100%
    nominee3 no object mandatory if total allocation percentage of nominee1 & nominee2 is less than 100%

    Nominee params

    Name Mandatory type Comments
    name yes string
    date_of_birth yes string date formatted as "YYYY-MM-DD"
    relationship yes string can be any relationship like (spouse/father/mother etc..)
    allocation_percentage yes integer should be from 0-100
    guardian_name no string mandatory if nominee is a minor
    guardian_relationship no string relationship of nominee with the guardian. Mandatory if nominee is a minor

    KYC IdentityDetail params

    Name Mandatory type Comments
    name yes string name of the investor as printed in the identity_proof
    father_or_spouse_name no string
    mothers_name no string
    kyc_relation no enum relationship of the investor with person mentioned in father_or_spouse_name field. Values permitted: FATHER, SPOUSE
    country_of_citizenship_ansi_code yes string ANSI code of the country of citizenship of the investor
    date_of_birth yes string date of birth of the investor in "YYYY-MM-DD" format
    gender yes enum gender of the investor. Values permitted: MALE, FEMALE, OTHERS
    marital_status yes enum marital status of the investor. Values permitted: MARRIED, SINGLE, OTHERS
    residential_status yes enum residential status of the investor. Values permitted: RESIDENT_INDIVIDUAL, NON_RESIDENT_INDIVIDUAL
    occupation yes enum occupation of the investor. Values permitted: AGRICULTURE, BUSINESS, DOCTOR, FOREX_DEALER, GOVERNMENT_SERVICE, HOUSE_WIFE, OTHERS, PRIVATE_SECTOR_SERVICE, PROFESSIONAL, PUBLIC_SECTOR_SERVICE, RETIRED, SERVICE, STUDENT.
    pan_number no string should be valid pan_number and mandatory if pan_exempt is false
    pan_exempt no boolean default to be false
    pep_exposed yes boolean flag to determine if the person is politically exposed
    pep_related yes boolean flag to determine if the person is related to a politically exposed person
    guardian_name no string mandatory if investor is minor
    guardian_relationship no string mandatory if investor is minor
    guardian_date_of_birth no string mandatory if investor is minor. Date of birth in format "YYYY-MM-DD".
    guardian_pan_number no string mandatory if investor is minor. PAN number of the guardian should be a valid PAN number.
    signature no string File Id of uploaded signature image using files api. Mandatory to create Investment Account when order gateway provider is BSE

    Address params

    Name Mandatory type Comments
    line1 yes string
    line2 no string
    line3 no string
    city no string mandatory if zipcode is given
    state no string mandatory if zipcode is given
    pincode no string mandatory if zipcode is not given
    zipcode no string mandatory if pincode is not given
    country_ansi_code no string mandatory if zipcode is given

    A note on BSE order gateway

    Mandatory fields validation for BSE

    Field Mandatory Remarks
    perm_addr_is_corres_addr yes
    kyc_identity_detail.name yes
    kyc_identity_detail.date_of_birth yes
    bank_accounts yes At least one bank account. For each bank account type, number and ifsc_code are mandatory
    correspondence_address.line1 yes
    correspondence_address.city yes
    correspondence_address.state yes
    correspondence_address.pincode yes
    correspondence_address.country_ansi_code yes
    contact_detail.email yes
    contact_detail.mobile yes

    Tax status specific validations for BSE

    Tax Status 4th character of PAN Bank Account Type Guardian Name Guardian PAN Gender
    Individual P SAVINGS/CURRENT/NRE/NRO mandatory
    On behalf of minor P SAVINGS/CURRENT mandatory mandatory mandatory

    Maximum length validations for BSE

    Field Maximum length
    kyc_identity_detail.name 70
    kyc_identity_detail.guardian_name 35
    kyc_identity_detail.date_of_birth 10
    nominee.name 35
    nominee.relationship 20
    bank_account.number 16
    bank_account.ifsc 11
    address.line1 40
    address.line2 40
    address.line3 40
    address.city 35
    contact_detail.office_telephone_no 15
    contact_detail.residence_telephone_no 15
    contact_detail.email 50
    contact_detail.mobile 10

    Update an investor

    curl -X POST "{base_url}/api/onb/investors/12435"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '{json_request}'
    

    JSON Request

    Same parameters as the request for create investor endpoint
    

    JSON Reponse

    {
      "id": 1,
      "display_name": "tony",
      "perm_addr_is_corres_addr": true,
      "ip_address": "192.168.1.1",
      "created_at": "2018-05-22T10:14:19.072Z",
      "updated_at": "2018-05-22T10:14:19.072Z",
      "meta": null,
      "nomination": {
        "skip_nomination": false,
        "nominee1": {
          "date_of_birth": "1990-10-10",
          "name": "Tony Stark",
          "relationship": "nandam",
          "guardian_name": null,
          "guardian_relationship": null,
          "allocation_percentage": 100
        },
        "nominee2": null,
        "nominee3": null
      },
      "contact_detail": {
        "email": "mfp@cybrilla.com",
        "isd_code": 91,
        "mobile": "9008580644",
        "office_telephone_no": null,
        "residence_telephone_no": null
      },
      "fatca_detail": {
        "country_of_birth_ansi_code": "IN",
        "source_of_wealth": "BUSINESS",
        "first_trc_ansi_code": null,
        "first_trc_taxid_type": null,
        "first_trc_taxid_number": null,
        "second_trc_ansi_code": null,
        "second_trc_taxid_type": null,
        "second_trc_taxid_number": null,
        "third_trc_ansi_code": null,
        "third_trc_taxid_type": null,
        "third_trc_taxid_number": null,
        "gross_annual_income": 1000000,
        "no_other_tax_residences": true
      },
      "kyc_identity_detail": {
        "name": "tony Soprano ms",
        "father_or_spouse_name": "tonys wife",
        "mothers_name": null,
        "ckyc_number": null,
        "kyc_relation": "spouse",
        "date_of_birth": "1980-10-10",
        "marital_status": "MARRIED",
        "pan_number": "AFZPN3001P",
        "gender": "female",
        "occupation": "BUSINESS",
        "residential_status": "RESIDENT_INDIVIDUAL",
        "country_of_citizenship_ansi_code": "IN",
        "pan_exempt": false,
        "pep_exposed": false,
        "pep_related": false,
        "guardian_relationship": null,
        "guardian_name": null,
        "guardian_date_of_birth": null,
        "guardian_pan_number": null,
        "signature": "beed6916-cec6-4f4f-bcc8-ed4d93b55660"
      },
      "bank_accounts": [
        {
          "id": 1,
          "account_holder_name": "tony",
          "type": "SAVINGS",
          "primary_account": true,
          "number": "00000001214415",
          "created_at": "2019-05-22T10:14:19.082Z",
          "updated_at": "2019-05-22T10:14:19.082Z",
          "branch": {
            "ifsc_code": "ICIC0000611",
            "micr_code": null,
            "branch_name": "GUDIVADA",
            "bank_name": "ICICI BANK LIMITED",
            "branch_address": "ICICI BANK LTD , D NO11218, NENIPLAZA, ELURU ROAD, GUDIVADA 521301",
            "contact": null,
            "city": "GUDIVADA",
            "district": "KRISHNA",
            "state": "ANDHRA PRADESH"
          },
          "cancelled_cheque": "3867a9c6-8a7c-4605-a31d-98367e8972b4"
        }
      ],
      "correspondence_address": {
        "line1": "1082 road",
        "line2": null,
        "line3": null,
        "type": "CORRESPONDENCE",
        "zipcode": "560112",
        "city": "Bengaluru",
        "state": "KARNATAKA",
        "country_ansi_code": "IN"
      },
      "_links": [
        {
          "href": "{base_url}/onb/investors/229",
          "rel": "self",
          "method": "GET"
        },
        {
          "href": "{base_url}/onb/investors/229",
          "rel": "update",
          "method": "POST"
        }
      ]
    }
    

    POST /api/onb/investors/:id

    Update an existing investor's details. Existing folios for this investor doesn't affect with this change. Any new folios created after the update will contain the updated investor's details.

    Parameters

    All query parameters are same as create investor. Refer to create investor documentation

    In bank_accounts array, id of each bank account needs to be sent to update existing bank account. Otherwise, a new bank account will be added to the investor.

    Fetch an investor

    curl "{base_url}/api/onb/investors/1"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON Reponse

    {
      "id": 1,
      "display_name": "tony",
      "perm_addr_is_corres_addr": true,
      "ip_address": "192.168.1.1",
      "created_at": "2018-05-22T10:14:19.072Z",
      "updated_at": "2018-05-22T10:14:19.072Z",
      "meta": null,
      "nomination": {
        "skip_nomination": false,
        "nominee1": {
          "date_of_birth": "1990-10-10",
          "name": "Tony Stark",
          "relationship": "nandam",
          "guardian_name": null,
          "guardian_relationship": null,
          "allocation_percentage": 100
        },
        "nominee2": null,
        "nominee3": null
      },
      "contact_detail": {
        "email": "mfp@cybrilla.com",
        "isd_code": 91,
        "mobile": "9008580644",
        "office_telephone_no": null,
        "residence_telephone_no": null
      },
      "fatca_detail": {
        "country_of_birth_ansi_code": "IN",
        "source_of_wealth": "BUSINESS",
        "first_trc_ansi_code": null,
        "first_trc_taxid_type": null,
        "first_trc_taxid_number": null,
        "second_trc_ansi_code": null,
        "second_trc_taxid_type": null,
        "second_trc_taxid_number": null,
        "third_trc_ansi_code": null,
        "third_trc_taxid_type": null,
        "third_trc_taxid_number": null,
        "gross_annual_income": 1000000,
        "no_other_tax_residences": true
      },
      "kyc_identity_detail": {
        "name": "tony Soprano ms",
        "father_or_spouse_name": "tonys wife",
        "mothers_name": null,
        "ckyc_number": null,
        "kyc_relation": "spouse",
        "date_of_birth": "1980-10-10",
        "marital_status": "MARRIED",
        "pan_number": "AFZPN3001P",
        "gender": "female",
        "occupation": "BUSINESS",
        "residential_status": "RESIDENT_INDIVIDUAL",
        "country_of_citizenship_ansi_code": "IN",
        "pan_exempt": false,
        "pep_exposed": false,
        "pep_related": false,
        "guardian_relationship": null,
        "guardian_name": null,
        "guardian_date_of_birth": null,
        "guardian_pan_number": null,
        "signature": "beed6916-cec6-4f4f-bcc8-ed4d93b55660"
      },
      "bank_accounts": [
        {
          "id": 1,
          "account_holder_name": "tony",
          "type": "SAVINGS",
          "primary_account": true,
          "number": "00000001214415",
          "created_at": "2019-05-22T10:14:19.082Z",
          "updated_at": "2019-05-22T10:14:19.082Z",
          "branch": {
            "ifsc_code": "ICIC0000611",
            "micr_code": null,
            "branch_name": "GUDIVADA",
            "bank_name": "ICICI BANK LIMITED",
            "branch_address": "ICICI BANK LTD , D NO11218, NENIPLAZA, ELURU ROAD, GUDIVADA 521301",
            "contact": null,
            "city": "GUDIVADA",
            "district": "KRISHNA",
            "state": "ANDHRA PRADESH"
          },
          "cancelled_cheque": "3867a9c6-8a7c-4605-a31d-98367e8972b4"
        }
      ],
      "correspondence_address": {
        "line1": "1082 road",
        "line2": null,
        "line3": null,
        "type": "CORRESPONDENCE",
        "zipcode": "560112",
        "city": "Bengaluru",
        "state": "KARNATAKA",
        "country_ansi_code": "IN"
      },
      "_links": [
        {
          "href": "{base_url}/onb/investors/229",
          "rel": "self",
          "method": "GET"
        },
        {
          "href": "{base_url}/onb/investors/229",
          "rel": "update",
          "method": "POST"
        }
      ]
    }
    

    GET /api/onb/investors/:id

    Retrieve an investor with the investor id

    List all investors

    curl "{base_url}/api/onb/investors"
      -H "Authorization: Bearer ACCESS_TOKEN"
    
    curl "{base_url}/api/onb/investors/search?query=user@cybrilla.com&bank_account_ids=1,22"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON Response

    {
      "last": false,
      "first": false,
      "total_pages": 5,
      "number": 2,
      "size": 10,
      "total_elements": 41,
      "investors": [
        {
          "id": 1,
          "display_name": "tony",
          "perm_addr_is_corres_addr": true,
          "ip_address": "192.168.1.1",
          "created_at": "2018-05-22T10:14:19.072Z",
          "updated_at": "2018-05-22T10:14:19.072Z",
          "meta": null,
          "nomination": {
            "skip_nomination": false,
            "nominee1": {
              "date_of_birth": "1990-10-10",
              "name": "Tony Stark",
              "relationship": "nandam",
              "guardian_name": null,
              "guardian_relationship": null,
              "allocation_percentage": 100
            },
            "nominee2": null,
            "nominee3": null
          },
          "contact_detail": {
            "email": "mfp@cybrilla.com",
            "isd_code": 91,
            "mobile": "9008580644",
            "office_telephone_no": null,
            "residence_telephone_no": null
          },
          "fatca_detail": {
            "country_of_birth_ansi_code": "IN",
            "source_of_wealth": "BUSINESS",
            "first_trc_ansi_code": null,
            "first_trc_taxid_type": null,
            "first_trc_taxid_number": null,
            "second_trc_ansi_code": null,
            "second_trc_taxid_type": null,
            "second_trc_taxid_number": null,
            "third_trc_ansi_code": null,
            "third_trc_taxid_type": null,
            "third_trc_taxid_number": null,
            "gross_annual_income": 1000000,
            "no_other_tax_residences": true
          },
          "kyc_identity_detail": {
            "name": "tony Soprano ms",
            "father_or_spouse_name": "tonys wife",
            "mothers_name": null,
            "ckyc_number": null,
            "kyc_relation": "spouse",
            "date_of_birth": "1980-10-10",
            "marital_status": "MARRIED",
            "pan_number": "AFZPN3001P",
            "gender": "female",
            "occupation": "BUSINESS",
            "residential_status": "RESIDENT_INDIVIDUAL",
            "country_of_citizenship_ansi_code": "IN",
            "pan_exempt": false,
            "pep_exposed": false,
            "pep_related": false,
            "guardian_relationship": null,
            "guardian_name": null,
            "guardian_date_of_birth": null,
            "guardian_pan_number": null,
            "signature": "beed6916-cec6-4f4f-bcc8-ed4d93b55660"
          },
          "bank_accounts": [
            {
              "id": 1,
              "account_holder_name": "tony",
              "type": "SAVINGS",
              "primary_account": true,
              "number": "00000001214415",
              "created_at": "2019-05-22T10:14:19.082Z",
              "updated_at": "2019-05-22T10:14:19.082Z",
              "branch": {
                "ifsc_code": "ICIC0000611",
                "micr_code": null,
                "branch_name": "GUDIVADA",
                "bank_name": "ICICI BANK LIMITED",
                "branch_address": "ICICI BANK LTD , D NO11218, NENIPLAZA, ELURU ROAD, GUDIVADA 521301",
                "contact": null,
                "city": "GUDIVADA",
                "district": "KRISHNA",
                "state": "ANDHRA PRADESH"
              },
              "cancelled_cheque": "3867a9c6-8a7c-4605-a31d-98367e8972b4"
            }
          ],
          "correspondence_address": {
            "line1": "1082 road",
            "line2": null,
            "line3": null,
            "type": "CORRESPONDENCE",
            "zipcode": "560112",
            "city": "Bengaluru",
            "state": "KARNATAKA",
            "country_ansi_code": "IN"
          },
          "_links": [
            {
              "href": "{base_url}/onb/investors/229",
              "rel": "self",
              "method": "GET"
            },
            {
              "href": "{base_url}/onb/investors/229",
              "rel": "update",
              "method": "POST"
            }
          ]
        }
      ]
    }
    

    GET /api/onb/investors

    Retrieve all the investors

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page, size should not be greater than 100



    GET /api/onb/investors/search

    Retrieve a list of investors by applying certain filters

    Query Parameters

    Parameter Mandatory Default Description
    query no - it can be name, email or PAN number
    bank_account_ids no - multiple bank account IDs separated by a comma
    ids no - multiple investors IDs separated by a comma
    page no 0 page number of the result set
    size no 20 number of results per page, size should not be greater than 100

    Investment Accounts

    Represents the account through which all the MF investments for an investor will be routed. The API allows you to create and fetch an investment account.

    Endpoints:

    POST /api/oms/investment_accounts
    GET /api/oms/investment_accounts

    Create an investment account

    curl -X POST "{base_url}/api/oms/investment_accounts"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '{json_request}'
    

    JSON request

    {
      "primary_investor_id": "1"
    }
    

    JSON response

    {
      "message": "Investment account created.",
      "investment_account_id": 3898573529235304961,
      "primary_investor_id": 1
    }
    

    POST /api/oms/investment_accounts

    Create an investment account for an investor

    Parameters

    Name Mandatory Type Comments
    primary_investor_id yes integer ID of the investor object

    List all investment accounts

    curl "{base_url}/api/oms/investment_accounts?investor_id=1"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON Response

    {
      "data": [
        {
          "primary_investor_id": 1,
          "secondary_investor_id": null,
          "investment_account_id": 1
        }
      ]
    }
    

    GET /api/oms/investment_accounts

    Retrieve a list of investment accounts of an investor where he is the primary investor

    Query Parameters

    Parameter Mandatory Description
    investor_id yes ID of the investor object

    Note :

    If the endpoint returns an empty array, it indicates that no investment account exists for that particular investor where he is the primary investor.

    Orders

    Represent the purchase and redemption orders. The API allows you to create and list orders for an investment account.

    Endpoints:

    POST /api/oms/investment_accounts/:id/orders/purchase/netbanking
    POST /api/oms/investment_accounts/:id/orders/purchase/nach
    POST /api/oms/investment_accounts/:id/orders/sell
    POST /api/oms/investment_accounts/:id/orders/sell/instant
    GET /api/oms/investment_accounts/:id/preredemption_summary
    GET /api/oms/investment_accounts/:id/orders
    GET /api/oms/orders

    Create a purchase order

    curl -X POST "{base_url}/api/oms/investment_accounts/123/orders/purchase/netbanking"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '{json_request}'
    

    JSON request

    For NETBANKING endpoint
    
    {
      "bank_account_id": 1,
      "orders": [
        {
          "isin": "INF204KA1B64",
          "amount": 10000,
          "source_ref_id": "0876789",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        },
        {
          "isin": "INF204KA1B84",
          "amount": 10000,
          "source_ref_id": "0876789",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        }
      ]
    }
    
    For NACH endpoint
    
    {
      "mandate_id": 1,
      "orders": [
        {
          "isin": "INF204KA1B64",
          "amount": 10000,
          "source_ref_id": "0876789",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        },
        {
          "isin": "INF204KA1B84",
          "amount": 10000,
          "source_ref_id": "0876789",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        }
      ]
    }
    

    JSON response

    {
      "orders": [
        {
          "id": 2654461373273791985,
          "isin": "INF204KA1B64",
          "folio_number": "sgerhh2422343424",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95",
          "source_ref_id": "0987656"
        },
        {
          "id": 798881668533720940,
          "isin": "INF204KA1B84",
          "source_ref_id": "0876789",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        }
      ]
    }
    

    POST /api/oms/investment_accounts/:id/orders/purchase/netbanking (For NETBANKING payments)
    POST /api/oms/investment_accounts/:id/orders/purchase/nach (For NACH payments): Not Supported with BSE as gateway provider.

    Create one time purchase orders.

    If the configured gateway is BSE, then the order will be in PENDING state upon creation. An attempt to submit the order asynchronously will be made immediately in the background. Once the order is submitted to BSE successfully, the order will be marked as SUBMITTED. However, if the gateway is RTA, you need to create a payment for this order before submitting the order to RTA.

    Note : The fund parameters mentioned in the comments below are availabe in Single Fund Schemes Detail API response. Lumpsum must be allowed for the given fund which can be confirmed by purchase_allowed flag in fund metadata.

    Parameters

    Name Mandatory Type Comments
    bank_account_id yes integer ID of the bank account through which the netbanking payment will be made for this order. Applicable only for NETBANKING endpoint
    mandate_id yes integer ID of the payment mandate through which the debit will happen for this order. Applicable only for NACH endpoint
    isin yes string fund ISIN number
    amount yes integer amount should fulfill the following conditions
    • if order is fresh purchase the amount should be between min_initial_investment and max_initial_investment and in multiple of initial_investment_multiples in fund
    • if order is additional purchase the amount should be between min_additional_investment and max_additional_investment and in multiple of additional_investment_multiples in fund
    folio_number no string mandatory if you need to place an additional purchase in the given folio number
    source_ref_id no string this is a source reference ID which will be unique across system for the purchase orders (ideally an auto generated identifier / uuid to identify a purchase order in your application)
    user_ip no string IP address of user
    server_ip no string IP address of server

    Create a sell order

    curl -X POST "{base_url}/api/oms/investment_accounts/123/orders/sell"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "orders": [
        {
          "folio_number": "45323/45",
          "isin": "INF204KA1B64",
          "type": "amount",
          "amount": 1000,
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        },
        {
          "folio_number": "45323/45",
          "isin": "INF204KA1B64",
          "type": "units",
          "units": 15,
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        }
      ]
    }
    

    JSON response:

    {
      "orders": [
        {
          "id": 2654461373273791985,
          "isin": "INF204KA1B64",
          "folio_number": "sgerhh2422343424",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95",
          "source_ref_id": "0987656"
        },
        {
          "id": 798881668533720940,
          "isin": "INF204KA1B84",
          "source_ref_id": "0876789",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        }
      ]
    }
    

    POST /api/oms/investment_accounts/:id/orders/sell

    Sell units of a scheme in an investment account

    Note : You can obtain redeemable_amount and redeemable_units from Holdings Report

    Parameters

    Name Mandatory Type Comments
    folio_number yes string from which folio_number you want to redeem
    isin yes string fund ISIN number
    type yes string type can be amount or units, mandatory if not redeem all
    amount no integer mandatory if type is amount, it should be lessthan or equal to redeemable_amount
    units no decimal mandatory if type is units, it should be lessthan or equal to redeemable_units
    redeem_all no boolean not to be sent if type is being sent, and if redeem_all is sent as true then type should not be provided
    source_ref_id no string this is a source reference ID which will be unique across system for a lumpsum order (ideally an auto generated identifier / uuid to identify a lumpsum order in your application)
    user_ip no string IP address of user
    server_ip no string IP address of server

    Create a sell order (instant)

    curl -X POST "{base_url}/api/oms/investment_accounts/123/orders/sell/instant"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "folio_number": "421227355",
      "isin": "INF10123VF4",
      "amount": 500,
      "redemption_bank_account_number": "0011212010100728645",
      "redemption_bank_account_ifsc_code": "122000004",
      "source_ref_id": "123",
      "user_ip": "192.168.1.1",
      "server_ip": "192.168.1.2"
    }
    

    JSON response:

    {
      "orders": [
        {
          "id": 11267,
          "isin": "INF109K01VF4",
          "isin_no": "INF109K01VF4",
          "source_ref_id": "kskaklkldlkas",
          "user_ip": "192.168.1.1",
          "server_ip": "192.168.1.2"
        }
      ]
    }
    

    POST /api/oms/investment_accounts/:id/orders/sell/instant

    This endpoint is used to place an Instant Redemption order with the respective AMCs for given isin and folio number. The order contains information such as isin, folio number, bank account number and bank IFSC code. The bank account number and IFSC code should be one of the bank account details returned in /pre_redemption_summary.

    Parameters

    Name Mandatory Type Comments
    folio_number yes string folio_number in which redemption to be placed
    isin yes string fund scheme's ISIN number. insta_redemption_allowed attribute of the fund_scheme should be true to fetch the details.
    amount yes integer amount should fulfill the following conditions
    redemption_bank_account_number yes string bank account number to which funds are transferred after redemption. It should be one of the bank account number returned in Pre Redemption Summary api
    redemption_bank_account_ifsc_code yes string ifsc_code of the given bank_account returned in Pre Redemption Summary api
    source_ref_id no string this is a source reference ID which will be unique across system for an order (ideally an auto generated identifier / uuid to identify an order in your application)
    user_ip no string IP address of user
    server_ip no string IP address of server

    Fetch an order

    curl "{base_url}/api/oms/investment_accounts/123/orders/311"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "id": 11267,
      "type": "REDEMPTION",
      "status": "FAILED",
      "amount": 500,
      "reverse_amount": null,
      "reverse_units": null,
      "price": null,
      "trade_date": null,
      "investment_date": "2019-04-03",
      "folio_number": "427352125",
      "bank_account_id": null,
      "source_ref_id": "kskaklkldlkas",
      "sip_id": null,
      "confirmed_at": "2019-04-03T14:10:00+05:30",
      "submitted_at": "2019-04-03T14:43:00+05:30",
      "succeeded_at": "2019-04-03T15:30:23+05:30",
      "reversed_at": null,
      "failed_at": null,
      "created_at": "2019-04-03T14:00:00+05:30",
      "redemption_mode": "INSTANT",
      "redemption_bank_account_number": "0040101007122128645",
      "redemption_bank_account_ifsc_code": "UTIB00122100004",
      "fund_scheme": {
        "id": 1231,
        "name": "Test Data Liquid Institutional Plan - Growth",
        "isin": "INF109K011212VF4",
        "scheme_code": "155124"
      }
    }
    

    GET /api/oms/investment_accounts/:id/orders/:id

    Retrieve an order on a particular investment account

    List all orders

    curl -X GET "{base_url}/api/oms/investment_accounts/123/orders"
      -H "Authorization: Bearer ACCESS_TOKEN"
    
    curl -X GET "{base_url}/api/oms/orders"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON response

    {
      "amc_orders": [
        {
          "id": 1616,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2019-04-03",
          "folio_number": "2106445674",
          "bank_account_id": null,
          "source_ref_id": null,
          "sip_id": null,
          "confirmed_at": "2019-04-03T14:10:00+05:30",
          "submitted_at": "2019-04-03T14:43:00+05:30",
          "succeeded_at": "2019-04-03T15:30:23+05:30",
          "reversed_at": null,
          "failed_at": null,
          "created_at": "2019-04-03T14:00:00+05:30",
          "redemption_mode": null,
          "redemption_bank_account_number": null,
          "redemption_bank_account_ifsc_code": null,
          "fund_scheme": {
            "id": 317,
            "name": "Invesco India Ultra Short Term Fund - Growth",
            "isin": "INF205K01HY0",
            "scheme_code": "USIG"
          }
        },
        {
          "id": 1766,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-16",
          "folio_number": "1017895054",
          "bank_account_id": null,
          "source_ref_id": "O_43034",
          "sip_id": null,
          "confirmed_at": "2018-03-16T11:10:00+05:30",
          "submitted_at": "2018-04-03T11:43:00+05:30",
          "succeeded_at": null,
          "reversed_at": "2018-04-03T15:30:23+05:30",
          "failed_at": null,
          "created_at": "2019-04-03T10:50:21+05:30",
          "redemption_mode": null,
          "redemption_bank_account_number": null,
          "redemption_bank_account_ifsc_code": null,
          "fund_scheme": {
            "id": 900,
            "name": "Aditya Birla Sun Life Cash Manager - Growth Plan",
            "isin": "INF209K01LQ0",
            "scheme_code": "43N"
          }
        }
      ],
      "last": true,
      "total_pages": 1,
      "total_elements": 4,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 4,
      "_links": {
        "self": {
          "href": "https://tenant.s.finprim.com/api/oms/investment_accounts/12/orders?state=pending&type=additional_purchase&sort=order_date&direction=desc"
        }
      }
    }
    

    GET /api/oms/investment_accounts/:id/orders
    GET /api/oms/investment_accounts/:id/orders/purchase (Deprecated)
    GET /api/oms/investment_accounts/:id/orders/sell (Deprecated)
    GET /api/oms/orders

    Retrieve all the purchase and sell orders or for a particular investment account

    Query Parameters

    Parameter Mandatory Default Description Allowed values
    state no successful comma separated multiple states pending, submitted, successful, cancelled, payment_confirmed, failed, reversed
    type no - comma separated multiple types purchase, additional_purchase, redemption, redeem_all
    sort no investment_date sorting is done based on this column investment_date
    direction no desc ascending order or descending order asc or desc
    page no 0 page number of the result set
    size no 20 number of results per page, size should not be greater than 100

    Instant Redemption

    These are Instant Redemption APIs to directly interact with instant redemption service privided by AMCs. Order status tracking is not possible while using these APIs.

    To track the order status and unit allocation, please use our APIs under

    Orders section.

    Supported AMCs:

    Pre Redemption Summary

    curl -X GET
      '{base_url}/api/instant_redemption/pre_redemption_summary?isin=INF209K01RU9&folio_number=1038234271'
      -H 'Authorization: Bearer ACCESS_TOKEN'
      -H 'Content-Type: application/json'
    

    JSON response

    {
      "folio_number": "1038234271",
      "isin": "INF209K01RU9",
      "instant_redemption": {
        "allowed": true,
        "min_amount": 100,
        "max_amount": 35801,
        "multiples": 1,
        "redemption_bank_accounts": [
          {
            "account_number": "10211234921",
            "ifsc_code": "SBIN0001288"
          }
        ],
        "remarks": "Record retrieved successfully"
      }
    }
    

    GET /api/instant_redemption/pre_redemption_summary
    GET /api/oms/investment_accounts/:id/preredemption_summary

    Get pre redemption summary for a given scheme and folio.

    Request Parameters

    Name Mandatory Type Comments
    folio_number Yes string Folio number from which the redemption is requested
    isin Yes string ISIN of the requested fund scheme

    Response Parameters

    Name Type Comments
    folio_number string Folio number of the requested fund
    isin string ISIN number of the requested fund
    instant_redemption object Redemption details for the configured scheme

    Instant Redemption

    Name Type Comments
    allowed boolean Is instant redemption allowed for the requested data
    min_amount decimal Minimum amount for instant redemption
    max_amount decimal Maximum amount eligible for instant redemption. Value will be '0' if allowed is false
    multiples decimal Multiples in which order amount has to be passed
    redemption_bank_accounts array List of investor bank accounts to which funds can be remitted.
    remarks string Return message or remarks from amc

    Redemption Bank Accounts

    Name Type Comments
    account_number string Eligbile Bank account number (Optionally sent by the amc).
    ifsc_code string Eligbile Bank account IFSC code (Optionally sent by the amc).

    Place Order

    curl -X POST 
      '{base_url}/api/instant_redemption/order'
      -H 'Authorization: Bearer ACCESS_TOKEN'
      -H 'Content-Type: application/json'
      -d '{json_request}'
    

    Place an Instant Redemption order with respective amc for given isin and folio number. The order contains information such as isin, folio number, bank account number and bank IFSC code. The bank account number and IFSC code should be one of the bank account details returned in /pre_redemption_summary service (if available), or the primary investor bank details for redemption.

    HTTP Request

    POST /api/instant_redemption/order

    JSON request

    {
      "folio_number": "91014440533",
      "isin": "INF109K01VF4",
      "amount": 500,
      "redemption_bank_account_number": "00111050852748",
      "redemption_bank_account_ifsc_code": "HDFC0002678",
      "meta": {
        "AXF": {
          "invname": "David",
          "BankName": "HDFC BANK",
          "BankType": "Savings",
          "RefNo": "User_custom_reference"
        }
      }
    }
    

    JSON response

    {
      "order_reference": "3361202",
      "created_at": "2019-05-24T12:58:23+05:30",
      "remarks": "Transaction Successful",
      "redemption_mode": "INSTANT",
      "response_verbatim": {
        "TRANID": "3361202",
        "TRXN_DATE": "24/05/2019",
        "TRXN_TIME": "12:58:23 PM",
        "BANK_RRN": "914412759801",
        "IMPS_CODE": "0",
        "IMPS_STATUS": "Transaction Successful"
      }
    }
    

    Request Parameters

    Name Mandatory Type Comments
    isin yes string Fund ISIN number
    folio_number yes string Fund folio number
    amount yes decimal Amount for instant redemption. Should be greater than minumum amount ant in multiples of value from pre-redemption-summary
    redemption_bank_account_number yes string Bank Account number associated with reqested folio.
    redemption_bank_account_ifsc_code yes string Bank IFSC code for the bank associtated with requested folio.
    meta no object as requested from amc

    Meta

    Metadata meta are used to send custom params to the amcs, irrespective of default parameters.

    Format: meta.{{amc_code}}.{{parameter}}

    The following parameters are supported by the amcs,

    Amc Parameter Mandatory Comments
    AXIS meta.AXF.invname Yes Investor name.
    AXIS meta.AXF.BankName Yes Bank Name.
    AXIS meta.AXF.BankType Yes Savings/ Current.
    AXIS meta.AXF.RefNo No User reference.

    Response Parameters

    Name Type Comments
    order_reference string Transaction Reference from amc
    created_at string Date Time of the trade.
    remarks string Any return message or remarks from amc.
    redemption_mode string INSTANT/ NORMAL
    • INSTANT if order is processed as instant redemption order by amc
    • NORMAL if order is processed as an normal order by amc
    response_verbatim object The entire reponse object from amc. Differs for each amc.

    Plans

    Plan represents the recurring investment orders scheduled on a monthly basis (monthly SIPs). The API allows you to create, update and cancel the SIPs for an investment account.

    Endpoints:

    POST /api/oms/investment_accounts/:id/orders/sips
    PATCH /api/oms/investment_accounts/:id/orders/sips/:id
    GET /api/oms/investment_accounts/:id/orders/sips/:id
    GET /api/oms/investment_accounts/:id/orders/sips/:id/installments
    GET /api/oms/investment_accounts/:id/orders/sips

    Create a SIP

    curl -X POST "{base_url}/api/oms/investment_accounts/123/orders/sips"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '{json_request}'
    

    JSON request

    {
      "orders": [
        {
          "isin": "INF204KA1B64",
          "amount": 10000,
          "start_day": "2",
          "frequency": "MONTHLY",
          "installments": 20,
          "mandate_id": 23,
          "source_ref_id": "0876789",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        }
      ]
    }
    

    JSON response

    {
      "orders": [
        {
          "id": 2654461373273791985,
          "isin": "INF204KA1B64",
          "folio_number": "sgerhh2422343424",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95",
          "source_ref_id": "0987656"
        },
        {
          "id": 798881668533720940,
          "isin": "INF204KA1B84",
          "source_ref_id": "0876789",
          "user_ip": "192.168.2.92",
          "server_ip": "192.168.2.95"
        }
      ]
    }
    

    POST /api/oms/investment_accounts/:id/orders/sips

    Create a monthly systematic investment plan (SIP). SIP is allowed only for certain schemes (refer sip_allowed attribute in the fund scheme api)

    Note : The fund parameters mentioned in the comments below are availabe in Single Fund Schemes Detail API response

    Parameters

    Name Mandatory Type Comments
    isin yes string fund ISIN number
    amount yes integer amount should be in multiple of sip_multiples and between min_sip_amount and max_sip_amount
    start_day yes string start_day should be one of the values received in sip_frequency_data
    frequency yes string currently only "MONTHLY" frequency is supported
    installments yes integer installments should be between min_sip_installments and 1200 inclusive
    folio_number no string mandatory if you need to place an additional sip in the given folio number
    mandate_id yes integer mandate ID returns in Create Mandate API response
    generate_first_installment_now no boolean By default, the value of this flag is false. If this flag is true, the first installment is generated immediately after SIP creation and the first installment will be in PENDING state (Coming soon on BSE gateway)
    source_ref_id no string this is a source reference ID which will unique across system for a sip (ideally an auto generate identifier / uuid to identify a SIP in the tenant's application)
    user_ip no string IP address of user
    server_ip no string IP address of server

    Accepting payment for first installment on the day of SIP creation

    To accept the payment for the first installment of the SIP immediately after the SIP creation, the SIP must be created with generate_first_installment_now=true. If this flag is set, FP will generate the first installment immediately after the SIP is created and the first installment will be in PENDING state. This installment can then be fetched using Fetch_Installments_API. After the installment is fetched you can use Create a Payment API or Create a Nach Payment API to create a payment. Please note that even if the mandate is APPROVED during SIP creation, no payment will be created for the first installment that is generated because of generate_first_installment_now=true flag.

    Examples (when generate_first_installment_now = true)

    SIP Creation day Start day First installment date Second installment date
    August 11,2021 10 August 11,2021 October 10,2021
    August 11,2021 11 August 11,2021 Septemeber 11,2021
    August 11,2021 12 August 11,2021 Septemeber 12,2021
    August 11,2021 28 August 11,2021 Septemeber 28,2021

    Modify a SIP

    curl -X PATCH "{base_url}/api/oms/investment_accounts/123/orders/sips/345"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '{json_request}'
    

    JSON request

    {
      "operation": "update",
      "data": {
        "mandate_id": "DQ12"
      }
    }
    

    JSON response

    For `update` operation
    
    {
      "message": "successfully updated the sip"
    }
    
    For `deactivate` operation
    
    {
      "sip_id": 1,
      "active": false,
      "amount": 10000,
      "frequency": "MONTHLY",
      "start_date": "2017-10-25",
      "installments": 20,
      "folio_number": null,
      "mandate_id": "DF23",
      "fund_scheme_id": 1,
      "fund_type": "GROWTH",
      "_links": {
        "self": {
          "href": "http://dev.mfpro.cybrilla.io/api/oms/investment_accounts/1/orders/sips/1"
        }
      }
    }
    
    For `cancel_next_installment` operation
    
    {
      "id": 2,
      "type": "PURCHASE",
      "status": "CANCELLED",
      "amount": 10000,
      "reverse_amount": null,
      "reverse_units": null,
      "nav": null,
      "stt": null,
      "trade_date": null,
      "investment_date": "2017-10-25",
      "folio_number": null,
      "bank_account_id": null,
      "fund_scheme": {
        "id": 1,
        "name": "Motilal Oswal MOSt Focused Multicap 35 Fund Growth",
        "scheme_code": "CPGP"
      }
    }
    

    PATCH /api/oms/investment_accounts/:id/orders/sips/:id

    Update the payment mandate for a SIP, cancel the next installment or all the future installments of a SIP

    Parameters

    Name Mandatory Type Comments
    operation yes string Allowed values for RTA Gateway: update, deactivate, cancel_next_installment
    Allowed values for BSE Gatweay: deactivate
    mandate_id conditional string ID of the mandate object. Required if the operation is update

    BSE SIP Deactivation Note :

    Fetch a SIP

    curl -X GET "{base_url}/api/oms/investment_accounts/123/orders/sips/434
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON response

    {
      "sip_id": 34,
      "active": true,
      "amount": 12000,
      "frequency": "MONTHLY",
      "start_date": "2018-05-21",
      "installments": 189,
      "folio_number": null,
      "mandate_id": "7",
      "isin": "INF204K01VA4",
      "source_ref_id": "O_40570"
    }
    

    GET /api/oms/investment_accounts/:id/orders/sips/:id

    Fetch the details of a particular SIP

    Fetch installments of a SIP

    curl -X GET "{base_url}/api/oms/investment_accounts/123/orders/sips/345/installments"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON response

    [
      {
        "id": 978,
        "type": "PURCHASE",
        "status": "SUCCESSFUL",
        "amount": 25000,
        "reverse_amount": null,
        "reverse_units": null,
        "price": null,
        "trade_date": null,
        "investment_date": "2017-09-10",
        "folio_number": "799515310622345",
        "bank_account_id": null,
        "source_ref_id": "AMC_36089",
        "sip_id": 425,
        "fund_scheme": {
          "id": 803,
          "name": "Mirae Asset Emerging Bluechip Fund - Regular Plan - Growth Option",
          "isin": "INF769K01101",
          "scheme_code": "EBRG"
        }
      }
    ]
    

    Retrieve all the installments of a particular SIP

    HTTP Request

    GET /api/oms/investment_accounts/:id/orders/sips/:id/installments

    List all SIPs

    curl -X GET "{base_url}/api/oms/investment_accounts/123/orders/sips"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON response

    {
      "sip_orders": [
        {
          "sip_id": 15,
          "active": true,
          "amount": 80000,
          "frequency": "MONTHLY",
          "start_date": "2018-02-10",
          "installments": 11,
          "folio_number": null,
          "mandate_id": "7",
          "isin": "INF204K01UN9",
          "source_ref_id": "O_40526"
        },
        {
          "sip_id": 16,
          "active": true,
          "amount": 1000,
          "frequency": "MONTHLY",
          "start_date": "2017-12-12",
          "installments": 36,
          "folio_number": "143RGY45679",
          "mandate_id": "45",
          "isin": "INF903J01538",
          "source_ref_id": "O_35626"
        }
      ],
      "last": false,
      "total_pages": 2,
      "total_elements": 31,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 20,
      "_links": {
        "self": {
          "href": "https://tenant.s.finprim.com/api/oms/investment_accounts/1111111/orders/sips"
        }
      }
    }
    

    GET /api/oms/investment_accounts/:id/orders/sips

    Retreive all the SIPs for an investment account

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page, size should not be greater than 100

    Transactions

    Representation of transactions populated and processed from the RTA reverse feeds which have been uploaded. More information on transaction processing and data points can be found on Technical documentation

    Endpoints:

    GET /transactions

    Transaction Object

    {
      "object": "transaction",
      "folio_number": "1562150537200",
      "isin": "INF760K01100",
      "type": "redemption",
      "amount": 2250,
      "units": 150,
      "traded_on": "2019-01-07",
      "traded_at": 15,
      "order": null,
      "corporate_action": null,
      "related_transaction_id": null,
      "rta_order_reference": "1562150537207",
      "rta_product_code": "101ETGP",
      "rta_investment_option": "GROWTH",
      "rta_scheme_name": "Test Canara Robeco Equity Tax Saver Fund - Regular Growth",
      "sources": [
        {
          "days_held": 7,
          "units": 100,
          "purchased_on": "2019-01-01",
          "purchased_at": 10,
          "gain": 500
        },
        {
          "days_held": 6,
          "units": 50,
          "purchased_on": "2019-01-02",
          "purchased_at": 12,
          "gain": 150
        }
      ]
    }
    
    Attribute Type Comments
    object string Value is transaction. String representing the object type. Objects of the same type share the same value.
    folio_number string Folio number
    isin string ISIN of the scheme. This can be used to fetch more details about the scheme from Fund schemes end point.
    type string Transaction type : purchase, redemption, switch_in, switch_out, transfer_in, transfer_out, dividend_payout, dividend_reinvestment, bonus
    amount decimal Transaction amount
    units decimal Number of units
    traded_on string Date on which this transaction happened (yyyy-MM-dd)
    traded_at decimal NAV at which the trade happened
    order string This will be null if the order has not been processed through the fintech primitives platform. Else, the value will be the order id.
    corporate_action string This field will specify the corporate action due to which the transaction happened. If the transaction was user initiated, the value for this attribute will be null. Supported Corporate actions : scheme_merger
    related_transaction_id string If a transaction is related to another transaction, the id of such transaction will be present here. For example, for a purchase rejection, a related transaction would be the original purchase transaction.
    rta_order_reference string Order reference number as obtained from the RTA reverse feed.
    rta_product_code string Scheme product code as obtained from the RTA reverse feed.
    rta_investment_option string Investment option as obtained from the RTA reverse feed.
    rta_scheme_name string Scheme name as obtained from the RTA reverse feed.
    sources List This will be populated in cases of redemption,switch_out or transfer_out transaction types. This attribute will give the information of the purchases from which the redeemed units were sourced from. We follow FIFO logic to populate the source.

    For example:Let

    T1 = Purchase of 100 units at NAV=10Rs.

    T2 = Purchase of 100 units at NAV=15Rs.

    T3 = Redemption of 150 units at NAV=20Rs.

    If T3 is concerned, out of the 150 units that were sold, 100 units came from T1 and 50 units came from T2. So, the source of T3 are T1 and T2.

    Sources

    Attribute Type Comments
    days_held Integer Number of days for which the units were held before being redeemed
    units decimal Number of units
    purchased_on string Date of purchase of units (yyyy-MM-dd)
    purchased_at decimal NAV per unit at which the units were purchased.
    gain decimal The resulting Gain/Loss because of the redemption. The value will be positive, if there is a gain. If there is a loss, the value will be negative.

    List all transactions

    curl -X GET "{base_url}/transactions"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON Response

    {
      "object": "list",
      "data": [
        {
          "object": "transaction",
          "folio_number": "1562150537200",
          "isin": "INF760K01100",
          "type": "redemption",
          "amount": 2250,
          "units": 150,
          "traded_on": "2019-01-07",
          "traded_at": 15,
          "order": null,
          "corporate_action": null,
          "related_transaction_id": null,
          "rta_order_reference": "1562150537207",
          "rta_product_code": "101ETGP",
          "rta_investment_option": "GROWTH",
          "rta_scheme_name": "Test Canara Robeco Equity Tax Saver Fund - Regular Growth",
          "sources": [
            {
              "days_held": 7,
              "units": 100,
              "purchased_on": "2019-01-01",
              "purchased_at": 10,
              "gain": 500
            },
            {
              "days_held": 6,
              "units": 50,
              "purchased_on": "2019-01-02",
              "purchased_at": 12,
              "gain": 150
            }
          ]
        },
        {
          "object": "transaction",
          "folio_number": "1562150537200",
          "isin": "INF760K01100",
          "type": "purchase",
          "amount": 1200,
          "units": 100,
          "traded_on": "2019-01-02",
          "traded_at": 12,
          "order": null,
          "corporate_action": null,
          "related_transaction_id": null,
          "rta_order_reference": "1562150537202",
          "rta_product_code": "101ETGP",
          "rta_investment_option": "GROWTH",
          "rta_scheme_name": "Test Canara Robeco Equity Tax Saver Fund - Regular Growth",
          "sources": [
    
          ]
        },
        {
          "object": "transaction",
          "folio_number": "1562150537200",
          "isin": "INF760K01100",
          "type": "purchase",
          "amount": 1000,
          "units": 100,
          "traded_on": "2019-01-01",
          "traded_at": 10,
          "order": null,
          "corporate_action": null,
          "related_transaction_id": null,
          "rta_order_reference": "1562150537201",
          "rta_product_code": "101ETGP",
          "rta_investment_option": "GROWTH",
          "rta_scheme_name": "Test Canara Robeco Equity Tax Saver Fund - Regular Growth",
          "sources": [
    
          ]
        }
      ]
    }
    

    GET /transactions

    Returns a list of transactions associated with the given folio(s). The transactions are returned, and sorted by transaction date, with the most recent transactions appearing first.

    ARGUMENTS

    Name Mandatory Type Comments
    folios yes list multiple folio_numbers separated by a comma
    types no list valid transaction types separated by a comma
    from no string from date in yyyy-MM-dd
    to no string to date in yyyy-MM-dd

    Note:

    Following table describes the behavior of API depending on the values of from and to date.

    from to Behavior
    Null Null All transactions of the given folio(s) for the current financial year are returned.
    Null Not Null Transactions starting from an year before to date till to date are returned.
    Not Null Null All transactions starting from from date till from+1 year are displayed.
    Note : If from+1 year is greater than current date transactions from from to current date are displayed.
    Not Null Not Null All transactions in the date range from to to date are displayed.
    Note : If the date range specified by from and to is greater than an year, it will result in an error.

    RESPONSE

    A list of transactions sorted by transaction date, with the most recent transactions appearing first.

    File Operations

    Represents a file operation. File operations are those operations which are performed on a file. A typical file operation workflow starts with a file being uploaded using Create File api. Once a file is uploaded a file operation can be created for this file using the file id obtained after creating a file.

    At present transaction_processing file operation type is supported. More Info

    Endpoints:

    POST /file_operations
    GET /file_operations/:id

    File Operation Object

    {
      "object": "file_operation",
      "id": "53307e81-f417-4428-93ad-a855c7c0d962",
      "file": "bf8253b0-c302-4715-974b-87a8d7a9efc3",
      "type": "transaction_processing",
      "status": "processed",
      "processed": 15,
      "failed": 3,
      "succeeded": 12
    }
    
    Attribute Type Comments
    object string Value is file_operation. String representing the object type. Objects of the same type share the same value.
    id string Unique identifier for the file_operation object created
    file string File id created using create file api.
    type string Processing will differ based on the type of the file operation. Supported types : transaction_processing
    status string Status of the file_operation created. Possible status: pending, processed, failed
    processed integer Number of processed records inside the file object.
    failed integer Number of records for which processing failed inside the file object.
    succeeded integer Number of records successfully processed.

    Create a file operation

    curl -X POST "{base_url}/file_operations"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '{json_request}'
    

    JSON Request

    {
      "type": "transaction_processing",
      "file": "bf8253b0-c302-4715-974b-87a8d7a9efc3"
    }
    

    JSON Response

    {
      "object": "file_operation",
      "id": "53307e81-f417-4428-93ad-a855c7c0d962",
      "file": "bf8253b0-c302-4715-974b-87a8d7a9efc3",
      "type": "transaction_processing",
      "status": "pending",
      "processed": null,
      "failed": null,
      "succeeded": null
    }
    

    POST /file_operations

    Returns a file_operation object holding details of the file operation along with the processed information. Initially once the request to file_operation is submitted, the status will be pending. Eventually the file will be processed in the background. Use the GET api to get further details.

    Attributes

    Attribute Mandatory Type Comments
    type yes string Supported types : transaction_processing
    file yes string File id obtained using the Create File api.

    RESPONSE

    Return the file_operation id along with other data in the object defined.

    Fetch a file operation

    curl -X GET "{base_url}/file_operations/53307e81-f417-4428-93ad-a855c7c0d962"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON Response

    {
      "object": "file_operation",
      "id": "53307e81-f417-4428-93ad-a855c7c0d962",
      "file": "bf8253b0-c302-4715-974b-87a8d7a9efc3",
      "type": "transaction_processing",
      "status": "processed",
      "processed": 15,
      "failed": 3,
      "succeeded": 12
    }
    

    GET /file_operations/:id

    Returns a file_operation object holding details of the file operation along with the processed information.

    ARGUMENTS

    Name Mandatory Type Comments
    id yes string file_operation id

    RESPONSE

    Single file_operation object holding details of the status of the file_operation along with details of records processed.

    Investor Reports

    Generate holdings report

    curl "{base_url}/api/oms/reports/holdings"
      -H "Authorization: Bearer ACCESS_TOKEN"
    
    curl "{base_url}/api/oms/investment_accounts/:id/holdings"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON response

    {
      "id": 12,
      "folios": [
        {
          "folio_number": "4131/34",
          "schemes": [
            {
              "isin": "INF740K01599",
              "name": "DSP BlackRock Income Opportunities Fund - Regular Plan -Growth",
              "type": "GROWTH",
              "holdings": {
                "as_on": "2018-03-12",
                "units": 83.597,
                "redeemable_units": 83.597
              },
              "market_value": {
                "as_on": "2018-03-08",
                "amount": 2368.4,
                "redeemable_amount": 2368.4
              },
              "invested_value": {
                "as_on": "2018-03-12",
                "amount": 2250
              },
              "payout": {
                "as_on": "2018-03-12",
                "amount": 0
              },
              "nav": {
                "as_on": "2018-03-08",
                "value": 28.3312
              }
            }
          ]
        },
        {
          "folio_number": "4998484493",
          "schemes": [
            {
              "isin": "INF204K01EF9",
              "name": "Reliance Medium Term Growth",
              "type": "GROWTH",
              "holdings": {
                "as_on": "2018-03-12",
                "units": 170.882,
                "redeemable_units": 170.882
              },
              "market_value": {
                "as_on": "2018-03-08",
                "amount": 6181.69,
                "redeemable_amount": 6181.69
              },
              "invested_value": {
                "as_on": "2018-03-12",
                "amount": 6000
              },
              "payout": {
                "as_on": "2018-03-12",
                "amount": 0
              },
              "nav": {
                "as_on": "2018-03-08",
                "value": 36.1752
              }
            }
          ]
        }
      ]
    }
    

    GET /api/oms/reports/holdings

    Generate a holdings report for an investment account or a set of folio numbers.

    Query Parameters

    Name Mandatory Description
    investment_account_id no ID of an investment account
    folios no comma separated list of folio numbers
    as_on no date till data required, in yyyy-MM-dd format

    Note :
    Either investment_account_id or folios are mandatory.



    GET api/oms/investment_accounts/:id/holdings

    Generate a holdings report for an investment account

    Query Parameters

    Name Mandatory Description
    folios no comma separated list of folio numbers
    as_on no date till data required, in yyyy-MM-dd format

    RESPONSE

    Returns a list of folios with the associated holdings per scheme in each folio. An empty array is returned if no folios exist.

    Simulation (Early access)

    All simulation apis are available only in the sandbox environment

    [POST] Order Simulation

    curl "{base_url}/api/oms/simulate/orders/{amc_order_id} "
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "status": "SUBMITTED"
    }
    

    JSON response:

    {
      "message": "order updated successfully"
    }
    

    This endpoint is used to simulate order statuses which are not available through public API. All simulation endpoints are only available in staging server.

    HTTP Request

    POST {base_url}/api/oms/simulate/orders/{amc_order_id}

    Simulate Order Request Params

    Name Mandatory Type Comments
    amc_order_id yes integer valid order id
    status yes string PAYMENT_CONFIRMED, SUBMITTED, SUCCESSFUL, FAILED and REVERSED are only allowed

    [POST] SIP Simulation

    curl "{base_url}/api/oms/simulate/sips/{sip_id}/generate_next_installment"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "message": "installment with order id 421 created. please use order simulation api for further simulation"
    }
    

    This endpoint is used to generate order for the given sip id, the order date will be of next installment.

    All simulation endpoints are only available in staging server.

    Example: If you have created sip with sip day 1 and created in march, first time it will create order for april , second time it will create order for may.

    HTTP Request

    POST {base_url}/api/oms/simulate/sips/{sip_id}/generate_next_installment

    Simulate SIP Request Params

    Name Mandatory Type Comments
    sip_id yes integer valid sip id

    [POST] Payment Simulation

    curl "{base_url}/api/pg/simulate/payments/{payment_id} "
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "status": "SUBMITTED"
    }
    

    JSON response:

    {
      "message": "payment updated to status SUBMITTED"
    }
    

    This endpoint is used to simulate payment statuses which are not available through public API.

    All simulation endpoints are only available in staging server.

    Note : To mark payment as APPROVED or SUCCESS mandate status must be APPROVED.

    HTTP Request

    POST {base_url}/api/pg/simulate/payments/{payment_id}

    Simulate Payment Request Params

    Name Mandatory Type Comments
    payment_id yes integer valid payment id
    status yes string SUBMITTED, APPROVED, REJECTED, INITIATED, PENDING, TIMEDOUT, SUCCESS and FAILED are only allowed

    [POST] Mandate Simulation

    curl "{base_url}/api/pg/simulate/mandates/{mandate_id}"
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "status": "SUBMITTED"
    }
    

    JSON response:

    {
      "message": "mandate updated to status SUBMITTED"
    }
    

    This endpoint is used to simulate mandate statuses which are not available through public API.

    All simulation endpoints are only available in staging server.

    HTTP Request

    POST {base_url}/api/pg/simulate/mandates/{mandate_id}

    Simulate Mandate Request Params

    Name Mandatory Type Comments
    mandate_id yes integer valid mandate id
    status yes string CREATED, SUBMITTED, APPROVED, RECEIVED and REJECTED are only allowed

    MasterData

    [GET] Pincodes

    curl "{base_url}/api/onb/pincodes"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "last": true,
      "first": true,
      "total_pages": 1,
      "number": 0,
      "size": 1,
      "total_elements": 1,
      "pincodes": [
        {
          "code": "560102",
          "city": "Bangalore South",
          "district": "Bangalore",
          "state_name": "Karnataka",
          "country_ansi_code": "IN",
          "_links": [
            {
              "href": "{base_url}/api/onb/pincodes/560102",
              "rel": "self",
              "method": "GET"
            }
          ]
        }
      ]
    }
    

    This endpoint retrieves all pincodes in the system with pagination

    HTTP Request

    GET {base_url}/api/onb/pincodes

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page, size should not be greater than 100

    [GET] Pincode

    curl "{base_url}/api/onb/pincodes/560102"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "code": "560102",
      "city": "Bangalore South",
      "district": "Bangalore",
      "state_name": "Karnataka",
      "country_ansi_code": "IN",
      "_links": [
        {
          "href": "{base_url}/api/onb/pincodes/560102",
          "rel": "self",
          "method": "GET"
        }
      ]
    }
    

    This endpoint retrieves details of the given pincode

    HTTP Request

    GET {base_url}/api/onb/pincodes/{pincode}

    [GET] States

    curl "{base_url}/api/onb/states"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "states": [
        {
          "name": "Karnataka",
          "state_code": "KA",
          "country_ansi_code": "IN"
        }
      ]
    }
    

    This endpoint retrieves all states of India which are updated in the system

    HTTP Request

    GET {base_url}/api/onb/states

    [GET] Countries

    curl "{base_url}/api/onb/countries"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "countries": [
        {
          "name": "India",
          "ansi_code": "IN"
        }
      ]
    }
    

    This endpoint retrieves the list of countries updated in the system

    HTTP Request

    GET {base_url}/api/onb/countries

    [GET] IfscCodes

    curl "{base_url}/api/onb/ifsc_codes"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "last": true,
      "first": true,
      "total_pages": 1,
      "number": 0,
      "size": 1,
      "total_elements": 1,
      "ifsc_codes": [
        {
          "ifsc_code": "ICIC0000611",
          "micr_code": "0000000",
          "branch_name": "gudivada",
          "branch_address": "ICICI BANK LTD , D NO-11-218, NENIPLAZA, ELURU ROAD, GUDIVADA. 521301",
          "bank_name": "ICICI",
          "contact": "SUMANTH SAGI 08674-247355",
          "city": "guivada",
          "district": "KRISHNA",
          "state": "ANDHRA PRADESH"
        }
      ]
    }
    

    This endpoint retrieves all ifsc_codes updated in the system

    HTTP Request

    GET {base_url}/api/onb/ifsc_codes

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page, size should not be greater than 100

    [GET] IfscCode

    curl "{base_url}/api/onb/ifsc_code/ICIC0000611"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "ifsc_code": "ICIC0000611",
      "micr_code": "0000000",
      "branch_name": "gudivada",
      "branch_address": "ICICI BANK LTD , D NO-11-218, NENIPLAZA, ELURU ROAD, GUDIVADA. 521301",
      "bank_name": "ICICI",
      "contact": "SUMANTH SAGI 08674-247355",
      "city": "guivada",
      "district": "KRISHNA",
      "state": "ANDHRA PRADESH"
    }
    

    This endpoint retrieves details of the given ifsc_code updated in the system

    HTTP Request

    GET {base_url}/api/onb/ifsc_codes/{ifsc_code}

    [GET] Single Fund Schemes Detail

    curl "{base_url}/api/oms/fund_schemes/{isin}"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "isin": "INF760K01DF2",
      "active": true,
      "name": "Canara Robeco Treasury Advantage Fund - Regular Plan- Weekly Div Reinvest",
      "investment_option": "DIV_REINVESTMENT",
      "min_initial_investment": 500,
      "min_additional_investment": 500,
      "initial_investment_multiples": 1,
      "max_initial_investment": 99999999,
      "max_additional_investment": 99999999,
      "additional_investment_multiples": 1,
      "min_withdrawal_amount": 100,
      "min_withdrawal_units": 1,
      "max_withdrawal_amount": null,
      "max_withdrawal_units": null,
      "withdrawal_multiples": 1,
      "sip_allowed": true,
      "min_sip_amount": 500,
      "max_sip_amount": 99999999,
      "min_sip_installments": 6,
      "sip_multiples": 1,
      "sip_frequency_data": {
        "MONTHLY": "1,5,15,20,25"
      },
      "switch_in_allowed": false,
      "switch_in_min_amt": null,
      "switch_multiples": null,
      "fund_category": "DEBT",
      "plan_type": "REGULAR",
      "amfi_code": "109366",
      "sub_category": null,
      "scheme_code": "TASW",
      "close_ended": false,
      "lock_in": false,
      "lock_in_period": null,
      "long_term_period": null,
      "purchase_allowed": true,
      "redemption_allowed": true,
      "insta_redemption_allowed": true,
      "amc_id": 6,
      "rta_id": 2,
      "merged": false,
      "merged_to_isin": null,
      "name_changes": null,
      "_links": {
        "self": {
          "href": "{base_url}/oms/api/fund_schemes/INF760K01DF2"
        }
      }
    }
    

    This endpoint retrieves any particular fund scheme information

    HTTP Request

    GET {base_url}/api/oms/fund_schemes/{isin}

    [GET] Fund Schemes (Deprecated)

    curl "{base_url}/api/oms/fund_schemes"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "fund_schemes": [
        {
          "isin": "INF205K01US5",
          "active": true,
          "name": "Invesco India Short Term Fund - Plan B Monthly Dividend",
          "investment_option": "DIV_PAYOUT",
          "min_initial_investment": null,
          "min_additional_investment": null,
          "initial_investment_multiples": null,
          "max_initial_investment": null,
          "max_additional_investment": null,
          "additional_investment_multiples": null,
          "min_withdrawal_amount": 1000,
          "min_withdrawal_units": 1,
          "max_withdrawal_amount": null,
          "max_withdrawal_units": null,
          "withdrawal_multiples": 1,
          "sip_allowed": false,
          "min_sip_amount": null,
          "max_sip_amount": null,
          "min_sip_installments": null,
          "sip_multiples": null,
          "sip_frequency_data": null,
          "switch_in_allowed": false,
          "switch_in_min_amt": null,
          "switch_multiples": null,
          "fund_category": "DEBT",
          "plan_type": "REGULAR",
          "amfi_code": null,
          "sub_category": null,
          "scheme_code": "STIM",
          "close_ended": false,
          "lock_in": false,
          "lock_in_period": null,
          "long_term_period": null,
          "purchase_allowed": false,
          "redemption_allowed": true,
          "amc_id": 31,
          "rta_id": 2,
          "merged": true,
          "merged_to_isin": "INF251K01NK1",
          "name_changes": {
            "history": [
              {
                "old_name": "BNP PARIBAS OVERNIGHT FUND - MONTHLY DIVIDEND OPTION",
                "old_name_valid_upto": "2018-12-03"
              }
            ]
          }
        },
        {
          "isin": "INF205K01UT3",
          "active": true,
          "name": "Invesco India Short Term Fund - Plan B Monthly Dividend",
          "investment_option": "DIV_REINVESTMENT",
          "min_initial_investment": null,
          "min_additional_investment": null,
          "initial_investment_multiples": null,
          "max_initial_investment": null,
          "max_additional_investment": null,
          "additional_investment_multiples": null,
          "min_withdrawal_amount": 1000,
          "min_withdrawal_units": 1,
          "max_withdrawal_amount": null,
          "max_withdrawal_units": null,
          "withdrawal_multiples": 1,
          "sip_allowed": false,
          "min_sip_amount": null,
          "max_sip_amount": null,
          "min_sip_installments": null,
          "sip_multiples": null,
          "sip_frequency_data": null,
          "switch_in_allowed": false,
          "switch_in_min_amt": null,
          "switch_multiples": null,
          "fund_category": "DEBT",
          "plan_type": "REGULAR",
          "amfi_code": null,
          "sub_category": null,
          "scheme_code": "STIM",
          "close_ended": false,
          "lock_in": false,
          "lock_in_period": null,
          "long_term_period": null,
          "purchase_allowed": false,
          "redemption_allowed": true,
          "amc_id": 31,
          "rta_id": 2,
          "merged": false,
          "merged_to_isin": null,
          "name_changes": null
        },
        {
          "isin": "INF204K01547",
          "active": true,
          "name": "RELIANCE TOP 200 FUND - DIVIDEND PLAN",
          "investment_option": "DIV_REINVESTMENT",
          "min_initial_investment": 5000,
          "min_additional_investment": 1000,
          "initial_investment_multiples": 1,
          "max_initial_investment": 199999,
          "max_additional_investment": 199999,
          "additional_investment_multiples": 1,
          "min_withdrawal_amount": 1,
          "min_withdrawal_units": 0.001,
          "max_withdrawal_amount": null,
          "max_withdrawal_units": null,
          "withdrawal_multiples": 1,
          "sip_allowed": true,
          "min_sip_amount": 1000,
          "max_sip_amount": 9999999,
          "min_sip_installments": 6,
          "sip_multiples": 100,
          "sip_frequency_data": {
            "MONTHLY": "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28"
          },
          "switch_in_allowed": false,
          "switch_in_min_amt": null,
          "switch_multiples": null,
          "fund_category": "EQUITY",
          "plan_type": "REGULAR",
          "amfi_code": null,
          "sub_category": null,
          "scheme_code": "EARD",
          "close_ended": false,
          "lock_in": false,
          "lock_in_period": null,
          "long_term_period": null,
          "purchase_allowed": true,
          "redemption_allowed": true,
          "insta_redemption_allowed": true,
          "amc_id": 30,
          "rta_id": 2,
          "merged": false,
          "merged_to_isin": null,
          "name_changes": null
        }
      ],
      "last": false,
      "total_pages": 21,
      "total_elements": 402,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 20
    }
    

    This endpoint retrieves all the fund scheme with details on each.

    HTTP Request

    GET {base_url}/api/oms/fund_schemes

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page, size should not be greater than 100
    active no NA value for active must be true OR false
    isin no NA comma separated list of isin

    [GET] AMCs

    curl "{base_url}/api/oms/amcs"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "_links": {
        "self": {
          "href": "{base_url}/oms/api/amcs"
        }
      },
      "amcs": [
        {
          "id": 1,
          "name": "Axis MF",
          "active": true,
          "amc_code": null
        }
      ]
    }
    

    This endpoint retrieves all the AMCs.

    HTTP Request

    GET {base_url}/api/oms/amcs

    Helper API

    Most of these APIs are for getting enums and other data from the system which is not related to any investor

    Registration MetaData

    curl "{base_url}/api/onb/metadata"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "address_types": [
        "CORRESPONDENCE",
        "OVERSEAS",
        "PERMANENT"
      ],
      "residential_statuses": [
        "RESIDENT_INDIVIDUAL",
        "NON_RESIDENT_INDIVIDUAL",
        "FOREIGN_NATIONAL",
        "PERSON_OF_INDIAN_ORIGIN",
        "PERSON_OF_INDIAN_ORIGIN_RESIDENT"
      ],
      "occupations": [
        "AGRICULTURE",
        "BUSINESS",
        "DOCTOR",
        "FOREX_DEALER",
        "GOVERNMENT_SERVICE",
        "HOUSE_WIFE",
        "OTHERS",
        "PRIVATE_SECTOR_SERVICE",
        "PROFESSIONAL",
        "PUBLIC_SECTOR_SERVICE",
        "RETIRED",
        "SERVICE",
        "STUDENT"
      ],
      "individual_identity_proofs": [
        "UID_AADHAR",
        "PANCARD",
        "VOTER_ID",
        "PASSPORT",
        "DRIVING_LICENSE",
        "NREGA_JOB_CARD",
        "OTHERS"
      ],
      "genders": [
        "MALE",
        "FEMALE",
        "OTHERS"
      ],
      "marital_statuses": [
        "MARRIED",
        "SINGLE",
        "OTHERS"
      ],
      "kyc_relationships": [
        "FATHER",
        "SPOUSE"
      ],
      "source_of_wealths": [
        "SALARY",
        "BUSINESS",
        "GIFT",
        "ANCESTRAL_PROPERTY",
        "RENTAL_INCOME",
        "PRIZE_MONEY",
        "ROYALTY",
        "OTHERS"
      ],
      "bank_account_types": [
        "CURRENT",
        "NRE",
        "NRO",
        "SAVINGS"
      ]
    }
    

    Returns different enums and values that have to be used while registering an investor

    HTTP Request

    GET {base_url}/api/onb/metadata

    Mandates

    Represents an authorization given by the investor to automatically debit payment from his bank account for onetime and recurring purchase orders.

    Endpoints:

    POST /api/pg/mandates
    POST /api/pg/payments/emandate/auth
    GET /api/pg/mandates/:id
    GET /api/pg/mandates

    Create a mandate (eNACH)

    curl -X POST "{base_url}/api/pg/mandates"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '
        {
      "mandate_type": "E_MANDATE",
      "bank_account_id": 1,
      "mandate_limit": 100000
    }
      '
    

    The above command returns JSON structured like this:

    {
      "id": 1
    }
    

    POST /api/pg/mandates

    This endpoint is used to create e-mandate. The API returns mandate ID in response.

    Parameters

    Parameter Mandatory Type Description
    mandate_type yes String E_MANDATE
    bank_account_id yes Long bank account ID generated while creating the investor. This is not the bank id or the bank account number. Please check the GET investor details API to fetch the bank account ID
    mandate_limit yes Integer mandate limit
    provider_name no String RAZORPAY (or) BSE
    valid_from no String valid From in yyyy-MM-dd format
    valid_to no String valid to in yyyy-MM-dd format. Only for BSE as gateway provider.

    Response Code : 201

    Authorize a mandate (eNACH)

    curl "{base_url}/api/pg/payments/emandate/auth"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '
        {
      "mandate_id": 1,
      "payment_postback_url": "https://example.com/"
    }
      '
    

    The above command returns JSON structured like this:

    {
      "token_url": "https://tenant.s.finprim.com/api/pg/payments/netbanking/razorpay?txnId=bdbd1396-3197-460b-afd3-adc3f6e09123&txnType=1",
      "id": 1
    }
    

    POST /api/pg/payments/emandate/auth

    This endpoint is used for authorizing the e-mandate. Once the authorization is done from the bank side, subsequent payments need not be authorized again and will be made automatically. The response contains payment gateway URL along with payment ID.

    Parameters

    Parameter Mandatory Type Description
    mandate_id yes Integer ID of created e-mandate
    payment_postback_url no String Application url where the investor will be redirected back after emandate auth transaction (https://example.com/payment_confirmation). Not Supported with BSE as gateway provider.

    Response Code : 200

    After e-mandate is authorized at the payment gateway, a post request using HTTP POST will be made via web browser to the preconfigured URL provided by tenant

    HTTP Form POST Parameters

    Parameter Type Description
    paymentId String ID of the generated payment
    status String payment status either success or failure
    failureReason String payment failure reason, empty if payment is successful

    You can use this data for displaying the authorization status to the investor and if required retry.

    Fetch a mandate

    curl "{base_url}/api/pg/mandates/1"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    The above command returns JSON structured like this:

    {
      "id": 1,
      "bank_account_id": 1,
      "mandate_ref": null,
      "mandate_token": "token_WxyDNskmds",
      "valid_from": "2017-10-23",
      "mandate_limit": 50000,
      "mandate_type": "NACH",
      "mandate_status": "SUBMITTED",
      "umrn": null,
      "created_at": "2017-10-23T04:49:21+05:30",
      "received_at": null,
      "submitted_at": "2017-10-23T04:30:21+05:30",
      "approved_at": null,
      "rejected_at": null,
      "rejected_reason": null,
      "provider_id": 1
    }
    

    GET /api/pg/mandates/:id

    This endpoint retrieves mandate info based on the mandate ID

    Response Code : 200

    Note

    List all mandates

    curl "{base_url}/api/pg/mandates?bank_account_id=18,12"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    The above command returns JSON structured like this:

    {
      "last": true,
      "total_pages": 1,
      "total_elements": 2,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 2,
      "mandates": [
        {
          "id": 2,
          "bank_account_id": 1,
          "mandate_ref": "391335121",
          "mandate_token": "token_WxyDNskmds",
          "valid_from": "2017-10-23",
          "mandate_limit": 50000,
          "mandate_type": "NACH",
          "mandate_status": "CREATED",
          "umrn": "1592",
          "created_at": "2017-10-23T04:51:27+05:30",
          "received_at": null,
          "submitted_at": null,
          "approved_at": null,
          "rejected_at": null,
          "rejected_reason": null,
          "provider_id": 1
        },
        {
          "id": 3,
          "bank_account_id": 1,
          "mandate_ref": "391115121",
          "mandate_token": "token_YnhDsFgos",
          "valid_from": "2017-11-24",
          "mandate_limit": 50000,
          "mandate_type": "NACH",
          "mandate_status": "CREATED",
          "umrn": "1512",
          "created_at": "2017-11-24T04:51:27+05:30",
          "received_at": null,
          "submitted_at": null,
          "approved_at": null,
          "rejected_at": null,
          "rejected_reason": null,
          "provider_id": 1
        }
      ]
    }
    

    GET /api/pg/mandates

    This endpoint retrieves mandate info based on given filters.

    Query Parameters

    Parameter Mandatory Default Description
    bank_account_id no - List of bank account ids
    page no 0 page number of the result set
    size no 20 number of results per page, size should not be greater than 100

    Response Code : 200

    Payments

    Represents a payment transaction. The API allows you to create a payment and fetch the payment details.

    Endpoints:

    POST /api/pg/payments/netbanking
    POST /api/oms/bse_payments (Deprecated)
    POST /api/pg/payments/nach
    GET /api/pg/payments/:id
    GET /api/pg/payments

    Create a payment

    curl -X POST "{base_url}/api/pg/payments/netbanking"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '
        {
      "amc_order_ids": [
        1,
        2
      ],
      "payment_postback_url": "https://example.com/"
    }
      '
    

    JSON Response

    {
      "token_url": "https://tenant.s.finprim.com/api/pg/payments/netbanking/razorpay?txnId=bdbd1396-3197-460b-afd3-adc3f6e09123&txnType=2",
      "id": 1
    }
    

    POST /api/pg/payments/netbanking

    Make payment for multiple orders together. It returns a URL to which the user has to be redirected to complete the payment. Netbanking, UPI and Debit Card are the allowed payment methods.

    Parameters

    Parameter Mandatory Type Description
    amc_order_ids yes Array contains the list of amc order ids
    method no String NETBANKING or UPI
    payment_postback_url no String Application url where the investor will be redirected back after payment operation (http://example.com/payment_confirmation)
    bank_account_id no Integer ID of the bank account through which the payment will be made for given order ids. Required only if orders are placed using Create MF Purchase API

    Response Code : 200

    After payment is done at the payment gateway, a post back using HTTP POST will be made via web browser to the preconfigured URL provided by tenant

    HTTP Form POST Parameters

    Parameter Type Description
    paymentId String ID of the generated payment
    status String payment status either success or failure
    failureReason String payment failure reason, empty if payment is successful

    You can use this data for displaying the status of the payment to the investor

    Create a Payment (BSE) (Deprecated)

    curl -X POST "{base_url}/api/oms/bse_payments"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '
        {
      "order_ids": [
        1,
        2
      ],
      "postback_url": "http://example.com/payment_confirmation"
    }
      '
    

    HTML Response

        <html>
      <head>
        <title>Redirecting to Bank</title>
      </head>
      <script language=JavaScript>
        var message="Function Disabled!";
      </script>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="left" valign="top">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td align="center" valign="middle">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td align="center"></td>
                    </tr>
                    <tr>
                      <td height="85" align="center">
                        <br>
                        <table width="80%" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
                          <tr>
                            <td bgcolor="#CCCCCC">
                              <table width="100%" border="0" cellpadding="6" cellspacing="0"
                                bgcolor="#FFFFFF">
                                <tr>
                                  <td colspan="2" align="left" valign="bottom">
                                    <span class="bodytxt4">Your payment request is being processed...</span>
                                  </td>
                                </tr>
                                <tr valign="top">
                                  <td colspan="2" align="left">
                                    <table width="100%" border="0" cellspacing="0"
                                      cellpadding="0">
                                      <tr>
                                        <td width="87%" bgcolor="#cccccc" height="1"
                                          align="center"></td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                                <tr>
                                  <td width="60%" align="left" valign="bottom">
                                    <table width="95%" border="0" cellpadding="1"
                                      cellspacing="0" bgcolor="#FFFFFF">
                                      <tr>
                                        <td align="right" valign="top"></td>
                                        <td class="bodytxt">&nbsp;</td>
                                      </tr>
                                      <tr>
                                        <td height="19" align="right" valign="top">
                                          <li class="bullet1"></li>
                                        </td>
                                        <td class="bodytxt2">This is a secure payment
                                          gateway using 128 bit SSL encryption.
                                        </td>
                                      </tr>
                                      <tr>
                                        <td align="right" valign="top">
                                          <li class="bullet1"></li>
                                        </td>
                                        <td class="bodytxt2">When you submit the
                                          transaction,
                                          the server will take about 1 to 5 seconds
                                          to process, but it may take longer at certain
                                          times. 
                                        </td>
                                      </tr>
                                      <tr>
                                        <td align="right" valign="top">
                                          <li class="bullet1"></li>
                                        </td>
                                        <td class="bodytxt2">Please do not press "Submit"
                                          button once again or the "Back" or "Refresh"
                                          buttons. 
                                        </td>
                                      </tr>
                                    </table>
                                  </td>
                                  <td align="right" valign="bottom">
                                    <table width="80%" border="0" cellpadding="1"
                                      cellspacing="0" bgcolor="#FFFFFF">
                                      <tr bgcolor="#FFFCF8">
                                        <td align="right" bgcolor="#FFFFFF"></td>
                                      </tr>
                                      <tr bgcolor="#FFFCF8">
                                        <td align="right" valign="middle" bgcolor="#FFFFFF"
                                          class="bodytxt2">&nbsp;</td>
                                      </tr>
                                      <tr bgcolor="#FFFCF8">
                                        <td align="right" bgcolor="#FFFFFF"
                                          class="bodytxt2">&nbsp;</td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <body>
        <form name="Bankfrm" method="post"
          action='https://retail.axisbank.co.in/wps/portal/rBanking/AxisSMRetailLogin/axissmretailpage?AuthenticationFG.MENU_ID=CIMSHP&AuthenticationFG.CALL_MODE=2&CATEGORY_ID=IRBILD'>
          <input type = "hidden" name = "qs" value="iolUktoMLRLckOa2tsSZzSdRxvqncib8XrLJ/2lqRGzpdrarybseADuMTxfcUsB1eXPYMpoZ6+FafzMzjt/Dk+VtuHjmBTfcAaGbeLNUrFC9GS31G6WBxAwhvSKMoK0aN7dAmqiCbm5XZkyB98EfhA==">
          <input type = "hidden" name = "RU" value="https://www.billdesk.com/pgidsk/PGIProcessResponse/UTI">
        </form>
      </body>
      <script>
        document.Bankfrm.submit();
      </script>
    </html>
    

    POST /api/oms/bse_payments

    Use Create Netbanking Payment API to make payment via BSE gateway instead.

    Make payment for multiple lumpusum purchases placed via BSE gateway provider. It returns an HTML response which you need to render on the investor's browser to complete the payment.

    Parameters

    Parameter Mandatory Type Description
    order_ids yes Array contains the list of amc order ids
    postback_url yes String Application url where the investor will be redirected back after payment operation (http://example.com/payment_confirmation)

    Response Code : 200

    After payment is done at the payment gateway, a post back using HTTP GET will be made via web browser to postback_url.

    Create a Nach Payment

    POST /api/pg/payments/nach

    curl -X POST "{base_url}/api/pg/payments/nach"
      -H "Authorization: Bearer ACCESS_TOKEN"
      -d '
        {
      "mandate_id": 1,
      "amc_order_ids": [
        1,
        2
      ]
    }
      '
    

    JSON Response

    {
      "id": 1,
      "mandate_id": 1,
      "amount": 80000,
      "amc_order_ids": [
        1,
        2
      ]
    }
    

    This endpoint can be used to create payments for multiple purchase orders which are in pending status and belong to a single investment account.

    Limitations :

    1. Can make payments only for purchase orders placed via RTA route .
    2. During the creation of payments that are triggered from this API, the platform doesn't check whether there are payments already created for the orders. Therefore, please ensure that there you are not creating multiple payments for the same order.

    Parameters

    Parameter Mandatory Type Description
    mandate_id yes Integer Id of the mandate which is returned as a part of the response of Create Mandate API. Please note that if the mandate is not in the APPROVED state, the payment that is created will be marked as FAILED
    amc_order_ids yes Array V1 purchase order ids of the orders for which the payments must be made using the mandate. Please note that there are following restrictions.
    a) All the orders must be in the PENDING state.
    b) All the orders must belong to a single investment account.
    c) The mandate must be associated with the investor mapped to the investment account.

    Response Code : 200

    Fetch a payment

    curl "{base_url}/api/pg/payments/1"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON Response

    {
      "id": 1,
      "payment_type": "NACH",
      "status": "PENDING",
      "amount": 80000,
      "debit_date": "2018-11-09",
      "amc_order_ids": [
        1
      ],
      "failed_reason": null,
      "method": null,
      "created_at": "2018-11-08T01:00:00+05:30",
      "submitted_at": null,
      "debit_confirmed_at": null,
      "failed_at": null,
      "transfer_initiated_at": null,
      "settled_at": null,
      "rejected_at": null
    }
    

    GET /api/pg/payments/:id

    Retrieve a particular payment with id

    List all payments

    curl "{base_url}/api/pg/payments"
      -H "Authorization: Bearer ACCESS_TOKEN"
    

    JSON Response

    {
      "last": true,
      "total_pages": 1,
      "total_elements": 2,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 2,
      "payments": [
        {
          "id": 1,
          "payment_type": "NACH",
          "status": "PENDING",
          "amount": 1000,
          "debit_date": "2019-01-01",
          "amc_order_ids": [
            1
          ],
          "failed_reason": null,
          "method": null,
          "created_at": "2018-12-31T01:00:02+05:30",
          "submitted_at": null,
          "debit_confirmed_at": null,
          "failed_at": null,
          "transfer_initiated_at": null,
          "settled_at": null,
          "rejected_at": null
        },
        {
          "id": 2,
          "payment_type": "NACH",
          "status": "SUBMITTED",
          "amount": 2000,
          "debit_date": "2019-01-01",
          "amc_order_ids": [
            2
          ],
          "failed_reason": null,
          "method": null,
          "created_at": "2018-12-31T01:00:02+05:30",
          "submitted_at": "2018-12-31T01:30:02+05:30",
          "debit_confirmed_at": null,
          "failed_at": null,
          "transfer_initiated_at": "2018-12-31T01:10:02+05:30",
          "settled_at": null,
          "rejected_at": null
        }
      ]
    }
    

    GET /api/pg/payments

    Retrieve the list of all payments and filter the result with the following parameters

    Query Parameters

    Parameter Mandatory Default Description Allowed values
    from no - from which date you want to search valid date (yyyy-MM-dd format)
    to no - up to which date you want to search. Should only be passed when from is provided valid date (yyyy-MM-dd format)
    payment_type no - type of payment you want to get NACH, NETBANKING, ECS, CHEQUE or AUTH_TRANSACTION
    payment_status no - multiple payment status separated by a comma SUBMITTED, APPROVED,REJECTED, INITIATED,PENDING,SUCCESS,FAILED
    amc_order_ids no - multiple amc order IDs separated by a comma
    direction no desc ascending order or Descending order asc or desc
    page no 0 page number of the result set
    size no 20 number of results per page, size should not be greater than 100

    KYC Checks

    This API will allow you to check the KYC compliance status of an investor and also display his demographic information as present in the KRA (KYC Registration Agency) databases.

    Endpoints:

    POST /api/kyc/check
    GET /api/kyc/:id
    PUT /api/kyc/:id/refetch

    Create a kyc check

    Status Check

    curl -X POST "{base_url}/api/kyc/check"
    -H "Authorization: Bearer JWTTOKEN"
    -d
    '
    {
      "pan": "BNBPP9384M"
    }
    '
    

    The above command returns JSON structured like this:

    {
      "id": "5620fd1f-eb14-442e-b0ee-da96a6c305c0",
      "source_ref_id": null,
      "pan": "BNBPP9384M",
      "entity_details": {
        "name": "Tony Soprano"
      },
      "status": true,
      "constraints": [
        {
          "type": "investment_limit",
          "amount": {
            "value": 50000,
            "currency": "inr"
          }
        }
      ],
      "sources": [
        {
          "name": "kra-cams",
          "response_verbatim": "Y|BNBPP9384M|KS100",
          "fetched_at": "2018-04-21T23:00:20+05:30"
        }
      ],
      "created_at": "2018-04-21T23:00:20+05:30",
      "updated_at": "2018-04-21T23:00:20+05:30"
    }
    

    POST /api/kyc/check

    Fetch KYC Data

    curl -X POST "{base_url}/api/kyc/check"
    -H "Authorization: Bearer JWTTOKEN"
    -d
    '
    {
    "pan": "BNBPP9384M",
    "date_of_birth": "25/10/1955"
    }
    '
    

    The above command returns JSON structured like this:

    {
      "id": "429f998a-6488-428b-adbd-1c7abdf2a42a",
      "source_ref_id": null,
      "pan": "AAAPA3751A",
      "entity_details": {
        "name": "Tony Soprano",
        "gender": "male",
        "date_of_birth": "25/10/1955",
        "father_name": "Murli Dhar Narang",
        "marital_status": "married",
        "nationality": "indian",
        "residential_status": "resident_individual",
        "correspondence_address": {
          "line_1": "19th main, 33rd cross",
          "line_2": "Jayanagar 4th T block",
          "line_3": null,
          "city": "Bengaluru",
          "pincode": "560041",
          "state": "Karnataka",
          "country": "India"
        },
        "permanent_address": {
          "line_1": "19th main, 33rd cross",
          "line_2": "Jayanagar 4th T block",
          "line_3": null,
          "city": "Bengaluru",
          "pincode": "560041",
          "state": "Karnataka",
          "country": "India"
        },
        "email": "suresh.nrg@gmail.com",
        "mobile": "9809879878"
      },
      "status": true,
      "constraints": [
    
      ],
      "sources": [
        {
          "name": "kra-cvl",
          "response_verbatim": "<xml></xml>",
          "fetched_at": "2021-08-10T12:32:25+05:30"
        }
      ],
      "created_at": "2021-08-10T12:32:25+05:30",
      "updated_at": "2021-08-10T12:32:25+05:30"
    }
    

    Creating a KYC Check fetches the investor's kyc status from different sources. We offer below listed two solutions here.

    Status Check

    This will allow you to check the KYC status of an investor using his / her PAN number. The status can be true or false which will indicate if he / she is KYC compliant or not. If the investor has some investment constraints, they would be listed under the constraints list.

    Fetch KYC Data

    This will allow you to check and fetch the KYC details of an investor as recorded in the KRA databases. You need to send the investor's PAN number and the date of birth as the input parameters in the request body. The response would contain the KYC status along with the demographic (Identity, Address and Contact) information of the investor under entity_details list.

    Query Parameters

    Parameter Mandatory Default Description
    pan yes - A valid PAN number to check the kyc status for
    Parameter Mandatory Default Description
    pan yes - A valid PAN number to check the kyc status for
    date_of_birth yes - A valid date of birth for the above mentioned PAN number in DD/MM/YYYY format

    Fetch a kyc check

    curl "{base_url}/api/kyc/5620fd1f-eb14-442e-b0ee-da96a6c305c0"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "id": "5620fd1f-eb14-442e-b0ee-da96a6c305c0",
      "source_ref_id": null,
      "pan": "BNBPP9384M",
      "entity_details": {
        "name": "Tony Soprano"
      },
      "status": true,
      "constraints": [
        {
          "type": "investment_limit",
          "amount": {
            "value": 50000,
            "currency": "inr"
          }
        }
      ],
      "sources": [
        {
          "name": "kra-cams",
          "response_verbatim": "Y|BNBPP9384M|KS100",
          "fetched_at": "2018-04-21T23:00:20+05:30"
        }
      ],
      "created_at": "2018-04-21T23:00:20+05:30",
      "updated_at": "2018-04-21T23:00:20+05:30"
    }
    

    GET /api/kyc/:id

    Retrieve the KYC Check object

    Refetch a kyc check

    curl -X PUT "{base_url}/api/kyc/5620fd1f-eb14-442e-b0ee-da96a6c305c0/refetch"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "id": "5620fd1f-eb14-442e-b0ee-da96a6c305c0",
      "source_ref_id": null,
      "pan": "BNBPP9384M",
      "entity_details": {
        "name": "Tony Soprano"
      },
      "status": true,
      "constraints": [
        {
          "type": "investment_limit",
          "amount": {
            "value": 50000,
            "currency": "inr"
          }
        }
      ],
      "sources": [
        {
          "name": "kra-cams",
          "response_verbatim": "Y|BNBPP9384M|KS100",
          "fetched_at": "2018-04-21T23:00:20+05:30"
        }
      ],
      "created_at": "2018-04-21T23:00:20+05:30",
      "updated_at": "2018-04-21T23:00:20+05:30"
    }
    

    PUT /api/kyc/:id/refetch

    Force the platform to refetch the kyc information from the sources

    KYC Requests

    Files

    Create a file

    curl -X POST "{base_url}/files"
    -H "Authorization: Bearer JWTTOKEN"
    -F
    '
    "file" : {file_to_upload}
    '
    

    The above command returns JSON structured like this:

    {
      "object": "file",
      "id": "224f380c-d8f9-6f15-b2d9-27968a75f491",
      "created_at": "2018-05-13T17:53:58+05:30",
      "filename": "bob_dl_back.jpg",
      "content_type": "image/jpeg",
      "purpose": null,
      "byte_size": 4501312,
      "url": "https://files.fp.com/bob_dl_back.jpg"
    }
    

    Endpoint is used to upload POI, POA, photo, video, signature files.

    HTTP Request

    POST {base_url}/files

    Query Parameters

    Parameter Mandatory Default Description
    file yes - File to upload.
    purpose no - Notes.

    Fetch a file

    curl "{base_url}/files/870d11d1-c63b-41ca-362a-c8062f4efc71"
      -H "Authorization: Bearer JWTTOKEN"
    

    Endpoint is used to fetch details of a particular file.

    {
      "object": "file",
      "id": "224f380c-d8f9-6f15-b2d9-27968a75f491",
      "created_at": "2018-05-13T17:53:58+05:30",
      "filename": "bob_dl_back.jpg",
      "content_type": "image/jpeg",
      "purpose": null,
      "byte_size": 4501312,
      "url": "https://files.fp.com/bob_dl_back.jpg"
    }
    

    Endpoint is used to fetch details of a particular file.

    HTTP Request

    GET {base_url}/files/{id}

    Query Parameters

    Parameter Mandatory Default Description
    id yes - file id returned from upload file api.

    List all files

    curl -X GET "{base_url}/files"
      -H "Authorization: Bearer JWTTOKEN"
    

    Enpoint fetches the list of all the files.

    {
      "object": "list",
      "data": [
        {
          "object": "file",
          "id": "d2784e7c-a414-4da8-954c-911fe425094a",
          "created_at": "2018-01-29T13:07:32+05:30",
          "filename": "file1.png",
          "content_type": "image/png",
          "purpose": "kyc approve document",
          "byte_size": 127343,
          "url": "https://files.fp.com/file1.png"
        },
        {
          "object": "file",
          "id": "81d631b2-4bc7-49b9-a11d-ff10110e484b",
          "created_at": "2018-01-29T13:44:56+05:30",
          "filename": "undraw_deliveries_131a.png",
          "content_type": "image/png",
          "purpose": "kyc document",
          "byte_size": 73441,
          "url": "https://files.fp.com/undraw_deliveries_131a.png"
        }
      ]
    }
    

    Enpoint fetches the list of all the files.

    HTTP Request

    GET {base_url}/files

    Errors

    Validation Error:

    {
      "error": {
        "status": 400,
        "message": "some description message",
        "errors": [
          {
            "field": "name",
            "message": "validation / error message"
          }
        ]
      }
    }
    

    Json Parse Error:

    {
      "error": {
        "status": 400,
        "message": "JSON parse error",
        "errors": null
      }
    }
    

    Fintech Primitives use standard HTTP error codes. Please refer to HTTP error codes documentation.

    All errors will be emitted in the following structure.

    attribute Type Comments
    status integer same as http status code
    message string descriptive message
    errors array of objects list of errors on each field