{"_id":"58112e73ded0340f0085d075","category":{"_id":"58112e72ded0340f0085d030","version":"58112e71ded0340f0085d02a","project":"551e85be610f400d00837db7","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-25T20:14:44.667Z","from_sync":false,"order":4,"slug":"store-api-methods","title":"Store API Methods"},"project":"551e85be610f400d00837db7","user":"55f2fd49b5b25021002b7dfd","version":{"_id":"58112e71ded0340f0085d02a","project":"551e85be610f400d00837db7","__v":4,"createdAt":"2016-10-26T22:30:09.862Z","releaseDate":"2016-10-26T22:30:09.862Z","categories":["58112e72ded0340f0085d02b","58112e72ded0340f0085d02c","58112e72ded0340f0085d02d","58112e72ded0340f0085d02e","58112e72ded0340f0085d02f","58112e72ded0340f0085d030","58112e72ded0340f0085d031","58112e72ded0340f0085d032","58112e72ded0340f0085d033","58112e72ded0340f0085d034","581137cc604d3c230048b7e4","58dc367221742d0f00a73f98","590768e54669da0f00db5c0b"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"new designer","version_clean":"2.0.0","version":"2.0"},"__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-25T21:04:20.357Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"_Methods for getting [Product](doc:product) data._\n[block:html]\n{\n  \"html\": \"<div class=\\\"endpoint list\\\">\\n  <span class=\\\"method get\\\">GET</span>\\n  <span class=\\\"uri\\\">\\n    \\t\\t/v1/store/api/products/\\n  </span>\\n</div>\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div class=\\\"endpoint list\\\">\\n  <span class=\\\"method get\\\">GET</span>\\n  <span class=\\\"uri\\\">\\n    /v1/store/api/products/{prod_id}/\\n  </span>\\n</div>\"\n}\n[/block]\n_Method that provides [Inventory](doc:inventory) counts for ecom products._\n[block:html]\n{\n  \"html\": \"<div class=\\\"endpoint list\\\">\\n  <span class=\\\"method get\\\">GET</span>\\n  <span class=\\\"uri\\\">\\n    /v1/store/api/products/inventory/\\n  </span>\\n</div>\"\n}\n[/block]\n# List products\n[block:html]\n{\n  \"html\": \"<div class=\\\"endpoint\\\">\\n  <span class=\\\"method get\\\">GET</span>\\n  <span class=\\\"uri\\\">\\n    \\t\\t/v1/store/api/products/\\n  </span>\\n</div>\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$.get('/v1/store/api/products/');\",\n      \"language\": \"javascript\",\n      \"name\": \"List\"\n    },\n    {\n      \"code\": \"$.get('https://api.cratejoy.com/v1/customers/',{\\n  \\\"address.city\\\": \\\"Austin\\\",\\n  \\\"_md.shoe.size__gt\\\": 10\\n});\",\n      \"language\": \"javascript\",\n      \"name\": \"Filter\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  count: 1,\\n  next: \\\"?page=1\\\",\\n  prev: null,\\n  results: [\\n    {\\n      id: 70990774,\\n      name: \\\"Spud of the Month Club\\\",\\n      description: \\\"The best potatoes in the world. To your door. Every month.\\\",\\n      slug: \\\"spud-of-the-month\\\",\\n      visible: true,\\n      deleted: false,\\n      url: \\\"/v1/store/api/products/70990774/\\\",\\n      ...\\n    }\\n  ]\\n}\",\n      \"language\": \"javascript\",\n      \"name\": \"200 OK\"\n    }\n  ]\n}\n[/block]\n# Get a product\n[block:html]\n{\n  \"html\": \"<div class=\\\"endpoint list\\\">\\n  <span class=\\\"method get\\\">GET</span>\\n  <span class=\\\"uri\\\">\\n\\t\\t/v1/store/api/products\\n  </span>\\n</div>\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$.get('/v1/store/api/products/70990774');\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n# List inventory levels\n[block:html]\n{\n  \"html\": \"<div class=\\\"endpoint\\\">\\n  <span class=\\\"method get\\\">GET</span>\\n  <span class=\\\"uri\\\">\\n    /v1/store/api/products/inventory/\\n  </span>\\n</div>\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$.get('/v1/store/api/products/inventory/');\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  count: 1,\\n  next: \\\"?page=1\\\",\\n  prev: null,\\n  results: [\\n    {\\n      product_id: 9853,\\n      product_instance_id: 9854,\\n      on-hand: 16\\n    }\\n  ]\\n}\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"product-methods-1","type":"basic","title":"Product Methods"}
_Methods for getting [Product](doc:product) data._ [block:html] { "html": "<div class=\"endpoint list\">\n <span class=\"method get\">GET</span>\n <span class=\"uri\">\n \t\t/v1/store/api/products/\n </span>\n</div>" } [/block] [block:html] { "html": "<div class=\"endpoint list\">\n <span class=\"method get\">GET</span>\n <span class=\"uri\">\n /v1/store/api/products/{prod_id}/\n </span>\n</div>" } [/block] _Method that provides [Inventory](doc:inventory) counts for ecom products._ [block:html] { "html": "<div class=\"endpoint list\">\n <span class=\"method get\">GET</span>\n <span class=\"uri\">\n /v1/store/api/products/inventory/\n </span>\n</div>" } [/block] # List products [block:html] { "html": "<div class=\"endpoint\">\n <span class=\"method get\">GET</span>\n <span class=\"uri\">\n \t\t/v1/store/api/products/\n </span>\n</div>" } [/block] [block:code] { "codes": [ { "code": "$.get('/v1/store/api/products/');", "language": "javascript", "name": "List" }, { "code": "$.get('https://api.cratejoy.com/v1/customers/',{\n \"address.city\": \"Austin\",\n \"_md.shoe.size__gt\": 10\n});", "language": "javascript", "name": "Filter" } ] } [/block] [block:code] { "codes": [ { "code": "{\n count: 1,\n next: \"?page=1\",\n prev: null,\n results: [\n {\n id: 70990774,\n name: \"Spud of the Month Club\",\n description: \"The best potatoes in the world. To your door. Every month.\",\n slug: \"spud-of-the-month\",\n visible: true,\n deleted: false,\n url: \"/v1/store/api/products/70990774/\",\n ...\n }\n ]\n}", "language": "javascript", "name": "200 OK" } ] } [/block] # Get a product [block:html] { "html": "<div class=\"endpoint list\">\n <span class=\"method get\">GET</span>\n <span class=\"uri\">\n\t\t/v1/store/api/products\n </span>\n</div>" } [/block] [block:code] { "codes": [ { "code": "$.get('/v1/store/api/products/70990774');", "language": "javascript" } ] } [/block] # List inventory levels [block:html] { "html": "<div class=\"endpoint\">\n <span class=\"method get\">GET</span>\n <span class=\"uri\">\n /v1/store/api/products/inventory/\n </span>\n</div>" } [/block] [block:code] { "codes": [ { "code": "$.get('/v1/store/api/products/inventory/');", "language": "javascript" } ] } [/block] [block:code] { "codes": [ { "code": "{\n count: 1,\n next: \"?page=1\",\n prev: null,\n results: [\n {\n product_id: 9853,\n product_instance_id: 9854,\n on-hand: 16\n }\n ]\n}", "language": "javascript" } ] } [/block]