{"id":36285,"date":"2024-08-21T13:59:37","date_gmt":"2024-08-21T12:59:37","guid":{"rendered":"https:\/\/developers.ila.cegid.com\/valuekeep\/\/"},"modified":"2024-12-26T18:29:53","modified_gmt":"2024-12-26T17:29:53","slug":"webapi-creating-a-misc-cost-type","status":"publish","type":"valuekeep","link":"https:\/\/developers.ila.cegid.com\/en\/valuekeep\/development-en\/transversal-en\/article\/webapi-creating-a-misc-cost-type","title":{"rendered":"How to create or delete a miscellaneous cost type?"},"content":{"rendered":"<section class=\"av_textblock_section \"  itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/CreativeWork\" ><div class='avia_textblock  '   itemprop=\"text\" ><h2>Create Miscellaneous Cost Type<\/h2>\n<div>This method allows to create a misc cost type in a simplified manner.<\/div>\n<div><\/div>\n<div>The method to be used when creating a type of misc cost is: <b>POST\u00a0<\/b><b> url\/api\/mytenant\/myorganization\/maintenancecore\/misccoststypes<\/b><\/div>\n<div><\/div>\n<div>Json example for creating a type of misc cost:<\/div>\n<div>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\">\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"miscCostTypeKey\":\u00a0\"JANTAR\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"description\":\u00a0\"Jantar\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"maxValue\":\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"amount\":\u00a0100.00,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"fractionDigits\":\u00a02,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"symbol\":\u00a0\"\u20ac\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"minValue\":\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"amount\":\u00a012.00,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"fractionDigits\":\u00a02,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"symbol\":\u00a0\"\u20ac\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"defaultValue\":\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"amount\":\u00a025.00,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"fractionDigits\":\u00a02,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"symbol\":\u00a0\"\u20ac\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0},\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"remarks\":\u00a0null,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"miscCost\":\u00a0\"Refei\u00e7oes\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"currency\":\u00a0\"EUR\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"company\":\u00a0\"DEMO\"\r\n\u00a0\u00a0\u00a0\u00a0}<\/pre>\n<p><span style=\"font-size: 12pt;\">This method allows to create a type of misc cost according to the parameters filled in:<\/span><\/p>\n<\/div>\n<div>\n<ol>\n<li style=\"list-style-type: disc;\"><span style=\"font-size: 12pt;\"><b>misccostTypeKey<\/b>: The misc cost type key. This field is mandatory.<\/span><\/li>\n<li style=\"list-style-type: disc;\"><span style=\"font-size: 12pt;\"><b>description<\/b>: Short description of the misc cost type. This field is mandatory.<\/span><\/li>\n<li style=\"list-style-type: disc;\"><span style=\"font-size: 12pt;\"><b>maxValue<\/b>: Maximum value.<\/span><\/li>\n<li style=\"list-style-type: disc;\"><span style=\"font-size: 12pt;\"><b>minValue<\/b>: Minimum value.<\/span><\/li>\n<li style=\"list-style-type: disc;\"><span style=\"font-size: 12pt;\"><b>defaultValue<\/b>: Default value.<\/span><\/li>\n<li style=\"list-style-type: disc;\"><span style=\"font-size: 12pt;\"><b>remarks<\/b>: Remarks.<\/span><\/li>\n<li style=\"list-style-type: disc;\"><span style=\"font-size: 12pt;\"><b>miscCost<\/b>: The misc cost key. This field is mandatory.<\/span><\/li>\n<li style=\"list-style-type: disc;\"><span style=\"font-size: 12pt;\"><b>currency<\/b>: The currency&#8217;s key. This field is mandatory.<\/span><\/li>\n<li style=\"list-style-type: disc;\"><span style=\"font-size: 12pt;\"><b>company<\/b>: The company&#8217;s key. This field is mandatory.<\/span><\/li>\n<\/ol>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0cm; line-height: normal; background: white;\"><span style=\"font-size: 12pt; color: #333333;\">When this method is executed successfully, it returns HttpStatusCode.201Created.<\/span><\/p>\n<\/div>\n<div><\/div>\n<\/div><\/section>\n<section class=\"av_textblock_section \"  itemscope=\"itemscope\" itemtype=\"https:\/\/schema.org\/CreativeWork\" ><div class='avia_textblock  '   itemprop=\"text\" ><h2>Delete Miscellaneous Cost Type<\/h2>\n<p><span style=\"font-weight: 400;\">This method allows you to delete a misc cost type.<\/span><\/p>\n<p style=\"font-weight: 400;\">The method to be used when deleting a misc cost type is:<\/p>\n<p><b><strong>DELETE\u00a0 url\/api\/mytenant\/myorganization\/maintenancecore\/misccoststypes\/{{companyKey}}\/{{misccoststypeKey}}<\/strong><\/b><\/p>\n<p>The parameters being replaced on the method are:<\/p>\n<ol>\n<li><b><strong>companyKey<\/strong><\/b>: Company key.<\/li>\n<li><b><strong>misccoststypeKey<\/strong><\/b>: The key of the misc cost type you wish to delete.<\/li>\n<\/ol>\n<p>When this method is executed successfully, it returns HttpStatusCode.204.<\/p>\n<\/div><\/section>\n","protected":false},"excerpt":{"rendered":"","protected":false},"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","tags":[912],"videos_tax":[],"post-type":[],"categoria-valuekeep":[947],"class_list":["post-36285","valuekeep","type-valuekeep","status-publish","format-standard","hentry","tag-costs","categoria-valuekeep-transversal-en"],"_links":{"self":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/valuekeep\/36285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/valuekeep"}],"about":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/types\/valuekeep"}],"replies":[{"embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/comments?post=36285"}],"version-history":[{"count":0,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/valuekeep\/36285\/revisions"}],"wp:attachment":[{"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/media?parent=36285"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/tags?post=36285"},{"taxonomy":"videos_tax","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/videos_tax?post=36285"},{"taxonomy":"post-type","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/post-type?post=36285"},{"taxonomy":"categoria-valuekeep","embeddable":true,"href":"https:\/\/developers.ila.cegid.com\/en\/wp-json\/wp\/v2\/categoria-valuekeep?post=36285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}