Class ByProjectKeyAgentsIntakeV1ResponsesPostString

All Implemented Interfaces:
ClientRequestCommand<AgentResponsesSuccess>, CreateHttpRequestCommand, HttpRequestCommand<AgentResponsesSuccess>, RequestCommand<AgentResponsesSuccess>

public class ByProjectKeyAgentsIntakeV1ResponsesPostString extends StringBodyApiMethod<ByProjectKeyAgentsIntakeV1ResponsesPostString,AgentResponsesSuccess>

Turns a natural-language prompt, optionally with supporting files, into a created Cart, QuoteRequest, or ShoppingList, returned in commercetools REST representation. The entity to create is set by outputType and is never inferred from the input.

A ShoppingList additionally requires a name for the list in the input. The Intake Agent never invents one. Unlike a Cart or Quote Request, a Shopping List does not require a country.

Non-fatal issues, such as requested Products that could not be matched to the catalog or a file that failed to parse, are reported as warnings alongside a successful 201 response rather than failing the request.

Accepts either an application/json body or a multipart/form-data request. An application/json body requires prompt. A multipart/form-data request requires prompt, an uploaded file, or both. See Multipart form data for the file upload format.

If the Intake Agent is not enabled for the Project, a FeatureDisabled error is returned.

For a list of possible errors returned by the Intake Agent, see Intake Agent Errors type.



   CompletableFuture<ApiHttpResponse<com.commercetools.api.models.agent.AgentResponsesSuccess>> result = apiRoot
            .withProjectKey("{projectKey}")
            .agents()
            .intake()
            .v1()
            .responses()
            .post("")
            .execute()