Add a location or device ad hoc with the CLI

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.
Alternatively, you can add locations and devices manually in the InStore Center.

Add a location using the CLI

  1. Complete the initial setup as described in Initial setup via the CLI.
  2. Run the following command, replacing the JSON string with the required location information:
Add a location via CLIbash
node index.js create-location '{"location_id": "12345", "location_name": "Test Store", ...}'

Add a device using the CLI

  1. Complete the initial setup as described in Initial setup via the CLI.
  2. 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
Add a device via CLIbash
node index.js create-device LOCATION_ID '{device info}'

Example

Example: Add a printer devicebash
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.