Valuekeep DevelopmentTransversal
DevelopmentTransversal
Transversal
Back | List of Articles

How to create or delete a unit?

Last changed in 14/01/2025

It is possible to create or delete a unit.

Creating a unit

This method allows to create a unit in a simplified manner.

The method to be used when creating a unit is: POST url/api/mytenant/myorganization/corepatterns/units

Json example for creating a unit:
{
        "unitKey": "HR",
        "description": "Hora",
        "precisionDigits": 2,
        "conversionFactor": 1.0,
        "symbol": "HR",
        "isDimensionBaseUnit": false,
        "dimension": "01"
    }

This method allows to create a unit according to the parameters filled in:

  1. unitKey: The key of the unit. Mandatory field.
  2. description: Short description of the unit. This field is mandatory.
  3. precisionDigits: Number of decimal places.
  4. conversionFactor: Conversion factor.
  5. symbol: Symbol.
  6. isDimensionBaseUnit: Dimension base unit. Fill in this field with true or false. There can only exist one unit with this field active (true).
  7. dimension: Dimension. (01-Quantity; 02- Weight; 03-Time; 04-Length). Mandatory field.

When this method is executed successfully, it returns HttpStatusCode.201Created.

Deleting a unit

This method allows you to delete a unit.

The method to be used when deleting a unit is: DELETE  url/api/mytenant/myorganization/corepatterns/units/{{unitKey}}
The parameters being replaced on the method are:
  • unitKey: key of the unit you wish to delete.
When this method is executed successfully, it returns HttpStatusCode.204.
Bookmark or share this article
Esta página foi útil?
Obrigado pelo seu voto.

login para deixar a sua opinião.

Obrigado pelo seu feedback. Iremos analisá-lo para continuarmos a melhorar!
Related Articles
How to create or delete a maintenance plan? How to get the list of maintenance plans? How to create or delete a miscellaneous cost type? How to get the list of miscellaneous cost types? How to create or delete a miscellaneous cost?