For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Sort by

How to I add line breaks in AddMemberMessageRTQ?

  • Answer ID 1290
  • Published 03/11/2016 04:37 AM
  • Updated 03/11/2016 04:37 AM
  • Permalink

I try and submit extra line breaks with AddMemberMessageRTQ (or related calls).  The API seems to "eat" the "extra" line breaks.  How I can send a message that is spaced correctly?

I want this:

Hello Customer,

Have a nice day!
- The Seller

and not:

Hello Customer,
Have a nice day,
- The Seller

To add the line breaks, you can use encoded characters in the message you're sending.  A hex-encoded character looks like this: 
 where '13' is the decimal ASCII character code you want to output in the message.  You can get a list of ASCII characters at

The characters you're interested in are 
, which are a 'linefeed' and 'carriage return' character, respectively.  These two characters are written to an application whenever you press the 'enter' key.  This is what causes the cursor to go to the next line.

However, using these characters doesn't get around the problem illustrated in the solution.  If you want to prevent the API from 'eating' the 'extra' line break, you need to put a character in between the first line break and the second.  One character you can use is a space.  With that in mind, let's see what text you would send to get the following message:

Message to the customer

Dear Valued Customer,

Thanks for your interest in our product.  We will get back to you soon.

The Seller


  <?xml version="1.0" encoding="utf-8" ?>
- <AddMemberMessageRTQRequest xmlns="urn:ebay:apis:eBLBaseComponents">
- <MemberMessage>
  <Body>Dear Valued Customer,&#13;&#10; &#13;&#10;Thanks for your interet in our product.  We will get back to you soon.&#13;&#10; &#13;&#10;Sincerely,&#13;&#10;The Seller</Body>
- <RequesterCredentials>

Note the space between &#10; and the following &#13.  If you omit this space, the extra line break will be removed when the API call is made, and your message won't look like you expect.

You can get a similar effect without resorting to the encoded characters as well.  If you type the body like you want it, and make sure to add a space on the blank lines, you can achieve the formatting you want as well.

Formatted Message without Encoded Characters

Dear Valued Customer,
 (a space character is on this 'blank' line)
Thanks for your interest in our product.  We will get back to you soon.
  (a space character is on this 'blank' line)
The Seller

How well did this answer your question?

Answers others found helpful

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter