ApiAsset
Update asset
Update an existing asset (Location, Production-Line, Process-Cell, Machine, Component)
Access restricted to roles:
- admin
- manufacturer-admin
- manufacturer-user
- producer-admin
Path Parameters
assetId*string
The unique identifier of the asset
Format
uuidRequest Body
application/json
assetType*string
Type of the asset
Default
"location"name?string
Name of the location
description?|
Detailed description of the location. Send null to remove the existing description.
address?
Address object for updating address fields
customAttributes?array<>
Custom attributes for the location
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://my.sweetconnect.io/api/asset/v1/assets/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "assetType": "location" }'{
"data": {
"assetType": "location",
"id": "0c1b9613-7d6f-40b7-bf29-3179ac401fc9",
"name": "Sample Asset",
"organizationId": "0c1b9613-7d6f-40b7-bf29-3179ac401fc9",
"description": "This is a sample asset for demonstration purposes",
"createdAt": "2025-07-22T14:48:00.000Z",
"updatedAt": "2025-07-22T15:10:00.000Z",
"createdBy": "0c1b9613-7d6f-40b7-bf29-3179ac401fc9",
"updatedBy": "0c1b9613-7d6f-40b7-bf29-3179ac401fc9",
"active": true,
"draft": false,
"custom": false,
"parentId": "0c1b9613-7d6f-40b7-bf29-3179ac401fc9",
"position": 1,
"customAttributes": [
{
"key": "color",
"value": "blue"
}
],
"address": {
"city": "Somecity",
"country": "Somecountry",
"address1": "Somestreet 101",
"address2": "Some additional info",
"postalcode": "01234",
"state": "SomeState"
}
}
}{
"errors": [
{
"errorCode": "Conflict",
"message": "A conflict occurred due to duplicate data or resource state issues.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "Unauthorized",
"message": "Authentication is required to access this resource.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "NoPermission",
"message": "You do not have permission to access this resource.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "NotFound",
"message": "The requested resource was not found.",
"extension": {}
}
]
}{
"errors": [
{
"errorCode": "InternalServerError",
"message": "An unexpected internal server error occurred.",
"extension": {}
}
]
}