Skip to content

Update a fixed asset

POST
/assets.update
curl --request POST \
--url https://api.sancho-wms.pl/v1/assets.update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "integrationId": 1, "kind": "fixedAsset", "id": 1, "expectedModifiedAt": "example", "expectedSavedAt": "example", "data": { "integrationType": "comarch-optima", "inventoryNumber": "example", "name": "example", "description": "example", "categoryId": 1, "purchaseDate": "2026-04-15", "value": 1, "holder": { "employeeId": 1, "name": "example", "since": "2026-04-15" }, "placeOfUse": { "name": "example", "since": "2026-04-15" }, "kind": "fixedAsset", "kst": "example", "inventoryBook": "example", "commissioningDate": "2026-04-15", "depreciationStartDate": "2026-04-15", "depreciation": { "method": "none", "rate": 1, "coefficient": 1 }, "taxDepreciation": { "method": "none", "rate": 1, "coefficient": 1, "value": 1, "startDate": "2026-04-15" } }, "tags": [ { "code": "example", "type": "qr", "identifier": "example", "note": "example" } ], "images": [ "example" ] }'

Saves the asset’s full image: data is the card, and tags and images replace Sancho’s tags and photos. Build data from /assets.get and change what you mean to; a DMS tool’s data is { "integrationType": "gascontrol-dms" }. The card goes to the ERP only when data differs from the card as read, so a tag or photo edit writes nothing there. A key with asset:annotate but not asset:update saves only the tags and images; its data is ignored. The integration must grant asset:update for every save, a tag or photo edit included. A null holder or place of use deletes the current period, as deleting the row on the card does in the ERP. Send the modifiedAt and snapshotSavedAt you read as expectedModifiedAt (null for a DMS tool) and expectedSavedAt; when either has moved, nothing is written and the answer is 409 documentConflict. Status and liquidation change only through /assets.dispose. images are /api/images/N paths kept from /assets.get or https:// URLs, and the whole request must stay under 64 KiB. A warning with stage assetExtras means the card was written but the tags and images were not.

Media typeapplication/json
object
integrationId
required
number
kind
required
string
Allowed values: fixedAsset equipment tool
id
required
integer
> 0 <= 9007199254740991
expectedModifiedAt
required
string | null
expectedSavedAt
required
string | null
data
required
AssetWrite
One of: discriminator: integrationType
ComarchOptimaAssetWrite
One of: discriminator: kind
ComarchOptimaFixedAssetWrite
object
integrationType
required
string
Allowed value: comarch-optima
inventoryNumber
required
string
>= 1 characters <= 20 characters
name
required
string
>= 1 characters <= 256 characters
description
required
string
categoryId
required
Any of:
integer
> 0 <= 9007199254740991
purchaseDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
value
required
number
holder
required
Any of:
object
employeeId
required
Any of:
integer
> 0 <= 9007199254740991
name
required
string
<= 255 characters
since
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
placeOfUse
required
Any of:
object
name
required
string
>= 1 characters <= 255 characters
since
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
kind
required
string
Allowed value: fixedAsset
kst
required
string
<= 20 characters
inventoryBook
required
string
>= 1 characters <= 32 characters
commissioningDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
depreciationStartDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
depreciation
required
AssetDepreciation
object
method
required
string
Allowed values: none linear degressive oneOff natural
rate
required
number
coefficient
required
number
taxDepreciation
required
Any of:
object
method
required
string
Allowed values: none linear degressive oneOff natural
rate
required
number
coefficient
required
number
value
required
number
startDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
tags
required
Array<object>
<= 1000 items
object
code
required
string
>= 1 characters
type
required
string
Allowed values: qr nfc
identifier
required
string
note
required
string
images
required
Array
<= 50 items

Successful response

