ResponseWrapperDynamicFormDto
Generic API response wrapper
Response status
Possible values: [SUCCESS, ERROR]
ERROR/SUCCESSMessage describing the response
Request failed/Request successfulCode message describing the response
ERR-001/SUC-001data object
Dynamic form structure with configurable fields
Total number of fields in the dynamic form
3fieldList object[]
List of fields in the dynamic form
The label of the form field displayed to the user, e.g., 'First Name'.
First NameThe internal name used to identify the form field, e.g., 'firstName'.
firstNameThe type of data expected in the form field, e.g., 'text', 'number', or 'email'.
textdataValueList object[]
A list of select values if the field is a dropdown type.
The unique value to represent the option
123The display label for the option
Option AThe data format or pattern expected for the field, e.g., 'yyyy-MM-dd' for a date field.
yyyy-MM-ddThe minimum size or length for the data entered in the form field.
3The maximum size or length for the data entered in the form field.
50criteriaList object[]
Label describing the criteria
ReferenceValue associated with the criteria
refList of fields attached to this criteria
["payment reference"]error object
Details of any error that occurred
Error code
ERR-142Human-readable error message
Resource not founddetails object[]
List of error details
Specific error code
ER4001What went wrong
Invalid inputField that caused the issue
usernameSuggested fixes
["Check the resource ID","Ensure the resource exists"]metaData object
Extra metadata to help debugging
Timestamp of when the response was generated
22024-10-14T14:28:11.284+01:00{
"status": "ERROR/SUCCESS",
"message": "Request failed/Request successful",
"codeMessage": "ERR-001/SUC-001",
"data": {
"fieldCount": 3,
"fieldList": [
{
"dataLabel": "First Name",
"dataName": "firstName",
"dataType": "text",
"dataValueList": [
{
"key": "1",
"value": "Option 1"
},
{
"key": "2",
"value": "Option 2"
}
],
"dataFormat": "yyyy-MM-dd",
"sizeMin": 3,
"sizeMax": 50
}
],
"criteriaCount": 0,
"criteriaList": [
{
"dataLabel": "Reference",
"dataValue": "ref",
"attachedFields": [
"payment reference"
]
}
]
},
"error": {
"code": "ERR-142",
"message": "Resource not found",
"details": [
{
"code": "ER4001",
"message": "Invalid input",
"target": "username"
},
{
"code": "ER4002",
"message": "Missing field",
"target": "email"
}
],
"suggestions": [
"Check the resource ID",
"Ensure the resource exists"
],
"metaData": {}
},
"timestamp": "22024-10-14T14:28:11.284+01:00"
}