TrackRecordPro API Documentation TrackRecordPro

companies endpoint

Summary

API Endpoint Address

https://api.trackrecordpro.co.uk/3.0/companies

Minimum Supported API Version3.0
Supported Methods

GET
POST
PUT
DELETE

Access LevelEveryone
DescriptionEach company which has access to the system has an entry in this table. Companies may be the parent company of other companies, which grants a subset of access to that company.

GET companies

GET /3.0/companies HTTP/1.1

Details

Retrieves any records from the current company plus all child companies

{
    "request": {
        "url": "\/3.0\/companies",
        "endpoint": "companies",
        "requested_version": "3.0",
        "api_version": 3,
        "request_method": "Get",
        "timestamp": 1507549103,
        "session": null
    },
    "pagination": {
        "total_pages": 24,
        "total_records": 692
    },
    "response": [
        {
            "id": 1,
            "name": "TrackRecordPro",
            "created": "2017-10-09 08:42:37",
            "logo": "trp.png",
            "subdomain": "trackrecordpro",
            "styles": {
                "test": {
                    "foo": "bar",
                    "baz": 1
                },
                "test2": 666.7
            },
            "data": null,
            "parentcompany": {
                "id": 1,
                "name": "TrackRecordPro",
                "created": "2017-10-09 08:42:37",
                "logo": "trp.png",
                "subdomain": "trackrecordpro",
                "styles": {
                    "test": {
                        "foo": "bar",
                        "baz": 1
                    },
                    "test2": 666.7
                },
                "data": null
            }
        },
        {
            "id": 2,
            "name": "CoMech Metrology Ltd.",
            "created": "2017-10-04 16:06:26",
            "logo": null,
            "subdomain": "comech",
            "styles": null,
            "data": null,
            "parentcompany": {
                "id": 1,
                "name": "TrackRecordPro",
                "created": "2017-10-09 08:42:37",
                "logo": "trp.png",
                "subdomain": "trackrecordpro",
                "styles": {
                    "test": {
                        "foo": "bar",
                        "baz": 1
                    },
                    "test2": 666.7
                },
                "data": null
            }
        }
    ]
}

POST companies

POST /3.0/companies HTTP/1.1

Details

Update an entry in the companies table. You must include the fields and values to update as a JSON object in the POST data.

{
    "request": {
        "url": "\/3.0\/companies\/id=42",
        "endpoint": "companies",
        "requested_version": "3.0",
        "api_version": 3,
        "request_method": "Post",
        "timestamp": 1507622071,
        "session": null
    },
    "response": {
        "records_updated": 1,
        "records_found": 1
    }
}

 

 

PUT companies

PUT /3.0/companies HTTP/1.1

Details

Describe the PUT method

Example here

DELETE companies

DELETE /3.0/companies HTTP/1.1

Details

Describe the DELETE method

Example here

Field Definitions

Expand

Invalid license

Your evaluation license of PocketQuery expired. Please contact an administrator to purchase a new license.