title: RESTful API behavior for entitys with two independent primary keys
body: <p>I have the following entity:</p>
  
  <pre><code>&lt;car&gt;
      &lt;carID&gt;7&lt;/carID&gt;
      &lt;...&gt;...&lt;/...&gt;
      &lt;externalCarID&gt;23890212&lt;/externalCarID&gt;
  &lt;/car&gt;
  </code></pre>
  
  <p>The problem is now that <code>carID</code> and <code>externalCarID</code> are both independent primary keys that are used by/for different systems and it should be possible for API clients to access a <code>car</code> entity with both the <code>carID</code> xor the <code>externalCarID</code>.</p>
  
  <p>Both keys are ints and they do <strong>not</strong> use disjoint sets:</p>
  
  <pre><code>carID(7) != externalCarID(7)
  </code></pre>
  
  <p><br></p>
  
  <p><strong>I have thought of the following solutions:</strong></p>
  
  <ol>
  <li>Access it with <code>/restapi/car/7</code> and <code>/restapi/externalcar/23890212</code></li>
  <li>Use parameters e.g. like <code>/restapi/car/7?type=regular</code> and <code>/restapi/car/23890212?type=ext</code></li>
  <li>Send the information <em>somewhere</em> in the header - <strong>but where?</strong></li>
  </ol>
  
  <p>Some tips how to handle this or feedback on my solutions, preferably with the reference to REST / HTTP specs, would be great!<br><br></p>
  
  <p><strong>Background about the primary keys:</strong></p>
  
  <p>Lets say our invoice systems needs the <code>carID</code> and our parent company controlling system needs the <code>externalCarID</code>. I do not like that at all, but its a running system and there is no way for me to change it right now.</p>