{"__v":0,"_id":"575676128749830e00681e9c","category":{"version":"575676128749830e00681e82","project":"55a4d5531a5f991700a9409e","_id":"575676128749830e00681e83","__v":0,"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-07-14T09:24:36.519Z","from_sync":false,"order":0,"slug":"setup","title":"urb-it as delivery method"},"parentDoc":null,"project":"55a4d5531a5f991700a9409e","user":"560266564f15002100ee444b","version":{"__v":2,"_id":"575676128749830e00681e82","project":"55a4d5531a5f991700a9409e","createdAt":"2016-06-07T07:21:54.005Z","releaseDate":"2016-06-07T07:21:54.005Z","categories":["575676128749830e00681e83","575676128749830e00681e84","575676128749830e00681e85","575676128749830e00681e86","575676128749830e00681e87","575676128749830e00681e88","575676128749830e00681e89","575676128749830e00681e8a","575676128749830e00681e8b","580c5ff36c35230f003d3b49"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2.0"},"updates":["56d55ed3a4a9211b00c8f248"],"next":{"pages":[],"description":""},"createdAt":"2016-02-01T12:12:10.472Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"post","results":{"codes":[]},"settings":"57bc0cc860d92e0e0079e564","auth":"required","params":[],"url":"/v2/postalcodes/validate"},"isReference":true,"order":5,"body":"[block:api-header]\n{\n \"type\": \"basic\"\n}\n[/block]\nEndpoint for validating a single postal code.\nIt will read the passed postal code parameter and match it to the database.\nThe response 200 (OK) will verify that the postal code is within urb-it delivery bounds.\n\n**Request parameters**\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Parameter\",\n \"h-1\": \"Type\",\n \"h-2\": \"Example\",\n \"h-3\": \"Description\",\n \"0-0\": \"postal_code\",\n \"0-1\": \"string\",\n \"0-2\": \"11144\",\n \"0-3\": \"The postalcode that will be matched to determine if valid.\"\n },\n \"cols\": 4,\n \"rows\": 1\n}\n[/block]\n**Response parameters**\n[block:parameters]\n{\n \"data\": {\n \"0-0\": \"postal_code\",\n \"h-0\": \"Parameter\",\n \"h-1\": \"Type\",\n \"h-2\": \"Description\",\n \"0-1\": \"string\",\n \"0-2\": \"The valid postalcode\"\n },\n \"cols\": 3,\n \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Example Request\"\n}\n[/block]\nExample shows a valid request\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"POST https://stage-retailer-api.urb-it.com/api/postalcode/validate\\nHTTP/1.1\\nAccept: application/vnd.urb-it.se+json; version=1\\nAuthorization: uwa b0477a45-1198-419f-b159-e484be341512:mltN3WwhN9/EZzu/0nRWjHFMdzYG1INAoVwUJ+mD9Nc=:b97ad65f78b741e78988dcb868f27d4d:1448549091\\nHost: stage-retailer-api.urb-it.com\",\n \"language\": \"http\"\n }\n ]\n}\n[/block]\nSample Request Body\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n\\t\\t\\\"postal_code\\\" : \\\"11144\\\"\\n}\",\n \"language\": \"text\"\n }\n ]\n}\n[/block]\n\n[block:api-header]\n{\n \"type\": \"basic\",\n \"title\": \"Example Responses\"\n}\n[/block]\nExample shows a status 200 OK response\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"postal_code\\\": \\\"11144\\\"\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]\nExample shows a status 500 response (Location outside urb-it delivery area)\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n \\\"status\\\": 404,\\n \\\"code\\\": \\\"RET-002\\\",\\n \\\"message\\\": \\\"The delivery location is located outside of the Urb-it availability zone.\\\",\\n \\\"developer_message\\\": \\\"The delivery location is located outside of the Urb-it availability zone.\\\",\\n \\\"more_info\\\": null\\n}\",\n \"language\": \"json\"\n }\n ]\n}\n[/block]","excerpt":"**Version 2.0**\nValidates if the supplied postal code is included in the urb-it area.","slug":"validate-postal-code","type":"endpoint","title":"Validate Postal Code"}postValidate Postal Code
**Version 2.0**
Validates if the supplied postal code is included in the urb-it area.
Definition
{{ api_url }}{{ page_api_url }}