# Inventory Counts
Inventory Count is an inventory transaction that is done periodically to compare the system calculated items levels with actual levels at the store.
# The Inventory Count Object
# Sample
{
"id": "8d2eb82d-",
"business_date": "1982-05-28",
"reference": "43049",
"status": 1,
"notes": "..",
"created_at": "2019-03-13 17:58:48",
"updated_at": "2019-03-13 17:58:48",
"items": [
{
"pivot": {
"quantity": 15,
"variance_quantity": 15,
"variance_cost": 0,
"variance_percent": null
},
"id": "8d86924"
}
],
"branch": {
"id": "8d84b5d2"
},
"creator": {
"id": "8d88a558"
},
"poster": {
"id": "8d88a550"
}
}# Attributes
| Field | Type | Rule | Description |
|---|---|---|---|
id | string | Unique identifier for the inventory count | |
business_date | string | nullable | The business date YYYY-MM-DD of the inventory count |
reference | string | nullable updatable | Unique user friendly reference number for the inventory count |
status* | integer | updatable | The Status os the inventory count |
notes | string | nullable updatable | User entered notes |
items* | object | updatable includable | List of Inventory Items attached to the inventory count |
branch* | object | updatable includable | The Branch attached to the inventory count |
poster | object | nullable updatable includable | The User object who posted the inventory count |
creator* | object | updatable includable | The User object who created the inventory count |
created_at | string | sortable | Time at which the object was created in UTC. YYYY-MM-DD HH-MM-SS |
updated_at | string | sortable | Time at which the object was updated in UTC. YYYY-MM-DD HH-MM-SS |
# Inventory Count Statuses
| Type | Description |
|---|---|
1 | Draft. |
2 | Closed. |
# List Inventory Counts
GET /inventory_counts
# Scope
inventory.transactions.read
# Filters
idbusiness_datebusiness_date_afterbusiness_date_beforereferencestatusbranch_idcreator_idposter_idupdated_aftercreated_onupdated_on
# Response
{
"data": [
{
"id": "8d2eb82d-",
"business_date": "1982-05-28",
"reference": "43049",
"status": 1,
"notes": "..",
"created_at": "2019-03-13 17:58:48",
"updated_at": "2019-03-13 17:58:48",
"items": [
{
"pivot": {
"quantity": 15,
"variance_quantity": 15,
"variance_cost": 0,
"variance_percent": null
},
"id": "8d86924"
}
],
"branch": {
"id": "8d84b5d2"
},
"creator": {
"id": "8d88a558"
},
"poster": {
"id": "8d88a550"
}
}
]
}# Get Inventory Count
GET /inventory_counts/{inventoryCountId}
# Scope
inventory.transactions.read
# Response
{
"data": {
"id": "8d2eb82d-",
"business_date": "1982-05-28",
"reference": "43049",
"status": 1,
"notes": "..",
"created_at": "2019-03-13 17:58:48",
"updated_at": "2019-03-13 17:58:48",
"items": [
{
"pivot": {
"quantity": 15,
"variance_quantity": 15,
"variance_cost": 0,
"variance_percent": null
},
"id": "8d86924"
}
],
"branch": {
"id": "8d84b5d2"
},
"creator": {
"id": "8d88a558"
},
"poster": {
"id": "8d88a550"
}
}
}# Create Inventory Count
Can create in all available statuses.
POST /inventory_counts
# Scope
inventory.transactions.write
# Request
{
"status": 1,
"notes": "inventory count notes",
"branch_id": "8d207fc3",
"creator_id": "8d207fc3",
"poster_id": "8d207fc3",
"items": [
{
"id": "8d207fc3",
"quantity": 200
}
]
}
# Response
{
"data": {
"id": "8d2eb82d-",
"business_date": "1982-05-28",
"reference": "43049",
"status": 1,
"notes": "..",
"created_at": "2019-03-13 17:58:48",
"updated_at": "2019-03-13 17:58:48",
"items": [
{
"pivot": {
"quantity": 15,
"variance_quantity": 15,
"variance_cost": 0,
"variance_percent": null
},
"id": "8d86924"
}
],
"branch": {
"id": "8d84b5d2"
},
"creator": {
"id": "8d88a558"
},
"poster": {
"id": "8d88a550"
}
}
}# Update Inventory Count
PUT /inventory_counts/{inventoryCountId}
# Scope
inventory.transactions.write
# Request
{
"status": 2,
"notes": "inventory count notes",
"branch_id": "8d207fc3",
"creator_id": "8d207fc3",
"poster_id": "8d207fc3",
"items": [
{
"id": "8d207fc3",
"quantity": 200
}
]
}
# Response
{
"data": {
"id": "8d2eb82d-",
"business_date": "1982-05-28",
"reference": "43049",
"status": 1,
"notes": "..",
"created_at": "2019-03-13 17:58:48",
"updated_at": "2019-03-13 17:58:48",
"items": [
{
"pivot": {
"quantity": 15,
"variance_quantity": 15,
"variance_cost": 0,
"variance_percent": null
},
"id": "8d86924"
}
],
"branch": {
"id": "8d84b5d2"
},
"creator": {
"id": "8d88a558"
},
"poster": {
"id": "8d88a550"
}
}
}# Delete Inventory Count
DELETE /inventory_counts/{inventoryCountId}
# Scope
inventory.transactions.write
The API will respond with 200 indicating that the transaction has been deleted.