---
updatedAt: 2025-08-11T18:18:17.000Z
agentTools:
  projectIndex: https://docs.keycafe.com/llms.txt
---

# Search SmartBoxes

Retrieve data for multiple SmartBoxes with a GET request to the endpoint.

If no search parameters are provided, the API will return all available SmartBoxes.

## Search by Location ID

You can filter SmartBoxes associated with a specific location by providing a location ID.

**Example**

```curl curl
curl -u 'test@yourdomain.com:{password}' "https://www.keycafe.com/v0/box?location=123456" -H "Accept: application/json"

```

## Search by Organization ID

You can also search for SmartBoxes linked to all locations within a specified organization ID.

```curl curl
curl -u 'test@yourdomain.com:{password}' "https://www.keycafe.com/v0/box?organization=123456" -H "Accept: application/json"

```

## Pagination

Results are paginated, with a maximum of 50 smart boxes per page. Additional pages can be accessed using the Link response header

```curl curl
Link: <https://www.keycafe.com/v0/box?location=123456&page=2>; rel="next", <https://www.keycafe.com/v0/box?location=123456&page=5>; rel="last"
```

* <code>rel="first"</code>: URL to retrieve the first page of results.
* <code>rel="prev"</code>: URL to retrieve the previous page of results.
* <code>rel="next"</code>: URL to retrieve the next page of results.
* <code>rel="last"</code>: URL to retrieve the final page of results.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Keycafe API",
    "version": "0"
  },
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-languages": [
    "shell",
    "python",
    "go"
  ],
  "servers": [
    {
      "url": "https://www.keycafe.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "paths": {
    "/v0/box": {
      "get": {
        "tags": [
          "Smartbox"
        ],
        "summary": "Search SmartBoxes",
        "description": "Retrieve data for multiple SmartBoxes with a GET request to the endpoint.",
        "operationId": "search-smartboxes",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "required": false,
            "description": "The ID of a location by which to filter results. </br> Example:123456",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": ""
            }
          },
          {
            "name": "organization",
            "in": "query",
            "required": false,
            "description": "The ID of an organization by which to filter results. </br> Example:123456",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of SmartBoxes matching the search query.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "integer",
                        "description": "Unique identifier of the SmartBox.",
                        "example": 123456
                      },
                      "name": {
                        "type": "string",
                        "description": "Name or label of the SmartBox device.",
                        "example": "MS100"
                      },
                      "bins": {
                        "type": "integer",
                        "description": "Number of bins (compartments) in the SmartBox.",
                        "example": 23
                      },
                      "model": {
                        "type": "string",
                        "description": "Model identifier of the SmartBox.",
                        "example": "MS100"
                      },
                      "serialNumber": {
                        "type": "string",
                        "description": "Serial number of the SmartBox.",
                        "example": "123456"
                      },
                      "lockBoxCode": {
                        "type": "string",
                        "description": "Code used to unlock the SmartBox manually.",
                        "example": "1234"
                      },
                      "powerSource": {
                        "type": "string",
                        "description": "Power source used (e.g., AC, Battery).",
                        "example": "AC"
                      },
                      "stateOfCharge": {
                        "type": "integer",
                        "description": "Current battery charge percentage.",
                        "example": 80
                      },
                      "lastStatusUpdate": {
                        "type": "string",
                        "format": "date-time",
                        "description": "Timestamp of the last status update.",
                        "example": "2019-07-01T11:56:01Z"
                      },
                      "signalStrength": {
                        "type": "integer",
                        "description": "Signal strength of the device’s network connection.",
                        "example": 79
                      },
                      "ethernet": {
                        "type": "boolean",
                        "description": "Whether Ethernet is enabled on the device.",
                        "example": false
                      },
                      "wifi": {
                        "type": "boolean",
                        "description": "Whether Wi-Fi is enabled on the device.",
                        "example": true
                      },
                      "location": {
                        "type": "object",
                        "description": "Location where the SmartBox is installed.",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "description": "Unique identifier of the location.",
                            "example": 123456
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the location.",
                            "example": "Corner Cafe"
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Result": {
                    "value": "[\n    { \"id\": 123456, \"bins\": 23, \"model\": \"MS100\", ... },\n    { \"id\": 654321, \"bins\": 23, \"model\": \"MS101\", ... }\n]"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```