Media typeapplication/json
AssetWriteResult
object
result
required
AssetDetails
One of: discriminator: integrationType
ComarchOptimaAssetDetails
object
id
required
number
kind
required
string
Allowed values: fixedAsset equipment tool
integrationId
required
number
inventoryNumber
required
string
serialNumber
required
string | null
name
required
string
description
required
string
category
required
string
status
required
string
Allowed values: inUse liquidated sold
purchaseDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
value
required
number
quantity
required
number | null
unit
required
string | null
holder
required
Any of:
AssetHolder
object
id
required
number | string | null
name
required
string
since
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
placeOfUse
required
string | null
placeOfUseSince
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
liquidationDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
integrationType
required
string
Allowed value: comarch-optima
importSource
required
Any of:
ImportSourceOutput
object
appId
required
string
rowId
required
string
categoryId
required
number | null
fixedAsset
required
Any of:
ComarchOptimaFixedAssetFields
object
kst
required
string
inventoryBook
required
string
commissioningDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
depreciationStartDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
depreciation
required
AssetDepreciationOutput
object
method
required
string
Allowed values: none linear degressive oneOff natural
rate
required
number
coefficient
required
number
taxDepreciation
required
Any of:
object
method
required
string
Allowed values: none linear degressive oneOff natural
rate
required
number
coefficient
required
number
value
required
number
startDate
required
Any of:
string format: date
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$/
modifiedAt
required
string | null
tags
required
Array<object>
TagListItem
object
productId
required
number | null
productKey
required
string | null
documentType
required
Any of:
string
Allowed values: goodsReceivedNote goodsIssuedNote transfer
documentId
required
number | null
documentKey
required
string | null
productBatchId
required
number | null
productBatchKey
required
string | null
documentLineIndex
required
Any of:
integer
<= 9007199254740991
documentKind
required
Any of:
string
Allowed values: external internal purchase sales transfer order
assetKind
required
Any of:
string
Allowed values: fixedAsset equipment tool
assetId
required
number | null
assetKey
required
string | null
id
required
number
accountId
required
number
integrationId
required
number
userId
required
number
code
required
string
type
required
string
Allowed values: qr nfc
identifier
required
string
note
required
string
documentName
required
string | null
productName
required
string | null
assetName
required
string | null
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
deletedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
user
required
object
id
required
number
name
required
string
avatar
required
string | null
images
required
Array<string>
snapshotSavedAt
required
string | null
customFieldsMeta
required
CustomFieldsMeta
object
key
additional properties
object
savedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
user
required
object
id
required
number
name
required
string
avatar
required
string | null
warnings
required
Array<object>
WriteWarning
object
stage
required
string
Allowed values: placements documents tags participants images assetExtras
detail
required
string

Example

{
"result": {
"kind": "fixedAsset",
"status": "inUse",
"integrationType": "comarch-optima",
"fixedAsset": {
"depreciation": {
"method": "none"
},
"taxDepreciation": {
"method": "none"
}
},
"tags": [
{
"documentType": "goodsReceivedNote",
"documentKind": "external",
"assetKind": "fixedAsset",
"type": "qr"
}
],
"customFieldsMeta": {}
},
"warnings": [
{
"stage": "placements"
}
]
}

Bad request

Media typeapplication/json
error.BAD_REQUEST

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "BAD_REQUEST",
"message": "Bad request",
"issues": []
}

Unauthorized

Media typeapplication/json
error.UNAUTHORIZED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNAUTHORIZED",
"message": "Unauthorized",
"issues": []
}

Payment required

Media typeapplication/json
error.PAYMENT_REQUIRED

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "PAYMENT_REQUIRED",
"message": "Payment required",
"issues": []
}

Forbidden

Media typeapplication/json
error.FORBIDDEN

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "FORBIDDEN",
"message": "Forbidden",
"issues": []
}

Not found

Media typeapplication/json
error.NOT_FOUND

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}

Conflict

Media typeapplication/json
error.CONFLICT

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "CONFLICT",
"message": "Conflict",
"issues": []
}

Unprocessable content

Media typeapplication/json
error.UNPROCESSABLE_CONTENT

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "UNPROCESSABLE_CONTENT",
"message": "Unprocessable content",
"issues": []
}

Too many requests

Media typeapplication/json
error.TOO_MANY_REQUESTS

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "TOO_MANY_REQUESTS",
"message": "Too many requests",
"issues": []
}

Internal server error

Media typeapplication/json
error.INTERNAL_SERVER_ERROR

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}

Service unavailable

Media typeapplication/json
error.SERVICE_UNAVAILABLE

The error information

object
message
required

The error message

string
code
required

The error code

string
issues

An array of issues that were responsible for the error

Array<object>
object
message
required
string

Example

{
"code": "SERVICE_UNAVAILABLE",
"message": "Service unavailable",
"issues": []
}