Add a location or device ad hoc with the CLI

Use our command-line interface to add a location or a device to an existing location.

Overview

An alternative method is to use the InStore Center application to manually add an individual location or device. See these topics for background on adding locations and devices.

Create one location via the CLI

  1. Set up the CLI as described in Initial setup via the CLI.
  2. Run a command with a JSON string that contains the required location information:

node index.js create-location '{"location_id":"12345","location_name":"Test Store",...}'

Create one device via the CLI

  1. Set up the CLI as described in Initial setup via the CLI.
  2. Run a command with a JSON string that contains the required location fields: name, type, description, status, brand, model, location_id, and shared.
node index.js create-device LOCATION_ID '{device info}'
Where LOCATION_ID is the identifier for a location that already exists and device info is modeled in the example.

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. In the InStore Center, you can manually delete a device if it is eligible for deletion. See Devices.