API Documentation >> API 2.0 Main >> Account Management >> Find Messages

Contents

Find Messages

Allowed HTTP Methods

Attention:

  1. This request returns only messages where the authenticated user is the receiver.
  2. You can either specify the query parameter unread=true to return all unread messages. If unread=true is matched, other query parameters are unconsidered. All returned messages will be marked as read!
  3. Or you can specify the query parameter startDate with an optional endDate to return all messages within the respective period. If no endDate is given, the actual time is taken.

Resource Information

Parameters

Date Strings

The request tries to recognize the value of the startDate and endDate query parameters as a valid date or date/time representation. If no time is given, it's automatically set to the start of the day (00:00:00). If no valid date or date/time representation can be recognized, the request will respond with a 400 Bad Request.

The safest format to use is the ISO 8601 representation:

2017-12-08T14:41:12+0100 (YYYY-MM-DDTHH:MM:SS±HHMM) for 8th of December, 2017, 14:41:12 CET

Attention: Please be aware that the colon (:) in time representations is a reserved character and needs to be percent encoded.

Example Request

1. Get all unread messages for the authenticated user as a receiver:

GET https://api.cardmarket.com/ws/v2.0/account/messages/find?unread=true


2. Get all messages for the authenticated user as a receiver between 1st and 31st of October 2017:

GET https://api.cardmarket.com/ws/v2.0/account/messages/find?startDate=2017-10-01&endDate=2017-11-01


3. Get all messages for the authenticated user as a receiver between 1st of January 2015 and now:

GET https://api.cardmarket.com/ws/v2.0/account/messages/find?startDate=2015-01-01