Zum Hauptinhalt springen

Cancel the TariffChange for the referred ContractItem

DELETE/v2/contracts/{contractId}/items/{contractItemId}/tariff-change
API-Version
v2
Request-Methode
DELETE
Operation-ID
contract-cancel-contract-tariff-change

Request​

  • contractIdstringrequired
  • contractItemIdstring (uuid)required

    The uuid of the active ContractItem (not the one that would replace the old one after the TariffChange) for which the TariffChange is to be cancelled. Only works for ContractItems for which a TariffChange is stored.

    Beispiel:"f6bb2d44-e6be-46dc-96f7-9602a7177a75"

Responses​

Format
application/json
Beschreibung

Returns the contractId of the Contract whose TariffChange was cancelled.

  • contractIdstring (uuid)
  • contractItemIdstring (uuid)
  • isCancelledboolean
Content-Type: application/json

{
"contractId": "f0f86186-0a5a-45b2-aa33-502777496347",
"contractItemId": "f0f86186-0a5a-45b2-aa33-502777496347",
"isCancelled": true
}
{
"properties": {
"contractId": {
"format": "uuid",
"type": "string"
},
"contractItemId": {
"format": "uuid",
"type": "string"
},
"isCancelled": {
"type": "boolean"
}
}
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X DELETE \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/contracts/string/items/f0f86186-0a5a-45b2-aa33-502777496347/tariff-change
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.contract.cancelContractTariffChange({
"contractId": "string",
"contractItemId": "f0f86186-0a5a-45b2-aa33-502777496347"
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Contract\CancelContractTariffChange\CancelContractTariffChangeRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new CancelContractTariffChangeRequest(
contractId: "string",
contractItemId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->contract()->cancelContractTariffChange($request);

var_dump($response->getBody();

Auf dieser Seite