Overview / Stock & supply / Update an asset count

Update an asset count

patch https://api.flactrum.com/v1/asset-counts/{count}

Sending items replaces every line. A completed count can no longer be changed.

Required scope assets.count
Success status200
Returns One AssetCount object

Parameters

NameInTypeDescription
count * path string ULID of the record.

Request body

FieldTypeDescription
branch_id * string —
code string Generated when empty.
status string —
note string —
items array Replaces every line when sent.

Response fields

FieldTypeDescription
id string —
code string —
branch_id string —
status string —
note string|null —
started_at string|null —
completed_at string|null —
items array —

Examples

Recorded from the test suite — these are real requests and their real responses.

curl -X PATCH 'https://api.flactrum.com/v1/asset-counts/01m43mxjhqm81q642crpzjw0n6' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "note": "Ayın ilk sayımı",
    "items": [
        {
            "asset_id": "01m43mxjhn2j3cb86ky59tv45s",
            "expected_quantity": 20,
            "counted_quantity": 19,
            "reason": "Bir tanesi serviste"
        }
    ]
}'

HTTP 200 · application/json

{
    "data": {
        "id": "01m43mxjhqm81q642crpzjw0n6",
        "code": "DSY-0002",
        "branch_id": "01m43mxjhcz9vjttm47nvwtde0",
        "status": "draft",
        "note": "Ayın ilk sayımı",
        "started_at": null,
        "completed_at": null,
        "item_count": 1,
        "items": [
            {
                "id": "01m43mxjj1z7s2m0mkhta0ekd8",
                "asset_id": "01m43mxjhn2j3cb86ky59tv45s",
                "expected_quantity": 20,
                "counted_quantity": 19,
                "difference": -1,
                "reason": "Bir tanesi serviste"
            }
        ],
        "created_at": "2026-10-04T14:26:06+00:00",
        "updated_at": "2026-10-04T14:26:06+00:00"
    }
}