Create a fixed asset
const url = 'https://api.sancho-wms.pl/v1/assets.create';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"integrationId":1,"importSource":{"appId":"example","rowId":"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"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sancho-wms.pl/v1/assets.create \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "integrationId": 1, "importSource": { "appId": "example", "rowId": "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" ] }'Creates a fixed asset (kind fixedAsset) or a piece of equipment (equipment) in the ERP from data, pairs tags and saves images, and answers result, the asset as /assets.get reads it after the write, with warnings. importSource names the application the card comes from (appId) and its key there (rowId), which the ERP keeps as the card’s import mark and /assets.get reads back. The ERP refuses a rowId it already holds in the register, whatever the appId or letter case (422 duplicateDocument). A create is never replayed and the asset list has no import-mark filter, so after a lost answer search /assets.list by the inventory number before sending again. Only comarch-optima integrations take a card, so any other answers 403, or 400 when it holds the scope. images are /api/images/N paths read from /assets.get or https:// URLs, and the whole request must stay under 64 KiB. A warning with stage assetExtras means the card was created but its tags and images were not saved.
Authorizations
Abschnitt betitelt „Authorizations“Request Bodyrequired
Abschnitt betitelt „Request Bodyrequired“object
object
object
object
object
object
Responses
Abschnitt betitelt „Responses“Successful response
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
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
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "BAD_REQUEST", "message": "Bad request", "issues": []}Unauthorized
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "UNAUTHORIZED", "message": "Unauthorized", "issues": []}Payment required
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "PAYMENT_REQUIRED", "message": "Payment required", "issues": []}Forbidden
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "FORBIDDEN", "message": "Forbidden", "issues": []}Not found
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "NOT_FOUND", "message": "Not found", "issues": []}Conflict
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "CONFLICT", "message": "Conflict", "issues": []}Unprocessable content
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "UNPROCESSABLE_CONTENT", "message": "Unprocessable content", "issues": []}Too many requests
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "TOO_MANY_REQUESTS", "message": "Too many requests", "issues": []}Internal server error
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "INTERNAL_SERVER_ERROR", "message": "Internal server error", "issues": []}Service unavailable
The error information
object
The error message
The error code
An array of issues that were responsible for the error
object
Example
{ "code": "SERVICE_UNAVAILABLE", "message": "Service unavailable", "issues": []}