URL: /services/rest/user/messages
Works for POST and application/x-www-form-urlencoded
parameters, or GET and query parameters
name | description | example value | validation rules |
---|---|---|---|
username | Username of registered user | 1234321@reseller | Cannot be null or empty, cannot contain spaces, user must exist |
password | Password | password | Cannot be null or empty, must match user's password |
since | Epoch, number of seconds since 1st Jan 1970 GMT | 1364545939 | Required, must be an integer number |
Response
Response is a array of messages in JSON, with some additional information.
{ newestMessageTimestamp = 123458 , messages = [ { from = 61409560857 ; documentId = 123456 ; originDocumentId = 533221 ; timestamp = 1362461321 ; text = "This is a server side message" ; }, { from = 61409560857 ; documentId = 123457 ; originDocumentId = 533222 ; timestamp = 1362461325 ; text = "This is another server side message" ; } ], status = 0 , hasMoreMessages = false } |
Response parameters
name | description |
---|---|
newestMessageTimestamp | timestamp of the newest returned message |
hasMoreMessages | true if there are more messages to retrieve from server, false otherwise |
status | 0 if everything is OK, error code otherwise |
messages | list of messages |
Parameters of single message
name | description |
---|---|
from | number of message sender |
documentId | message ID |
originDocumentId | ID of the message this message is reply for |
timestamp | timestamp of the message |
text | message text |
Possible statuses
0, 1, 2, 3, 4, 200, 220, 9999
Status codes and their meaning: User and Reseller REST API Response Status Codes