Retrieving a List of Audits

Maxim

Maxim

Last updated on Oct 8, 2026

Returns the company's audits, from newest to oldest: by date, and within one date by number. Lines are not included in the list; they are returned by v1/audits/get_entry.

v1/audits/get_list.php

Parameters

Field Type Required Description
storage_id int No Only audits of this storage location
date_from string No Audits from this date inclusive, YYYY-MM-DD
date_to string No Audits up to this date inclusive, YYYY-MM-DD
status int No Status: 0 Planned, 1 Completed
limit int No Page size, from 1 to 1000
offset int No How many records to skip

Without limit the whole list is returned. See Common Rules for pagination.

Response

An array audits with the audit's fields:

Field Type Description
id int Audit ID
num int Number. Assigned automatically
date string Audit date, YYYY-MM-DD
status int Status: 0 Planned, 1 Completed
storage_id int Storage location the audit is carried out at
storage_name string Storage location name
lines int Number of lines
surplus_cost float Surpluses at cost
shortage_cost float Shortages at cost, a negative number
total_cost float Total at cost: surplus_cost plus shortage_cost
surplus_price float Surpluses at sale price. Products only, 0 for materials
shortage_price float Shortages at sale price, a negative number. Products only
total_price float Total at sale price: surplus_price plus shortage_price

The total field holds the total number of audits matching the filters.

Example request

{
    "storage_id": 3998,
    "date_from": "2026-01-01",
    "limit": 100,
    "offset": 0
}

Example response

{
    "success": true,
    "audits": [
        {
            "id": 1699,
            "num": 24,
            "date": "2026-09-30",
            "status": 1,
            "storage_id": 3998,
            "storage_name": "Main",
            "lines": 2,
            "surplus_cost": 0,
            "shortage_cost": -57900,
            "total_cost": -57900,
            "surplus_price": 0,
            "shortage_price": 0,
            "total_price": 0
        }
    ],
    "total": 1
}

Errors

Error Reason
Date is not a valid date in format YYYY-MM-DD Invalid date_from or date_to
Invalid status value. Must be a number status is not a number
Invalid limit value. Must be between 1 and 1000 Invalid limit
Offset requires limit offset passed without limit