Get contents

Inorder to retrieve the contents of a Dialogue and display it on your app, you need to first prepare the payload.

   "apiKey":"[Your API Key]",
   "emailHash":"[The hash of your email]",
   "slug":"[Your Slug]",
   "IsPilotVersion":null, //Set this to get Pilot data
   "variables":null, //Your variables and corresponding values if any.
   "pageSize":null, //In order to get paginated data.
   "pageIndex":null //In order to get paginated data.

Now that you have the payload ready, you can call the GetContents endpoint and POST the payload as part of the body.

If the contents are retrieved successfully, it will return you a response which will contain a status code, reason phrase and response. The status code indicates the standard HTTP response status codes and the reason phrase will contain the corresponding reason for the status code. The response will have the content which can be displayed on your app.

A sample response would look like the one below.

            "dish-name":"Chicken Hot Dog",
            "long-description":"Chicken Hot Dog with mayonnaise.",
            "short-description":"Chicken Hot Dog with mayonnaise.",

Every record will contain an id and isSourceAPI field. The id field is a unique identifier that can be used to update or delete the record. The isSourceAPI field indicates if the record was added through the API or manually through the portal.