To create a new Unit of Measure or update an existing one in the AppZen System. This returns the uuid, the unique identifier, for this Unit of Measure.
If there already exists a Unit of Measure, with the given uom_code body parameter, then the existing Unit of Measure will be updated. The status in the response shows as UPDATED.
For a newly created Unit of Measure, the status shows as CREATED.
Request URI
POST https://api.appzen.com/dictionary-data-services/
unit-of-measure
Header Parameters
Name | Type | Description | Required |
---|---|---|---|
x-api-key | String | The x-api-key provided to authorize the request. | Yes |
customer-id | String | The Customer ID provided to authorize the request. | Yes |
customer-key | String | The Customer Key provided to authorize the request. | Yes |
Body Parameters
Name | Type | Description | Required |
---|---|---|---|
uom_code | string |
Unit of Measure code in your System. |
Yes |
uom_description | string |
Unit of Measure name/description in your System. |
No |
uom_precision | integer |
Max number of decimal digits of precision to be preserved. Minimum:0 Maximum:9 default:9 Example: If defined as 2, then the quantity of 12.555 will be rounded to 12.56
|
No |
is_active | boolean | To check if the item is active in your System. default: true |
No |
is_default | boolean | To check if the item is the default one in your System. default: false |
No |
Sample Request
curl -X POST "https://api.appzen.com/dictionary-data-services/unit-of-measure"
-H "accept: application/json"
-H "x-api-key: R7wsFxxxx"
-H "customer-id: 1004xxxx"
-H "customer-key: 15d1xxxx"
-H "Content-Type: application/json"
-d
"{
"uom_code": "PCS",
"uom_description": "Number of Pieces",
"uom_precision": "if defined as 2, then quantity of 12.555 will be rounded to 12.56",
"is_active": true,
"is_default": false
}"
Sample Response
Success
{
"uuid": "5fc03087-d265-11e7-b8c6-83e29cd24f4c",
"status": "UPDATED"
}
Failure
The request fails if you enter an invalid URL.
{
"timestamp": "2019-01-17T16:12:45.977+0000",
"status": 404,
"error": "Not Found",
"message": "Error code : 17e3338d - The resource you specified cannot be not found"
}
Response Code
Response Code | Description |
200 | The request is successful. |
201 |
The request is successful. |
400 |
The request failed due to a malformed request syntax. Check the requested URL, including the parameters. |
401 |
The request failed due to an authorization issue. For example, the Customer Key could be missing or invalid. |
403 |
The request failed due to a permission issue. The x-api key may not have permission to perform the request. |
404 |
The request failed as the resource is not found. Check the requested URL. |
500 |
The request failed due to an AppZen server issue. |
See Also
Comments
Article is closed for comments.