Api Reference
Scope: Workspace-scoped — requires authenticated organization context and valid credentials for that workspace.
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):
1{2 "type": "all-products",3 "products": [4 {5 "productMasterId": "prod_123",6 "sku": "SKU-123",7 "productName": "Product Name",8 "locationId": "loc_123",9 "lastCountedDate": "2024-01-01",10 "nextCountDate": "2024-02-01",11 "isOverdue": false,12 "abcClass": "A",13 "currentQty": 20014 }15 ],16 "count": 50,17 "overdueCount": 518}Response (Batches Mode):
1{2 "type": "batches",3 "batches": [4 {5 "id": "batch_123",6 "locationId": "loc_123",7 "status": "IN_PROGRESS",8 "assigneeId": "user_456",9 "createdAt": "2024-01-15T10:00:00Z",10 "itemCount": 2511 }12 ],13 "count": 314}Response (ABC Config Mode):
1{2 "config": {3 "aPercent": 80,4 "bPercent": 15,5 "cPercent": 5,6 "aFrequencyDays": 30,7 "bFrequencyDays": 60,8 "cFrequencyDays": 909 }10}1curl -X GET "https://app.betterdata.co/api/inventory/cycle-count?locationId=loc_123&mode=all-products&abcClass=A" \2 -H "Authorization: Bearer YOUR_API_KEY" \3 -H "Content-Type: application/json"1curl -X GET "https://app.betterdata.co/api/inventory/cycle-count?locationId=loc_123&mode=batches&status=IN_PROGRESS" \2 -H "Authorization: Bearer YOUR_API_KEY" \3 -H "Content-Type: application/json"1curl -X GET "https://app.betterdata.co/api/inventory/cycle-count?mode=abc-config" \2 -H "Authorization: Bearer YOUR_API_KEY" \3 -H "Content-Type: application/json"Creating and completing cycle counts requires inventory management permissions.
