SmartPill Device API Usage Guide

Follow these steps to interact with your devices and slots using the API.

  1. 🖊
    Create Device: POST /api/devices/create
    Create a new device by providing name and unique mac address.
  2. 📄
    List Devices: GET /devices
    Retrieve all registered devices.
  3. 🔔
    Ping Device: POST /api/devices/{mac}/ping
    Ping a device by its MAC address to update its status.
  4. 📋
    Get Device Slots: GET /api/devices/{mac}/slots
    Retrieve all non-deleted slots for a device. This also resets the istoupdate flag.
  5. Randomize Slots: POST /api/devices/{mac}/randomize-slots
    Periodically call this to randomize and update slot configurations for a device. This sets istoupdate to true and updates updated_at.
View Full API Documentation