Get Inventory Discrepancy Stats
GET/api/veracore/integration-instances/:integration_instance/inventory/discrepancy-stats
Totals over the same filtered discrepancy set the discrepancies endpoint pages through.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
items is how many discrepancies match, impact is the summed absolute gap priced at unit cost, and shortfalls / surpluses split those items by direction (shortfall = SKU.io believes it holds more than the warehouse does).
Call this instead of adding up a page. The aggregation runs in SQL over the whole filtered set, so passing the same warehouse_id and filters as the list gives headline figures that agree with what the list is showing rather than with its first 15 rows.
Every filter the discrepancies endpoint accepts is accepted here; page, per_page and sort are not — there are no rows to order.
Filters
Every filterable column takes an operator suffix, e.g. filter[sku.contains]=WID. The bare form (filter[sku]=WID-BLU-12) is equivalent to .is.
- Text operators:
is,is_not,contains,does_not_contain,is_one_of,is_not_one_of,starts_with,does_not_start_with,ends_with,does_not_end_with,is_empty,is_not_empty. - Numeric operators:
is,is_not,is_one_of,is_not_one_of,greater_than,less_than,greater_than_or_equal,less_than_or_equal,between,is_empty,is_not_empty. - Datetime operators:
is,is_not,before,after,on_or_before,on_or_after,between,is_empty,is_not_empty, plus the relative operatorstoday,yesterday,tomorrow,past_week,past_month,past_year,next_week,next_month,next_year.
Advanced filter groups
Instead of flat keys, clients may send a base64-encoded filter_groups tree, nesting AND/OR groups over the same columns. Unregistered columns inside the tree are silently ignored.
- Text columns:
sku,product_name,type,veracore_product_id,veracore_title,sku_warehouse_name,veracore_warehouse_id,veracore_warehouse_name. - Numeric columns:
unit_cost,sku_inventory,veracore_inventory,discrepancy,discrepancy_value,component_count. - Datetime columns:
last_synced_at. filter[direction]takesshortfallorsurplus;filter[sku_warehouse_id]takes one id or a comma-separated list.
Errors
404when the integration instance does not exist or is not a Veracore instance.
Authentication: Requires Bearer token.
Request
Responses
- 200
- 401
- 403
- 404
- 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.
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.