{"docs":{"name":"Freshly","info":"\n<p>Another API description</p>\n","copyright":null,"doc_url":"/docs/1.0","api_url":"/api/shopify","resources":{"inventory_batch_order_items":{"doc_url":"/docs/1.0/inventory_batch_order_items","id":"inventory_batch_order_items","api_url":"/api/shopify","name":"Inventory_batch_order_items","short_description":null,"full_description":"","version":"1.0","formats":null,"metadata":null,"methods":[{"doc_url":"/docs/1.0/inventory_batch_order_items/index","name":"index","apis":[{"api_url":"/api/shopify/inventory_batch_order_items","http_method":"GET","short_description":"List of inventory batch order items based on Shopify order ID and Shopify line item ID","deprecated":null}],"formats":null,"full_description":"","errors":[{"code":401,"description":"The provided token is invalid","metadata":null},{"code":422,"description":"Could not process parameters","metadata":null}],"params":[{"name":"line_item_id","full_name":"line_item_id","description":"\n<p>Shopify line item ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"order_id","full_name":"order_id","description":"\n<p>Shopify order ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false}],"returns":[],"examples":["// invalid params\nGET /api/shopify/inventory_batch_order_items?line_item_id=37651\n422\nparam is missing or the value is empty: order_id","// invalid token\nGET /api/shopify/inventory_batch_order_items?order_id=17841&line_item_id=97368\n401\nHTTP Token: Access denied.\n","// valid token and params\nGET /api/shopify/inventory_batch_order_items?order_id=64371&line_item_id=27144\n200\n[\n  {\n    \"id\": 1597,\n    \"inventory_batch_id\": 4047,\n    \"quantity\": 2,\n    \"created_at\": \"2023-07-03 05:48:06 UTC\",\n    \"updated_at\": \"2023-07-03 05:48:06 UTC\",\n    \"order_id\": 64371,\n    \"line_item_id\": 27144\n  }\n]"],"metadata":null,"see":[],"headers":[{"name":"Authorization","description":"Bearer token","options":{"required":true}}],"show":true},{"doc_url":"/docs/1.0/inventory_batch_order_items/create","name":"create","apis":[{"api_url":"/api/shopify/inventory_batch_order_items","http_method":"POST","short_description":"Create inventory batch order item","deprecated":null}],"formats":null,"full_description":"","errors":[{"code":401,"description":"The provided token is invalid","metadata":null},{"code":422,"description":"Could not process parameters","metadata":null}],"params":[{"name":"inventory_batch_order_item","full_name":"inventory_batch_order_item","description":"","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a Hash","expected_type":"hash","metadata":null,"show":true,"validations":[],"deprecated":false,"params":[{"name":"line_item_id","full_name":"inventory_batch_order_item[line_item_id]","description":"\n<p>Shopify line item ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"order_id","full_name":"inventory_batch_order_item[order_id]","description":"\n<p>Shopify order ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"inventory_batch_id","full_name":"inventory_batch_order_item[inventory_batch_id]","description":"\n<p>Inventory batch ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"quanitity","full_name":"inventory_batch_order_item[quanitity]","description":"\n<p>Quantity</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false}]}],"returns":[],"examples":["// invalid token\nPOST /api/shopify/inventory_batch_order_items\ninventory_batch_order_item[order_id]=70424&inventory_batch_order_item[line_item_id]=23779&inventory_batch_order_item[inventory_batch_id]=4048&inventory_batch_order_item[quantity]=2\n401\nHTTP Token: Access denied.\n","// invalid params\nPOST /api/shopify/inventory_batch_order_items\ninventory_batch_order_item[quantity]=2\n422\nServer error","// valid token and params\nPOST /api/shopify/inventory_batch_order_items\ninventory_batch_order_item[order_id]=50743&inventory_batch_order_item[line_item_id]=63389&inventory_batch_order_item[inventory_batch_id]=4050&inventory_batch_order_item[quantity]=2\n201\n{\n  \"id\": 1598,\n  \"inventory_batch_id\": 4050,\n  \"quantity\": 2,\n  \"created_at\": \"2023-07-03 05:48:06 UTC\",\n  \"updated_at\": \"2023-07-03 05:48:06 UTC\",\n  \"order_id\": 50743,\n  \"line_item_id\": 63389\n}"],"metadata":null,"see":[],"headers":[{"name":"Authorization","description":"Bearer token","options":{"required":true}}],"show":true},{"doc_url":"/docs/1.0/inventory_batch_order_items/destroy","name":"destroy","apis":[{"api_url":"/api/shopify/inventory_batch_order_items/:id","http_method":"DELETE","short_description":"Delete inventory batch order item","deprecated":null}],"formats":null,"full_description":"","errors":[{"code":401,"description":"The provided token is invalid","metadata":null},{"code":404,"description":"Record not found","metadata":null}],"params":[{"name":"id","full_name":"id","description":"\n<p>Inventory batch order item ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false}],"returns":[],"examples":["// invalid id\nDELETE /api/shopify/inventory_batch_order_items/100\n404\nRecord not found","// invalid token\nDELETE /api/shopify/inventory_batch_order_items/1593\n401\nHTTP Token: Access denied.\n","// valid token and id\nDELETE /api/shopify/inventory_batch_order_items/1594\n200\nBatch removed"],"metadata":null,"see":[],"headers":[{"name":"Authorization","description":"Bearer token","options":{"required":true}}],"show":true}],"headers":null,"deprecated":null},"inventory_batches":{"doc_url":"/docs/1.0/inventory_batches","id":"inventory_batches","api_url":"/api/shopify","name":"Inventory_batches","short_description":null,"full_description":"","version":"1.0","formats":null,"metadata":null,"methods":[{"doc_url":"/docs/1.0/inventory_batches/index","name":"index","apis":[{"api_url":"/api/shopify/inventory_batches","http_method":"GET","short_description":"List of inventory batches based on pagination, search, and filter (by variant ID or location ID or both).","deprecated":null}],"formats":null,"full_description":"","errors":[{"code":401,"description":"The provided token is invalid","metadata":null}],"params":[{"name":"location_id","full_name":"location_id","description":"\n<p>Shopify location ID</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"variant_id","full_name":"variant_id","description":"\n<p>Shopify variant ID</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"page","full_name":"page","description":"\n<p>Page number</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"search","full_name":"search","description":"\n<p>Search by inventory batch batch_name, batch_number, barcode, invoice_number description or product title or variant title or barcode</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false}],"returns":[],"examples":["// invalid token\nGET /api/shopify/inventory_batches?location_id=1000&variant_id=2000&page=1&search=Inventory+Batch\n401\nHTTP Token: Access denied.\n","// valid token\nGET /api/shopify/inventory_batches?location_id=1000&variant_id=2000&page=1&search=Inventory+Batch\n200\n[\n  {\n    \"id\": 4037,\n    \"quantity\": 55,\n    \"expired_at\": null,\n    \"expiry_date\": \"2023-07-13 05:48:06 UTC\",\n    \"received_date\": \"2023-07-03 05:48:06 UTC\",\n    \"metadata\": {\n      \"batch_name\": \"Inventory Batch\"\n    },\n    \"created_at\": \"2023-07-03 05:48:06 UTC\",\n    \"updated_at\": \"2023-07-03 05:48:06 UTC\",\n    \"notified_at\": null,\n    \"discounted\": false,\n    \"location_id\": 1000,\n    \"variant_id\": 2000\n  }\n]"],"metadata":null,"see":[],"headers":[{"name":"Authorization","description":"Bearer token","options":{"required":true}}],"show":true},{"doc_url":"/docs/1.0/inventory_batches/show","name":"show","apis":[{"api_url":"/api/shopify/inventory_batches/:id","http_method":"GET","short_description":"Show inventory batch","deprecated":null}],"formats":null,"full_description":"","errors":[{"code":401,"description":"The provided token is invalid","metadata":null},{"code":404,"description":"Record not found","metadata":null}],"params":[{"name":"id","full_name":"id","description":"\n<p>Inventory batch ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false}],"returns":[],"examples":["// valid token\nGET /api/shopify/inventory_batches/4029\n200\n{\n  \"id\": 4029,\n  \"quantity\": 55,\n  \"expired_at\": null,\n  \"expiry_date\": \"2023-07-13 05:48:05 UTC\",\n  \"received_date\": \"2023-07-03 05:48:05 UTC\",\n  \"metadata\": {\n    \"batch_name\": \"Inventory Batch\"\n  },\n  \"created_at\": \"2023-07-03 05:48:05 UTC\",\n  \"updated_at\": \"2023-07-03 05:48:05 UTC\",\n  \"notified_at\": null,\n  \"discounted\": false,\n  \"location_id\": 1000,\n  \"variant_id\": 2000\n}","// invalid id\nGET /api/shopify/inventory_batches/4031\n404\nRecord not found","// invalid token\nGET /api/shopify/inventory_batches/4032\n401\nHTTP Token: Access denied.\n"],"metadata":null,"see":[],"headers":[{"name":"Authorization","description":"Bearer token","options":{"required":true}}],"show":true},{"doc_url":"/docs/1.0/inventory_batches/create","name":"create","apis":[{"api_url":"/api/shopify/inventory_batches","http_method":"POST","short_description":"Create inventory batch","deprecated":null}],"formats":null,"full_description":"","errors":[{"code":401,"description":"The provided token is invalid","metadata":null},{"code":422,"description":"Could not process parameters","metadata":null}],"params":[{"name":"enable_shopify_sync","full_name":"enable_shopify_sync","description":"\n<p>Should enable Shopify sync?</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be one of: <code>true</code>, <code>false</code>, <code>1</code>, <code>0</code>.","expected_type":"boolean","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"inventory_batch","full_name":"inventory_batch","description":"","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a Hash","expected_type":"hash","metadata":null,"show":true,"validations":[],"deprecated":false,"params":[{"name":"location_id","full_name":"inventory_batch[location_id]","description":"\n<p>Shopify location ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"variant_id","full_name":"inventory_batch[variant_id]","description":"\n<p>Shopify variant ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"quantity","full_name":"inventory_batch[quantity]","description":"\n<p>Inventory batch quantity</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"batch_name","full_name":"inventory_batch[batch_name]","description":"\n<p>Inventory batch name</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"batch_number","full_name":"inventory_batch[batch_number]","description":"\n<p>Inventory batch number</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"barcode","full_name":"inventory_batch[barcode]","description":"\n<p>Inventory batch barcode</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"invoice_number","full_name":"inventory_batch[invoice_number]","description":"\n<p>Inventory batch invoice number</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"description","full_name":"inventory_batch[description]","description":"\n<p>Inventory batch description</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"received_date","full_name":"inventory_batch[received_date]","description":"\n<p>Inventory batch received date</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false}]}],"returns":[],"examples":["// invalid params\nPOST /api/shopify/inventory_batches\ninventory_batch[quantity]=55\n422\nLocation must exist and Variant must exist","// invalid token\nPOST /api/shopify/inventory_batches\nenable_shopify_sync=true&inventory_batch[location_id]=1000&inventory_batch[variant_id]=2000&inventory_batch[quantity]=55&inventory_batch[batch_name]=batch_name&inventory_batch[batch_number]=batch_number&inventory_batch[barcode]=barcode&inventory_batch[invoice_number]=invoice_number&inventory_batch[description]=description&inventory_batch[received_date]=2023-07-03\n401\nHTTP Token: Access denied.\n","// valid token and params\nPOST /api/shopify/inventory_batches\nenable_shopify_sync=true&inventory_batch[location_id]=1000&inventory_batch[variant_id]=2000&inventory_batch[quantity]=55&inventory_batch[batch_name]=batch_name&inventory_batch[batch_number]=batch_number&inventory_batch[barcode]=barcode&inventory_batch[invoice_number]=invoice_number&inventory_batch[description]=description&inventory_batch[received_date]=2023-07-03\n201\n{\n  \"id\": 4041,\n  \"quantity\": 55,\n  \"expired_at\": null,\n  \"expiry_date\": null,\n  \"received_date\": \"2023-07-03 00:00:00 UTC\",\n  \"metadata\": {\n    \"batch_name\": \"batch_name\",\n    \"batch_number\": \"batch_number\",\n    \"barcode\": \"barcode\",\n    \"invoice_number\": \"invoice_number\",\n    \"description\": \"description\"\n  },\n  \"created_at\": \"2023-07-03 05:48:06 UTC\",\n  \"updated_at\": \"2023-07-03 05:48:06 UTC\",\n  \"notified_at\": null,\n  \"discounted\": false,\n  \"location_id\": 1000,\n  \"variant_id\": 2000\n}"],"metadata":null,"see":[],"headers":[{"name":"Authorization","description":"Bearer token","options":{"required":true}}],"show":true},{"doc_url":"/docs/1.0/inventory_batches/update","name":"update","apis":[{"api_url":"/api/shopify/inventory_batches/:id","http_method":"PUT","short_description":"Update inventory batch","deprecated":null}],"formats":null,"full_description":"","errors":[{"code":401,"description":"The provided token is invalid","metadata":null},{"code":404,"description":"Record not found","metadata":null},{"code":422,"description":"Could not process parameters","metadata":null}],"params":[{"name":"enable_shopify_sync","full_name":"enable_shopify_sync","description":"\n<p>Should enable Shopify sync?</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be one of: <code>true</code>, <code>false</code>, <code>1</code>, <code>0</code>.","expected_type":"boolean","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"inventory_batch","full_name":"inventory_batch","description":"","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a Hash","expected_type":"hash","metadata":null,"show":true,"validations":[],"deprecated":false,"params":[{"name":"location_id","full_name":"inventory_batch[location_id]","description":"\n<p>Shopify location ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"variant_id","full_name":"inventory_batch[variant_id]","description":"\n<p>Shopify variant ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"quantity","full_name":"inventory_batch[quantity]","description":"\n<p>Inventory batch quantity</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"batch_name","full_name":"inventory_batch[batch_name]","description":"\n<p>Inventory batch name</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"batch_number","full_name":"inventory_batch[batch_number]","description":"\n<p>Inventory batch number</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"barcode","full_name":"inventory_batch[barcode]","description":"\n<p>Inventory batch barcode</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"invoice_number","full_name":"inventory_batch[invoice_number]","description":"\n<p>Inventory batch invoice number</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"description","full_name":"inventory_batch[description]","description":"\n<p>Inventory batch description</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false},{"name":"received_date","full_name":"inventory_batch[received_date]","description":"\n<p>Inventory batch received date</p>\n","required":false,"allow_nil":false,"allow_blank":false,"validator":"Must be a String","expected_type":"string","metadata":null,"show":true,"validations":[],"deprecated":false}]}],"returns":[],"examples":["// valid token and params\nPUT /api/shopify/inventory_batches/4025\ninventory_batch[quantity]=56&inventory_batch[location_id]=1000&inventory_batch[variant_id]=2000\n200\n{\n  \"id\": 4025,\n  \"quantity\": 56,\n  \"expired_at\": null,\n  \"expiry_date\": \"2023-07-13 05:48:05 UTC\",\n  \"received_date\": \"2023-07-03 05:48:05 UTC\",\n  \"metadata\": {\n    \"batch_name\": \"Inventory Batch\"\n  },\n  \"created_at\": \"2023-07-03 05:48:05 UTC\",\n  \"updated_at\": \"2023-07-03 05:48:05 UTC\",\n  \"notified_at\": null,\n  \"discounted\": false,\n  \"location_id\": 1000,\n  \"variant_id\": 2000\n}","// invalid params\nPUT /api/shopify/inventory_batches/4026\ninventory_batch[quantity]=56\n422\nLocation must exist and Variant must exist","// invalid id\nPUT /api/shopify/inventory_batches/100\ninventory_batch[quantity]=56&inventory_batch[location_id]=1000&inventory_batch[variant_id]=2000\n404\nRecord not found","// invalid token\nPUT /api/shopify/inventory_batches/4028\ninventory_batch[location_id]=1000&inventory_batch[variant_id]=2000&inventory_batch[quantity]=56&inventory_batch[batch_name]=batch_name&inventory_batch[batch_number]=batch_number&inventory_batch[barcode]=barcode&inventory_batch[invoice_number]=invoice_number&inventory_batch[description]=description&inventory_batch[received_date]=2023-07-03\n401\nHTTP Token: Access denied.\n"],"metadata":null,"see":[],"headers":[{"name":"Authorization","description":"Bearer token","options":{"required":true}}],"show":true},{"doc_url":"/docs/1.0/inventory_batches/destroy","name":"destroy","apis":[{"api_url":"/api/shopify/inventory_batches/:id","http_method":"DELETE","short_description":"Delete inventory batch","deprecated":null}],"formats":null,"full_description":"","errors":[{"code":401,"description":"The provided token is invalid","metadata":null},{"code":404,"description":"Record not found","metadata":null}],"params":[{"name":"id","full_name":"id","description":"\n<p>Inventory batch ID</p>\n","required":true,"allow_nil":false,"allow_blank":false,"validator":"Must be a Integer","expected_type":"numeric","metadata":null,"show":true,"validations":[],"deprecated":false}],"returns":[],"examples":["// invalid id\nDELETE /api/shopify/inventory_batches/100\n404\nRecord not found","// valid token\nDELETE /api/shopify/inventory_batches/4034\n200\nInventory batch deleted","// invalid token\nDELETE /api/shopify/inventory_batches/4035\n401\nHTTP Token: Access denied.\n"],"metadata":null,"see":[],"headers":[{"name":"Authorization","description":"Bearer token","options":{"required":true}}],"show":true}],"headers":null,"deprecated":null},"shops":{"doc_url":"/docs/1.0/shops","id":"shops","api_url":"/api/shopify","name":"Shops","short_description":null,"full_description":"","version":"1.0","formats":null,"metadata":null,"methods":[{"doc_url":"/docs/1.0/shops/show","name":"show","apis":[{"api_url":"/api/shopify/shop","http_method":"GET","short_description":"get current Shop","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"returns":[],"examples":["// invalid token\nGET /api/shopify/shop\n401\nHTTP Token: Access denied.\n","// valid token\nGET /api/shopify/shop\n200\n{\n  \"name\": \"shopify store\",\n  \"shopify_domain\": \"44733.myshopify.com\"\n}"],"metadata":null,"see":[],"headers":[{"name":"Authorization","description":"Bearer token","options":{"required":true}}],"show":true}],"headers":null,"deprecated":null}}}}