{"_id":"586f7c30a5132b1b00fe2c08","category":{"_id":"582c7058e4a4920f00ff004d","__v":0,"version":"582c7058e4a4920f00ff0045","project":"56c1e50bce02590d006091c9","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-26T12:33:01.341Z","from_sync":false,"order":6,"slug":"examples","title":"Examples"},"parentDoc":null,"project":"56c1e50bce02590d006091c9","githubsync":"","user":"586d17bb9a854123001acd6d","__v":0,"version":{"_id":"582c7058e4a4920f00ff0045","project":"56c1e50bce02590d006091c9","__v":2,"createdAt":"2016-11-16T14:42:32.468Z","releaseDate":"2016-11-16T14:42:32.468Z","categories":["582c7058e4a4920f00ff0046","582c7058e4a4920f00ff0047","582c7058e4a4920f00ff0048","582c7058e4a4920f00ff0049","582c7058e4a4920f00ff004a","582c7058e4a4920f00ff004b","582c7058e4a4920f00ff004c","582c7058e4a4920f00ff004d","582c7058e4a4920f00ff004e","582c7058e4a4920f00ff004f","582d97124b2536250038b392"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-06T11:14:56.142Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"Example #1\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Errors: [\\n{\\n  \\\"code\\\": \\\"outside_hours\\\",\\n  \\\"message\\\": \\\"We only accept delivery requests between 0800 and 2200 UTC\\\"\\n}\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nExample #2\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Errors: [\\n{\\n  \\\"code\\\": \\\"bad_request\\\",\\n  \\\"message\\\": \\\"Postcode not recognised\\\"\\n},\\n{\\n  \\\"code\\\": \\\"bad_request\\\",\\n  \\\"message\\\": \\\"Mobile number not provided\\\"\\n}\\n]\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"receive-order-response-body-with-errors","type":"basic","title":"Receive Order response body with errors (make visible after release of PCPSA-30)"}

Receive Order response body with errors (make visible after release of PCPSA-30)


Example #1 [block:code] { "codes": [ { "code": "Errors: [\n{\n \"code\": \"outside_hours\",\n \"message\": \"We only accept delivery requests between 0800 and 2200 UTC\"\n}\n]", "language": "json" } ] } [/block] Example #2 [block:code] { "codes": [ { "code": "Errors: [\n{\n \"code\": \"bad_request\",\n \"message\": \"Postcode not recognised\"\n},\n{\n \"code\": \"bad_request\",\n \"message\": \"Mobile number not provided\"\n}\n]", "language": "json" } ] } [/block]