getMessages

Retrieves an array of messages that comprise a single back-and-forth thread of an initial message and subsequent replies.

getMessages Input

getMessages is a secure API method with the following URL and HTTP header requirements:

Submit to URL: https://api.bonanza.com/api_requests/secure_request
Required in HTTP header: X-BONANZLE-API-DEV-NAME set to your dev_id
  X-BONANZLE-API-CERT-NAME set to your cert_id

Note that all secure methods except for fetchToken and getBoothItems require you to submit a user token so that we know what user account you are acting on behalf of.  For details about setting up and submitting user tokens, see our intro to user tokens.

The name for your request should be getMessagesRequest.

Here are the available input parameters that can be serialized into JSON:

Argument Type Occurrence Meaning
Call-specific Input Fields
messageId integer Required The messages for the messages set that includes the given message id will be returned. Typically, this should be the id included in the results when calling getMessages, but it does not have to be the id of the first message in the set of messages.

getMessages Output

The name for the output returned from this request is getMessagesResponse. So, after parsing the serialized response into JSON, you can access the data with something like:

my_json_hash['getMessagesResponse']

Here are all the possible output parameters:

Argument Type Occurrence Meaning
Standard Output Fields
errorMessage Container Conditionally Description of an error or warning that occurred when Bonanza processed the request. Not returned if the ack value is Success.
errorMessage.error Container Conditionally,
repeatable: [0..*]
errorMessage.error.category ErrorCategory Conditionally Currently unused.
errorMessage.error.message string Conditionally A description of the error
errorMessage.error.type ErrorType Conditionally A unique descriptive name for the error.
timestamp dateTime Always This value represents the date and time when Bonanza processed the request. The time zone of this value is GMT and the format is the ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). See the "dateTime" type for information about this time format and converting to and from the GMT time zone.
Call-specific Output Fields
messages Container Always, repeatable: [0..*] Contains an array of the messages returned.
messages[n].id integer Always The id of the message. This can be used as an input to getMessages to get all messages in the set of messages that this message belongs to.
messages[n].from string Always The user name of the user that sent the message.
messages[n].to string Always The user name of the user that the message was sent to.
messages[n].senderPictureURL string Always The URL of the sender's profile picture
messages[n].receiverPictureURL string Always The URL of the receiver's profile picture
messages[n].sentAt dateTime Always The date and time at which the message was sent.
messages[n].subject string Always The subject line of the message.
messages[n].body string Always The body of the message. Note that the body may contain HTML.
messages[n].read boolean Always

Whether the message has been read by the receiving user.

messages[n].saved boolean Always Whether the message has been saved by the receiving user.

 

Spinner

You may adjust your notification preferences at any time

Minimum 6 characters; at least one number and one capital letter

If you become a seller on Bonanza, this information will become part of your public profile

New to Bonanza? Sign up to save items, follow sellers and get exclusive coupons.

Don't worry - Bonanza respects your inbox. We send less email and make it easy to opt out. Read our privacy policy »