Message Thread Entity

{
    thread: {
        partner: {                  // user entity with optional "name"
            idUser:
            username:
            country:
            isCommercial:
            riskGroup:
            reputation:
            shipsFast:
            sellCount:
            onVacation:
            idDisplayLanguage:
            name: {
                firstName:
                lastName:
            }
        }
        message: [                  // array of enclosed message entities
            {
                idMessage:          // message ID
                isSending:          // true: authenticated user is sending
                                    // false: authenticated user is receiving
                date:               // date the message was created
                text:               // message text
                unread:             // true: if the authenticated user is receiving and hasn't read yet
                                    // missing, if user is sending or already read a received message
            }
        ]
        unreadMessages:             // count of unread messages in the thread (only in thread overview)
    }
}

See also: User Entity

For message thread overview requests message is not an array but the newest message entity of the thread.

For single thread requests unreadMessages is missing.

For single thread requests, messages the authenticated user received but hasn't read yet unread is set to true otherwise unread is missing.

Example Entities

Response from GET https://www.mkmapi.eu/ws/v1.1/account/messages (see /account/messages[/:idOtherUser[/:idMessage])

{
    thread: [
        {
            partner: {
                idUser: 9999
                username: "Maxi"
                country: "D"
                isCommercial: 1
                riskGroup: 0
                reputation: 1
                shipsFast: 1
                sellCount: 254
                onVacation: false
                idDisplayLanguage: 3
                name: {
                    firstName: "Maximilian"
                    lastName: "Mustermann"
                }
            }
            message: {
                idMessage: 47114711
                isSending: false
                date: "2014-05-15T15:11:16+0200"
                text: "Receiving a message"
            }
            unreadMessages: 1
        }
        {
        partner: {
                idUser: 9998
                username: "Martina"
                country: "D"
                isCommercial: 0
                riskGroup: 0
                reputation: 1
                shipsFast: 1
                sellCount: 0
                onVacation: true
                idDisplayLanguage: 3
                name: {
                    firstName: "Martina"
                    lastName: "Mustermann"
                }
            }
            message: {
                idMessage: 47114712
                isSending: true
                date: "2014-05-15T15:11:16+0200"
                text: "Sending a message"
            }
            unreadMessages: 0
        }
    ]
}

Response from GET https://www.mkmapi.eu/ws/v1.1/account/messages/9999 (see /account/messages[/:idOtherUser[/:idMessage])

{
    partner: {
        idUser: 9999
        username: "Maxi"
        country: "D"
        isCommercial: 1
        riskGroup: 0
        reputation: 1
        shipsFast: 1
        sellCount: 254
        onVacation: false
        idDisplayLanguage: 3
        name: {
            firstName: "Maximilian"
            lastName: "Mustermann"
        }
    }
    message: [
        {
            idMessage: 47114711
            isSending: false
            date: "2014-05-15T15:11:16+0200"
            text: "Receiving a message"
            unread: true
        }
        {
            idMessage: 47114711
            isSending: true
            date: "2014-05-14T10:28:17+0200"
            text: "Sending a message"
        }
    ]
}