Creates or updates an asset. Assets without sub-assets can be transferred via this endpoint. A separate transferAsset endpoint for moving parent assets and their sub-assets to another site or office is planned for a future release.
Rate limit range: Standard
Body
Required
-
Asset label. It can be the name but it can also be an identifier (barCode, QRCode or NFC) used for asset search purpose.
Minimum length is
1, maximum length is10000. -
Related site code. Case insensitive.
Minimum length is
1, maximum length is256. -
Asset type code. Case insensitive.
Minimum length is
1, maximum length is256. -
Code of the asset. Case insensitive.
Maximum length is
256. -
Parent asset code (if hierarchical structure). Case insensitive.
Maximum length is
256. -
Asset description if any.
Maximum length is
10000. -
Commissioning details of the asset. If absent, status defaults to ACTIVE and startDate to null.
-
Map of custom fields of an asset.
curl \
--request PUT 'https://ws-eu1.praxedo.com/eTech/rest/ws/referentials/v1/assets/code:asset-123456' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"label": "Fridge RC400",
"siteCode": "MCDOPA75009",
"assetTypeCode": "FRIDGE",
"officeCode": "OFFICE_PARIS",
"description": "Fridge RC400 for restauration",
"commissioning": {
"startDate": "2021-06-08",
"status": "ACTIVE"
},
"customFields": {
"textCustomFieldCode": {
"textValue": "24 months"
},
"checkBoxCustomFieldCode": {
"booleanValue": true
},
"dropDownCustomFieldCode": {
"dropDownValue": "High"
},
"urlCustomFieldCode": {
"urlValue": "https://asset-manual.com"
},
"dateCustomFieldCode": {
"dateValue": "2024-12-25"
},
"dateTimeCustomFieldCode": {
"dateTimeValue": "2024-12-25T10:00"
},
"timeCustomFieldCode": {
"timeValue": 36000
},
"gpsCustomFieldCode": {
"gpsValue": {
"longitude": 48.8567,
"latitude": 2.3508
}
}
}
}'
{
"label": "Fridge RC400",
"siteCode": "MCDOPA75009",
"assetTypeCode": "FRIDGE",
"officeCode": "OFFICE_PARIS",
"description": "Fridge RC400 for restauration",
"commissioning": {
"startDate": "2021-06-08",
"status": "ACTIVE"
},
"customFields": {
"textCustomFieldCode": {
"textValue": "24 months"
},
"checkBoxCustomFieldCode": {
"booleanValue": true
},
"dropDownCustomFieldCode": {
"dropDownValue": "High"
},
"urlCustomFieldCode": {
"urlValue": "https://asset-manual.com"
},
"dateCustomFieldCode": {
"dateValue": "2024-12-25"
},
"dateTimeCustomFieldCode": {
"dateTimeValue": "2024-12-25T10:00"
},
"timeCustomFieldCode": {
"timeValue": 36000
},
"gpsCustomFieldCode": {
"gpsValue": {
"longitude": 48.8567,
"latitude": 2.3508
}
}
}
}
{
"label": "Motor RC129",
"siteCode": "SITE_001",
"assetTypeCode": "MOTOR",
"customFields": {
"mandatoryTextCustomFieldCode": {
"textValue": "Mandatory field value"
}
}
}
{
"label": "Updated Fridge RC400",
"siteCode": "MCDOPA75009",
"assetTypeCode": "FRIDGE",
"officeCode": "OFFICE_PARIS",
"description": "Fridge RC400 for restauration",
"commissioning": {
"startDate": "2021-05-08",
"status": "ACTIVE"
},
"customFields": {
"textCustomFieldCode": {
"textValue": "24 months"
},
"checkBoxCustomFieldCode": {
"booleanValue": true
},
"dropDownCustomFieldCode": {
"dropDownValue": "High"
},
"urlCustomFieldCode": {
"urlValue": "https://asset-manual.com"
},
"dateCustomFieldCode": {
"dateValue": "2024-12-25"
},
"dateTimeCustomFieldCode": {
"dateTimeValue": "2024-12-25T10:00"
},
"timeCustomFieldCode": {
"timeValue": 36000
},
"gpsCustomFieldCode": {
"gpsValue": {
"longitude": 48.8567,
"latitude": 2.3508
}
}
}
}
{
"label": "Updated Basic Asset",
"siteCode": "SITE_001",
"assetTypeCode": "BASIC",
"customFields": {
"mandatoryTextCustomFieldCode": {
"textValue": "Updated mandatory value"
}
}
}
{
"label": "Sub asset",
"siteCode": "FACTORY_SITE",
"assetTypeCode": "PTO",
"officeCode": "MAINTENANCE_OFFICE",
"parentAssetCode": "BOX",
"description": "Sub component of telecom installation",
"commissioning": {
"startDate": "2023-03-20",
"status": "ACTIVE"
},
"customFields": {
"textCustomFieldCode": {
"textValue": "SN123456789"
},
"checkBoxCustomFieldCode": {
"booleanValue": false
},
"dropDownCustomFieldCode": {
"dropDownValue": "Low"
},
"urlCustomFieldCode": {
"urlValue": "https://sub-asset-doc.com"
},
"dateCustomFieldCode": {
"dateValue": "2024-11-01"
},
"dateTimeCustomFieldCode": {
"dateTimeValue": "2024-12-15T09:00"
},
"timeCustomFieldCode": {
"timeValue": 32400
},
"gpsCustomFieldCode": {
"gpsValue": {
"longitude": 48.8567,
"latitude": 2.3508
}
}
}
}
{
"errors": [
{
"code": "referentials.customers.asset.label.mandatory",
"message": "Property label is required."
}
],
"errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
"errors": [
{
"code": "referentials.customers.asset.sitecode.mandatory",
"message": "Property siteCode is required."
}
],
"errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
"errors": [
{
"code": "referentials.customers.asset.assettypecode.mandatory",
"message": "Property assetTypeCode is required."
}
],
"errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
"errors": [
{
"code": "referentials.customers.asset.code.mandatory",
"message": "Missing code in path."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.invalid.json",
"message": "Invalid Json format."
}
],
"errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
"errors": [
{
"code": "referentials.customers.asset.invalid.json",
"message": "Duplicate field 'label'."
}
],
"errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
"errors": [
{
"code": "referentials.customers.asset.field.unknown",
"message": "The field 'foo_bar' is unknown. Please correct your JSON request."
}
],
"errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
"errors": [
{
"code": "referentials.customers.asset.office.unknown",
"message": "The organizational unit 'DUMMY' is unknown."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.office.user.hierarchy.error",
"message": "The office is not a descendant of the user's one."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.office.site.hierarchy.error",
"message": "The office is not a descendant of the site's one."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.office.parent.hierarchy.error",
"message": "The office is not a descendant of the parent asset's one."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.parent.site.mismatch",
"message": "The parent asset 'parentAssetCode' does not belong to the site 'siteCode'."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.with.child.cannot.be.moved",
"message": "The asset 'assetCode' has child assets and cannot be moved. A specific transferAsset endpoint will be developed to transfer the site, office and parentAsset of an asset with children."
}
],
"errorReference": "f27b6e670c3d404e48095900660dbf128a05"
}
{
"errors": [
{
"code": "referentials.customers.asset.site.unknown",
"message": "The site 'DUMMY' is unknown."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.assettype.unknown",
"message": "The asset type 'DUMMY' is unknown."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.parent.unknown",
"message": "The parent asset 'DUMMY' is unknown."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.parent.identical",
"message": "The asset cannot be its own parent."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.hierarchy.error",
"message": "The asset parent is also a child of the asset."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "referentials.customers.asset.hierarchy.error",
"message": "Hierarchy contains 10 or more levels."
}
],
"errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
"errors": [
{
"code": "unauthorized.nocredentials",
"message": "No credentials."
}
],
"errorReference": "f939c6b8c15045c9a70f500fdb570555"
}
{
"errors": [
{
"code": "unauthorized.badcredentials",
"message": "Bad Credentials."
}
],
"errorReference": "f1028f99811b422eb21f5ff176664069"
}
{
"errors": [
{
"code": "access.forbiden",
"message": "You don't have the rights to access this resource."
}
],
"errorReference": "a745dc4c5a2b473aaf8ce94c9260aa8f"
}
{
"errors": [
{
"code": "ratelimiter.toomanyrequest",
"message": "Rejected because of the rate limit definition."
}
],
"errorReference": "973326230a3f44daba6cc34a5939b4fb"
}
{
"errors": [
{
"code": "internal.server.error",
"message": "Something went wrong."
}
],
"errorReference": "6377010431314bf6b0b95ec4d32ddae0"
}