Cycle Counts API
Scope: Tenant-scoped; requires authenticated org context
Availability: Not available in SuperAdmin
Endpoints
Get Cycle Count Data
GET /api/inventory/cycle-count
Get cycle count data in different modes: all products, batches, to-resolve items, suggestions, or ABC config.
Query Parameters:
| Parameter | Type | Required | Description |
|---|
locationId | string | Yes* | Location ID (required unless mode=abc-config) |
mode | string | No | Data mode: all-products, batches, to-resolve, suggestions, abc-config (default: all-products) |
search | string | No | Search filter (for all-products mode) |
categoryId | string | No | Category filter (for all-products mode) |
binId | string | No | Bin filter (for all-products mode) |
abcClass | string | No | ABC class filter (for all-products mode) |
showOverdueOnly | boolean | No | Only show overdue items (for all-products mode) |
status | string | No | Batch status filter (for batches mode) |
assigneeId | string | No | Filter by assignee (for batches mode) |
includeCompleted | boolean | No | Include completed batches (for batches mode) |
Response (All Products Mode):
{
"type": "all-products",
"products": [
{
"productMasterId": "prod_123",
"sku": "SKU-123",
"productName": "Product Name",
"locationId": "loc_123",
"lastCountedDate": "2024-01-01",
"nextCountDate": "2024-02-01",
"isOverdue": false,
"abcClass": "A",
"currentQty": 200
}
],
"count": 50,
"overdueCount": 5
}
Response (Batches Mode):
{
"type": "batches",
"batches": [
{
"id": "batch_123",
"locationId": "loc_123",
"status": "IN_PROGRESS",
"assigneeId": "user_456",
"createdAt": "2024-01-15T10:00:00Z",
"itemCount": 25
}
],
"count": 3
}
Response (ABC Config Mode):
{
"config": {
"aPercent": 80,
"bPercent": 15,
"cPercent": 5,
"aFrequencyDays": 30,
"bFrequencyDays": 60,
"cFrequencyDays": 90
}
}
Example Requests
Get All Products for Cycle Count
curl -X GET "https://app.betterdata.co/api/inventory/cycle-count?locationId=loc_123&mode=all-products&abcClass=A" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Get Cycle Count Batches
curl -X GET "https://app.betterdata.co/api/inventory/cycle-count?locationId=loc_123&mode=batches&status=IN_PROGRESS" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Get ABC Configuration
curl -X GET "https://app.betterdata.co/api/inventory/cycle-count?mode=abc-config" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Related Pages
Permissions & Roles
Creating and completing cycle counts requires inventory management permissions.