Add a single location or device to an existing location using the InStore device command-line interface (CLI).
You can use the InStore device CLI to add a location or device directly to your system. This method is useful for quick, ad hoc additions without using the InStore Center application.
Add a location using the CLI
- Complete the initial setup as described in Initial setup via the CLI.
- Run the following command, replacing the JSON string with the required location information:
node index.js create-location '{"location_id": "12345", "location_name": "Test Store", ...}'
Add a device using the CLI
-
Complete the initial setup as described in Initial setup via the CLI.
-
Run the following command, replacing
LOCATION_ID
with the identifier of an existing location and{device info}
with the required device fields:name
type
description
status
brand
model
location_id
shared
node index.js create-device LOCATION_ID '{device info}'
Example
node index.js create-device 44444 '{"name": "Epson TM88VI Printer", "type": "Printer", "description": "Printer 1", "status": "Active", "brand": "Epson", "model": "m1", "shared": true, "proxy_address": "127.0.0.1", "ip_address": "127.0.0.1"}'
You cannot delete a device from a location programmatically using the CLI. To delete a device, use the InStore Center if the device is eligible for deletion.