# Inventory Snapshots
Inventory Snapshots are taken by the system automatically at the end of each business day to store the item's quantities and cost per unit at the end of each inventory business day.
# The Snapshot Object
# Sample
{
"items": [
{
"pivot": {
"quantity": 5,
"cost_per_unit": 12
},
"id": "8f7b966d"
}
],
"branch": {
"id": "8f7ab00a"
},
"id": "8f8aef3b",
"business_date": "2020-01-05",
"branch_id": "8f7ab00a",
"created_at": "2020-01-06 00:00:19",
"updated_at": "2020-01-06 00:00:19"
}
# Attributes
| Field | Type | Rule | Description |
|---|---|---|---|
id | string | Unique identifier for the inventory snapshots. | |
business_date | string | The business date of the inventory snapshot | |
branch | object | includable | The Branch attached to the inventory snapshot |
items | array | includable | List of Inventory Items attached to the inventory snapshot |
created_at | string | sortable | Time at which the inventory snapshot was created in UTC. YYYY-MM-DD HH-MM-SS |
updated_at | string | sortable | Time at which the inventory snapshot was updated in UTC. YYYY-MM-DD HH-MM-SS |
# List Inventory Snapshots
GET /inventory_snapshots
# Scope
inventory.transactions.read
# Filters
business_datebusiness_date_afterbusiness_date_beforecreated_onupdated_onbranch_idupdated_after
# Response
{
"data": [
{
"items": [
{
"pivot": {
"quantity": 5,
"cost_per_unit": 12
},
"id": "8f7b966d"
}
],
"branch": {
"id": "8f7ab00a"
},
"id": "8f8aef3b",
"business_date": "2020-01-05",
"branch_id": "8f7ab00a",
"created_at": "2020-01-06 00:00:19",
"updated_at": "2020-01-06 00:00:19"
}
]
}
# Get Inventory Snapshot
GET /inventory_snapshots/{inventory_snapshotId}
# Scope
inventory.transactions.read
# Response
{
"data": {
"items": [
{
"pivot": {
"quantity": 5,
"cost_per_unit": 12
},
"id": "8f7b966d"
}
],
"branch": {
"id": "8f7ab00a"
},
"id": "8f8aef3b",
"business_date": "2020-01-05",
"branch_id": "8f7ab00a",
"created_at": "2020-01-06 00:00:19",
"updated_at": "2020-01-06 00:00:19"
}
}