title: Many-to-Many JSON API URI naming
body: <p>I'm wondering if the following naming convention would correctly fit the <a href="https://jsonapi.org/" rel="nofollow noreferrer">JSON API</a> standard, as it is not specifically mentioned anywhere that I can find.</p>
  
  <p>Given a many to many relationship between accounts and products, with an account-product resource storing pivot data between the two.</p>
  
  <p>I would to know how to handle the <strong>/api/v1/accounts/1/products</strong> relationship resource</p>
  
  <p><strong>account > account-product > product</strong></p>
  
  <p>URLs:</p>
  
  <p><strong>/api/v1/accounts</strong>: returns <strong>account</strong> resources</p>
  
  <p><strong>/api/v1/account-product</strong>s: returns <strong>account-product</strong> resources</p>
  
  <p><strong>/api/v1/accounts/1/products</strong>: returns <strong>account-product</strong> resources</p>
  
  <p>OR</p>
  
  <p><strong>/api/v1/accounts/1/products</strong>: return <strong>product</strong> resources related to the account</p>
  
  <hr>
  
  <p>The two arguments here being this: </p>
  
  <p>Option 1: account/1/products should return the link between the accounts and the products as it should essentially act as the ID should essentially act as a hyphen e.g. account/1/products really means account-products.</p>
  
  <p>Option 2: account/1/products should returns products related to the account and also include the account-products resource as a mandatory relationship because the resource in the URI is product, not account-product</p>