{"_id":"569526b8caa32519009c411e","project":"556cd8aec14029190092d292","__v":34,"user":"5625a0ce4dcb400d00ff4473","category":{"_id":"55fdb08c4bebdf17004130d4","project":"556cd8aec14029190092d292","version":"556cd8aec14029190092d295","__v":11,"pages":["55fdb124b652110d00758b70","55fdb2a956d6990d00a6caca","55fdb38856d6990d00a6cacc","55ff6c519e7ccf0d000a1d7f","5613db97acd4343500088079","5616d7b9cf2a1e0d00247971","56196204fa2a6d0d002a1352","5622f2c906481c0d00e5315c","569526b8caa32519009c411e","569fbbcbbeb79a17009f8f89","56aac68aac665d0d00af76b0"],"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-19T18:59:24.105Z","from_sync":false,"order":4,"slug":"how-to","title":"How To..."},"parentDoc":null,"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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-12T16:15:52.261Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":4,"body":"##1. Add Listings To A Sale\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"/api/sales/:sale_id/listings\"\n}\n[/block]\nYou can add up to 25 listings at a time by passing an Array of listing_ids. You must be a [Reverb Preferred Seller](https://reverb.com/page/preferred-seller-program) to access this endpoint.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -XPOST -H \\\"Content-Type: application/hal+json\\\" -H \\\"Accept: application/hal+json\\\" -H \\\"Authorization: Bearer [oauth_token]\\\" -H \\\"Accept-Version: 3.0\\\" https://api.reverb.com/api/sales/89472/listings -d '{\\\"listing_ids\\\":[\\\"21363\\\",\\\"24524\\\"]}'\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"results\\\":[\\n  {\\n    \\\"listing_id\\\":\\\"21363\\\",\\n    \\\"success\\\":true,\\n    \\\"message\\\":\\\"OK\\\"\\n  },\\n  {\\n    \\\"listing_id\\\":\\\"24524\\\",\\n    \\\"success\\\":false,\\n    \\\"message\\\":\\\"You are not authorized to add this listing to a sale.\\\" // example error message\\n  }\\n]}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##2. Remove Listings From A Sale\n[block:api-header]\n{\n  \"type\": \"delete\",\n  \"title\": \"/api/sales/:sale_id/listings\"\n}\n[/block]\nYou can remove up to 25 listings at a time by passing an Array of listing_ids. You must be a [Reverb Preferred Seller](https://reverb.com/page/preferred-seller-program) to access this endpoint.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -XDELETE -H \\\"Content-Type: application/hal+json\\\" -H \\\"Accept: application/hal+json\\\" -H \\\"Accept-Version: 3.0\\\" -H \\\"Authorization: Bearer [oauth_token]\\\" https://api.reverb.com/api/sales/89472/listings -d '{\\\"listing_ids\\\":[\\\"21363\\\",\\\"24524\\\"]}'\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\\"results\\\":[\\n  {\\n    \\\"listing_id\\\":\\\"21363\\\",\\n    \\\"success\\\":true,\\n    \\\"message\\\":\\\"OK\\\"\\n  },\\n  {\\n    \\\"listing_id\\\":\\\"24524\\\",\\n    \\\"success\\\":false,\\n    \\\"message\\\":\\\"You are not authorized to remove this listing from a sale.\\\" // example error message\\n  }\\n]}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##3. View All Sales for a Given Listing\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/api/listings/:listing_id/sales\"\n}\n[/block]\nAuthentication not required; however, an authenticated user may see more information.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -XGET -H \\\"Authorization: Bearer [oauth_token]\\\" -H \\\"Accept-Version: 3.0\\\" https://api.reverb.com/api/listings/21363/sales\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"total\\\":1,\\n  \\\"_links\\\":{},\\n  \\\"sales\\\":[\\n    {\\n     \\\"id\\\":5,\\n     \\\"discount_percent\\\":10,\\n     \\\"discount_code\\\":\\\"10PERCENT\\\",\\n     \\\"max_count_listings_allowed\\\":null,\\n      \\\"starts_at\\\":\\\"2015-12-25T08:00:00-06:00\\\",\\n      \\\"ends_at\\\":\\\"2016-01-22T11:50:50-06:00\\\",\\n      \\\"_links\\\":{\\n        \\\"web\\\":{\\n          \\\"href\\\":\\\"https://reverb.site/sales/feil-group-old-sale\\\"\\n        },\\n        \\\"listings\\\":{\\n          \\\"href\\\":\\\"/api/sales/5/listings\\\"\\n        }\\n      }\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##4. View All Reverb Official Sales\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/api/sales/reverb\"\n}\n[/block]\nView all live and upcoming Reverb Official Sales. You must be a [Reverb Preferred Seller](https://reverb.com/page/preferred-seller-program) to access this endpoint.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -XGET -H \\\"Authorization: Bearer [oauth_token]\\\" -H \\\"Accept-Version: 3.0\\\" https://api.reverb.com/api/sales/reverb\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"total\\\":1,\\n  \\\"_links\\\":{},\\n  \\\"sales\\\":[\\n    {\\n      \\\"id\\\":2,\\n      \\\"discount_percent\\\":5,\\n      \\\"discount_code\\\":\\\"REVERBrules\\\",\\n      \\\"max_count_listings_allowed\\\":20,\\n      \\\"starts_at\\\":\\\"2015-12-30T08:00:00-06:00\\\",\\n      \\\"ends_at\\\":\\\"2016-01-21T18:00:00-06:00\\\",\\n      \\\"_links\\\":{\\n        \\\"web\\\":{\\n          \\\"href\\\":\\\"https://reverb.site/sales/reverb-pedal-sale\\\"\\n        },\\n        \\\"listings\\\":{\\n          \\\"href\\\":\\\"/api/sales/2/listings\\\"\\n        }\\n      }\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n##5. View all your Seller Sales\n[block:api-header]\n{\n  \"type\": \"get\",\n  \"title\": \"/api/sales/seller\"\n}\n[/block]\nView all sales that you own. You must be a [Reverb Preferred Seller](https://reverb.com/page/preferred-seller-program) to access this endpoint.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -XGET -H \\\"Authorization: Bearer [oauth_token]\\\" -H \\\"Accept-Version: 3.0\\\" https://api.reverb.com/api/sales/seller\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"total\\\":2,\\n  \\\"_links\\\":{},\\n  \\\"sales\\\":[\\n    {\\n     \\\"id\\\":5,\\n     \\\"discount_percent\\\":10,\\n     \\\"discount_code\\\":\\\"10PERCENT\\\",\\n     \\\"max_count_listings_allowed\\\":null,\\n      \\\"starts_at\\\":\\\"2015-12-25T08:00:00-06:00\\\",\\n      \\\"ends_at\\\":\\\"2016-01-22T11:50:50-06:00\\\",\\n      \\\"_links\\\":{\\n        \\\"web\\\":{\\n          \\\"href\\\":\\\"https://reverb.site/sales/feil-group-old-sale\\\"\\n        },\\n        \\\"listings\\\":{\\n          \\\"href\\\":\\\"/api/sales/5/listings\\\"\\n        }\\n      }\\n    }\\n  ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n###Notes on Sale Attributes\n+ `max_count_listings_allowed` is an Integer denoting how many listings are allowed in a Sale per user. This is typically only set on Reverb Official Sales, and is irrelevant for Seller Sales. A `null` value indicates no threshold.","excerpt":"[Add Listings](https://dev.reverb.com/docs/manage-sales#section-1-add-listings-to-a-sale)\n[Remove Listings](https://dev.reverb.com/docs/manage-sales#section-2-remove-listings-from-a-sale)\n[View A Listing's Sales](https://dev.reverb.com/docs/manage-sales#section-3-view-all-sales-for-a-given-listing)\n[View Reverb Official Sales](https://dev.reverb.com/docs/manage-sales#section-4-view-all-reverb-official-sales)\n[View Seller Sales](https://dev.reverb.com/docs/manage-sales#section-5-view-all-your-seller-sales)\n[Important Notes](https://dev.reverb.com/docs/manage-sales#section-notes-on-sale-attributes)","slug":"manage-sales","type":"basic","title":"Manage Sales"}

