List fixed assets
const url = 'https://api.sancho-wms.pl/v1/assets.list';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"cursor":"example","filters":{"kind":{"$eq":"fixedAsset","$ne":"fixedAsset","$in":["fixedAsset"],"$nin":["fixedAsset"],"$meta":{"preset":"example","scoped":true}},"status":{"$eq":"inUse","$ne":"inUse","$in":["inUse"],"$nin":["inUse"],"$meta":{"preset":"example","scoped":true}},"category":{"$eq":"example","$ne":"example","$gt":"example","$gte":"example","$lt":"example","$lte":"example","$in":["example"],"$nin":["example"],"$exists":true,"$regex":"example","$meta":{"preset":"example","scoped":true}},"hasTags":{"$eq":true,"$ne":true,"$in":[true],"$nin":[true],"$meta":{"preset":"example","scoped":true}},"integrationId":{"$eq":"example","$ne":"example","$gt":"example","$gte":"example","$lt":"example","$lte":"example","$in":["example"],"$nin":["example"],"$exists":true,"$regex":"example","$meta":{"preset":"example","scoped":true}}},"sort":{"field":"name","dir":"asc"},"limit":100,"q":"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.list \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "cursor": "example", "filters": { "kind": { "$eq": "fixedAsset", "$ne": "fixedAsset", "$in": [ "fixedAsset" ], "$nin": [ "fixedAsset" ], "$meta": { "preset": "example", "scoped": true } }, "status": { "$eq": "inUse", "$ne": "inUse", "$in": [ "inUse" ], "$nin": [ "inUse" ], "$meta": { "preset": "example", "scoped": true } }, "category": { "$eq": "example", "$ne": "example", "$gt": "example", "$gte": "example", "$lt": "example", "$lte": "example", "$in": [ "example" ], "$nin": [ "example" ], "$exists": true, "$regex": "example", "$meta": { "preset": "example", "scoped": true } }, "hasTags": { "$eq": true, "$ne": true, "$in": [ true ], "$nin": [ true ], "$meta": { "preset": "example", "scoped": true } }, "integrationId": { "$eq": "example", "$ne": "example", "$gt": "example", "$gte": "example", "$lt": "example", "$lte": "example", "$in": [ "example" ], "$nin": [ "example" ], "$exists": true, "$regex": "example", "$meta": { "preset": "example", "scoped": true } } }, "sort": { "field": "name", "dir": "asc" }, "limit": 100, "q": "example" }'Lists fixed assets, equipment and tools from the key’s integrations, as the ERP’s registers keep them, each with the number of Sancho tags paired to it (tagCount). Send the response’s nextCursor back as cursor, with the same q, filters and sort, until no nextCursor comes back; limit (default and maximum 100) applies to each integration, and an integration that failed to answer is named in failedIntegrationIds. q is a text search of at least two characters, matching among others the name, the inventory number and the serial number, and filters narrows by kind, status, category and integrationId ($eq or $in), and by hasTags ($eq): true for assets with a Sancho tag paired, false for those with none. value is the initial value, not the net book value. Address an asset by its integrationId, kind and id: each register numbers its entries apart.
Authorizations
Abschnitt betitelt „Authorizations“Request Bodyrequired
Abschnitt betitelt „Request Bodyrequired“object
object
object
object
object
object
object
$regex takes literal text, optionally anchored with a leading ^ and a trailing $; escape any other regex character with a backslash. Matching ignores case.
object
object
object
object
$regex takes literal text, optionally anchored with a leading ^ and a trailing $; escape any other regex character with a backslash. Matching ignores case.
object
object
Responses
Abschnitt betitelt „Responses“Successful response
object
object
object
Example
{ "items": [ { "kind": "fixedAsset", "status": "inUse", "integrationType": "comarch-optima" } ]}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": []}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": []}