Creating a Question
Creates a question for a collect page.
Method Info
Url | https://www.payit2.com/api/v1/collect-page/{CollectPageId}/question |
---|---|
Verb | POST |
Headers | X-PayItSquare-AppKey, X-PayItSquare-Token |
{CollectPageId} | The id of the collect page. |
Input
Property | Data Type | Validation Info |
---|---|---|
Id | Guid | The id of the question. This will be needed for calls to update or delete the individual question. |
QuestionType | Int32 | This is the type of control to use for this question. PayIt2 supports the following question types: Text Box (1), Text Area (2), Drop Down (3), Checkbox (4), Number (5). and Short Text Box (6) |
QuestionText | String | The text to use for the question |
IsRequired | Boolean | When true, payers must enter a value to continue |
SortOrder | Int32 | This determines the order that the question will display on the collect page. |
Output
Property | Data Type | Other Info |
---|---|---|
Id | Guid | 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
{ "QuestionType": 1, "QuestionText": "My Question", "IsRequired": true, "SortOrder": 3 }
Sample Success Response
{ "Id": "1de0c70d-1a1c-4c27-8371-ec2d3fe0c2d2", "IsSuccess": true, "Messages": [] }
Sample Error Response
{ "Id": "00000000-0000-0000-0000-000000000000", "IsSuccess": false, "Messages": [ "Error Message 1", "Error Message 2" ] }