Manage Sales

[Add Listings](https://dev.reverb.com/docs/manage-sales#section-1-add-listings-to-a-sale) [Remove Listings](https://dev.reverb.com/docs/manage-sales#section-2-remove-listings-from-a-sale) [View A Listing's Sales](https://dev.reverb.com/docs/manage-sales#section-3-view-all-sales-for-a-given-listing) [View Reverb Official Sales](https://dev.reverb.com/docs/manage-sales#section-4-view-all-reverb-official-sales) [View Seller Sales](https://dev.reverb.com/docs/manage-sales#section-5-view-all-your-seller-sales) [Important Notes](https://dev.reverb.com/docs/manage-sales#section-notes-on-sale-attributes)

##1. Add Listings To A Sale [block:api-header] { "type": "post", "title": "/api/sales/:sale_id/listings" } [/block] You can add up to 25 listings at a time by passing an Array of listing_ids. You must be a [Reverb Preferred Seller](https://reverb.com/page/preferred-seller-program) to access this endpoint. [block:code] { "codes": [ { "code": "curl -XPOST -H \"Content-Type: application/hal+json\" -H \"Accept: application/hal+json\" -H \"Authorization: Bearer [oauth_token]\" -H \"Accept-Version: 3.0\" https://api.reverb.com/api/sales/89472/listings -d '{\"listing_ids\":[\"21363\",\"24524\"]}'", "language": "curl" } ] } [/block] [block:code] { "codes": [ { "code": "{\"results\":[\n {\n \"listing_id\":\"21363\",\n \"success\":true,\n \"message\":\"OK\"\n },\n {\n \"listing_id\":\"24524\",\n \"success\":false,\n \"message\":\"You are not authorized to add this listing to a sale.\" // example error message\n }\n]}", "language": "json" } ] } [/block] ##2. Remove Listings From A Sale [block:api-header] { "type": "delete", "title": "/api/sales/:sale_id/listings" } [/block] You can remove up to 25 listings at a time by passing an Array of listing_ids. You must be a [Reverb Preferred Seller](https://reverb.com/page/preferred-seller-program) to access this endpoint. [block:code] { "codes": [ { "code": "curl -XDELETE -H \"Content-Type: application/hal+json\" -H \"Accept: application/hal+json\" -H \"Accept-Version: 3.0\" -H \"Authorization: Bearer [oauth_token]\" https://api.reverb.com/api/sales/89472/listings -d '{\"listing_ids\":[\"21363\",\"24524\"]}'", "language": "curl" } ] } [/block] [block:code] { "codes": [ { "code": "{\"results\":[\n {\n \"listing_id\":\"21363\",\n \"success\":true,\n \"message\":\"OK\"\n },\n {\n \"listing_id\":\"24524\",\n \"success\":false,\n \"message\":\"You are not authorized to remove this listing from a sale.\" // example error message\n }\n]}", "language": "json" } ] } [/block] ##3. View All Sales for a Given Listing [block:api-header] { "type": "get", "title": "/api/listings/:listing_id/sales" } [/block] Authentication not required; however, an authenticated user may see more information. [block:code] { "codes": [ { "code": "curl -XGET -H \"Authorization: Bearer [oauth_token]\" -H \"Accept-Version: 3.0\" https://api.reverb.com/api/listings/21363/sales", "language": "curl" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"total\":1,\n \"_links\":{},\n \"sales\":[\n {\n \"id\":5,\n \"discount_percent\":10,\n \"discount_code\":\"10PERCENT\",\n \"max_count_listings_allowed\":null,\n \"starts_at\":\"2015-12-25T08:00:00-06:00\",\n \"ends_at\":\"2016-01-22T11:50:50-06:00\",\n \"_links\":{\n \"web\":{\n \"href\":\"https://reverb.site/sales/feil-group-old-sale\"\n },\n \"listings\":{\n \"href\":\"/api/sales/5/listings\"\n }\n }\n }\n ]\n}", "language": "json" } ] } [/block] ##4. View All Reverb Official Sales [block:api-header] { "type": "get", "title": "/api/sales/reverb" } [/block] View all live and upcoming Reverb Official Sales. You must be a [Reverb Preferred Seller](https://reverb.com/page/preferred-seller-program) to access this endpoint. [block:code] { "codes": [ { "code": "curl -XGET -H \"Authorization: Bearer [oauth_token]\" -H \"Accept-Version: 3.0\" https://api.reverb.com/api/sales/reverb", "language": "curl" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"total\":1,\n \"_links\":{},\n \"sales\":[\n {\n \"id\":2,\n \"discount_percent\":5,\n \"discount_code\":\"REVERBrules\",\n \"max_count_listings_allowed\":20,\n \"starts_at\":\"2015-12-30T08:00:00-06:00\",\n \"ends_at\":\"2016-01-21T18:00:00-06:00\",\n \"_links\":{\n \"web\":{\n \"href\":\"https://reverb.site/sales/reverb-pedal-sale\"\n },\n \"listings\":{\n \"href\":\"/api/sales/2/listings\"\n }\n }\n }\n ]\n}", "language": "json" } ] } [/block] ##5. View all your Seller Sales [block:api-header] { "type": "get", "title": "/api/sales/seller" } [/block] View all sales that you own. You must be a [Reverb Preferred Seller](https://reverb.com/page/preferred-seller-program) to access this endpoint. [block:code] { "codes": [ { "code": "curl -XGET -H \"Authorization: Bearer [oauth_token]\" -H \"Accept-Version: 3.0\" https://api.reverb.com/api/sales/seller", "language": "curl" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"total\":2,\n \"_links\":{},\n \"sales\":[\n {\n \"id\":5,\n \"discount_percent\":10,\n \"discount_code\":\"10PERCENT\",\n \"max_count_listings_allowed\":null,\n \"starts_at\":\"2015-12-25T08:00:00-06:00\",\n \"ends_at\":\"2016-01-22T11:50:50-06:00\",\n \"_links\":{\n \"web\":{\n \"href\":\"https://reverb.site/sales/feil-group-old-sale\"\n },\n \"listings\":{\n \"href\":\"/api/sales/5/listings\"\n }\n }\n }\n ]\n}", "language": "json" } ] } [/block] ###Notes on Sale Attributes + `max_count_listings_allowed` is an Integer denoting how many listings are allowed in a Sale per user. This is typically only set on Reverb Official Sales, and is irrelevant for Seller Sales. A `null` value indicates no threshold.