# List storage stays of company devices, newest first

**GET** `/storage-stays`

## Parameters

### `limit` (_query_, optional)

Page size (max 100)

- **Type:** `integer`
- **Default:** `50`
- **Example:** `50`
- **Constraints:** >= 1, <= 100

### `offset` (_query_, optional)

Number of items to skip

- **Type:** `integer`
- **Default:** `0`
- **Example:** `0`
- **Constraints:** >= 0

### `device_id` (_query_, optional)

Filter by device id

- **Type:** `integer`
- **Example:** `12`
- **Constraints:** > 0

### `status` (_query_, optional)

ACTIVE: stored at Fleet. ENDING: on its way back. ENDED: delivered back. CANCELLED: never stored.

- **Type:** `string`
- **Enum:** `"ACTIVE"`, `"ENDING"`, `"ENDED"`, `"CANCELLED"`

## Responses

### 200

Paginated storage stays

**application/json**

_Schema ref:_ `#/components/schemas/ListStorageStaysResponse` (ListStorageStaysResponse)

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "nullable": true,
        "properties": {
          "id": {
            "type": "integer"
          },
          "device_id": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "ENDING",
              "ENDED",
              "CANCELLED"
            ],
            "description": "ACTIVE: stored at Fleet. ENDING: on its way back. ENDED: delivered back. CANCELLED: never stored."
          },
          "country_code": {
            "type": "string",
            "nullable": true,
            "description": "Country of the Fleet storage (ISO alpha-2)"
          },
          "factory_reset": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the device was factory reset on intake"
          },
          "quality": {
            "type": "string",
            "nullable": true,
            "description": "Condition graded on intake"
          },
          "inbound_parcel_id": {
            "type": "integer",
            "nullable": true,
            "description": "Shipment to the storage; listed in the device parcels"
          },
          "outbound_parcel_id": {
            "type": "integer",
            "nullable": true,
            "description": "Shipment out of the storage; listed in the device parcels"
          },
          "started_at": {
            "type": "string",
            "nullable": true
          },
          "ended_at": {
            "type": "string",
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "nullable": true
          },
          "updated_at": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id",
          "device_id",
          "status",
          "country_code",
          "factory_reset",
          "quality",
          "inbound_parcel_id",
          "outbound_parcel_id",
          "started_at",
          "ended_at",
          "created_at",
          "updated_at"
        ],
        "description": "Current storage stay (ACTIVE or ENDING); past stays are listed by GET /storage-stays?device_id="
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "description": "Total items matching filters (before paging)",
          "example": 42
        },
        "limit": {
          "type": "integer",
          "description": "Page size used for this response",
          "example": 50
        },
        "offset": {
          "type": "integer",
          "description": "Offset used for this response",
          "example": 0
        }
      },
      "required": [
        "total",
        "limit",
        "offset"
      ]
    }
  },
  "required": [
    "data",
    "meta"
  ]
}
```

### 400

Validation error

**application/json**

_Schema ref:_ `#/components/schemas/ValidationErrorResponse` (ValidationErrorResponse)

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string",
      "description": "Every validation failure, comma-separated",
      "example": "Required, must be an ISO 3166-1 alpha-2 country code"
    },
    "type": {
      "type": "string",
      "enum": [
        "validation_error"
      ]
    },
    "error": {
      "type": "string",
      "enum": [
        "validation_error"
      ]
    }
  },
  "required": [
    "message",
    "type",
    "error"
  ]
}
```

### 401

Missing, invalid, or revoked API key

**text/plain**

```json
{
  "type": "string",
  "example": "Unauthorized"
}
```

### 429

Rate limit exceeded. The RateLimit-* headers give the limit and the reset time.

**text/plain**

```json
{
  "type": "string",
  "example": "Too many requests, please try again later."
}
```

### 500

Unexpected server error

**application/json**

_Schema ref:_ `#/components/schemas/InternalErrorResponse` (InternalErrorResponse)

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "enum": [
        "INTERNAL_ERROR"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 503

Rate limiting is temporarily unavailable; retry with backoff

**application/json**

_Schema ref:_ `#/components/schemas/RateLimiterUnavailableResponse` (RateLimiterUnavailableResponse)

```json
{
  "type": "object",
  "properties": {
    "message": {
      "type": "string"
    }
  },
  "required": [
    "message"
  ]
}
```

## Security

```json
[
  {
    "bearerAuth": []
  }
]
```

**bearerAuth:** Bearer token using a Fleet platform API key (flt_sk_…).

---

_Generated from the OpenAPI specification for raw Markdown / tooling use._
