title: url design for RESTful services
body: <p>I have a resource called <code>Pricing</code> which i want to retrieve. An <code>Offer</code> can have pricing and a <code>Promo</code> can have <code>Pricing</code> resource and there is another entity <code>Customer</code> with which <code>Pricing</code> can be mapped. I want to retrieve <code>Pricing</code> based on either one of <code>OfferId</code>/<code>PromoId</code>/<code>CustomerId</code>.</p>
  
  <p>To design the URLs for this, i'm running into two options:</p>
  
  <p><strong>Option 1:</strong> Pass it as query string</p>
  
  <pre><code>/pricing?OfferId=234&amp;PromoId=345&amp;CustomerId=543234
  </code></pre>
  
  <p><strong>Option 2:</strong> Have three APIs</p>
  
  <pre><code>/pricing/offer?id=234
  /pricing/promo?id=345
  /pricing/customer?id=543234
  </code></pre>
  
  <p>IMO, <code>OfferId</code>/<code>PromoId</code>/<code>CustomerId</code> should be treated as attribute of the resource. Therefore pass attribute as query string.I'm more inclined towards Option 1.</p>
  
  <p>Option 2 avoids if else condition to retrieve the resource and looks much cleaner but does it seems to be supporting REST standard of URL design?</p>
  
  <p>What's the REST standard to design the URL. Which option would you recommend? </p>