Lets us know your idea for our recommendation programm
POST/customers/ {customerId}/ recommendation-suggestions/
v2
POST
customer-create-recommendation-suggestion
Request
Responses
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ 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();