Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Add a users feedback

Description

The Add() method is used to add/log a users feedback. This is usually performed after they have submitted their service request and they are presented with a feedback form.

Package Details

Interface

IFeedbackManager

Syntax

feedbackManager.Add(feedback)

Returns

MTOA.DomainObjects.FeedbackTask<Feedback>

API Endpoint

[POST
/api/v1/feedbackRequest Body
{

Parameters

Parameter

Description

Parameter Type

FeedbackDTO

Feedback

Request body

Sample request body

Code Block
languagejson
{
  "ServiceId": 0, // must be a valid service id

...


  "Rating": 0, // number must be between 1 and 5

...


  "Comment": "string"

...


}

Returns

On success, 200 - OkOk

On error, 400 Bad Request

On authorization error, 403 Forbidden

Example

using MTOA.BLL.Interfaces;
Code Block
languagec#
var feedback = new Feedback
{
    Comment = "A comment",
    Rating = 4, //must be a value between 1 - 5
    ServiceId = 11 //must be a valid service id
};

var returnValfeedback = await _feedbackManager.Add(feedback);