TrackRecordPro API Documentation TrackRecordPro

messages endpoint

Summary

API Endpoint Address

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

Minimum Supported API Version3.0
Supported Methods

GET
POST
PUT
DELETE

Access LevelEveryone
DescriptionThe messages endpoint allows management of messages sent to a company. All recipient users at the company will have their messages visible here from within the API.

GET messages

GET /3.0/messages HTTP/1.1

Details

Retrieve one or more messages

{
    "request": {
        "url": "\/3.0\/messages",
        "endpoint": "messages",
        "requested_version": "3.0",
        "api_version": 3,
        "request_method": "Get",
        "timestamp": 1507558350,
        "session": null
    },
    "pagination": {
        "total_pages": 24,
        "total_records": 692
    },
    "response": [
        {
            "id": 1,
            "sender_user_id": 1,
            "target_user_id": 2,
            "company_id": null,
            "message_read": 0,
            "date_range_start": null,
            "date_range_end": null,
            "messagetext": "This is an example message for the API documentation.",
            "sender": {
                "id": 1,
                "username": "craig.edwards",
                "email": "craig.edwards@comech.co.uk",
                "first_name": "Craig",
                "last_name": "Edwards",
                "phone": "07715 904822",
                "email_confirmed": 1,
                "permissions": null,
                "company_id": null,
                "reminders": 1,
                "data": null
            },
            "recipient": {
                "id": 2,
                "username": "test.user",
                "email": "testuser@comech.co.uk",
                "first_name": "Test",
                "last_name": "User",
                "phone": "01332 867700",
                "email_confirmed": 1,
                "password_last_changed": null,
                "permissions": null,
                "company_id": null,
                "reminders": 1,
                "data": null
            },
            "company": {
                "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
                },
                "parent_company_id": 1,
                "data": null
            }
        }
    ]
}

POST messages

POST /3.0/messages HTTP/1.1

Details

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

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

 

 

PUT messages

PUT /3.0/messages HTTP/1.1

Details

Describe the PUT method

Example here

DELETE messages

DELETE /3.0/messages 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.