title: Should we differentiate 'echoed' request fields in a POST response?
body: <p>The web application we are developing allows developers to do an HTTP POST from a form (that they develop) to our servers. We provide them with an API reference for the request and response field names.</p>
  
  <p>One particular requirement of our application is that the response must include all request fields that were originally submitted - kind of like an echo of the request fields in the response.</p>
  
  <p>To try and keep the API <strong>intuitive</strong> and <strong>unambiguous</strong>, I have suggested that in the response field names, we prepend those 'echoed' request fields with something (e.g. 'req_' or 'request_') to differentiate them from true response data. However, a few of the guys are not so sure with this approach, and they suggest that we just keep the names the same.</p>
  
  <p>I would appreciate your opinions on this; I'm relatively new to defining APIs so any feedback would be great.</p>
  
  <p>To summarize, the two options on the table are:</p>
  
  <h1>Option 1 - Don't Differentiate Request Fields In Response</h1>
  
  <p><strong>request:</strong></p>
  
  <pre><code>name: 'Joe Bloggs'
  address: '22 My Street, My City'
  amount: '100.00'
  </code></pre>
  
  <p><strong>response:</strong></p>
  
  <pre><code>transaction_id: '384765'
  transaction_time: '2011-12-31T11:59:59Z'
  message: 'Your transaction was successful.'
  name: 'Joe Bloggs'
  address: '22 My Street, My City'
  amount: '100.00'
  </code></pre>
  
  <h1>Option 2 - Differentiate Request Fields In Response</h1>
  
  <p><strong>request:</strong></p>
  
  <pre><code>name: 'Joe Bloggs'
  address: '22 My Street, My City'
  amount: '100.00'
  </code></pre>
  
  <p><strong>response:</strong></p>
  
  <pre><code>transaction_id: '384765'
  transaction_time: '2011-12-31T11:59:59Z'
  message: 'Your transaction was successful.'
  req_name: 'Joe Bloggs'
  req_address: '22 My Street, My City'
  req_amount: '100.00'
  </code></pre>