{"action":"created","issue":{"url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-api/issues/12","labels_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-api/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-api/issues/12/comments","events_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-api/issues/12/events","html_url":"https://github.com/ministryofjustice/money-to-prisoners-api/pull/12","id":94692240,"number":12,"title":"PrisonerLocation model and endpoint","user":{"login":"marcofucci","id":178865,"avatar_url":"https://avatars.githubusercontent.com/u/178865?v=3","gravatar_id":"","url":"https://api.github.com/users/marcofucci","html_url":"https://github.com/marcofucci","followers_url":"https://api.github.com/users/marcofucci/followers","following_url":"https://api.github.com/users/marcofucci/following{/other_user}","gists_url":"https://api.github.com/users/marcofucci/gists{/gist_id}","starred_url":"https://api.github.com/users/marcofucci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcofucci/subscriptions","organizations_url":"https://api.github.com/users/marcofucci/orgs","repos_url":"https://api.github.com/users/marcofucci/repos","events_url":"https://api.github.com/users/marcofucci/events{/privacy}","received_events_url":"https://api.github.com/users/marcofucci/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-13T10:39:12Z","updated_at":"2015-08-11T09:01:07Z","closed_at":"2015-08-11T08:59:42Z","pull_request":{"url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-api/pulls/12","html_url":"https://github.com/ministryofjustice/money-to-prisoners-api/pull/12","diff_url":"https://github.com/ministryofjustice/money-to-prisoners-api/pull/12.diff","patch_url":"https://github.com/ministryofjustice/money-to-prisoners-api/pull/12.patch"},"body":"New endpoint allowing the creation of multiple prisoner locations at the same time.\r\nThis simulates a report upload but it's a lot cleaner/easier to understand and safer.\r\n\r\nThe format is:\r\n\r\n    CREATE   /prisoner-locations/\r\n        [\r\n        \t{\r\n        \t\tprisoner_number: \"<prisoner-number>\",  # e.g. L2513UV\r\n        \t\tprisoner_dob: \"<prisoner-dob>\",  # e.g. 1980-06-17\r\n        \t\tprison: \"<prison-id>\"  # e.g. prison-1\r\n        \t},\r\n        \t{\r\n        \t\tprisoner_number: \"<prisoner-number>\",  # e.g. L2513UV\r\n        \t\tprisoner_dob: \"<prisoner-dob>\",  # e.g. 1980-06-17\r\n        \t\tprison: \"<prison-id>\"  # e.g. prison-1\r\n        \t}\r\n        ]  \r\n\r\nThe system would store the items and update an `upload_counter` incremented field on each one of them which can be used later on to group them.\r\n\r\n**Pros**\r\n * easy to understand\r\n * we don't need to store any files\r\n\r\n**Cons**\r\n * clients would have to pre-process the data\r\n * each call to the endpoint represents an \"upload\" so partial creates are not allowed (2 calls => 2 uploads with the last one meant to \"override\" the first one)."},"comment":{"url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-api/issues/comments/129779057","html_url":"https://github.com/ministryofjustice/money-to-prisoners-api/pull/12#issuecomment-129779057","issue_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-api/issues/12","id":129779057,"user":{"login":"SteveMarshall","id":2210,"avatar_url":"https://avatars.githubusercontent.com/u/2210?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveMarshall","html_url":"https://github.com/SteveMarshall","followers_url":"https://api.github.com/users/SteveMarshall/followers","following_url":"https://api.github.com/users/SteveMarshall/following{/other_user}","gists_url":"https://api.github.com/users/SteveMarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveMarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveMarshall/subscriptions","organizations_url":"https://api.github.com/users/SteveMarshall/orgs","repos_url":"https://api.github.com/users/SteveMarshall/repos","events_url":"https://api.github.com/users/SteveMarshall/events{/privacy}","received_events_url":"https://api.github.com/users/SteveMarshall/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T09:01:06Z","updated_at":"2015-08-11T09:01:06Z","body":":+1: :sparkles: "}}