Skip to main content

ResponseWrapperDynamicFormDto

Generic API response wrapper

statusstring

Response status

Possible values: [SUCCESS, ERROR]

Example: ERROR/SUCCESS
messagestring

Message describing the response

Example: Request failed/Request successful
codeMessagestring

Code message describing the response

Example: ERR-001/SUC-001
data object

Dynamic form structure with configurable fields

fieldCountinteger<int32>

Total number of fields in the dynamic form

Example: 3
fieldList object[]

List of fields in the dynamic form

  • Array [
  • dataLabelstring

    The label of the form field displayed to the user, e.g., 'First Name'.

    Example: First Name
    dataNamestring

    The internal name used to identify the form field, e.g., 'firstName'.

    Example: firstName
    dataTypestring

    The type of data expected in the form field, e.g., 'text', 'number', or 'email'.

    Example: text
    dataValueList object[]

    A list of select values if the field is a dropdown type.

  • Array [
  • valuestring

    The unique value to represent the option

    Example: 123
    labelstring

    The display label for the option

    Example: Option A
  • ]
  • dataFormatstring

    The data format or pattern expected for the field, e.g., 'yyyy-MM-dd' for a date field.

    Example: yyyy-MM-dd
    sizeMininteger<int32>

    The minimum size or length for the data entered in the form field.

    Example: 3
    sizeMaxinteger<int32>

    The maximum size or length for the data entered in the form field.

    Example: 50
  • ]
  • criteriaCountinteger<int32>
    criteriaList object[]
  • Array [
  • dataLabelstring

    Label describing the criteria

    Example: Reference
    dataValuestring

    Value associated with the criteria

    Example: ref
    attachedFieldsstring[]

    List of fields attached to this criteria

    Example: ["payment reference"]
  • ]
  • error object

    Details of any error that occurred

    codestring

    Error code

    Example: ERR-142
    messagestring

    Human-readable error message

    Example: Resource not found
    details object[]

    List of error details

  • Array [
  • codestring

    Specific error code

    Example: ER4001
    messagestring

    What went wrong

    Example: Invalid input
    targetstring

    Field that caused the issue

    Example: username
  • ]
  • suggestionsstring[]

    Suggested fixes

    Example: ["Check the resource ID","Ensure the resource exists"]
    metaData object

    Extra metadata to help debugging

    property name*string
    timestampstring<date-time>

    Timestamp of when the response was generated

    Example: 22024-10-14T14:28:11.284+01:00
    ResponseWrapperDynamicFormDto
    {
    "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"
    }