title: Link to another resource in a REST API: by its ID, or by its URL?
body: <p>I am creating some APIs using <a href="/questions/tagged/apiary" class="post-tag" title="show questions tagged &#39;apiary&#39;" rel="tag">apiary</a>, so the language used is JSON.</p>
  
  <p>Let's assume I need to represent this resource:</p>
  
  <pre><code>{
      "id" : 9,
      "name" : "test",
      "customer_id" : 12,
      "user_id" : 1,
      "store_id" : 3,
      "notes" : "Lorem ipsum example long text"
  }
  </code></pre>
  
  <p>Is it correct to refer to other resources by their IDs (<code>12</code>, <code>1</code>, <code>3</code>), or I should specify the URL of these resources (i.e. <code>/customers/12</code>, <code>/users/1</code>, <code>/stores/3</code>)?</p>
  
  <p>I am not using HATEOAS and I am a bit confused.</p>