Create Stock Take From Discrepancies
POST/api/veracore/integration-instances/:integration_instance/inventory/create-stock-take
Turn the discrepancy report into a stock take that brings SKU.io in line with what the warehouse actually holds.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Only mapped, single-product, mapped-warehouse discrepancies are eligible; multi-product offers are skipped because their reported balance is the minimum across components rather than a countable quantity. included_count and skipped_count say how the selection resolved, and total_value_adjustment is the signed cost impact of applying it.
Body fields
product_ids(array of integers, optional) — SKU.io product ids to include. These are product ids, not inventory row ids, because the discrepancy report is keyed on the mapped product. Omit or send an empty array to mean "every eligible discrepancy".warehouse_id(integer, optional) — restrict the stock take to one SKU.io warehouse.status(string, optional) — one ofdraft,open,closed. Defaults todraft.openstarts the count immediately;closedstarts and finalises it in one call.date(date, optional) — stock take date. Defaults to today.notes(string, optional, max 1000) — free text carried onto the stock take.
Selecting "everything" safely
When product_ids is empty the server resolves the selection itself by re-running the discrepancy query. Any filter the discrepancy list accepts may be appended to this request's query string, and the selection is narrowed the same way — so "apply to all" means everything currently matching those filters, not the whole warehouse. Send no filters to select the entire eligible set.
Errors
422when nothing is eligible, or when the selection spans more than one warehouse and nowarehouse_idwas supplied — a stock take counts one warehouse at a time.422when the Veracore facility behind the selection has no SKU.io warehouse mapped to it.404when the integration instance does not exist or is not a Veracore instance.
Authentication: Requires Bearer token.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.