Work with Units (Unit of measure)

Data entity AOT name Entity name (DMF) Public collection name (OData) Support OData Support DMF Category ReadOnly
UnitOfMeasureEntity Units UnitsOfMeasure Yes Yes Reference No

UnitOfMeasureEntity Entity is allowed to operate with warehowses in D365FO.

Key

  • UnitSymbol

Fields

Field name Value example Description
(*)UnitSymbol “ea”
IsFixedUnitSymbolAssigned “No”
SystemOfUnits “None”
IsSystemUnit “No”
FixedUnitSymbolAssignment “Pieces”
UnitClass “Quantity”
UnitDescription “Each”
IsBaseUnit “Yes”
DecimalPrecision 0
NationalCode ""

Postman

Request for get data

GET: https://{{base_url}}/data/UnitsOfMeasure(UnitSymbol='ea')

Header:
OData-Version:4.0
OData-MaxVersion:4.0
Content-Type:application/json;odata.metadata=minimal
Accept:application/json;odata.metadata=minimal
Accept-Charset:UTF-8
Authorization:Bearer {{token}}
Host:{{base_url}}
Response:
{
    "@odata.context": "https://{{base_url}}/data/$metadata#UnitsOfMeasure/$entity",
    "@odata.etag": "W/\"JzAsMjI1NjU0MjExOTk7MCwyMjU2NTQyMTE5ODswLDA7MCw1NjM3MTQ0NTg1OzAsMCc=\"",
    "UnitSymbol": "ea",
    "IsFixedUnitSymbolAssigned": "No",
    "SystemOfUnits": "None",
    "IsSystemUnit": "No",
    "FixedUnitSymbolAssignment": "Pieces",
    "UnitClass": "Quantity",
    "UnitDescription": "Each",
    "IsBaseUnit": "Yes",
    "DecimalPrecision": 0,
    "NationalCode": ""
}

Request for create data

POST : https://{{base_url}}/data/UnitsOfMeasure

Header:
OData-Version:4.0
OData-MaxVersion:4.0
Content-Type:application/json;odata.metadata=minimal
Accept:application/json;odata.metadata=minimal
Accept-Charset:UTF-8
Authorization:Bearer {{token}}
Host:{{base_url}}
body:
{
    "@odata.type":"#Microsoft.Dynamics.DataEntities.UnitOfMeasure",
    "UnitSymbol": "bit"
}
Response:
{
    "@odata.context": "https://{{base_url}}/data/$metadata#UnitsOfMeasure/$entity",
    "@odata.etag": "W/\"JzEsNjg3MTk0Nzc2MTY7MCwwOzAsMDswLDA7MCwwJw==\"",
    "UnitSymbol": "bit",
    "IsFixedUnitSymbolAssigned": "No",
    "SystemOfUnits": "None",
    "IsSystemUnit": "No",
    "FixedUnitSymbolAssignment": "Pieces",
    "UnitClass": "Quantity",
    "UnitDescription": "",
    "IsBaseUnit": "No",
    "DecimalPrecision": 0,
    "NationalCode": ""
}

Request for update data

PATCH : https://{{base_url}}/data/UnitsOfMeasure(UnitSymbol='bit')

Header:
    OData-Version:4.0
    OData-MaxVersion:4.0
    Content-Type:application/json;odata.metadata=minimal
    Accept:application/json;odata.metadata=minimal
    Accept-Charset:UTF-8
    Authorization:Bearer {{token}}
    Host:{{base_url}}
body:
{
    "@odata.type":"#Microsoft.Dynamics.DataEntities.UnitOfMeasure",
    "DecimalPrecision": "3"
}
Response: Status: 204

Request for delete data

DELETE : https://{{base_url}}/data/UnitsOfMeasure(UnitSymbol='bit')

Header:
OData-Version:4.0
OData-MaxVersion:4.0
Content-Type:application/json;odata.metadata=minimal
Accept:application/json;odata.metadata=minimal
Accept-Charset:UTF-8
Authorization:Bearer {{token}}
Host:{{base_url}}
Response: Status: 204

Last modified February 12, 2021 : tmp check (bb0801d)