{"_id":"576d42354bcd290e0042895d","user":"56703859e10ecb0d0004eebb","__v":0,"category":{"_id":"576d42354bcd290e00428944","__v":0,"version":"576d42354bcd290e00428941","project":"56a526d4e7a1622b0024fae4","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-02-11T11:25:07.821Z","from_sync":false,"order":0,"slug":"objective-c","title":"Our API"},"editedParams":true,"project":"56a526d4e7a1622b0024fae4","editedParams2":true,"parentDoc":null,"version":{"_id":"576d42354bcd290e00428941","project":"56a526d4e7a1622b0024fae4","__v":1,"createdAt":"2016-06-24T14:22:45.076Z","releaseDate":"2016-06-24T14:22:45.076Z","categories":["576d42354bcd290e00428942","576d42354bcd290e00428943","576d42354bcd290e00428944","576d42354bcd290e00428945","576d42354bcd290e00428946","576d42354bcd290e00428947"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-27T15:00:44.429Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","examples":{"codes":[]},"method":"get","auth":"required","params":[{"_id":"56d1b9c52baeae0b00aa5032","ref":"","in":"path","required":false,"desc":"The unique chirp identifier","default":"","type":"string","name":"longcode"}],"url":"/chirps/decode/:longcode"},"isReference":true,"order":7,"body":"[block:textarea]\n{\n  \"text\": \"## Request\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"language\": \"python\",\n      \"code\": \"import requests\\n\\nurl = 'https://api.chirp.io/v1/chirps/decode/parrotbilllllahcm4'\\nheaders = {\\n  'X-Auth-Token': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',\\n}\\n\\nresponse = requests.get(url, headers=headers)\",\n      \"name\": null\n    },\n    {\n      \"code\": \"  $.ajax({\\n    type : \\\"GET\\\",\\n    url : 'https://api.chirp.io/v1/chirps/decode/parrotbilllllahcm4',\\n    headers: {\\n      'X-Auth-Token' : 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'\\n    },\\n    async : true,\\n    dataType : \\\"json\\\",\\n    success: success,\\n    error: error\\n  });\",\n      \"language\": \"javascript\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"## Results\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"status\": 200,\n      \"language\": \"json\",\n      \"code\": \"{\\n    \\\"shortcode\\\": \\\"parrotbill\\\"\\n}\",\n      \"name\": 200\n    },\n    {\n      \"status\": 400,\n      \"language\": \"json\",\n      \"code\": \"{\\n    \\\"status\\\": 400,\\n    \\\"description\\\": \\\"Bad Request: Invalid parameter(s).\\\",\\n    \\\"error\\\": true\\n}\",\n      \"name\": 400\n    },\n    {\n      \"code\": \"{\\n    \\\"status\\\": 401,\\n    \\\"description\\\": \\\"Unauthorized: Missing access token.\\\",\\n    \\\"error\\\": true\\n}\",\n      \"language\": \"json\",\n      \"status\": 401,\n      \"name\": 401\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\nDecodes an 18-character Chirp \"longcode\" to its \"shortcode\" payload identifier. This decodes Reed-Solomon and includes error correction to rectify missed characters.\n\nUnknown characters should be marked with a '?'.","excerpt":"","slug":"api-decode","type":"endpoint","title":"/chirps/decode/:encoded_identifier"}

get/chirps/decode/:encoded_identifier


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

longcode:
string
The unique chirp identifier

Documentation

[block:textarea] { "text": "## Request", "sidebar": true } [/block] [block:code] { "codes": [ { "language": "python", "code": "import requests\n\nurl = 'https://api.chirp.io/v1/chirps/decode/parrotbilllllahcm4'\nheaders = {\n 'X-Auth-Token': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',\n}\n\nresponse = requests.get(url, headers=headers)", "name": null }, { "code": " $.ajax({\n type : \"GET\",\n url : 'https://api.chirp.io/v1/chirps/decode/parrotbilllllahcm4',\n headers: {\n 'X-Auth-Token' : 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'\n },\n async : true,\n dataType : \"json\",\n success: success,\n error: error\n });", "language": "javascript" } ], "sidebar": true } [/block] [block:textarea] { "text": "## Results", "sidebar": true } [/block] [block:code] { "codes": [ { "status": 200, "language": "json", "code": "{\n \"shortcode\": \"parrotbill\"\n}", "name": 200 }, { "status": 400, "language": "json", "code": "{\n \"status\": 400,\n \"description\": \"Bad Request: Invalid parameter(s).\",\n \"error\": true\n}", "name": 400 }, { "code": "{\n \"status\": 401,\n \"description\": \"Unauthorized: Missing access token.\",\n \"error\": true\n}", "language": "json", "status": 401, "name": 401 } ], "sidebar": true } [/block] Decodes an 18-character Chirp "longcode" to its "shortcode" payload identifier. This decodes Reed-Solomon and includes error correction to rectify missed characters. Unknown characters should be marked with a '?'.

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}