POST api/reviews/{reviewId}/comments
Create a new comment.
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| reviewId |
reviewId either a number or encrypted Id. |
string |
Required |
Body Parameters
The used to create the comment for a review id.
CommentCreateRequestViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| CommentText |
Gets or sets the text of the comment. |
string |
Required Max length: 10000 Min length: 50 |
| CultureCode |
Gets or sets the Culture Code of the comment text (Optional). Default is en-us (English). |
string |
None. |
| CommentTranslations |
Gets or sets the Comment Translations (Optional). |
Collection of CommentTranslationViewModel |
None. |
Request Formats
application/json, text/json
Sample:
{
"CommentText": "sample string 1",
"CultureCode": "sample string 2",
"CommentTranslations": [
{
"CultureCode": "sample string 1",
"CommentText": "sample string 2"
},
{
"CultureCode": "sample string 1",
"CommentText": "sample string 2"
}
]
}
application/xml, text/xml
Sample:
<CommentCreateRequestViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Apts.Api.WebApi.Models.Comment">
<CommentText>sample string 1</CommentText>
<CommentTranslations>
<CommentTranslationViewModel>
<CommentText>sample string 2</CommentText>
<CultureCode>sample string 1</CultureCode>
</CommentTranslationViewModel>
<CommentTranslationViewModel>
<CommentText>sample string 2</CommentText>
<CultureCode>sample string 1</CultureCode>
</CommentTranslationViewModel>
</CommentTranslations>
<CultureCode>sample string 2</CultureCode>
</CommentCreateRequestViewModel>
application/x-www-form-urlencoded
Sample:
application/x-www-form-urlencoded not supported.
Response Information
Resource Description
CommentCreateResponseViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| CommentId |
Gets or sets Comment Id. |
integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"CommentId": 1
}
application/xml, text/xml
Sample:
<CommentCreateResponseViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Apts.Api.WebApi.Models.Comment"> <CommentId>1</CommentId> </CommentCreateResponseViewModel>