Skip to main content
POST

Authorizations

Authorization
string
header
required

Authenticate using a bearer token. To create a token, navigate to /settings/api-tokens and click Create API Token.

Body

application/json

Request body for creating a cycle count batch. Scope Type A (location, the default): warehouse_ids is required. Optionally narrow to specific bins with location_ids (which requires count_mode: bin_location). Scope Type B (item, requires the CS_8871_CYCLE_COUNT_LOCATION_SCOPE feature flag): supply product_ids or lot_ids instead. warehouse_ids becomes an optional narrowing filter — omit it to count every warehouse where the selection has stock.

name
string | null
scope_type
enum<string>
default:location
Available options:
location,
item
warehouse_ids
integer[]

Required unless scope_type=item (then an optional narrowing filter).

location_ids
integer[]

Requires count_mode: bin_location.

product_ids
integer[]

Scope Type B "Products" sub-mode.

lot_ids
integer[]

Scope Type B "Lots" sub-mode.

category_ids
integer[]
sub_category_id
integer | null
preferred_vendor_ids
integer[]
count_mode
enum<string>
default:sku
Available options:
sku,
bin_location
is_blind_count
boolean
default:false

When true, counters do not see expected quantities. If the tenant setting "Require blind cycle counts" is enabled, every new batch is created blind regardless of this value (a false value is overridden, not rejected).

include_discontinued
boolean
default:false
include_archived
boolean
default:false
include_inactive
boolean
default:false
include_zero_qty
boolean
default:false
remarks
string | null

Response

Created. Returns the batch with its per-warehouse sessions. May include a non-blocking warning when some selected products/lots had no stock.

A cycle count batch — the top-level grouping created by POST /pickflow/cycle-counts. A batch fans out into one session per warehouse in scope (see sessions).

id
integer
uuid
string
name
string | null
scopeType
enum<string>

location (Scope Type A) counts whole warehouses/bins; item (Scope Type B) counts specific products or lots. Item scope requires the CS_8871_CYCLE_COUNT_LOCATION_SCOPE feature flag.

Available options:
location,
item
countMode
enum<string>
Available options:
sku,
bin_location
isBlindCount
boolean

When true, counters do not see the expected quantity while counting.

categoryId
integer | null
subCategoryId
integer | null
preferredVendorId
integer | null
productIds
integer[] | null
lotIds
integer[] | null
products
object[] | null

Resolved item-scope product selections as human-readable names. Present only on single-batch responses (create / batch detail); the paginated batch list omits it (no per-row lookup).

lots
object[] | null

Resolved item-scope lot selections as human-readable names. Present only on single-batch responses (create / batch detail); the paginated batch list omits it (no per-row lookup).

remarks
string | null
createdBy
integer
createdAt
string<date-time>
updatedAt
string<date-time>
sessions
object[]

The per-warehouse sessions belonging to this batch.

sessionsCount
integer

Total number of sessions in the batch. Present on the batch list/detail endpoints (redundant with sessions.length when the full collection is also returned).

warning
string

Present only on the create response when scope_type=item and some selected products/lots had no stock and were dropped from the count.