Unit of Measure
A unit of measure record exposes a unit of measure to REST web services. The unit of measure is also known as a unit type. This record is not a subrecord.
The REST API Browser includes information about the field names and field types of the unit type record, and about the HTTP methods, request parameters, and operations available to this record. For details, see the REST API Browser’s unitsType reference page.
For information about using the REST API Browser, see The REST API Browser.
Record IDs
The record ID for a unit of measure REST record is unitsType.
Code Samples
The following samples show common use cases for unit of measure. The example ID is 4.
Creating a Unit of Measure Using a POST Request
POST https://demo123.suitetalk.api.snap.netsuite.com/services/rest/record/v1/unitsType
{ "name": "unit A", "uom": { "items": [ { "abbreviation": "UA", "baseUnit": true, "conversionRate": 1.0, "inUse": false, "pluralAbbreviation": "UsA", "pluralName": "units A", "unitName": "unit A" } ] }
}
Retrieving a Unit of Measure Using a GET Request
This sample shows how to retrieve an existing units type.
GET https://demo123.suitetalk.api.snap.netsuite.com/services/rest/record/v1/unitsType/4
This sample shows how to retrieve an existing units type unit of measure with the internal id of 567.
GET https://demo123.suitetalk.api.snap.netsuite.com/services/rest/record/v1/unitsType/4/uom/567
Updating a Unit of Measure Using a PATCH Request
This sample shows how to update an existing units type.
PATCH https://demo123.suitetalk.api.snap.netsuite.com/services/rest/record/v1/unitsType/4
{
"name": "unit B",
" description": "Unit description",
}
This sample shows how to update an existing unit of measure.
PATCH https://demo123.suitetalk.api.snap.netsuite.com/services/rest/record/v1/unitsType/4
{ "abbreviation": "UBx", "baseUnit": true, "conversionRate": 1.0, "pluralAbbreviation": "UsBx", "pluralName": "units Bx", "unitName": "unit Bx"
}
Deleting a Unit of Measure Using a DELETE Request
DELETE https://demo123.suitetalk.api.snap.netsuite.com/services/rest/record/v1/unitsType/4