{"title":"Delete latest cost contract","category":"default","creationDate":1776961629,"content":"<p>When replacing a cost contract, you first need to make a <code>deleteLastCostContract<\/code> request to remove the previous inactive cost contract. Then, proceed to create a new one with <a href=\"\/pt\/account-management-api\/manage-cost-contracts\/addcostcontract\">addCostContract<\/a>.<\/p>\n<p>This endpoint does not support partial updates.<\/p>\n<p>In case an error occurs during a <code>\/deleteLatestCostContract<\/code> update:<\/p>\n<ul>\n<li>No changes are applied.<\/li>\n<li>Current data is kept.<\/li>\n<li>The entire update fails.<\/li>\n<\/ul>\n<h2 id=\"deletelatestcostcontract-request-fields\">Request parameters<\/h2>\n<p>To delete the oldest inactive cost contract for a specific account key, make a POST <code>\/deleteLatestCostContract<\/code> request specifying:  <\/p>\n<table><thead><tr class=\"header\"><th>Name<\/th><th>Type<\/th><th>Required<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>\n<p><code>accountKey<\/code><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<center><center><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/center><\/center>\n<\/td><td><p>Unique reference to identify an account.\n\n-   Company account key format: `Company.COMPANY_CODE`\n-   Merchant account key format:\u00a0`Merchant.MERCHANT_CODE`<br>\n<\/p><\/td><\/tr><\/tbody><\/table>\n<h2 id=\"deletelatestcostcontract-response-fields\">Response parameters<\/h2>\n<p>If there are no errors in the request, the call returns\u00a0a\u00a0<code>pspReference.<\/code>If any issues occur during the process, the call returns one or more warning or error messages.<\/p>\n<table><thead><tr class=\"header\"><th>Name<\/th><th>Type<\/th><th>Returned\u00a0by\u00a0default<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>\n<p><strong><code>pspReference<\/code><\/strong><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<center><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/center>\n<\/td><td>\n<p>A reference to uniquely identify the request.<\/p>\n<\/td><\/tr><tr><td>\n<p><strong><code>warnings<\/code><\/strong><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<center><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/center>\n<\/td><td>Warning message(s) about problems encountered while trying to delete the oldest inactive cost contract.<br>\nReturned when the oldest inactive cost contract deletion for the specified account key does not work as expected.<\/td><\/tr><tr><td>\n<p><strong><code>errors<\/code><\/strong><\/p>\n<\/td><td>\n<p>String<\/p>\n<\/td><td>\n<center><img title=\"-x-\" alt=\"-x-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/x.png\" \/><\/center>\n<\/td><td><p>Error message(s) about problems encountered while trying to delete the oldest inactive cost contract.<br>\nReturned when the oldest inactive cost contract deletion for the specified account key fails.<\/p><\/td><\/tr><\/tbody><\/table>\n<h2>Examples<\/h2>\n<h3 id=\"request\">Request<\/h3>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'1485944773'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{  \\n   \\\"accountKey\\\":\\\"MerchantAccount.TestMerchant\\\"\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"\\u00a0&lt;soap:Envelope xmlns:soap=\\\"http:\\\/\\\/schemas.xmlsoap.org\\\/soap\\\/envelope\\\/\\\" xmlns:xsd=\\\"http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema\\\" xmlns:xsi=\\\"http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema-instance\\\"&gt;\\n  &lt;soap:Body&gt;\\n    &lt;deleteLatestCostContract xmlns=\\\"http:\\\/\\\/caaccount.services.adyen.com\\\"&gt;\\n      &lt;request&gt;\\n        &lt;accountKey&gt;MerchantAccount.TestMerchant&lt;\\\/accountKey&gt;\\n      &lt;\\\/request&gt;\\n    &lt;\\\/deleteLatestCostContract&gt;\\n  &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3 id=\"response\">Response<\/h3>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'422534969'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{  \\n   \\\"pspReference\\\":\\\"9914526949160163\\\"\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"\\u00a0&lt;soap:Envelope xmlns:soap=\\\"http:\\\/\\\/schemas.xmlsoap.org\\\/soap\\\/envelope\\\/\\\" xmlns:ns0=\\\"http:\\\/\\\/caaccount.services.adyen.com\\\" xmlns:xsd=\\\"http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema\\\" xmlns:xsi=\\\"http:\\\/\\\/www.w3.org\\\/2001\\\/XMLSchema-instance\\\"&gt;\\n  &lt;soap:Body&gt;\\n    &lt;ns0:deleteLatestCostContractResponse&gt;\\n      &lt;ns0:response&gt;\\n        &lt;ns0:pspReference&gt;9914140650000269&lt;\\\/ns0:pspReference&gt;\\n      &lt;\\\/ns0:response&gt;\\n    &lt;\\\/ns0:deleteLatestCostContractResponse&gt;\\n  &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>","url":"https:\/\/docs.adyen.com\/pt\/account-management-api\/manage-cost-contracts\/deletelatestcostcontract","articleFields":{"id":"25134965","type":"page","description":"Delete the most recent inactive cost contract for an account key.","_expandable":{"operations":""},"status":"current"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/account-management-api\/manage-cost-contracts\/deletelatestcostcontract","title":"Delete latest cost contract","content":"When replacing a cost contract, you first need to make a deleteLastCostContract request to remove the previous inactive cost contract. Then, proceed to create a new one with addCostContract.\nThis endpoint does not support partial updates.\nIn case an error occurs during a \/deleteLatestCostContract update:\n\nNo changes are applied.\nCurrent data is kept.\nThe entire update fails.\n\nRequest parameters\nTo delete the oldest inactive cost contract for a specific account key, make a POST \/deleteLatestCostContract request specifying:  \nNameTypeRequiredDescription\naccountKey\n\nString\n\n\nUnique reference to identify an account.\n\n-   Company account key format: `Company.COMPANY_CODE`\n-   Merchant account key format:\u00a0`Merchant.MERCHANT_CODE`\n\nResponse parameters\nIf there are no errors in the request, the call returns\u00a0a\u00a0pspReference.If any issues occur during the process, the call returns one or more warning or error messages.\nNameTypeReturned\u00a0by\u00a0defaultDescription\npspReference\n\nString\n\n\n\nA reference to uniquely identify the request.\n\nwarnings\n\nString\n\n\nWarning message(s) about problems encountered while trying to delete the oldest inactive cost contract.\nReturned when the oldest inactive cost contract deletion for the specified account key does not work as expected.\nerrors\n\nString\n\n\nError message(s) about problems encountered while trying to delete the oldest inactive cost contract.\nReturned when the oldest inactive cost contract deletion for the specified account key fails.\nExamples\nRequest\n\n    \n\nResponse\n\n    \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Account management API","lvl2":"Manage cost contracts","lvl3":"Delete latest cost contract"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/account-management-api","lvl2":"https:\/\/docs.adyen.com\/pt\/account-management-api\/manage-cost-contracts","lvl3":"\/pt\/account-management-api\/manage-cost-contracts\/deletelatestcostcontract"},"levels":4,"category":"","category_color":"","tags":["Delete","latest","contract"]},"articleFiles":{"422534969.json":"<p alt=\"\">422534969.json<\/p>","1485944773.json":"<p alt=\"\">1485944773.json<\/p>"}}
