NAV Navbar
shell
  • Introduction
  • Recommended Process Flow
  • Authentication
  • Investors
  • Investment Account
  • Orders
  • Order History
  • MasterData
  • Helper API
  • Mandate
  • E-Mandate
  • Payments
  • KYC
  • Errors
  • Introduction

    Welcome to the Fintech Primitives Mutual Fund APIs. You can use our APIs to access Mutual Fund API endpoints, which can get information on various investors, and their respective orders in the database.

    Recommended Process Flow

    Please refer to the Documentation for further details on the following

    Authentication

    Fintech Primitives Mutual Fund System supports 3 different types of authentication: Admin, Tenant and User. It expects the API key to be included in all API requests to the server in a header in the below format:

    Authorization: Bearer JWT_TOKEN

    HMAC Token Generation

    The API uses the HMAC Token based authentication mechanism for tenant login. The HMAC generation procedure is as follows.

    HMAC Token Generation

    Generate payload to sign

    
    Generated payload will be like
    
    "POST" + "\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"))

    The above steps will generate the HMAC token which needs to be passed to the Tenant login API

    [POST] Tenant Login

    curl -X POST "http://tenant.example.com/api/auth/tenant/login"
      -H "
        Authorization: tenant_name:HMAC_TOKEN
        MFProDate: 20150830T123600Z
        Content-Type: application/json
      "
    

    The above command returns JSON structured like this:

    {
      "user": {
        "id": "1",
        "name": "kumar",
        "email": "test@cybrilla.com",
        "phone_number": "1234567891"
      },
      "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyIiwic2NvcGVzIjpbInVzZXIiXSwiaXNzIjoiY3licmlsbGEtYXV0aCIsImlhdCI6MTUwMDQ3MzUxOSwiZXhwIjoxNTAwNDc1MzE5fQ.3_l86DYlmBphZuikVh4F0fHlf-4YG48xk2X__8AkdWc"
    }
    

    The endpoint allows tenants to login. A JWT_TOKEN is returned which has to be provided in other requests for authentication.

    HTTP Request

    POST http://tenant.example.com/api/auth/tenant/login

    Content-Type: application/json

    Header Parameters

    Authorization public_key:token

    public_key is the tenant name which will be shared with each tenant

    token is the HMAC token generated in the previous steps.

    MFProDate is the timestamp used in Step 2.2 in hmac-generation formatted as yyyyMMdd'T'HHmmssZ

    Investors

    [GET] Investors

    curl "http://tenant.example.com/api/onb/investors"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "last": false,
      "first": false,
      "total_pages": 5,
      "number": 2,
      "size": 10,
      "total_elements": 41,
      "investors": [
        {
          "id": 1,
          "display_name": "The Boss",
          "perm_addr_is_corres_addr": true,
          "created_at": "2017-07-18T12:02:44.982Z",
          "updated_at": "2017-07-18T12:02:44.982Z",
          "meta": null,
          "_links": [
            {
              "href": "http://tenant.example.com/api/onb/investors/1",
              "rel": "self",
              "method": "GET"
            },
            {
              "href": "http://tenant.example.com/api/onb/investors/1",
              "rel": "update",
              "method": "POST"
            }
          ],
          "nomination": {
            "skip_nomination": false,
            "nominee1": {
              "name": "tonny",
              "date_of_birth": "1990-10-10",
              "relationship": "spouse",
              "allocation_percentage": 100,
              "guardian_name": null,
              "guardian_relationship": null
            },
            "nominee2": null,
            "nominee3": null
          },
          "bank_accounts": [
            {
              "id": 22,
              "account_holder_name": "Tony Soprano",
              "type": "SAVINGS",
              "ifsc_code": "ICIC0000611",
              "number": "00000001234455",
              "created_at": "2017-07-18T12:02:45.017Z",
              "updated_at": "2017-07-18T12:02:45.017Z",
              "primary_account": true
            }
          ],
          "correspondence_address": {
            "line1": "asdfasf asdfasdasdfasdfasdf",
            "line2": null,
            "line3": null,
            "type": "CORRESPONDENCE",
            "city": "Bangalore South",
            "state": "Karnataka",
            "country_ansi_code": "IN",
            "zipcode": null,
            "address_proof": "VOTER_ID_CARD",
            "address_proof_others_name": null,
            "address_proof_expiry_date": null,
            "address_proof_number": "asfasfasfsf",
            "pincode": "560102",
            "country": "IN"
          },
          "kyc_identity_detail": {
            "name": "antony",
            "father_or_spouse_name": "johny sacks",
            "mothers_name": null,
            "kyc_relation": "SPOUSE",
            "date_of_birth": "1980-10-10",
            "marital_status": "MARRIED",
            "pan_number": "AFZPN3951P",
            "gender": "FEMALE",
            "identity_proof": "PANCARD",
            "identity_proof_others_name": null,
            "identity_proof_expiry_date": null,
            "identity_proof_number": "AFZPN3951P",
            "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
          },
          "contact_detail": {
            "email": "user@cybrilla.com",
            "isd_code": 91,
            "mobile": "9008081644",
            "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_taxid_type": null,
            "third_trc_taxid_number": null,
            "third_trc_ansi_code": null,
            "gross_annual_income": 100000,
            "no_other_tax_residences": true
          }
        }
      ]
    }
    

    This endpoint retrieves all the investors in the scope. If the scope is tenant then all investors belonging to the tenant are retrieved. If a user's JWT token is used then investors related to the given user are retrieved.

    HTTP Request

    GET http://tenant.example.com/api/onb/investors

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page
    curl "http://tenant.example.com/api/onb/investors/search?query=user@cybrilla.com&bank_account_ids=1,22"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "last": false,
      "first": false,
      "total_pages": 5,
      "number": 2,
      "size": 10,
      "total_elements": 41,
      "investors": [
        {
          "id": 1,
          "display_name": "The Boss",
          "perm_addr_is_corres_addr": true,
          "created_at": "2017-07-18T12:02:44.982Z",
          "updated_at": "2017-07-18T12:02:44.982Z",
          "meta": null,
          "_links": [
            {
              "href": "http://tenant.example.com/api/onb/investors/1",
              "rel": "self",
              "method": "GET"
            },
            {
              "href": "http://tenant.example.com/api/onb/investors/1",
              "rel": "update",
              "method": "POST"
            }
          ],
          "nomination": {
            "skip_nomination": false,
            "nominee1": {
              "name": "tonny",
              "date_of_birth": "1990-10-10",
              "relationship": "spouse",
              "allocation_percentage": 100,
              "guardian_name": null,
              "guardian_relationship": null
            },
            "nominee2": null,
            "nominee3": null
          },
          "bank_accounts": [
            {
              "id": 22,
              "account_holder_name": "Tony Soprano",
              "type": "SAVINGS",
              "ifsc_code": "ICIC0000611",
              "number": "00000001234455",
              "created_at": "2017-07-18T12:02:45.017Z",
              "updated_at": "2017-07-18T12:02:45.017Z",
              "primary_account": true
            }
          ],
          "correspondence_address": {
            "line1": "asdfasf asdfasdasdfasdfasdf",
            "line2": null,
            "line3": null,
            "type": "CORRESPONDENCE",
            "city": "Bangalore South",
            "state": "Karnataka",
            "country_ansi_code": "IN",
            "zipcode": null,
            "address_proof": "VOTER_ID_CARD",
            "address_proof_others_name": null,
            "address_proof_expiry_date": null,
            "address_proof_number": "asfasfasfsf",
            "pincode": "560102",
            "country": "IN"
          },
          "kyc_identity_detail": {
            "name": "antony",
            "father_or_spouse_name": "johny sacks",
            "mothers_name": null,
            "kyc_relation": "SPOUSE",
            "date_of_birth": "1980-10-10",
            "marital_status": "MARRIED",
            "pan_number": "AFZPN3951P",
            "gender": "FEMALE",
            "identity_proof": "PANCARD",
            "identity_proof_others_name": null,
            "identity_proof_expiry_date": null,
            "identity_proof_number": "AFZPN3951P",
            "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
          },
          "contact_detail": {
            "email": "user@cybrilla.com",
            "isd_code": 91,
            "mobile": "9008081644",
            "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_taxid_type": null,
            "third_trc_taxid_number": null,
            "third_trc_ansi_code": null,
            "gross_annual_income": 100000,
            "no_other_tax_residences": true
          }
        }
      ]
    }
    

    HTTP Request

    GET http://tenant.example.com/api/onb/investors/search

    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
    page no 0 page number of the result set
    size no 20 number of results per page

    [GET] Investor Details

    curl "http://tenant.example.com/api/onb/investors/1"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "id": 1,
      "display_name": "The Boss",
      "perm_addr_is_corres_addr": true,
      "created_at": "2017-07-18T12:02:44.982Z",
      "updated_at": "2017-07-18T12:02:44.982Z",
      "meta": null,
      "_links": [
        {
          "href": "http://tenant.example.com/api/onb/investors/1",
          "rel": "self",
          "method": "GET"
        },
        {
          "href": "http://tenant.example.com/api/onb/investors/1",
          "rel": "update",
          "method": "POST"
        }
      ],
      "nomination": {
        "skip_nomination": false,
        "nominee1": {
          "name": "tonny",
          "date_of_birth": "1990-10-10",
          "relationship": "spouse",
          "allocation_percentage": 100,
          "guardian_name": null,
          "guardian_relationship": null
        },
        "nominee2": null,
        "nominee3": null
      },
      "bank_accounts": [
        {
          "id": 22,
          "account_holder_name": "Tony Soprano",
          "type": "SAVINGS",
          "ifsc_code": "ICIC0000611",
          "number": "00000001234455",
          "created_at": "2017-07-18T12:02:45.017Z",
          "updated_at": "2017-07-18T12:02:45.017Z",
          "primary_account": true
        }
      ],
      "correspondence_address": {
        "line1": "asdfasf asdfasdasdfasdfasdf",
        "line2": null,
        "line3": null,
        "type": "CORRESPONDENCE",
        "city": "Bangalore South",
        "state": "Karnataka",
        "country_ansi_code": "IN",
        "zipcode": null,
        "address_proof": "VOTER_ID_CARD",
        "address_proof_others_name": null,
        "address_proof_expiry_date": null,
        "address_proof_number": "asfasfasfsf",
        "pincode": "560102",
        "country": "IN"
      },
      "kyc_identity_detail": {
        "name": "antony",
        "father_or_spouse_name": "johny sacks",
        "mothers_name": null,
        "kyc_relation": "SPOUSE",
        "date_of_birth": "1980-10-10",
        "marital_status": "MARRIED",
        "pan_number": "AFZPN3951P",
        "gender": "FEMALE",
        "identity_proof": "PANCARD",
        "identity_proof_others_name": null,
        "identity_proof_expiry_date": null,
        "identity_proof_number": "AFZPN3951P",
        "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
      },
      "contact_detail": {
        "email": "user@cybrilla.com",
        "isd_code": 91,
        "mobile": "9008081644",
        "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_taxid_type": null,
        "third_trc_taxid_number": null,
        "third_trc_ansi_code": null,
        "gross_annual_income": 100000,
        "no_other_tax_residences": true
      }
    }
    

    This endpoint shows the data of an investor identified by the given investor_id

    HTTP Request

    GET http://tenant.example.com/api/onb/investors/{investor_id}

    [POST] Create Investor

    curl -X POST "http://tenant.example.com/api/onb/investors"
      -H "Authorization: Bearer JWTTOKEN"
      -d '
        {
      "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"
        }
      ],
      "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
      },
      "correspondence_address": {
        "line1": "1082 harlur road",
        "pincode": "560102"
      }
    }
      '
    

    The above command returns JSON structured like this:

    {
      "id": 1,
      "display_name": "The Boss",
      "perm_addr_is_corres_addr": true,
      "created_at": "2017-07-18T12:02:44.982Z",
      "updated_at": "2017-07-18T12:02:44.982Z",
      "meta": null,
      "_links": [
        {
          "href": "http://tenant.example.com/api/onb/investors/1",
          "rel": "self",
          "method": "GET"
        },
        {
          "href": "http://tenant.example.com/api/onb/investors/1",
          "rel": "update",
          "method": "POST"
        }
      ],
      "nomination": {
        "skip_nomination": false,
        "nominee1": {
          "name": "tonny",
          "date_of_birth": "1990-10-10",
          "relationship": "spouse",
          "allocation_percentage": 100,
          "guardian_name": null,
          "guardian_relationship": null
        },
        "nominee2": null,
        "nominee3": null
      },
      "bank_accounts": [
        {
          "id": 22,
          "account_holder_name": "Tony Soprano",
          "type": "SAVINGS",
          "ifsc_code": "ICIC0000611",
          "number": "00000001234455",
          "created_at": "2017-07-18T12:02:45.017Z",
          "updated_at": "2017-07-18T12:02:45.017Z",
          "primary_account": true
        }
      ],
      "correspondence_address": {
        "line1": "asdfasf asdfasdasdfasdfasdf",
        "line2": null,
        "line3": null,
        "type": "CORRESPONDENCE",
        "city": "Bangalore South",
        "state": "Karnataka",
        "country_ansi_code": "IN",
        "zipcode": null,
        "address_proof": "VOTER_ID_CARD",
        "address_proof_others_name": null,
        "address_proof_expiry_date": null,
        "address_proof_number": "asfasfasfsf",
        "pincode": "560102",
        "country": "IN"
      },
      "kyc_identity_detail": {
        "name": "antony",
        "father_or_spouse_name": "johny sacks",
        "mothers_name": null,
        "kyc_relation": "SPOUSE",
        "date_of_birth": "1980-10-10",
        "marital_status": "MARRIED",
        "pan_number": "AFZPN3951P",
        "gender": "FEMALE",
        "identity_proof": "PANCARD",
        "identity_proof_others_name": null,
        "identity_proof_expiry_date": null,
        "identity_proof_number": "AFZPN3951P",
        "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
      },
      "contact_detail": {
        "email": "user@cybrilla.com",
        "isd_code": 91,
        "mobile": "9008081644",
        "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_taxid_type": null,
        "third_trc_taxid_number": null,
        "third_trc_ansi_code": null,
        "gross_annual_income": 100000,
        "no_other_tax_residences": true
      }
    }
    

    This endpoint is used to create an investor.

    HTTP Request

    POST http://tenant.example.com/api/onb/investors/

    Query 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

    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
    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.

    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

    [POST] Update Investor

    curl -X POST "http://tenant.example.com/api/onb/investors/:investor_id"
      -H "Authorization: Bearer JWTTOKEN"
      -d '
        {
      "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"
        }
      ],
      "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
      },
      "correspondence_address": {
        "line1": "1082 harlur road",
        "pincode": "560102"
      }
    }
      '
    

    The above command returns JSON structured like this:

    {
      "id": 1,
      "display_name": "The Boss",
      "perm_addr_is_corres_addr": true,
      "created_at": "2017-07-18T12:02:44.982Z",
      "updated_at": "2017-07-18T12:02:44.982Z",
      "meta": null,
      "_links": [
        {
          "href": "http://tenant.example.com/api/onb/investors/1",
          "rel": "self",
          "method": "GET"
        },
        {
          "href": "http://tenant.example.com/api/onb/investors/1",
          "rel": "update",
          "method": "POST"
        }
      ],
      "nomination": {
        "skip_nomination": false,
        "nominee1": {
          "name": "tonny",
          "date_of_birth": "1990-10-10",
          "relationship": "spouse",
          "allocation_percentage": 100,
          "guardian_name": null,
          "guardian_relationship": null
        },
        "nominee2": null,
        "nominee3": null
      },
      "bank_accounts": [
        {
          "id": 22,
          "account_holder_name": "Tony Soprano",
          "type": "SAVINGS",
          "ifsc_code": "ICIC0000611",
          "number": "00000001234455",
          "created_at": "2017-07-18T12:02:45.017Z",
          "updated_at": "2017-07-18T12:02:45.017Z",
          "primary_account": true
        }
      ],
      "correspondence_address": {
        "line1": "asdfasf asdfasdasdfasdfasdf",
        "line2": null,
        "line3": null,
        "type": "CORRESPONDENCE",
        "city": "Bangalore South",
        "state": "Karnataka",
        "country_ansi_code": "IN",
        "zipcode": null,
        "address_proof": "VOTER_ID_CARD",
        "address_proof_others_name": null,
        "address_proof_expiry_date": null,
        "address_proof_number": "asfasfasfsf",
        "pincode": "560102",
        "country": "IN"
      },
      "kyc_identity_detail": {
        "name": "antony",
        "father_or_spouse_name": "johny sacks",
        "mothers_name": null,
        "kyc_relation": "SPOUSE",
        "date_of_birth": "1980-10-10",
        "marital_status": "MARRIED",
        "pan_number": "AFZPN3951P",
        "gender": "FEMALE",
        "identity_proof": "PANCARD",
        "identity_proof_others_name": null,
        "identity_proof_expiry_date": null,
        "identity_proof_number": "AFZPN3951P",
        "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
      },
      "contact_detail": {
        "email": "user@cybrilla.com",
        "isd_code": 91,
        "mobile": "9008081644",
        "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_taxid_type": null,
        "third_trc_taxid_number": null,
        "third_trc_ansi_code": null,
        "gross_annual_income": 100000,
        "no_other_tax_residences": true
      }
    }
    

    This endpoint is used to update an existing investor's details

    HTTP Request

    POST http://tenant.example.com/api/onb/investors/{investor_id}

    Query Parameters

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

    Investment Account

    [POST] Create Investment Account

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts"
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "primary_investor_id": "1"
    }
    

    JSON response:

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

    This endpoint is used to create an investment account for the investor. Investment_account_id is required to interact with the Order Management System.

    HTTP Request

    POST http://tenant.example.com/api/oms/investment_accounts

    Investment Account Params

    Name Mandatory Type Comments
    primary_investor_id yes integer investor ID returns in Create Investor API response

    [GET] Investment Accounts

    curl "http://tenant.example.com/api/oms/investment_accounts?investor_id=1"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

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

    This endpoint retrieves a list of investment accounts associated with a given investor identified by the given investor_id

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts

    Query Parameters

    Parameter Mandatory Description
    investor_id yes investor ID of the investor

    Note :

    If the endpoint returns an empty array, it indicates that no investment account exists for that particular investor id.

    [GET] Investment Account Holdings

    curl "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/holdings"
      -H "Authorization: Bearer JWTTOKEN"
    

    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
              }
            }
          ]
        },
        {
          "folio_number": "168714",
          "schemes": [
            {
              "isin": "INF200K01180",
              "name": "SBI BLUE CHIP FUND-REGULAR PLAN GROWTH",
              "type": "GROWTH",
              "holdings": {
                "as_on": "2018-03-12",
                "units": 165.555,
                "redeemable_units": 165.555
              },
              "market_value": {
                "as_on": "2018-03-08",
                "amount": 6126.38,
                "redeemable_amount": 6126.38
              },
              "invested_value": {
                "as_on": "2018-03-12",
                "amount": 6000
              },
              "payout": {
                "as_on": "2018-03-12",
                "amount": 0
              },
              "nav": {
                "as_on": "2018-03-08",
                "value": 37.0051
              }
            }
          ]
        },
        {
          "folio_number": "2145674",
          "schemes": [
            {
              "isin": "INF205K01HY0",
              "name": "Invesco India Ultra Short Term Fund - Growth",
              "type": "GROWTH",
              "holdings": {
                "as_on": "2018-03-12",
                "units": 0.421,
                "redeemable_units": 0.421
              },
              "market_value": {
                "as_on": "2018-03-08",
                "amount": 1003.54,
                "redeemable_amount": 1003.54
              },
              "invested_value": {
                "as_on": "2018-03-12",
                "amount": 1000
              },
              "payout": {
                "as_on": "2018-03-12",
                "amount": 0
              },
              "nav": {
                "as_on": "2018-03-08",
                "value": 2383.6936
              }
            }
          ]
        },
        {
          "folio_number": "4991603125",
          "schemes": [
            {
              "isin": "INF204K01EF9",
              "name": "Reliance Medium Term Growth",
              "type": "GROWTH",
              "holdings": {
                "as_on": "2018-03-12",
                "units": 14.007,
                "redeemable_units": 14.007
              },
              "market_value": {
                "as_on": "2018-03-08",
                "amount": 506.71,
                "redeemable_amount": 506.71
              },
              "invested_value": {
                "as_on": "2018-03-12",
                "amount": 500
              },
              "payout": {
                "as_on": "2018-03-12",
                "amount": 0
              },
              "nav": {
                "as_on": "2018-03-08",
                "value": 36.1752
              }
            }
          ]
        }
      ]
    }
    

    This endpoint retrieves all folios with current holdings for the given investment_account

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/holdings

    Query Parameters

    Name Mandatory Description Example
    folios no comma separated list of folios 499183272514,499778256972,491178256912
    as_on no date till data required 1990-12-12

    Note :

    If the endpoint returns an empty array, it indicates that investment account does not have any folio numbers mapped to it.

    [GET] Investment Account Orders

    curl "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders"
      -H "Authorization: Bearer JWTTOKEN"
    

    This endpoint retrieves all orders for the given investment_account

    {
      "amc_orders": [
        {
          "id": 1616,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-04-13",
          "folio_number": "2106445674",
          "bank_account_id": null,
          "source_ref_id": null,
          "fund_scheme": {
            "id": 317,
            "name": "Invesco India Ultra Short Term Fund - Growth",
            "isin": "INF205K01HY0",
            "scheme_code": "USIG"
          }
        },
        {
          "id": 1770,
          "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": "8881867/08",
          "bank_account_id": null,
          "source_ref_id": "O_43040",
          "fund_scheme": {
            "id": 427,
            "name": "ICICI Prudential Liquid - Regular Plan - Growth",
            "isin": "INF109K01VQ1",
            "scheme_code": "1565"
          }
        },
        {
          "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",
          "fund_scheme": {
            "id": 900,
            "name": "Aditya Birla Sun Life Cash Manager - Growth Plan",
            "isin": "INF209K01LQ0",
            "scheme_code": "43N"
          }
        },
        {
          "id": 1761,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "3099909995010",
          "bank_account_id": 36,
          "source_ref_id": "O_43015",
          "fund_scheme": {
            "id": 6,
            "name": "Franklin India Ultra-short Bond Fund - Super Institutional - Growth",
            "isin": "INF090I01CN4",
            "scheme_code": "309"
          }
        },
        {
          "id": 1763,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "499183273514",
          "bank_account_id": 36,
          "source_ref_id": "O_43027",
          "fund_scheme": {
            "id": 3,
            "name": "Reliance Medium Term Growth",
            "isin": "INF204K01EF9",
            "scheme_code": "IPGP"
          }
        },
        {
          "id": 1764,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "499183273514",
          "bank_account_id": 36,
          "source_ref_id": "O_43028",
          "fund_scheme": {
            "id": 3,
            "name": "Reliance Medium Term Growth",
            "isin": "INF204K01EF9",
            "scheme_code": "IPGP"
          }
        },
        {
          "id": 1765,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "SBBNAE209345",
          "bank_account_id": 36,
          "source_ref_id": "O_43033",
          "fund_scheme": {
            "id": 4,
            "name": "Sundaram Diversified Equity Growth",
            "isin": "INF903J01538",
            "scheme_code": "14"
          }
        },
        {
          "id": 1759,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "8558159/65",
          "bank_account_id": 36,
          "source_ref_id": "O_43013",
          "fund_scheme": {
            "id": 427,
            "name": "ICICI Prudential Liquid - Regular Plan - Growth",
            "isin": "INF109K01VQ1",
            "scheme_code": "1565"
          }
        },
        {
          "id": 1767,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "1017895054",
          "bank_account_id": 36,
          "source_ref_id": "O_43035",
          "fund_scheme": {
            "id": 900,
            "name": "Aditya Birla Sun Life Cash Manager - Growth Plan",
            "isin": "INF209K01LQ0",
            "scheme_code": "43N"
          }
        },
        {
          "id": 1768,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "503304785537",
          "bank_account_id": 36,
          "source_ref_id": "O_43036",
          "fund_scheme": {
            "id": 1269,
            "name": "UTI-  Liquid Fund-Cash Plan-INST Growth",
            "isin": "INF789F01PH1",
            "scheme_code": "CPIG"
          }
        },
        {
          "id": 1769,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 5000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "1017895054",
          "bank_account_id": 36,
          "source_ref_id": "O_43039",
          "fund_scheme": {
            "id": 900,
            "name": "Aditya Birla Sun Life Cash Manager - Growth Plan",
            "isin": "INF209K01LQ0",
            "scheme_code": "43N"
          }
        },
        {
          "id": 1760,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "499159381447",
          "bank_account_id": 36,
          "source_ref_id": "O_43014",
          "fund_scheme": {
            "id": 80,
            "name": "RELIANCE LIQUIDITY FUND - GROWTH PLAN GROWTH OPTION",
            "isin": "INF204K01VA4",
            "scheme_code": "LQGP"
          }
        }
      ],
      "last": true,
      "total_pages": 1,
      "total_elements": 12,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 12,
      "_links": {
        "self": {
          "href": "http://wealthapp.mft.com:9010/api/oms/investment_accounts/12/orders?state=pending&type=additional_purchase&sort=order_date&direction=desc"
        }
      }
    }
    

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders

    Query Parameters

    Parameter Mandatory Default Description Allowed values
    state no successful Comma separated multiple states pending, submitted, successful or failed
    type no - Comma separated multiple types purchase, additional_purchase, redemption
    sort no order_date Sorting is done based on this column order_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

    Orders

    [POST] Create Lumpsum Order (NETBANKING)

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/purchase/netbanking"
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "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"
        }
      ]
    }
    

    JSON resonse:

    {
      "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"
        }
      ]
    }
    

    This endpoint is used to create a lumpsum netbanking order

    HTTP Request

    POST http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/purchase/netbanking

    Lumpsum order Params

    Name Mandatory Type Comments
    bank_account_id yes integer
    isin yes string fund ISIN number
    amount yes integer
    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 unique across system for the lumpsum order (ideally an auto generate identifier / uuid to identify a lumpsum order in tenant's application)
    user_ip no string IP address of user
    server_ip no string IP address of server

    [POST] Create Lumpsum Order (NACH)

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/purchase/nach"
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "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 resonse:

    {
      "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"
        }
      ]
    }
    

    This endpoint is used to create a lumpsum NACH order

    HTTP Request

    POST http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/purchase/nach

    Lumpsum order Params

    Name Mandatory Type Comments
    mandate_id yes integer
    isin yes string fund ISIN number
    amount yes integer
    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 unique across system for a lumpsum order (ideally an auto generate identifier / uuid to identify a lumpsum order in tenant's application)
    user_ip no string IP address of user
    server_ip no string IP address of server

    [POST] Create Sell Order

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sell"
      -H "Authorization: Bearer JWTTOKEN"
      -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"
        },
        {
          "folio_number": "45323/45",
          "isin": "INF204KA1B64",
          "redeem_all": true,
          "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"
        }
      ]
    }
    

    This endpoint is used to create a sell order

    HTTP Request

    POST http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sell

    Withdrawal order Params

    Name Mandatory Type Comments
    folio_number yes string
    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
    units no decimal mandatory if type is 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
    user_ip no string IP address of user
    server_ip no string IP address of server

    [POST] Create SIP Order

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips"
      -H "Authorization: Bearer JWTTOKEN"
      -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"
        }
      ]
    }
    

    This endpoint is used to create an SIP order

    HTTP Request

    POST http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips

    Sip order Params

    Name Mandatory Type Comments
    isin yes string fund ISIN number
    amount yes integer
    start_day yes string
    frequency yes string currently only "MONTHLY" frequency is supported
    installments yes integer
    folio_number no string mandatory if you need to place an additional sip in the given folio number
    mandate_id yes integer
    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

    [GET] List SIP Order

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips"
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON response:

    {
      "sip_orders": [
        {
          "sip_id": 1,
          "active": true,
          "amount": 10000,
          "frequency": "MONTHLY",
          "start_date": "2017-10-25",
          "installments": 20,
          "folio_number": null,
          "mandate_id": "23",
          "fund_scheme_id": 1,
          "fund_type": "GROWTH",
          "_links": {
            "self": {
              "href": "http://tenant.example.com/oms/investment_accounts/1/orders/sips/1"
            }
          }
        }
      ],
      "last": true,
      "total_pages": 1,
      "total_elements": 1,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 1,
      "_links": {
        "self": {
          "href": "http://tenant.example.com/oms/investment_accounts/1/orders/sips"
        }
      }
    }
    

    This endpoint lists all the SIP orders

    Note :

    If the endpoint returns an empty array, it indicates that no SIP exists for that particular investor id.

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips

    [GET] Single SIP Order Detail

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips/1{sip_id}
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON response:

    {
      "sip_id": 1,
      "active": true,
      "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://tenant.example.com/investment_accounts/1/orders/sips/1"
        }
      }
    }
    

    This endpoint is used to get the details of an SIP order

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips/{sip_id}

    [GET] SIP Order Instalment

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips/{sip_id}/installments"
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON response:

    [
      {
        "id": 7,
        "type": "PURCHASE",
        "status": "PENDING",
        "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"
        }
      }
    ]
    

    This endpoint is used to get instalment details of an SIP order

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips/{sip_id}/installments

    Note :

    If the endpoint returns an empty array, it indicates that no SIP installments exists for that particular SIP id.

    [PATCH] Update SIP Order

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{invetsment_account_id}/orders/sips/{sip_id}"
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON request:

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

    JSON response:

    {
      "message": "successfully updated the sip"
    }
    

    This endpoint is used to update an SIP order.

    HTTP Request

    PATCH http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips/{sip_id}

    [PATCH] Cancel SIP Order

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips/{sip_id}"
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "operation": "deactivate"
    }
    

    JSON response:

    {
      "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"
        }
      }
    }
    

    This endpoint is used to cancel an SIP order

    HTTP Request

    PATCH http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips/{sip_id}

    [PATCH] Cancel SIP Order Instalment

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips/{sip_id}"
      -H "Authorization: Bearer JWTTOKEN"
      -d '{json_request}'
    

    JSON request:

    {
      "operation": "cancel_next_installment"
    }
    

    JSON response:

    {
      "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"
      }
    }
    

    This endpoint is used to cancel the next upcoming installment of an SIP order

    HTTP Request

    PATCH http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sips/{sip_id}

    [GET] Orders

    curl "http://tenant.example.com/api/oms/orders"
      -H "Authorization: Bearer JWTTOKEN"
    
    {
      "amc_orders": [
        {
          "id": 1616,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-04-13",
          "folio_number": "2106445674",
          "bank_account_id": null,
          "source_ref_id": null,
          "fund_scheme": {
            "id": 317,
            "name": "Invesco India Ultra Short Term Fund - Growth",
            "isin": "INF205K01HY0",
            "scheme_code": "USIG"
          }
        },
        {
          "id": 1770,
          "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": "8881867/08",
          "bank_account_id": null,
          "source_ref_id": "O_43040",
          "fund_scheme": {
            "id": 427,
            "name": "ICICI Prudential Liquid - Regular Plan - Growth",
            "isin": "INF109K01VQ1",
            "scheme_code": "1565"
          }
        },
        {
          "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",
          "fund_scheme": {
            "id": 900,
            "name": "Aditya Birla Sun Life Cash Manager - Growth Plan",
            "isin": "INF209K01LQ0",
            "scheme_code": "43N"
          }
        },
        {
          "id": 1761,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "3099909995010",
          "bank_account_id": 36,
          "source_ref_id": "O_43015",
          "fund_scheme": {
            "id": 6,
            "name": "Franklin India Ultra-short Bond Fund - Super Institutional - Growth",
            "isin": "INF090I01CN4",
            "scheme_code": "309"
          }
        },
        {
          "id": 1763,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "499183273514",
          "bank_account_id": 36,
          "source_ref_id": "O_43027",
          "fund_scheme": {
            "id": 3,
            "name": "Reliance Medium Term Growth",
            "isin": "INF204K01EF9",
            "scheme_code": "IPGP"
          }
        },
        {
          "id": 1764,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "499183273514",
          "bank_account_id": 36,
          "source_ref_id": "O_43028",
          "fund_scheme": {
            "id": 3,
            "name": "Reliance Medium Term Growth",
            "isin": "INF204K01EF9",
            "scheme_code": "IPGP"
          }
        },
        {
          "id": 1765,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "SBBNAE209345",
          "bank_account_id": 36,
          "source_ref_id": "O_43033",
          "fund_scheme": {
            "id": 4,
            "name": "Sundaram Diversified Equity Growth",
            "isin": "INF903J01538",
            "scheme_code": "14"
          }
        },
        {
          "id": 1759,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "8558159/65",
          "bank_account_id": 36,
          "source_ref_id": "O_43013",
          "fund_scheme": {
            "id": 427,
            "name": "ICICI Prudential Liquid - Regular Plan - Growth",
            "isin": "INF109K01VQ1",
            "scheme_code": "1565"
          }
        },
        {
          "id": 1767,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "1017895054",
          "bank_account_id": 36,
          "source_ref_id": "O_43035",
          "fund_scheme": {
            "id": 900,
            "name": "Aditya Birla Sun Life Cash Manager - Growth Plan",
            "isin": "INF209K01LQ0",
            "scheme_code": "43N"
          }
        },
        {
          "id": 1768,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "503304785537",
          "bank_account_id": 36,
          "source_ref_id": "O_43036",
          "fund_scheme": {
            "id": 1269,
            "name": "UTI-  Liquid Fund-Cash Plan-INST Growth",
            "isin": "INF789F01PH1",
            "scheme_code": "CPIG"
          }
        },
        {
          "id": 1769,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 5000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "1017895054",
          "bank_account_id": 36,
          "source_ref_id": "O_43039",
          "fund_scheme": {
            "id": 900,
            "name": "Aditya Birla Sun Life Cash Manager - Growth Plan",
            "isin": "INF209K01LQ0",
            "scheme_code": "43N"
          }
        },
        {
          "id": 1760,
          "type": "ADDITIONAL_PURCHASE",
          "status": "PENDING",
          "amount": 1000,
          "reverse_amount": null,
          "reverse_units": null,
          "price": null,
          "trade_date": null,
          "investment_date": "2018-03-14",
          "folio_number": "499159381447",
          "bank_account_id": 36,
          "source_ref_id": "O_43014",
          "fund_scheme": {
            "id": 80,
            "name": "RELIANCE LIQUIDITY FUND - GROWTH PLAN GROWTH OPTION",
            "isin": "INF204K01VA4",
            "scheme_code": "LQGP"
          }
        }
      ],
      "last": true,
      "total_pages": 1,
      "total_elements": 12,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 12,
      "_links": {
        "self": {
          "href": "http://wealthapp.mft.com:9010/api/oms/investment_accounts/12/orders?state=pending&type=additional_purchase&sort=order_date&direction=desc"
        }
      }
    }
    

    This endpoint retrieves all the orders mapped to the tenant

    HTTP Request

    GET http://tenant.example.com/api/oms/orders

    Query Parameters

    Parameter Mandatory Default Description Allowed values
    state no successful comma separated multiple states pending, submitted, successful or failed
    type no - comma separated multiple types purchase, additional_purchase, redemption
    sort no order_date sorting is done based on this column order_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

    Order History

    [GET] Fetch all orders

    curl "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "_links": {
        "self": {
          "href": "http://tenant.example.com/oms/api/investment_accounts/3898573529235304961/orders"
        }
      },
      "amc_orders": [
        {
          "type": "PURCHASE",
          "status": "SUCCESSFUL",
          "amount": 2000,
          "reverse_amount": 2000,
          "reverse_units": 20,
          "nav": 100,
          "stt": 20,
          "trade_date": "2017-07-27",
          "order_date": "2017-07-27T07:16:50.951Z",
          "folio_number_id": 1,
          "fund_scheme": {
            "id": 1,
            "name": "Axis Equity Dir Gr"
          }
        },
        {
          "type": "REDEEM_ALL",
          "status": "PENDING",
          "amount": null,
          "reverse_amount": null,
          "reverse_units": null,
          "nav": null,
          "stt": null,
          "trade_date": null,
          "order_date": "2017-07-27T07:43:18.039Z",
          "folio_number_id": 1,
          "fund_scheme": {
            "id": 1,
            "name": "Axis Equity Dir Gr"
          }
        }
      ],
      "last": true,
      "total_pages": 1,
      "total_elements": 2,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 2
    }
    

    This endpoint retrieves all orders placed by the investor

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders

    Parameter Mandatory Default Description Allowed values
    state no successful comma separated multiple states pending, submitted, successful or failed
    type no - comma separated multiple types purchase, additional_purchase, redemption
    sort no order_date sorting is done based on this column order_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

    [GET] Fetch Single Order

    curl "http://tenant.example.com/api/oms/investment_accounts/1/orders/311"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "id": 311,
      "type": "PURCHASE",
      "status": "PAYMENT_CONFIRMED",
      "amount": 10000,
      "reverse_amount": null,
      "reverse_units": null,
      "price": null,
      "trade_date": null,
      "investment_date": "2018-11-06",
      "folio_number": null,
      "bank_account_id": 1,
      "source_ref_id": "B3D81JMS3KBBSLS1BNH1",
      "fund_scheme": {
        "id": 127,
        "name": "RELIANCE RETIREMENT FUND - WEALTH CREATION SCHEME - GROWTH PLAN",
        "isin": "INF204KA1B64",
        "scheme_code": "RWGP"
      }
    }
    

    This endpoint retrieves order with given amc_order_id

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/{amc_order_id}

    [GET] Fetch purchase orders

    curl "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/purchase"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "_links": {
        "self": {
          "href": "http://tenant.example.com/oms/api/investment_accounts/3898573529235304961/orders/purchase"
        }
      },
      "amc_orders": [
        {
          "type": "PURCHASE",
          "status": "SUCCESSFUL",
          "amount": 2000,
          "reverse_amount": 2000,
          "reverse_units": 20,
          "nav": 100,
          "stt": 20,
          "trade_date": "2017-07-27",
          "order_date": "2017-07-27T07:16:50.951Z",
          "folio_number_id": 1,
          "fund_scheme": {
            "id": 1,
            "name": "Axis Equity Dir Gr"
          }
        }
      ],
      "last": true,
      "total_pages": 1,
      "total_elements": 1,
      "size": 10,
      "number": 0,
      "first": true,
      "number_of_elements": 1
    }
    

    This endpoint retrieves all purchase orders placed by the investor

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/purchase

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page

    [GET] Fetch sell orders

    curl "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sell"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "_links": {
        "self": {
          "href": "http://tenant.example.com/oms/api/investment_accounts/3898573529235304961/orders/purchase"
        }
      },
      "amc_orders": [
        {
          "type": "REDEEM_ALL",
          "status": "PENDING",
          "amount": null,
          "reverse_amount": null,
          "reverse_units": null,
          "nav": null,
          "stt": null,
          "trade_date": null,
          "order_date": "2017-07-27T07:43:18.039Z",
          "folio_number_id": 1,
          "fund_scheme": {
            "id": 1,
            "name": "Axis Equity Dir Gr"
          }
        }
      ],
      "last": true,
      "total_pages": 1,
      "total_elements": 1,
      "size": 10,
      "number": 0,
      "first": true,
      "number_of_elements": 1
    }
    

    This endpoint retrieves all sell orders placed by the investor

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/sell

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page

    [GET] Fetch switch orders

    curl "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/switch"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "_links": {
        "self": {
          "href": "http://tenant.example.com/oms/api/investment_accounts/3898573529235304961/orders/purchase"
        }
      },
      "amc_orders": [
        {
          "type": "PURCHASE",
          "status": "SUCCESSFUL",
          "amount": 2000,
          "reverse_amount": 2000,
          "reverse_units": 20,
          "nav": 100,
          "stt": 20,
          "trade_date": "2017-07-27",
          "order_date": "2017-07-27T07:16:50.951Z",
          "folio_number_id": 1,
          "fund_scheme": {
            "id": 1,
            "name": "Axis Equity Dir Gr"
          }
        }
      ],
      "last": true,
      "total_pages": 1,
      "total_elements": 1,
      "size": 10,
      "number": 0,
      "first": true,
      "number_of_elements": 1
    }
    

    This endpoint retrieves all switch orders placed by the investor

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/switch

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page

    [GET] Fetch dividends orders

    curl "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/dividend"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "_links": {
        "self": {
          "href": "http://tenant.example.com/oms/api/investment_accounts/3898573529235304961/orders/purchase"
        }
      },
      "amc_orders": [
        {
          "type": "PURCHASE",
          "status": "SUCCESSFUL",
          "amount": 2000,
          "reverse_amount": 2000,
          "reverse_units": 20,
          "nav": 100,
          "stt": 20,
          "trade_date": "2017-07-27",
          "order_date": "2017-07-27T07:16:50.951Z",
          "folio_number_id": 1,
          "fund_scheme": {
            "id": 1,
            "name": "Axis Equity Dir Gr"
          }
        }
      ],
      "last": true,
      "total_pages": 1,
      "total_elements": 1,
      "size": 10,
      "number": 0,
      "first": true,
      "number_of_elements": 1
    }
    

    This endpoint retrieves all dividend orders of the investor

    HTTP Request

    GET http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/orders/dividend

    Query Parameters

    Parameter Mandatory Default Description
    page no 0 page number of the result set
    size no 20 number of results per page

    MasterData

    [GET] Pincodes

    curl "http://tenant.example.com/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": "http://tenant.example.com/api/onb/pincodes/560102",
              "rel": "self",
              "method": "GET"
            }
          ]
        }
      ]
    }
    

    This endpoint retrieves all pincodes in the system with pagination

    HTTP Request

    GET http://tenant.example.com/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

    [GET] Pincode

    curl "http://tenant.example.com/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": "http://tenant.example.com/api/onb/pincodes/560102",
          "rel": "self",
          "method": "GET"
        }
      ]
    }
    

    This endpoint retrieves details of the given pincode

    HTTP Request

    GET http://tenant.example.com/api/onb/pincodes/{pincode}

    [GET] States

    curl "http://tenant.example.com/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 http://tenant.example.com/api/onb/states

    [GET] Countries

    curl "http://tenant.example.com/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 http://tenant.example.com/api/onb/countries

    [GET] IfscCodes

    curl "http://tenant.example.com/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 http://tenant.example.com/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

    [GET] IfscCode

    curl "http://tenant.example.com/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 http://tenant.example.com/api/onb/ifsc_codes/{ifsc_code}

    [POST] Fetch investors fund scheme restrictions/validation

    curl -X POST "http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/fund_schemes/restrictions"
      -H "Authorization: Bearer JWTTOKEN, Content-Type: multipart/form-data"
      -d '{json_request}'
    

    JSON request:

    {
      "fund_scheme_ids": [
        1,
        2
      ]
    }
    

    JSON response:

    {
      "data": {
        "attributes": [
          {
            "minSipAmount": 500,
            "sipMultiples": 1,
            "sipFrequency": null,
            "investmentMultiples": 100,
            "minWithdrawalAmount": 500,
            "withdrawalMultiples": 1,
            "maxInvestmentAmount": 999999999,
            "minSwitchAmount": 500,
            "minInvestmentAmount": 500,
            "maxWithdrawalUnits": 2000,
            "folioNumber": null,
            "maxSipAmount": 999999999,
            "switchMultiples": 1,
            "id": 1,
            "minSipInstallments": 3,
            "maxWithdrawalAmount": 999999999,
            "minWithdrawalUnits": 5
          },
          {
            "minSipAmount": 500,
            "sipMultiples": 1,
            "sipFrequency": null,
            "investmentMultiples": 100,
            "minWithdrawalAmount": 500,
            "withdrawalMultiples": 1,
            "maxInvestmentAmount": 999999999,
            "minSwitchAmount": 500,
            "minInvestmentAmount": 500,
            "maxWithdrawalUnits": 2000,
            "folioNumber": null,
            "maxSipAmount": 999999999,
            "switchMultiples": 1,
            "id": 2,
            "minSipInstallments": 3,
            "maxWithdrawalAmount": 999999999,
            "minWithdrawalUnits": 5
          }
        ]
      }
    }
    

    This endpoint retrieves the validation information for the provided fund schemes

    HTTP Request

    POST http://tenant.example.com/api/oms/investment_accounts/{investment_account_id}/fund_schemes/restrictions

    Fund Scheme Restrictions Params

    Name Mandatory Type Comments
    fund_scheme_ids yes array fund_scheme_ids should be given in array with ids as integer

    [GET] Single Fund Schemes Detail

    curl "http://tenant.example.com/api/oms/fund_schemes/{isin}"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "fund_scheme_id": 1872,
      "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,
      "amc_id": 6,
      "rta_id": 2,
      "merged": false,
      "merged_to_isin": null,
      "name_changes": null,
      "_links": {
        "self": {
          "href": "http://tenant.example.com/oms/api/fund_schemes/INF760K01DF2"
        }
      }
    }
    

    This endpoint retrieves any particular fund scheme information

    HTTP Request

    GET http://tenant.example.com/api/oms/fund_schemes/{isin}

    [GET] Fund Schemes

    curl "http://tenant.example.com/api/oms/fund_schemes"
      -H "Authorization: Bearer JWTTOKEN"
    

    JSON response:

    {
      "fund_schemes": [
        {
          "fund_scheme_id": 303,
          "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"
              }
            ]
          }
        },
        {
          "fund_scheme_id": 304,
          "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
        },
        {
          "fund_scheme_id": 16,
          "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,
          "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 http://tenant.example.com/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
    active no NA value for active must be true OR false
    isin no NA comma separated list of isin

    [GET] AMCs

    curl "http://tenant.example.com/api/oms/amcs"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "_links": {
        "self": {
          "href": "http://tenant.example.com/oms/api/amcs"
        }
      },
      "amcs": [
        {
          "id": 1,
          "name": "Axis MF",
          "active": true,
          "amc_code": null
        }
      ]
    }
    

    This endpoint retrieves all the AMCs.

    HTTP Request

    GET http://tenant.example.com/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 "http://tenant.example.com/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 http://tenant.example.com/api/onb/metadata

    Mandate

    [POST] Create Mandate

    curl -X POST "http://tenant.example.com/api/pg/mandates"
      -H "Authorization: Bearer JWTTOKEN"
      -d '
        {
      "mandate_type": "NACH",
      "bank_account_id": 1,
      "mandate_limit": 100000,
      "valid_from": "2017-10-16",
      "provider_id": 1
    }
      '
    

    The above command returns JSON structured like this:

    {
      "id": 1
    }
    

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

    HTTP Request

    POST http://tenant.example.com/api/pg/mandates

    Content-Type: application/json

    Body Parameters

    Parameter Mandatory Type Description
    mandate_type yes String mandate Type
    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
    valid_from no String valid from
    provider_id no Long provider ID sent earlier

    Response Code : 201

    [GET] Mandate

    curl "http://tenant.example.com/api/pg/mandates/1"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns JSON structured like this:

    {
      "id": 1,
      "bank_account_id": 1,
      "mandate_ref": null,
      "valid_from": "2017-10-17",
      "mandate_limit": 100000,
      "mandate_type": "NACH",
      "mandate_status": "APPROVED",
      "umrn": "qwdwdw11323213213213",
      "received_date": null,
      "submitted_date": "2017-10-18T01:21:54.513+05:30[Asia/Kolkata]",
      "approved_date": null,
      "rejected_reason": null,
      "provider_id": 1
    }
    

    This endpoint retrieves mandate info based on the mandate ID

    HTTP Request

    GET http://tenant.example.com/api/pg/mandates/{mandateId}

    Response Code : 200

    [GET] Mandates by Filters

    curl "http://tenant.example.com/api/pg/mandates?bank_account_id=18,12"
      -H "Authorization: Bearer JWTTOKEN"
    

    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": 12,
          "bank_account_id": 18,
          "mandate_ref": "390315921",
          "valid_from": "2018-03-17",
          "mandate_limit": 50000,
          "mandate_type": "NACH",
          "mandate_status": "CREATED",
          "umrn": "1592",
          "received_date": null,
          "submitted_date": null,
          "approved_date": null,
          "rejected_reason": null,
          "provider_id": 1
        },
        {
          "id": 4,
          "bank_account_id": 12,
          "mandate_ref": "WAQP000001",
          "valid_from": "2017-11-08",
          "mandate_limit": 50000,
          "mandate_type": "NACH",
          "mandate_status": "CREATED",
          "umrn": null,
          "received_date": null,
          "submitted_date": null,
          "approved_date": null,
          "rejected_reason": null,
          "provider_id": 1
        }
      ]
    }
    

    This endpoint retrieves mandate info based on given filters.

    HTTP Request

    GET http://tenant.example.com/api/pg/mandates?bank_account_id={bank_account_ids}

    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

    Response Code : 200

    E-Mandate

    [POST] Create E-Mandate

    curl -X POST "http://tenant.example.com/api/pg/mandates"
      -H "Authorization: Bearer JWTTOKEN"
      -d '
        {
      "mandate_type": "E_MANDATE",
      "bank_account_id": 1,
      "mandate_limit": 100000
    }
      '
    

    The above command returns JSON structured like this:

    {
      "id": 1
    }
    

    This endpoint is used to create e-mandate. The e-mandate feature is currently supported for Razorpay only. The API returns mandate ID in response.

    HTTP Request

    POST http://tenant.example.com/api/pg/mandates

    Content-Type: application/json

    Body 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 currently RAZORPAY only
    valid_from no String valid From in yyyy-MM-dd format

    Response Code : 201

    [POST] Auth Transaction

    curl "http://tenant.example.com/api/pg/payments/emandate/auth"
      -H "Authorization: Bearer JWTTOKEN"
      -d '
        {
      "mandate_id": 1
    }
      '
    

    The above command returns JSON structured like this:

    {
      "token_url": "http://tenant.mfpro.cybrilla.io/api/pg/payments/netbanking/razorpay?txnId=bdbd1396-3197-460b-afd3-adc3f6e09123&txnType=1",
      "id": 1
    }
    

    This endpoint is used for authenticating the e-mandate feature from the respective bank once. Once the authentication is done from the bank side, subsequent payments need not be authenticated again and will be made automatically. The response contains payment gateway URL along with payment ID.

    HTTP Request

    POST http://tenant.example.com/api/pg/payments/emandate/auth

    Content-Type: application/json

    Body Parameters

    Parameter Mandatory Type Description
    mandate_id yes Integer mandate ID of created e-mandate

    Response Code : 200

    After e-mandate is authenticated 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 authentication status to the investor and if required retry

    Payments

    [POST] Net Banking

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

    The above command returns JSON structured like this:

    {
      "token_url": "https://www.tpsl-india.in/PaymentGateway/txnreq.pg?id=7104d8b5-d9b4-4ff0-bda0-bfa2b308f072",
      "id": 1
    }
    

    This endpoint is used to make payment for multiple orders placed. The response contains payment gateway URL along with payment ID

    HTTP Request

    POST http://tenant.example.com/api/pg/payments/netbanking

    Content-Type: application/json

    Body Parameters

    Parameter Mandatory Type Description
    amc_order_ids yes Array contains the list of amc order ids
    method no String NETBANKING or CARD
    payment_post_back_url no 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 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

    [GET] Get Payment

    curl "http://tenant.example.com/api/pg/payments/1"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns payment with id 1

    {
      "id": 1,
      "payment_type": "NETBANKING",
      "status": "APPROVED",
      "amount": 5000,
      "debit_date": "2017-03-15",
      "amc_order_ids": [
        16,
        17
      ]
    }
    

    This endpoint returns the details of the payment with id payment_id

    HTTP Request

    GET http://tenant.example.com/api/pg/payments/{payment_id}

    Response Code : 200

    [GET] Get all Payments

    curl "http://tenant.example.com/api/pg/payments"
      -H "Authorization: Bearer JWTTOKEN"
    

    The above command returns list of payments

    {
      "last": true,
      "total_pages": 1,
      "total_elements": 2,
      "size": 20,
      "number": 0,
      "first": true,
      "number_of_elements": 2,
      "payments": [
        {
          "id": 2,
          "payment_type": "NETBANKING",
          "status": "APPROVED",
          "amount": 5000,
          "debit_date": "2017-03-15",
          "amc_order_ids": [
            16,
            17
          ]
        },
        {
          "id": 4,
          "payment_type": "NETBANKING",
          "status": "APPROVED",
          "amount": 100000,
          "debit_date": "2017-01-15",
          "amc_order_ids": null
        }
      ]
    }
    

    HTTP Request

    GET http://tenant.example.com/api/pg/payments

    Query Parameters

    Parameter Mandatory Default Description Allowed values
    from no - from which date you want to search format should be yyyy-MM-dd valid date (yyyy-MM-dd format)
    to no - up to which date you want to search format should be yyyy-MM-dd 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

    Note :

    1. The parameter to will only be accepted with from parameter
    2. If you don't pass to whith from then to will be considered as the current date

    KYC

    [POST] Create KYC Check

    curl -X POST "http://tenant.example.com/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": {
      },
      "status": true,
      "constraints": [
    
      ],
      "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"
    }
    

    Creating a KYC Check fetches the investor's kyc status from different sources

    HTTP Request

    POST http://tenant.example.com/api/kyc/check

    Query Parameters

    Parameter Mandatory Default Description
    pan yes - A valid PAN number to check the kyc status for

    [GET] Retrieve KYC Check

    curl "http://tenant.example.com/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": {
      },
      "status": true,
      "constraints": [
    
      ],
      "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"
    }
    

    Retrieve the KYC Check object

    HTTP Request

    GET http://tenant.example.com/api/kyc/{id}

    [PUT] Refetch KYC Status

    curl -X PUT "http://tenant.example.com/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": {
      },
      "status": true,
      "constraints": [
    
      ],
      "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"
    }
    

    Force the platform to refetch the kyc information from the sources

    HTTP Request

    PUT http://tenant.example.com/api/kyc/{id}/refetch

    Errors

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

    All errors will be emitted in the following structure.

    Error 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
    {
      "status": 400,
      "message": "some description message",
      "errors": [
        {
          "field": "name",
          "message": "validation / error message"
        }
      ]
    }
    

    Example Validation Error on investor creation

    {
      "error": {
        "status": 400,
        "message": "Validation failed. 20 error(s)",
        "errors": [
          {
            "field": "bank_accounts[1].account_holder_name",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts[0].account_holder_name",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts[0].number",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts[0].type",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts[0].primary_account",
            "message": "should not be empty / null"
          },
          {
            "field": "kyc_identity_detail",
            "message": "should not be empty / null"
          },
          {
            "field": "perm_addr_is_corres_addr",
            "message": "should not be empty / null"
          },
          {
            "field": "contact_detail",
            "message": "should not be empty / null"
          },
          {
            "field": "fatca_detail.no_other_tax_residences",
            "message": "should not be empty / null"
          },
          {
            "field": "display_name",
            "message": "should not be empty / null"
          },
          {
            "field": "nomination",
            "message": "should not be empty / null"
          },
          {
            "field": "fatca_detail.gross_annual_income",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts[1].ifsc_code",
            "message": "should not be empty / null"
          },
          {
            "field": "fatca_detail.country_of_birth",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts[1].primary_account",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts[0].ifsc_code",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts[1].number",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts",
            "message": "atleast one bank_account should be marked as primary"
          },
          {
            "field": "fatca_detail.source_of_wealth",
            "message": "should not be empty / null"
          },
          {
            "field": "bank_accounts[1].type",
            "message": "should not be empty / null"
          }
        ]
      }
    }
    

    Example Json Parse Error

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