NAV
cURL

Introduction

Welcome to the Tofler API! This API exposes major functionality to access the data resources of the Tofler platform. We are continuously adding data sources and access methods to this API.

The API is exposed with RESTful end-points and can be accessed using any http client or library - including cURL, python requests and others. Example cURL requests are provided on the right for you to easily test connectivity and functionality.

IMPORTANT NOTE: This API is being deprecated with end-of-life scheduled for 12th November, 2017.

General Information

All requests return a dictionary with two keys. One key is compulsorily “status”. This can take only one of two values - SUCCESS or FAILURE. In case of SUCCESS, the other key in the dictionary is always “content” and this contains the actual data or response that had been requested. In case of FAILURE, the other key in the dictionary is “error” and contains a description (and some times more details) of the error generated.

For the sake of brevity of the examples, only the value of the “content” key is shown in the sample outputs below.

Prettified output can be obtained for any request by adding a “pretty=true” query string to any request.

While the default output is JSON, XML-formatted output can be obtained for any request by adding “format=xml” query string to the request.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
  -H "Authorization: BEARER <api-key>"

Make sure to replace api-key with your API key.

Tofler’s API ordinarily requires API keys to access most resources. However, a certain number of requests per day are allowed on specific resources without requiring a key.

To request an API key, please visit https://www.tofler.in/developers. You will be prompted to log in. You can either create a free Tofler account or use your Facebook or Google accounts to log in and obtain a key. The daily limits for each end-point will be displayed. If you wish to use the API directly from your website, please write to webmaster[at]tofler.in to request the addition of an “Origin” (i.e. your web address) to allow cross-origin requests from your website.

When an API request is being made with API keys, the API key must be provided in the Authorization header as shown below.

Authorization: BEARER api-key

Companies

Search For Companies

curl "https://www.tofler.io/api/v3/companies?q=<search-string>"
  -H "Authorization: BEARER <api-key>"

The above command returns JSON structured like this:

[
    {
        "status": "Converted to LLP and dissolved", 
        "popular_name": null, 
        "cin": "U51900MH2006PLC158898", 
        "company_name": "THIRDWAVE MULTITRADE LIMITED"
    }, 
    {
        "status": "Active", 
        "popular_name": null, 
        "cin": "U52590GJ2012PTC069779", 
        "company_name": "THIRDWAVE IMPEX PRIVATE LIMITED"
    }, 
    {
        "status": "Active", 
        "popular_name": null, 
        "cin": "U51909WB2004PTC100145", 
        "company_name": "THIRDWAVE AGENCY PRIVATE LIMITED"
    }, 
    {
        "status": "Strike off", 
        "popular_name": null, 
        "cin": "U72900KA2000PTC026348", 
        "company_name": "THIRDWAVE SOFTECH PRIVATE LIMITED"
    }
]

This endpoint can be used to search for companies based on their name. It is particularly useful for search-as-you-type boxes.

HTTP Request

GET https://www.tofler.io/api/v3/companies

Query Parameters

Parameter Type Description
q string first few characters of any company name

Basic information about a company

curl "https://www.tofler.io/api/v3/companies/U74140HR2015PTC056520"
  -H "Authorization: BEARER <api-key>"

The above command returns JSON structured like this:

{
    "masterdata": {
        "identifier": "U74140HR2012PTC012520",
        "type": "company",
        "name": "Jai Shri Ram Polymers Private Limited", 
        "incorporation_date": "2012-08-31", 
        "status": "Active", 
        "address_line1": "12", 
        "address_line2": "SECTOR-5", 
        "city": "FARIDABAD", 
        "state": "Haryana", 
        "pincode": "121003", 
        "country": "INDIA", 
        "email": "whoami@companywebsite.com", 
        "website": null, 
        "company_type": "Private", 
        "company_category": "Company limited by shares", 
        "company_subcategory": "Indian Non-Government Company", 
        "listed": false, 
        "authorized_capital": 100000, 
        "paidup_capital": 100000, 
        "balance_sheet_date": null, 
        "agm_date": "2015-09-30", 
        "last_updated": "2015-10-20"
    }, 
    "signatories": [
        {
            "din": "01234567", 
            "name": "NONAME GENIUS",
            "designation": "Director", 
            "appointment_date": "2012-08-31"
        }, 
        {
            "din": "76543210", 
            "name": "POPULAR MAN",
            "designation": "Director", 
            "appointment_date": "2012-08-31"
        }
    ]
}

This endpoint retrieves basic information about a specific company. The identifier of the company for which the information is sought has to be supplied. These identifiers can be obtained using the search end-point. Alternatively, if the CIN of the company is known, that can be supplied directly.

There are three different kinds of “companies” that can be returned:
  company
  llp
  foreign company

HTTP Request

GET https://www.tofler.io/api/v3/companies/<CIN>

URL Parameters

Parameter Description
CIN The Company Identification Number of the company to be retrieved

Signatories

Directorships of a signatory

curl "https://www.tofler.io/api/v3/signatories/<din>/directorships"
  -H "Authorization: BEARER <api-key>"

The above command returns JSON structured like this:

[
    {
        "appointment": "2013-11-29", 
        "cin": "U01234DL2001PTC123456", 
        "designation": "Director", 
        "company_name": "BASIC COMPANY ONE PRIVATE LIMITED"
    }, 
    {
        "appointment": "2011-01-01", 
        "cin": "U12345PB2012PTC432123", 
        "designation": "Director", 
        "company_name": "BASIC COMPANY TWO PRIVATE LIMITED"
    }
]

This endpoint lets you retrieve the list of companies where a specific person is on the board. This returns the identifier of the company, the name, the designation and the date of appointment.

HTTP Request

GET https://www.tofler.io/api/v3/signatories/<DIN>/directorships

URL Parameters

Parameter Description
DIN The Director Identifier Number of the signatory about whom information is sought

Errors

The Tofler API uses the following error codes:

Error Code Meaning
400 Bad Request –
401 Unauthorized – Your API key is wrong or you are not authorized to access the requested resource
404 Not Found – The specified resource could not be found
429 Too Many Requests – You’ve exceeded your daily limit of requests on the Tofler API!
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.