Add a location or device ad hoc with the CLI

Ask about this Page
Copy for LLM
View as Markdown

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", ...}'
If your organization has created payment options with the default key set to true, a new location can have those payment options automatically associated with it. If there are no default payment options, or if the location requires special options, you can manually add them to the location. See Assign payment options to a location.

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
    • status
    • brand
    • model
    • shared
Add a device via CLIbash
node index.js create-device LOCATION_ID '{device info}'
If the device you are adding is a workstation, see Initial setup via the CLI for required fields. If your organization has created payment options with the default key set to true, a new workstation can have those payment options automatically associated with it. If there are no default payment options, or if the workstation requires special options, you can manually add them to the workstation. See Assign payment options to a workstation.

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.