Create Stock Take From Discrepancies
POST/api/shiphero/integration-instances/:integration_instance/inventory/create-stock-take
Create a SKU.io stock take from the selected ShipHero inventory discrepancies. The stock take counts each product at its ShipHero on-hand quantity.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
| product_ids | array of integers | optional | Product IDs to include. Each must exist in products. Empty array (or omitted) = "stock take all": every visible discrepancy is included (kits excluded by default — see include_kits). |
| warehouse_id | integer | optional | Warehouse to scope discrepancies to. Must exist in warehouses. Defaults to the first mapped warehouse. |
| notes | string | optional | Custom notes (max 500 chars). Defaults to an auto-generated note referencing the warehouse. |
| date | string | optional | Stock take date in Y-m-d format. Defaults to today. |
| status | string | optional | One of draft, open, closed. Defaults to draft. open initiates the count; closed initiates and finalizes it. |
| include_kits | boolean | optional | Default false. Only meaningful for a "stock take all" (empty product_ids). ShipHero reports 0 on hand for kit SKUs (inventory lives on the components), so kits are excluded by default to avoid zeroing out their SKU.io on-hand inventory. Set true to include them anyway; excluded_kit_count in the response will then be 0. |
Response (data):
| Field | Type | Description |
|---|---|---|
| stock_take | object | The created stock take record. |
| stock_take_url | string | Tenant URL to the stock take detail page (/v2/inventory/stock-takes/{id}). |
| selected_count | integer | Number of discrepancies included in the stock take. |
| total_value_adjustment | string | Sum of discrepancy values, formatted to 2 decimal places. |
| excluded_kit_count | integer | Number of kit SKUs excluded from a "stock take all" (0 when include_kits is true or when specific product_ids were given). |
Errors: Returns 422 with a message when no warehouse mapping exists, no discrepancies match the criteria, or the specified warehouse is not mapped.
Authentication: Requires Bearer token.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
Successful response
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.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.