UOM CRUD API documentation version v1
https://APPLICATION_URL/rest/api/v1/uom
/unitsystems
Create a unit system with languages and unit conversion mappings.
post /unitsystems
Create a unit system with languages and unit conversion mappings.
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"unitSystem": {
"type": "string",
"maxLength": 36,
"description": "Unit System"
},
"languageList": {
"type": "array",
"properties": {
"type": "object",
"properties": {
"language": {
"type": "string",
"enum": [
"EN",
"DE",
"ZF",
"CS",
"FR",
"IT",
"JA",
"RU",
"ES"
],
"maxLength": 5,
"description": "Language Key"
},
"description": {
"type": "string",
"maxLength": 200,
"description": "Unit system Text"
}
}
}
},
"unitConversionMappingList": {
"type": "array",
"properties": {
"type": "object",
"properties": {
"sourceUnitId": {
"type": "string",
"maxLength": 15,
"description": "Unit of Measurement"
},
"targetUnitId": {
"type": "string",
"maxLength": 15,
"description": "Unit of Measurement"
}
}
}
}
}
}
Example:
{
"unitSystem": "metric",
"languageList": [
{
"language": "EN",
"description": "Metric System"
},
{
"language": "DE",
"description": "Metrisches Maßsystem"
}
],
"unitConversionMappingList": [
{
"sourceUnitId": "MI",
"targetUnitId": "MM"
},
{
"sourceUnitId": "MGL",
"targetUnitId": "MGQ"
}
]
}HTTP status code 201
Successfully creates unit system.
HTTP status code 400
The request could not be understood by the server due to malformed syntax.
Body
Media type: application/json
Type: any
Example:
{
"errorMessages": [
{
"severity": "ERROR",
"errorMessage": "Provided unit system already exist.Please provide a different unit system name.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}Secured by basic
Delete a unit system, its languages and unit conversion mappings.
delete /unitsystems/{unitSystemName}
Delete a unit system, its languages and unit conversion mappings.
URI Parameters
- unitSystemName: required (string)
HTTP status code 204
Successfully deletes unit system.
HTTP status code 400
The request could not be understood by the server due to malformed syntax.
Body
Media type: application/json
Type: any
Example:
{
"errorMessages": [
{
"severity": "ERROR",
"errorMessage": "Provided unit system does not exist.Please provide a valid unit system name.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}Secured by basic
Update the description of a unit system for a specified language. If description do not exist for the given language, a description is created.
Delete the language description of a unit system.
put /unitsystems/{unitSystemName}/languages
Update the description of a unit system for a specified language. If description do not exist for the given language, a description is created.
URI Parameters
- unitSystemName: required (string)
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "array",
"additionalProperties": false,
"properties": {
"type": "object",
"properties": {
"language": {
"type": "string",
"enum": [
"EN",
"DE",
"ZF",
"CS",
"FR",
"IT",
"JA",
"RU",
"ES"
],
"maxLength": 5,
"description": "Language Key"
},
"description": {
"type": "string",
"maxLength": 200,
"description": "Unit system Text"
}
}
}
}
Example:
[
{
"language": "EN",
"description": "Metric System"
},
{
"language": "DE",
"description": "Metrisches Maßsystem"
}
]HTTP status code 204
Successfully updates unit mapping.
HTTP status code 400
The request could not be understood by the server due to malformed syntax.
Body
Media type: application/json
Type: any
Example:
{
"errorMessages": [
{
"severity": "ERROR",
"errorMessage": "Provided unit system does not exist.Please provide a valid unit system name.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}Secured by basic
delete /unitsystems/{unitSystemName}/languages
Delete the language description of a unit system.
URI Parameters
- unitSystemName: required (string)
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "array",
"additionalProperties": false,
"properties": {
"type": "object",
"properties": {
"language": {
"type": "string",
"enum": [
"EN",
"DE",
"ZF",
"CS",
"FR",
"IT",
"JA",
"RU",
"ES"
],
"maxLength": 5,
"description": "Language Key"
}
}
}
}
Example:
[
{
"language": "EN"
},
{
"language": "DE"
}
]HTTP status code 204
Successfully deletes language description.
HTTP status code 400
The request could not be understood by the server due to malformed syntax.
Body
Media type: application/json
Type: any
Example:
{
"errorMessages": [
{
"severity": "ERROR",
"errorMessage": "Provided unit system does not exist.Please provide a valid unit system name.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}Secured by basic
Update the unit mappings of a unit system. If the specified unit mapping does not exist, then it is created.
Delete the unit mapping of a unit system.
put /unitsystems/{unitSystemName}/unitmappings
Update the unit mappings of a unit system. If the specified unit mapping does not exist, then it is created.
URI Parameters
- unitSystemName: required (string)
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "array",
"additionalProperties": false,
"properties": {
"type": "object",
"properties": {
"sourceUnitId": {
"type": "string",
"maxLength": 15,
"description": "Unit of Measurement"
},
"targetUnitId": {
"type": "string",
"maxLength": 15,
"description": "Unit of Measurement"
}
}
}
}
Example:
[
{
"sourceUnitId": "MI",
"targetUnitId": "MM"
},
{
"sourceUnitId": "MGL",
"targetUnitId": "MGQ"
}
]HTTP status code 204
Successfully updates unit conversion mapping.
HTTP status code 400
The request could not be understood by the server due to malformed syntax.
Body
Media type: application/json
Type: any
Example:
{
"errorMessages": [
{
"severity": "ERROR",
"errorMessage": "Provided unit system does not exist.Please provide a valid unit system name.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}Secured by basic
delete /unitsystems/{unitSystemName}/unitmappings
Delete the unit mapping of a unit system.
URI Parameters
- unitSystemName: required (string)
Body
Media type: application/json
Type:
{
"$schema": "http://json-schema.org/draft-4/schema",
"type": "array",
"additionalProperties": false,
"properties":{
"type": "object",
"properties":{
"sourceUnitId":{
"type": "string",
"maxLength": 15,
"description": "Unit of Measurement"
}
}
}
}
Example:
[
{
"sourceUnitId": "MI"
},
{
"sourceUnitId": "MGL"
}
]HTTP status code 204
Successfully deletes unit mapping.
HTTP status code 400
The request could not be understood by the server due to malformed syntax.
Body
Media type: application/json
Type: any
Example:
{
"errorMessages": [
{
"severity": "ERROR",
"errorMessage": "Provided unit system does not exist.Please provide a valid unit system name.",
"repeatedEntities": [],
"EntitiesNotFound": []
}
]
}Secured by basic
/data
Retrieve the language descriptions for a unit system.
get /data/unitsystems/{unitsystems}
Retrieve the language descriptions for a unit system.
URI Parameters
- unitsystems: required (string)
HTTP status code 200
Successfully retrieves language descriptions for unit system.
Body
Media type: application/json
Type: any
Example:
[
{
"language": "ZH",
"description": "公制"
},
{
"language": "CS",
"description": "Metrický systém"
},
{
"language": "DE",
"description": "Metrisches Maßsystem"
},
{
"language": "EN",
"description": "Metric System"
},
{
"language": "FR",
"description": "Système métrique"
},
{
"language": "IT",
"description": "Sistema metrico"
},
{
"language": "JA",
"description": "メートル法"
},
{
"language": "DA",
"description": "MerDet metriske system"
},
{
"language": "PL",
"description": "System metryczny"
},
{
"language": "RU",
"description": "Метрическая система"
},
{
"language": "ES",
"description": "Sistema métrico"
}
]HTTP status code 204
No data found.
Secured by basic
Retrieve the language description for a unit system.
get /data/unitsystems/{unitsystems}/languages/{language}
Retrieve the language description for a unit system.
URI Parameters
- unitsystems: required (string)
- language: required (string)
HTTP status code 200
Succefully retrieves language description of unit system.
Body
Media type: application/json
Type: any
Example:
[
{
"language": "EN",
"description": "Metric System"
}
]HTTP status code 204
No data found.