Content

Get document


Generates a document assigned to a slug.

Method name: getDocument(slugName);

Declaration

public static IDataApiCall<Object> getDocument(String slugName)

Parameters

Parameter Type Mandatory Default Description
slugName String yes - Specify the name of the slug.

Return Value

IDataApiCall<Object> object to execute the request.

Example

apiCall = Content.getDocument("slug");
apiCall.execute(this::onSuccess, this::onFailure);

Get documents


Generates all documents assigned to a schema.

Method name: getDocuments(slugName);

Declaration

public static IDataApiCall<List<Object>> getDocument(DocumentsApiQuery documentsApiQuery)

Parameters

Parameter Type Mandatory Default Description
documentsApiQuery DocumentsApiQuery yes - Object for configuration of the query parameters

Return Value

IDataApiCall<List<Object>> object to execute the request.

Example

DocumentsApiQuery documentsApiQuery = new DocumentsApiQuery();
documentsApiQuery.setVersion("1.0.0");
documentsApiQuery.setDocumentQueryParameters(DocumentsApiQueryType.SCHEMA, "promotions");
apiCall = Content.getDocuments(documentsApiQuery);
apiCall.execute(this::onSuccess, this::onFailure);

Get recommendations


Return a list of recommendations assigned to a slug.

Method name: getRecommendations(slugName, options);

Declaration

public static IDataApiCall<RecommendationResponse> getRecommendations(String slugName, RecommendationRequestBody options)

Parameters

Parameter Type Mandatory Default Description
slugName String yes - Specify the name of the slug.
options RecommendationRequestBody yes - Object which stores the ID of an item to generate recommendations for.

Return Value

IDataApiCall<RecommendationResponse> object to execute the request.

Example

RecommendationRequestBody requestBody = new RecommendationRequestBody();
requestBody.setProductId("1");
String slugName = "testSlugName";
apiCall = Content.getRecommendations(slugName, requestBody);
apiCall.execute(this::onSuccess, this::onFailure);
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.