Creating a Answer for a Person
Creates an answer for a Person.
Method Info
| Url | https://www.payit2.com/api/v1/collect-page/{CollectPageId}/Person/{PayerId}/answer |
|---|---|
| Verb | POST |
| Headers | X-PayItSquare-AppKey, X-PayItSquare-Token |
| {CollectPageId} | The id of the collect page. |
| {PayerId} | The id of the Person. |
Input
| Property | Data Type | Validation Info |
|---|---|---|
| QuestionId | Guid | The ID of the question being answered. |
| AnswerText | String | The answer for the question. |
| OptionId | Nullable`1 | If the question has options, this is the id of the option they've selected. |
Output
| Property | Data Type | Other Info |
|---|---|---|
| Id | Int32 | The id of the created object. It will be used as part of the url for subsequent updates. Only available if the creation was successful. |
| IsSuccess | Boolean | Indicates if the call was successful or not. |
| Messages | String Array | Will contain a list of error messages if IsSuccess is false |
Sample Input
{
"QuestionId": "29c94f47-ade4-4ca6-8bdf-7e9206c6444b",
"AnswerText": "My Answer",
"OptionId": null
}
Sample Success Response
{
"Id": 1234,
"IsSuccess": true,
"Messages": []
}
Sample Error Response
{
"Id": 0,
"IsSuccess": false,
"Messages": [
"Error Message 1",
"Error Message 2"
]
}