Update a tag
const url = 'https://api.sancho-wms.pl/v1/tags.update';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"productId":1,"productKey":"example","documentType":"goodsReceivedNote","documentId":1,"documentKey":"example","productBatchId":1,"productBatchKey":"example","documentLineIndex":1,"documentKind":"external","assetKind":"fixedAsset","assetId":1,"assetKey":"example","id":1,"integrationId":1,"identifier":"example","note":"example","documentName":"example","productName":"example","assetName":"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/tags.update \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "productId": 1, "productKey": "example", "documentType": "goodsReceivedNote", "documentId": 1, "documentKey": "example", "productBatchId": 1, "productBatchKey": "example", "documentLineIndex": 1, "documentKind": "external", "assetKind": "fixedAsset", "assetId": 1, "assetKey": "example", "id": 1, "integrationId": 1, "identifier": "example", "note": "example", "documentName": "example", "productName": "example", "assetName": "example" }'Writes a tag’s whole writable state: read it with tags.get or tags.list, change what you need and send the whole object back, since every field is required. It may move the tag to another integration, product, document line, batch or asset. An asset is addressed by assetKind and assetId, set together, and assetKey is always null. assetName, like productName and documentName, is a display snapshot you supply: Sancho stores it as sent and does not look it up. code, type, the author and the timestamps are Sancho’s. Updating a retired tag (one with deletedAt set) restores it: send null for the links you are leaving, or it comes back with its old document line and asset. A key needs both the tag’s current integration and the one the update names. "" clears identifier and note.
Authorizations
Dział zatytułowany „Authorizations”Request Bodyrequired
Dział zatytułowany „Request Bodyrequired”object
Responses
Dział zatytułowany „Responses”Successful response
object
object
object
object
Example
{ "result": { "documentType": "goodsReceivedNote", "documentKind": "external", "assetKind": "fixedAsset", "type": "qr" }, "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": []}