Zum Hauptinhalt springen

Lets us know your idea for our recommendation programm

POST/v2/customers/{customerId}/recommendation-suggestions
API-Version
v2
Request-Methode
POST
Operation-ID
customer-create-recommendation-suggestion

Request​

  • customerIdstringrequired
    Beispiel:"edefeee4-e8e9-4e2d-ab95-9a2eb6104cfb"

Responses​

Format
application/json
Beschreibung

The suggestion has been made.

  • customerIdstring
Content-Type: application/json

{
"customerId": "edefeee4-e8e9-4e2d-ab95-9a2eb6104cfb"
}
{
"properties": {
"customerId": {
"example": "edefeee4-e8e9-4e2d-ab95-9a2eb6104cfb",
"type": "string"
}
},
"type": "object"
}

Nutzungsbeispiele​

$ curl \
--fail \
--location \
-X POST \
-d '{"suggestion":"a mittwald t-shirt"}' \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
-H 'Content-Type: application/json' \
https://api.mittwald.de/v2/customers/string/recommendation-suggestions
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.customer.createRecommendationSuggestion({
"customerId": "string",
"data": {
"suggestion": "a mittwald t-shirt"
}
});

assertStatus(response, 201);

use \Mittwald\ApiClient\Generated\V2\Clients\Customer\CreateRecommendationSuggestion\CreateRecommendationSuggestionRequest;
use \Mittwald\ApiClient\Generated\V2\Clients\Customer\CreateRecommendationSuggestion\CreateRecommendationSuggestionRequestBody;

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

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

$request = (new CreateRecommendationSuggestionRequest(
customerId: "string",
body: $body
));
$response = $client->customer()->createRecommendationSuggestion($request);

var_dump($response->getBody();

Auf dieser Seite