> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getply.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getply.com/_mcp/server.

# List Inventory Counts

GET https://api.getply.com/api/v1/inventory-counts

Returns a paginated list of inventory count sessions for the authenticated
business. Optionally filter by status. Invalid status values return a
`400` with a friendly error listing valid values.

Requires scope: `inventory_counts:read`

Reference: https://docs.getply.com/api-reference/api-reference/inventory-counts/list

## Authentication

- `API_KEY` header (required) — API Key authentication via header

## Servers

- `https://api.getply.com` (production, default)
- `https://sandbox-api.getply.com` (sandbox)

## Request

### Query parameters

- `page` (integer, optional) — Zero-based page index. Defaults to `0`.
- `size` (integer, optional) — Items per page. Defaults to `20`, maximum `100`.
- `status` (enum, optional) — Filter by status. Returns `400` with a list of valid values if an unrecognized status is provided.
  - Allowed values: `PLANNED`, `NOT_STARTED`, `IN_PROGRESS`, `PENDING`, `COMPLETED`
- `sort` (string, optional) — Sort by `field,direction` (Spring Pageable format; direction `asc` or `desc`, default `asc`). Allowed fields: id, status, period, startDate, dueDate, active, canceled, createdAt, updatedAt. Default order (when no sort is supplied): `updatedAt,desc`.

## Response

### 200

- `data` (list of InventoryCount, required)
- `pagination` (PaginationMeta, required) — Pagination metadata returned on all list endpoints.

## Errors

### 400 Bad Request Error

The request was malformed or failed validation. Check the `message` field for details on which fields are invalid.

- `code` (string, required) — Machine-readable error code (e.g. `NOT_FOUND`, `VALIDATION_ERROR`).
- `message` (string, required) — Human-readable description of what went wrong.
- `status` (integer, required) — HTTP status code.
- `timestamp` (string, required) — ISO 8601 timestamp when the error occurred (e.g. `2026-03-20T14:30:00`).
- `path` (string, required) — The request path that triggered the error.

### 401 Unauthorized Error

The `API_KEY` header is missing or the key is invalid. Verify your API key in the Ply dashboard under Settings > Workspace > API Keys.

- `code` (string, required) — Machine-readable error code (e.g. `NOT_FOUND`, `VALIDATION_ERROR`).
- `message` (string, required) — Human-readable description of what went wrong.
- `status` (integer, required) — HTTP status code.
- `timestamp` (string, required) — ISO 8601 timestamp when the error occurred (e.g. `2026-03-20T14:30:00`).
- `path` (string, required) — The request path that triggered the error.

### 403 Forbidden Error

The authenticated API key does not have permission to perform this action.

- `code` (string, required) — Machine-readable error code (e.g. `NOT_FOUND`, `VALIDATION_ERROR`).
- `message` (string, required) — Human-readable description of what went wrong.
- `status` (integer, required) — HTTP status code.
- `timestamp` (string, required) — ISO 8601 timestamp when the error occurred (e.g. `2026-03-20T14:30:00`).
- `path` (string, required) — The request path that triggered the error.

### 429 Rate Limit Error

You have exceeded the rate limit. Two limits apply, both pooled per business — creating additional API keys does not raise either: - 60 requests per minute - 10,000 requests per day Any response that passes authentication carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`; requests rejected earlier, such as a missing key or a missing scope, carry none of them. On a `429`, wait the number of seconds given in `Retry-After` before retrying, and back off further if you get a second one.

- `code` (string, required) — Machine-readable error code (e.g. `NOT_FOUND`, `VALIDATION_ERROR`).
- `message` (string, required) — Human-readable description of what went wrong.
- `status` (integer, required) — HTTP status code.
- `timestamp` (string, required) — ISO 8601 timestamp when the error occurred (e.g. `2026-03-20T14:30:00`).
- `path` (string, required) — The request path that triggered the error.

## Types

### InventoryCount

An inventory count session for a specific location.

- `id` (UUID, required) — Unique identifier for the inventory count.
- `status` (enum, required) — Current status of the count session.
  - Allowed values: `PLANNED`, `NOT_STARTED`, `IN_PROGRESS`, `PENDING`, `COMPLETED`
- `period` (integer, required) — Count period number (e.g. cycle or iteration index).
- `active` (boolean, required) — Whether the count session is currently active.
- `canceled` (boolean, required) — Whether the count session has been cancelled.
- `assignedUserIds` (list of UUID, required) — IDs of users assigned to this count session.
- `createdAt` (datetime, required) — ISO 8601 timestamp when the session was created.
- `updatedAt` (datetime, required) — ISO 8601 timestamp when the session was last updated.
- `location` (ResourceRef, optional) — Reference to the location being counted.
- `startDate` (date, optional) — Scheduled start date for the count (ISO 8601 date, e.g. `2026-03-15`).
- `dueDate` (date, optional) — Due date for completing the count (ISO 8601 date, e.g. `2026-03-22`).

### PaginationMeta

Pagination metadata returned on all list endpoints.

- `page` (integer, required) — Zero-based page index of the current result set.
- `size` (integer, required) — Number of items per page actually applied — the page's capacity, not the number of rows it happens to contain, so a final partial page still reports the full size. When you supply a valid `size` this is that value, because requests above the maximum are rejected rather than reduced: a truncated page can never be reported as a full one. When you omit `size` it is the default of 20.
- `totalElements` (long, required) — Total number of items matching the query across all pages.
- `totalPages` (integer, required) — Total number of pages available.

### ResourceRef

A reference to a related resource, containing its ID and display name.

- `id` (UUID, required) — Unique identifier of the referenced resource.
- `name` (string, optional) — Human-readable display name.

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "a3b4c5d6-e7f8-9012-abcd-ef3456789012",
      "status": "IN_PROGRESS",
      "period": 1,
      "active": true,
      "canceled": false,
      "assignedUserIds": [
        "e1f2a3b4-c5d6-7890-efab-901234567890"
      ],
      "createdAt": "2026-03-15T07:00:00",
      "updatedAt": "2026-03-20T11:00:00",
      "location": {
        "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
        "name": "Main Warehouse"
      },
      "startDate": "2026-03-15",
      "dueDate": "2026-03-22"
    }
  ],
  "pagination": {
    "page": 0,
    "size": 20,
    "totalElements": 1,
    "totalPages": 1
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.getply.com/api/v1/inventory-counts"

headers = {"API_KEY": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.getply.com/api/v1/inventory-counts';
const options = {method: 'GET', headers: {API_KEY: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getply.com/api/v1/inventory-counts"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("API_KEY", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.getply.com/api/v1/inventory-counts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["API_KEY"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.getply.com/api/v1/inventory-counts")
  .header("API_KEY", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.getply.com/api/v1/inventory-counts', [
  'headers' => [
    'API_KEY' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.getply.com/api/v1/inventory-counts");
var request = new RestRequest(Method.GET);
request.AddHeader("API_KEY", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["API_KEY": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getply.com/api/v1/inventory-counts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```