Stock takes
The stock takes API allows you to create, view, update, and delete individual, or a batch, of stock takes. A stock take lists the products (or inventories, when Multi-Inventory is active) to count, with their stock and the counted quantities.
The requests need a user with the Stock Takes capabilities: read_stock_takes to list, read_stock_take, create_stock_takes, edit_stock_take and delete_stock_take for the single stock takes, and edit_others_stock_takes for the batch requests.
Stock take properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Unique identifier for the resource. read-only |
status | string | Stock take status. Options: draft (Counting), publish (Reconciled) and trash. Default is draft. |
title | string | Stock take title. If it's empty, a title with the creation date is shown in the admin. |
items_added | integer | Number of items added to the stock take. |
items_counted | integer | Number of items that were already counted. |
total_stock | number | Sum of the current stock of all the items. |
total_count | number | Sum of the counted quantities of all the items. |
total_value | number | Value of the current stock of all the items (stock × purchase price). |
count_value | number | Value of the counted quantities of all the items (count × purchase price). |
count_difference | number | Difference between the total count and the total stock. |
value_difference | number | Difference between the count value and the total value. |
date_created | date-time | The date the stock take was created, in the site's timezone. |
date_created_gmt | date-time | The date the stock take was created, as GMT. |
date_modified | date-time | The date the stock take was last modified, in the site's timezone. read-only |
date_modified_gmt | date-time | The date the stock take was last modified, as GMT. read-only |
date_reconciled | date-time | The date the stock take was reconciled, in the site's timezone. |
date_reconciled_gmt | date-time | The date the stock take was reconciled, as GMT. |
author_id | integer | User ID who created the stock take. write-only |
line_items | array | Stock take items data. See Stock take - Line items properties |
meta_data | array | Meta data. See Stock take - Meta data properties |
The totals (from items_added to value_difference) are calculated from the line items every time the stock take is loaded, so any value sent for them is overwritten. The stock and the values are taken from the current stock and purchase price of the related products or inventories.
Stock take - Line items properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Stock take item ID. Pass it to update or delete an existing item. read-only |
item_id | integer | Related item ID (product ID or inventory ID). |
st_id | integer | Stock take ID. read-only |
stock | number | The item stock quantity. |
count | number | The items counted. |
reconciled | boolean | Whether the item has been reconciled. Default is false. |
parent_id | integer | The item's parent ID (if applicable). If it's not set, it's filled automatically with the parent product of a variation or with the product an inventory belongs to. |
is_inventory | boolean | Whether the related item is an inventory. It's returned as 0 or 1. Default is false. Multi-Inventory |
delete | boolean | To delete an item, pass this prop as true with the item ID to remove. write-only |
meta_data | array | Item meta data. read-only |
Stock take - Meta data properties
| Attribute | Type | Description |
|---|---|---|
id | integer | Meta ID. read-only |
key | string | Meta key. |
value | mixed | Meta value. |
The reconciliation (updating the stock of the products with the counted quantities) can only be run from the Stock Takes screens in the WordPress admin. Setting status to publish or reconciled to true through the API doesn't change the stock of the products.
Create a stock take
This API helps you to create a new stock take.
HTTP request
/wp-json/wc/v3/atum/stock-takesExample of how to create a stock take with two products
curl -X POST https://example.com/wp-json/wc/v3/atum/stock-takes \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"title": "Warehouse A - Monthly count",
"line_items": [
{
"item_id": 93,
"stock": 10,
"count": 8
},
{
"item_id": 37,
"stock": 20
}
]
}'{
"meta_data": [],
"id": 2150,
"status": "draft",
"items_added": 2,
"items_counted": 1,
"total_stock": "30.00",
"total_count": "8.00",
"total_value": "170.00",
"count_value": "40.00",
"count_difference": -22,
"value_difference": "-130.00",
"line_items": [
{
"id": 1021,
"item_id": 93,
"st_id": 2150,
"stock": 10,
"count": 8,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
},
{
"id": 1022,
"item_id": 37,
"st_id": 2150,
"stock": 20,
"count": null,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
}
],
"date_created": "2026-10-30T09:12:40",
"title": "Warehouse A - Monthly count",
"date_modified": "2026-10-30T09:12:40",
"date_reconciled": null,
"date_reconciled_gmt": null,
"date_created_gmt": "2026-10-30T08:12:40",
"date_modified_gmt": "2026-10-30T08:12:40",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes/2150"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes"
}
]
}
}Retrieve a stock take
This API lets you retrieve and view a specific stock take.
HTTP request
/wp-json/wc/v3/atum/stock-takes/<id>curl https://example.com/wp-json/wc/v3/atum/stock-takes/2150 \
-u consumer_key:consumer_secret{
"meta_data": [],
"id": 2150,
"status": "draft",
"items_added": 2,
"items_counted": 1,
"total_stock": "30.00",
"total_count": "8.00",
"total_value": "170.00",
"count_value": "40.00",
"count_difference": -22,
"value_difference": "-130.00",
"line_items": [
{
"id": 1021,
"item_id": 93,
"st_id": 2150,
"stock": 10,
"count": 8,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
},
{
"id": 1022,
"item_id": 37,
"st_id": 2150,
"stock": 20,
"count": null,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
}
],
"date_created": "2026-10-30T09:12:40",
"title": "Warehouse A - Monthly count",
"date_modified": "2026-10-30T09:12:40",
"date_reconciled": null,
"date_reconciled_gmt": null,
"date_created_gmt": "2026-10-30T08:12:40",
"date_modified_gmt": "2026-10-30T08:12:40",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes/2150"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes"
}
]
}
}Available parameters
| Parameter | Type | Description |
|---|---|---|
context | string | Scope under which the request is made; determines fields present in response. Options: view and edit. Default is view. |
dp | integer | Number of decimal points to use in the totals. Default is the WooCommerce price decimals setting. |
List all stock takes
This API helps you to view all the stock takes.
HTTP request
/wp-json/wc/v3/atum/stock-takescurl https://example.com/wp-json/wc/v3/atum/stock-takes \
-u consumer_key:consumer_secret[
{
"meta_data": [],
"id": 2150,
"status": "draft",
"items_added": 2,
"items_counted": 1,
"total_stock": "30.00",
"total_count": "8.00",
"total_value": "170.00",
"count_value": "40.00",
"count_difference": -22,
"value_difference": "-130.00",
"line_items": [
{
"id": 1021,
"item_id": 93,
"st_id": 2150,
"stock": 10,
"count": 8,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
},
{
"id": 1022,
"item_id": 37,
"st_id": 2150,
"stock": 20,
"count": null,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
}
],
"date_created": "2026-10-30T09:12:40",
"title": "Warehouse A - Monthly count",
"date_modified": "2026-10-30T09:12:40",
"date_reconciled": null,
"date_reconciled_gmt": null,
"date_created_gmt": "2026-10-30T08:12:40",
"date_modified_gmt": "2026-10-30T08:12:40",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes/2150"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes"
}
]
}
},
{
"meta_data": [],
"id": 2101,
"status": "publish",
"items_added": 1,
"items_counted": 1,
"total_stock": "12.00",
"total_count": "12.00",
"total_value": "60.00",
"count_value": "60.00",
"count_difference": 0,
"value_difference": "0.00",
"line_items": [
{
"id": 998,
"item_id": 208,
"st_id": 2101,
"stock": 12,
"count": 12,
"reconciled": true,
"is_inventory": 1,
"parent_id": 507,
"meta_data": []
}
],
"date_created": "2026-09-28T16:03:11",
"date_reconciled": "2026-09-30T10:45:02",
"title": "Inventory 1 - September count",
"date_modified": "2026-09-30T10:45:02",
"date_reconciled_gmt": "2026-09-30T08:45:02",
"date_created_gmt": "2026-09-28T14:03:11",
"date_modified_gmt": "2026-09-30T08:45:02",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes/2101"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes"
}
]
}
}
]Available parameters
| Parameter | Type | Description |
|---|---|---|
context | string | Scope under which the request is made; determines fields present in response. Options: view and edit. Default is view. |
page | integer | Current page of the collection. Default is 1. |
per_page | integer | Maximum number of items to be returned in result set. Default is 10. |
search | string | Limit results to the stock takes whose title matches a string. |
after | string | Limit response to resources published after a given ISO8601 compliant date. |
before | string | Limit response to resources published before a given ISO8601 compliant date. |
modified_after | string | Limit response to stock takes modified after a given ISO8601 compliant date. |
modified_before | string | Limit response to stock takes modified before a given ISO8601 compliant date. |
dates_are_gmt | boolean | Whether to consider GMT post dates when limiting response by published or modified date. Default is false. |
exclude | array | Ensure result set excludes specific IDs. |
include | array | Limit result set to specific IDs. |
offset | integer | Offset the result set by a specific number of items. |
order | string | Order sort attribute ascending or descending. Options: asc and desc. Default is desc. |
orderby | string | Sort collection by object attribute. Options: date, id, include, title, slug and modified. Default is date. |
status | array | Limit result set to stock takes which have specific statuses. Options: any, draft, publish and trash. Default is any. |
product | integer | Limit result set to stock takes that include the specified product ID. |
dp | integer | Number of decimal points to use in the totals. Default is the WooCommerce price decimals setting. |
Update a stock take
This API lets you make changes to a stock take. To update an existing item, pass its id within the line_items. The items without id are added to the stock take.
HTTP request
/wp-json/wc/v3/atum/stock-takes/<id>Example of how to count an item and remove another one
curl -X PUT https://example.com/wp-json/wc/v3/atum/stock-takes/2150 \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"line_items": [
{
"id": 1022,
"count": 18
},
{
"id": 1021,
"delete": true
}
]
}'{
"meta_data": [],
"id": 2150,
"status": "draft",
"items_added": 1,
"items_counted": 1,
"total_stock": "20.00",
"total_count": "18.00",
"total_value": "120.00",
"count_value": "108.00",
"count_difference": -2,
"value_difference": "-12.00",
"line_items": [
{
"id": 1022,
"item_id": 37,
"st_id": 2150,
"stock": 20,
"count": 18,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
}
],
"date_created": "2026-10-30T09:12:40",
"title": "Warehouse A - Monthly count",
"date_modified": "2026-10-30T09:20:15",
"date_reconciled": null,
"date_reconciled_gmt": null,
"date_created_gmt": "2026-10-30T08:12:40",
"date_modified_gmt": "2026-10-30T08:20:15",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes/2150"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes"
}
]
}
}Delete a stock take
This API helps you delete a stock take.
HTTP request
/wp-json/wc/v3/atum/stock-takes/<id>curl -X DELETE https://example.com/wp-json/wc/v3/atum/stock-takes/2150?force=true \
-u consumer_key:consumer_secret{
"meta_data": [],
"id": 2150,
"status": "draft",
"items_added": 1,
"items_counted": 1,
"total_stock": "20.00",
"total_count": "18.00",
"total_value": "120.00",
"count_value": "108.00",
"count_difference": -2,
"value_difference": "-12.00",
"line_items": [
{
"id": 1022,
"item_id": 37,
"st_id": 2150,
"stock": 20,
"count": 18,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
}
],
"date_created": "2026-10-30T09:12:40",
"title": "Warehouse A - Monthly count",
"date_modified": "2026-10-30T09:20:15",
"date_reconciled": null,
"date_reconciled_gmt": null,
"date_created_gmt": "2026-10-30T08:12:40",
"date_modified_gmt": "2026-10-30T08:20:15",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes/2150"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes"
}
]
}
}Available parameters
| Parameter | Type | Description |
|---|---|---|
force | boolean | Use true to permanently delete the stock take. Otherwise, it's moved to the trash. Default is false. |
Batch update stock takes
This API helps you to batch create, update and delete multiple stock takes.
Note: By default it's limited to up to 100 objects to be created, updated or deleted. The stock takes listed in delete are deleted permanently.
HTTP request
/wp-json/wc/v3/atum/stock-takes/batchcurl -X POST https://example.com/wp-json/wc/v3/atum/stock-takes/batch \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"create": [
{
"title": "Warehouse B - Monthly count",
"line_items": [
{
"item_id": 22,
"stock": 5
}
]
}
],
"update": [
{
"id": 2150,
"title": "Warehouse A - October count"
}
],
"delete": [ 2101 ]
}'{
"create": [
{
"meta_data": [],
"id": 2160,
"status": "draft",
"items_added": 1,
"items_counted": 0,
"total_stock": "5.00",
"total_count": "0.00",
"total_value": "40.00",
"count_value": "0.00",
"count_difference": -5,
"value_difference": "-40.00",
"line_items": [
{
"id": 1030,
"item_id": 22,
"st_id": 2160,
"stock": 5,
"count": null,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
}
],
"date_created": "2026-10-30T09:31:05",
"title": "Warehouse B - Monthly count",
"date_modified": "2026-10-30T09:31:05",
"date_reconciled": null,
"date_reconciled_gmt": null,
"date_created_gmt": "2026-10-30T08:31:05",
"date_modified_gmt": "2026-10-30T08:31:05",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes/2160"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes"
}
]
}
}
],
"update": [
{
"meta_data": [],
"id": 2150,
"status": "draft",
"items_added": 1,
"items_counted": 1,
"total_stock": "20.00",
"total_count": "18.00",
"total_value": "120.00",
"count_value": "108.00",
"count_difference": -2,
"value_difference": "-12.00",
"line_items": [
{
"id": 1022,
"item_id": 37,
"st_id": 2150,
"stock": 20,
"count": 18,
"reconciled": false,
"is_inventory": 0,
"parent_id": 0,
"meta_data": []
}
],
"date_created": "2026-10-30T09:12:40",
"title": "Warehouse A - October count",
"date_modified": "2026-10-30T09:31:05",
"date_reconciled": null,
"date_reconciled_gmt": null,
"date_created_gmt": "2026-10-30T08:12:40",
"date_modified_gmt": "2026-10-30T08:31:05",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes/2150"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes"
}
]
}
}
],
"delete": [
{
"meta_data": [],
"id": 2101,
"status": "publish",
"items_added": 1,
"items_counted": 1,
"total_stock": "12.00",
"total_count": "12.00",
"total_value": "60.00",
"count_value": "60.00",
"count_difference": 0,
"value_difference": "0.00",
"line_items": [
{
"id": 998,
"item_id": 208,
"st_id": 2101,
"stock": 12,
"count": 12,
"reconciled": true,
"is_inventory": 1,
"parent_id": 507,
"meta_data": []
}
],
"date_created": "2026-09-28T16:03:11",
"date_reconciled": "2026-09-30T10:45:02",
"title": "Inventory 1 - September count",
"date_modified": "2026-09-30T10:45:02",
"date_reconciled_gmt": "2026-09-30T08:45:02",
"date_created_gmt": "2026-09-28T14:03:11",
"date_modified_gmt": "2026-09-30T08:45:02",
"_links": {
"self": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes/2101"
}
],
"collection": [
{
"href": "https://example.com/wp-json/wc/v3/atum/stock-takes"
}
]
}
}
]
}