Skip to main content

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.

Not yet available to API tokens

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 of draft, open, closed. Defaults to draft. open starts the count immediately; closed starts 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

  • 422 when nothing is eligible, or when the selection spans more than one warehouse and no warehouse_id was supplied — a stock take counts one warehouse at a time.
  • 422 when the Veracore facility behind the selection has no SKU.io warehouse mapped to it.
  • 404 when the integration instance does not exist or is not a Veracore instance.

Authentication: Requires Bearer token.

Request

Responses

OK

Response Headers
    Content-Type