{"action":"created","issue":{"url":"https://api.github.com/repos/spree/spree/issues/5883","labels_url":"https://api.github.com/repos/spree/spree/issues/5883/labels{/name}","comments_url":"https://api.github.com/repos/spree/spree/issues/5883/comments","events_url":"https://api.github.com/repos/spree/spree/issues/5883/events","html_url":"https://github.com/spree/spree/issues/5883","id":54289850,"number":5883,"title":"Users should be allowed to create new orders with line items if they currently have no current order.","user":{"login":"BenMorganIO","id":3117356,"avatar_url":"https://avatars.githubusercontent.com/u/3117356?v=3","gravatar_id":"","url":"https://api.github.com/users/BenMorganIO","html_url":"https://github.com/BenMorganIO","followers_url":"https://api.github.com/users/BenMorganIO/followers","following_url":"https://api.github.com/users/BenMorganIO/following{/other_user}","gists_url":"https://api.github.com/users/BenMorganIO/gists{/gist_id}","starred_url":"https://api.github.com/users/BenMorganIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenMorganIO/subscriptions","organizations_url":"https://api.github.com/users/BenMorganIO/orgs","repos_url":"https://api.github.com/users/BenMorganIO/repos","events_url":"https://api.github.com/users/BenMorganIO/events{/privacy}","received_events_url":"https://api.github.com/users/BenMorganIO/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spree/spree/labels/feature_request","name":"feature_request","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-14T06:43:15Z","updated_at":"2015-01-14T16:37:28Z","closed_at":"2015-01-14T07:06:30Z","body":"After looking through the documentation and the code, Spree only lets admins create orders via the API. I think this isn't helpful for frontend heavy applications.\r\n\r\nSomething I would like to propose is allowing `POST /api/orders` to create a new order with line items (if supplied) if the user or guest currently does _not_ have a current order.\r\n\r\nIf the user's `guest_token` is present and it maps to an incomplete order in `Spree::Order` then its unauthorized. Admins can still create as many orders as they like.\r\n\r\n- Admins can create orders\r\n- Users can create orders if they do not have a current order\r\n- Guests can create orders if they do not have a current order\r\n\r\nThoughts?\r\n"},"comment":{"url":"https://api.github.com/repos/spree/spree/issues/comments/69945681","html_url":"https://github.com/spree/spree/issues/5883#issuecomment-69945681","issue_url":"https://api.github.com/repos/spree/spree/issues/5883","id":69945681,"user":{"login":"BenMorganIO","id":3117356,"avatar_url":"https://avatars.githubusercontent.com/u/3117356?v=3","gravatar_id":"","url":"https://api.github.com/users/BenMorganIO","html_url":"https://github.com/BenMorganIO","followers_url":"https://api.github.com/users/BenMorganIO/followers","following_url":"https://api.github.com/users/BenMorganIO/following{/other_user}","gists_url":"https://api.github.com/users/BenMorganIO/gists{/gist_id}","starred_url":"https://api.github.com/users/BenMorganIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenMorganIO/subscriptions","organizations_url":"https://api.github.com/users/BenMorganIO/orgs","repos_url":"https://api.github.com/users/BenMorganIO/repos","events_url":"https://api.github.com/users/BenMorganIO/events{/privacy}","received_events_url":"https://api.github.com/users/BenMorganIO/received_events","type":"User","site_admin":false},"created_at":"2015-01-14T16:37:28Z","updated_at":"2015-01-14T16:37:28Z","body":"@JDutil @gmacdougall Has any work been done on this? I would be willing to submit a PR to get this feature into 3.0 by the end of the week. Currently working on it right now in a spree app."}}