Zum Hauptinhalt springen

Schedule an Extension Instance Variant change for the next possible date

POST/v2/extension-instances/{extensionInstanceId}/contract/variant-change
API-Version
v2
Request-Methode
POST
Operation-ID
extension-schedule-extension-variant-change

Request​

  • extensionInstanceIdstring (uuid)required
    Beispiel:"d7238330-e080-494c-a7d4-9b3abf2e0764"

Responses​

Format
application/json
Beschreibung

A Variant Change was scheduled.

  • effectiveDatestring (date-time)

    The Date the variant change will be executed.

  • extensionInstanceIdstring (uuid)

    The ID of the Extension Instance the variant change was scheduled for.

Content-Type: application/json

{
"effectiveDate": "1985-10-26T01:21:00.000Z",
"extensionInstanceId": "f0f86186-0a5a-45b2-aa33-502777496347"
}
{
"properties": {
"effectiveDate": {
"description": "The Date the variant change will be executed.",
"format": "date-time",
"type": "string"
},
"extensionInstanceId": {
"description": "The ID of the Extension Instance the variant change was scheduled for.",
"format": "uuid",
"type": "string"
}
}
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X POST \
-d '{"targetVariantKey":"string"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/extension-instances/f0f86186-0a5a-45b2-aa33-502777496347/contract/variant-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.marketplace.extensionScheduleExtensionVariantChange({
"extensionInstanceId": "f0f86186-0a5a-45b2-aa33-502777496347",
"data": {
"targetVariantKey": "string"
}
});

assertStatus(response, 201);

use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionScheduleExtensionVariantChange\ExtensionScheduleExtensionVariantChangeRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionScheduleExtensionVariantChange\ExtensionScheduleExtensionVariantChangeRequestBody;

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

// TODO: Please consult the properties and constructor signature of
// ExtensionScheduleExtensionVariantChangeRequestBody to learn how to construct a valid instance
$body = new ExtensionScheduleExtensionVariantChangeRequestBody(/* TODO: ... */);

$request = (new ExtensionScheduleExtensionVariantChangeRequest(
extensionInstanceId: "f0f86186-0a5a-45b2-aa33-502777496347",
body: $body
));
$response = $client->marketplace()->extensionScheduleExtensionVariantChange($request);

var_dump($response->getBody();

Auf dieser Seite