title: REST actions and URL API design considerations
body: <p>I'm building a inventory management system and I'm busy designing (thinking) of the API and my REST implementation.</p>
  
  <p>I have the following resources and on the resource you can perform many actions/operations.
  Each operation will modify the resource and in some cases create a new resource and also create history or transactions.</p>
  
  <p>I'm looking for some input from experts in regards to useability and acceptability in regards to URL and resource design. The gotchas and real world examples, any opinion or criticism welcome.</p>
  
  <p>My concerns are that the whole application might be develop around this one big resource?
  My backend stack will be C# and servicestack framework and for frontend I'll be using HTML and AngularJS. Not that it makes a difference. </p>
  
  <p>Scenario 1.
  Typical operation will be:</p>
  
  <pre><code>POST /inventory/{id}/move
  POST /inventory/{id}/scrap
  PUT  /inventory/{id}/takeon
  POST /inventory/{id}/pick
  PUT  /inventory/{id}/receive
  POST /inventory/{id}/hold
  POST /inventory/{id}/release
  POST /inventory/{id}/transfer
  POST /inventory/{id}/return
  POST /inventory/{id}/adjustment
  
  
  {
    "userID": "",       //who is doing the actions (all)
    "tolocationID": "", //new location for inventory (move/takeon/pick/receive/transfer/return)
    "qty": "",          //qty (pick/receive/takeon/transfer/return)
    "comment": "",      //optional for transaction (all)
    "serial": "",       //(takeon/receive)
    "batch": "",        //(takeon/receive)
    "expirydate": "",   //(takeon/receive)
    "itemCode": "",     //(takeon/receive)
    "documentID": "",   //(pick/receive/return/transfer)
    "reference" :"",    //(all)
    "UOM" :"",          //(all)
    "reference" :"",    //(all)
  }
  </code></pre>
  
  <p>Is this acceptable in regards to standards.
  The other approach might be.</p>
  
  <p>Scenario 2.</p>
  
  <pre><code>POST /inventory/{id}/move
  POST /inventory/{id}/scrap
  PUT  /inventory/{id}/takeon
  POST /document/{id}/pick     //**document**
  PUT  /document/{id}/receive  //**document**
  POST /inventory/{id}/hold
  POST /inventory/{id}/release
  POST /document/{id}/transfer  //**document**
  POST /document/{id}/return    //**document**
  POST /inventory/{id}/adjustment
  </code></pre>
  
  <p>and then to change the resources.</p>
  
  <p>Scenario 3. in my opinion wrong</p>
  
  <pre><code>POST /transaction/move/{...}
  POST /transaction/scrap/{...}
  PUT  /transaction/takeon/{...}
  POST /transaction/pick/{...}  
  PUT  /transaction/receive/{...} 
  POST /transaction/hold/{...}
  POST /transaction/release/{...}
  POST /transaction/transfer/{...}  
  POST /transaction/return/{...}
  POST /transaction/adjustment/{...}
  </code></pre>
  
  <p>Any comments welcome, not looking for answer but more advice on design considerations? </p>
  
  <p>Thanks for taking the time reading this entry!</p>