Valuekeep DevelopmentTransversal
DevelopmentTransversal
Transversal
Back | List of Articles

How to create or delete a miscellaneous cost type?

Last changed in 26/12/2024

Create Miscellaneous Cost Type

This method allows to create a misc cost type in a simplified manner.
The method to be used when creating a type of misc cost is: POST  url/api/mytenant/myorganization/maintenancecore/misccoststypes
Json example for creating a type of misc cost:
 {
        "miscCostTypeKey": "JANTAR",
        "description": "Jantar",
        "maxValue": {
            "amount": 100.00,
            "fractionDigits": 2,
            "symbol": "€"
        },
        "minValue": {
            "amount": 12.00,
            "fractionDigits": 2,
            "symbol": "€"
        },
        "defaultValue": {
            "amount": 25.00,
            "fractionDigits": 2,
            "symbol": "€"
        },
        "remarks": null,
        "miscCost": "Refeiçoes",
        "currency": "EUR",
        "company": "DEMO"
    }

This method allows to create a type of misc cost according to the parameters filled in:

  1. misccostTypeKey: The misc cost type key. This field is mandatory.
  2. description: Short description of the misc cost type. This field is mandatory.
  3. maxValue: Maximum value.
  4. minValue: Minimum value.
  5. defaultValue: Default value.
  6. remarks: Remarks.
  7. miscCost: The misc cost key. This field is mandatory.
  8. currency: The currency's key. This field is mandatory.
  9. company: The company's key. This field is mandatory.

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

Delete Miscellaneous Cost Type

This method allows you to delete a misc cost type.

The method to be used when deleting a misc cost type is:

DELETE  url/api/mytenant/myorganization/maintenancecore/misccoststypes/{{companyKey}}/{{misccoststypeKey}}

The parameters being replaced on the method are:

  1. companyKey: Company key.
  2. misccoststypeKey: The key of the misc cost type 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.
Related Articles
How to create or delete a maintenance plan? How to get the list of maintenance plans? How to get the list of miscellaneous cost types? How to create or delete a miscellaneous cost? How to get the list of miscellaneous costs?