{"_id":"55fc80353c21291900e7e0b0","__v":14,"version":{"_id":"556cd8aec14029190092d295","__v":14,"project":"556cd8aec14029190092d292","createdAt":"2015-06-01T22:11:58.756Z","releaseDate":"2015-06-01T22:11:58.756Z","categories":["556cd8afc14029190092d296","55ca5a55241e790d004f47ea","55dc9fdb4f535537007da1b2","55dc9fdfc755b63700dc843c","55fdb08c4bebdf17004130d4","560ef4c2a36c610d00e7013e","5613db296a092921004c30c2","56156581dc8aea0d002475e8","56169d1ee98f5517005627a8","5622fde7de7dc01700c6dd5f","56cf75f3336aa60b0086a495","5818f3c02093901b00bcf91a","582f7ff88ea0800f0035639a","583f30c110448a2500dd990f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"556cbb50c14029190092d20f","category":{"_id":"556cd8afc14029190092d296","pages":["556cd8b0c14029190092d298","55fc80353c21291900e7e0b0","55fc86873c21291900e7e0bd","55fc87be4ee5911900d357a9","55fdacf3b652110d00758b68","55fdae0f51dbf70d00c61bb8","55fdaf4156d6990d00a6cac5","560efa0743ea130d00a3621a","56169ba4a6767c0d00166a46","56aa75e24350eb17009147b5"],"__v":10,"project":"556cd8aec14029190092d292","version":"556cd8aec14029190092d295","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-06-01T22:11:59.312Z","from_sync":false,"order":1,"slug":"about-the-api","title":"About The API"},"parentDoc":null,"project":"556cd8aec14029190092d292","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-18T21:20:53.513Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Before you start with the API, please [register your application for sandbox access.](https://reverb.readme.io/docs/sandbox) \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Are you bored with these docs?\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Interactive Swagger Documentation\",\n  \"body\": \"Our API serves automatically generated Swagger documentation which allows you to play with it without writing any code. \\n\\n[Click here to start using the interactive API explorer.](https://dev.reverb.com/docs/swagger)\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Them's the rules\"\n}\n[/block]\nIf you want to jam out with the Reverb API, it's probably best you follow these tips and guidelines:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**Content Types**\\n\\nPlease set your Accept and Content-Type header to \\\"application/hal+json\\\"\",\n    \"h-0\": \"The Rule\",\n    \"h-1\": \"The Why\",\n    \"0-1\": \"HAL is a JSON linking and embedding standard that makes our API easier for you to consume by following links much like you might on a webpage.\",\n    \"1-0\": \"**Use Links**\\n\\nYou should never construct your own URLs or assume anything about the URL structure of the application.\",\n    \"1-1\": \"Our resources link to the actions you can take on them. If you follow the links your app is less likely to break if we decide to change how the links are structured.\",\n    \"2-0\": \"Links are sometimes verbs like \\\"add_to_wishlist\\\" and sometimes resource nouns like \\\"lists\\\". We are primarily focusing on resource nouns like \\\"lists\\\" unless there is ambiguity, in which case we use verbs.\",\n    \"2-1\": \"Most resource endpoints behave similarly (accepting GET/PUT/POST/DELETE requests that do what you would think). Some endpoints only do a subset of those actions. To find out what's possible, just try to do what you're doing and watch the error response, or [check out the swagger docs](https://reverb.com/swagger).\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Content Types - a common pitfall\"\n}\n[/block]\nRequests are sensitive to the Content-Type header. If you use `application/hal+json` your body must be a json encoded string. If you use `application/x-www-form-urlencoded` or leave off the content type, your body must be a urlencoded parameter string. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Use application/hal+json Content Type and send JSON\",\n  \"body\": \"Some of the endpoints of the API take nested objects. You'll have a much easier time implementing clients if you submit your POST bodies as JSON rather than form encoded params.\"\n}\n[/block]\n\nHere's an example using a JSON encoded body.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST -H \\\"Content-Type: application/hal+json\\\" --data '{\\\"email\\\": \\\"foo:::at:::bar.com\\\", \\\"password\\\": \\\"asdf\\\"}' https://api.reverb.com/api/auth/email.json\",\n      \"language\": \"curl\",\n      \"name\": \"hal+json\"\n    }\n  ]\n}\n[/block]\nHere is an example using the form encoded params, similar to a url query string. This is not recommended as it makes it hard to send nested structures.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST -H \\\"Content-Type: application/x-www-form-urlencoded\\\" --data 'email=foo@bar.com&password=asdf' https://api.reverb.com/api/auth/email.json\",\n      \"language\": \"curl\",\n      \"name\": \"form-urlencoded\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Pagination\"\n}\n[/block]\nAll collection-based api calls will return `_links` that include `next` and `prev` keys. These hrefs should be followed. If they are not present, there is no next or previous page. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"_links\\\": {\\n    \\\"next\\\": {\\\"href\\\":\\\"https://api.reverb.com/api/listings/?page=2\\\"}, \\n    \\\"prev\\\": {\\\"href\\\":\\\"https://api.reverb.com/api/listings/?page=1\\\"}\\n  },\\n  \\\"listings\\\":[\\n    {\\n      \\\"some\\\": \\\"data\\\"\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Questions?\"\n}\n[/block]\nPlease head over to our [API Forum](https://dev.reverb.com/discuss) to get your questions answered quickly.","excerpt":"","slug":"getting-started","type":"basic","title":"Getting Started"}
Before you start with the API, please [register your application for sandbox access.](https://reverb.readme.io/docs/sandbox) [block:api-header] { "type": "basic", "title": "Are you bored with these docs?" } [/block] [block:callout] { "type": "success", "title": "Interactive Swagger Documentation", "body": "Our API serves automatically generated Swagger documentation which allows you to play with it without writing any code. \n\n[Click here to start using the interactive API explorer.](https://dev.reverb.com/docs/swagger)" } [/block] [block:api-header] { "type": "basic", "title": "Them's the rules" } [/block] If you want to jam out with the Reverb API, it's probably best you follow these tips and guidelines: [block:parameters] { "data": { "0-0": "**Content Types**\n\nPlease set your Accept and Content-Type header to \"application/hal+json\"", "h-0": "The Rule", "h-1": "The Why", "0-1": "HAL is a JSON linking and embedding standard that makes our API easier for you to consume by following links much like you might on a webpage.", "1-0": "**Use Links**\n\nYou should never construct your own URLs or assume anything about the URL structure of the application.", "1-1": "Our resources link to the actions you can take on them. If you follow the links your app is less likely to break if we decide to change how the links are structured.", "2-0": "Links are sometimes verbs like \"add_to_wishlist\" and sometimes resource nouns like \"lists\". We are primarily focusing on resource nouns like \"lists\" unless there is ambiguity, in which case we use verbs.", "2-1": "Most resource endpoints behave similarly (accepting GET/PUT/POST/DELETE requests that do what you would think). Some endpoints only do a subset of those actions. To find out what's possible, just try to do what you're doing and watch the error response, or [check out the swagger docs](https://reverb.com/swagger)." }, "cols": 2, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Content Types - a common pitfall" } [/block] Requests are sensitive to the Content-Type header. If you use `application/hal+json` your body must be a json encoded string. If you use `application/x-www-form-urlencoded` or leave off the content type, your body must be a urlencoded parameter string. [block:callout] { "type": "info", "title": "Use application/hal+json Content Type and send JSON", "body": "Some of the endpoints of the API take nested objects. You'll have a much easier time implementing clients if you submit your POST bodies as JSON rather than form encoded params." } [/block] Here's an example using a JSON encoded body. [block:code] { "codes": [ { "code": "curl -X POST -H \"Content-Type: application/hal+json\" --data '{\"email\": \"foo@bar.com\", \"password\": \"asdf\"}' https://api.reverb.com/api/auth/email.json", "language": "curl", "name": "hal+json" } ] } [/block] Here is an example using the form encoded params, similar to a url query string. This is not recommended as it makes it hard to send nested structures. [block:code] { "codes": [ { "code": "curl -X POST -H \"Content-Type: application/x-www-form-urlencoded\" --data 'email=foo@bar.com&password=asdf' https://api.reverb.com/api/auth/email.json", "language": "curl", "name": "form-urlencoded" } ] } [/block] [block:api-header] { "type": "basic", "title": "Pagination" } [/block] All collection-based api calls will return `_links` that include `next` and `prev` keys. These hrefs should be followed. If they are not present, there is no next or previous page. [block:code] { "codes": [ { "code": "{\n \"_links\": {\n \"next\": {\"href\":\"https://api.reverb.com/api/listings/?page=2\"}, \n \"prev\": {\"href\":\"https://api.reverb.com/api/listings/?page=1\"}\n },\n \"listings\":[\n {\n \"some\": \"data\"\n }\n ]\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "Questions?" } [/block] Please head over to our [API Forum](https://dev.reverb.com/discuss) to get your questions answered quickly.