Beruflich Dokumente
Kultur Dokumente
With the help of this document you can easily query the RedFlagDeals.com Messaging Centre database through our
API. We suggest you print this document and keep it for future reference.
This document was last updated August 17, 2010 and is applicable to version 1 of the API.
Important Information
If there are any errors with the request or issues processing the values of the request, an ErrorResponse XML will
be returned.
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<ErrorResponse>
<ErrorCode>10001</ErrorCode>
<ErrorMessage>Not logged in</ErrorMessage>
</ErrorResponse>
Some errors are more generic and will not have a matching ErrorCode. Any ErrorCode under 10000 should be
ignored and treated as generic.
List of API Commands
Command Description
login
The result of the login. This will always be 1 as a failed login will generate an
LoginResult
ErrorResponse XML response
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<LoginResponse>
<LoginResult>1</LoginResult>
</LoginResponse>
msg_list
0, unless searchuser or
The folder to list searchtitle is set (it
folderid Integer - No
messages for then defaults to "all
folders")
String to search
searchuser - String - No
by username
String to search
searchtitle by message - String - No
subject
# of messages
Automatically chosen based
perpage to return per Integer - No
on size of a specific folder
request
Must be one
of:
sort Field to sort on. date String date No
title
sender
Must be one
Ordering of
of:
order results on the desc String No
asc
sort
desc
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<MessageListResponse>
<Folders>
<Folder id="0">
<Name>Inbox</Name>
<TotalMessages>2</TotalMessages>
<Selected>true</Selected>
</Folder>
<Folder id="-1">
<Name>Sent Items</Name>
<TotalMessages>3</TotalMessages>
<Selected>false</Selected>
</Folder>
</Folders>
<Pagination>
<CurrentPage>1</CurrentPage>
<TotalPages>1</TotalPages>
<PerPage>2</PerPage>
<Total>2</Total>
<Returned>2</Returned>
</Pagination>
<Messages>
<MessageGroup label="Today">
<Message id="10135604">
<FolderId>0</FolderId>
<Subject>Test Message</Subject>
<Preview>This is just a test...</Preview>
<Body><!--Not shown in sample --></Body>
<Date>
<Timestamp>1281721111</Timestamp>
<Display>1 hour ago</Display>
</Date>
<From>
<User id="226512">Kaitlyn</User>
</From>
<To>
<User id="23921">GregLovesDeals</User>
</To>
<Cc/>
<Bcc>
<User id="42124">DavidDaGreat</User>
</Bcc>
</To>
<Status>1</Status>
</Message>
<Message id="10135600">
<FolderId>0</FolderId>
<Subject>Test Message!</Subject>
<Preview>This is a test message!! Hello test messsssageee</Preview>
<Body><!--Not shown in sample --></Body>
<Date>
<Timestamp>1281721073</Timestamp>
<Display>1 hour ago</Display>
</Date>
<From>
<User id="226512">Kaitlyn</User>
</From>
<To>
<User id="23921">GregLovesDeals</User>
</To>
<Cc />
<Bcc />
msg_details
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<MessageDetailsResponse>
<Message id="10135604">
<FolderId>0</FolderId>
<Subject>Test Message</Subject>
<Preview>This is just a test...</Preview>
<Body><!--Not shown in sample --></Body>
<Date>
<Timestamp>1281721111</Timestamp>
<Display>1 hour ago</Display>
</Date>
<From>
<User id="226512">Kaitlyn</User>
</From>
<To>
<User id="23921">GregLovesDeals</User>
</To>
<Cc/>
<Bcc>
<User id="42124">DavidDaGreat</User>
</Bcc>
<Status>0</Status>
</Message>
</MessageListResponse>
msg_send
This will always be 1 as any other result will generate an ErrorResponse XML
SendResult
response
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<MessageSendResponse>
<SendResult>1</SendResult>
</MessageSendResponse>
folder_list
Container for one or more Folder elements. Please note that the Selected element will
Folders
always be false for this call.
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<FolderListResponse>
<Folders>
<Folder id="0">
<Name>Inbox</Name>
<TotalMessages>2</TotalMessages>
<Selected>false</Selected>
</Folder>
<Folder id="-1">
<Name>Sent Items</Name>
<TotalMessages>3</TotalMessages>
<Selected>false</Selected>
</Folder>
<Folder id="1">
<Name>Important Messages</Name>
<TotalMessages>8</TotalMessages>
<Selected>false</Selected>
</Folder>
</Folders>
</FolderListResponse>
user_search
Users Container for one or more User elements. There will be a maximum of 15 results returned
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<UserSearchResponse>
<Users>
<User id="27">Dan</User>
<User id="163315">Dan Auger</User>
<User id="165814">Dan Board</User>
<User id="278460">Dan Carson</User>
<User id="15229">Dan Chu</User>
<User id="312841">dan druff</User>
<User id="126658">Dan Ellsworth</User>
<User id="287680">dan fernandes</User>
<User id="208268">Dan from Montreal</User>
<User id="127952">Dan Humniski</User>
<User id="294411">dan lal</User>
<User id="18302">Dan M.</User>
<User id="126819">dan magee</User>
<User id="243169">Dan R</User>
<User id="119984">Dan Samuel</User>
</Users>
</UserSearchResponse>
Appendix
Folder Element
This element has an id attribute representing the unique identifier for the folder
Field Description
true or false if this folder is the current folder that messages are being selected
Selected
from
Pagination Element
Field Description
TotalPages The total number of pages based on the Total and PerPage
The number of results returned. This should always equal the PerPage unless it is the
Returned
last page of results that may not contain exactly PerPage
Message Element
This element has an id attribute representing the unique identifier for the message
Field Description
Status of message:
0. Unread
Status 1. Read
2. Replied to
3. Forwarded
User Element
This element has an id attribute representing the unique identifier for the user
<User id="27">Dan</User>
Revision History
Date Changes