Users

Routes for managing users


Get User Details

GET/users/user/:userId

Retrieve details of a specific user by their user ID.

Required attributes

  • Name
    userId
    Type
    string
    Description

    The id of the user you wish to load

cURL

    curl https://your.platform.url/kong/core/api/gateway/users/user/501a4c57-acb8-40d6-b867-b833854a96b9 \
      -H "Authorization: Bearer {token}"

Sample Response

{
  "guid": "501a4c57-acb8-40d6-b867-b833854a96b9",
  "status": "Active",
  "username": "testuser",
  "contact": {
    "title": "Mr",
    "forename": "Test",
    "surname": "User",
    "fullName": "Mr Test User",
    "contactEmail": {
      "email": "test@user.com"
    },
    "dateCreated": null
  },
  "pivot": null,
  "data": []
}

Update User

PATCH/users/:userId

Updates the details for a specific user.

Required attributes

  • Name
    userId
    Type
    string
    Description

    The id of the user you wish to update

Body Parameters

  • Name
    tile
    Type
    string
    Description

    The users title

  • Name
    forename
    Type
    string
    Description

    The users forename

  • Name
    surname
    Type
    string
    Description

    The users surname

  • Name
    email
    Type
    string
    Description

    The users email address

cURL

    curl -X PATCH https://your.platform.url/kong/core/api/gateway/users/8c63ce30-bb74-4910-9c2e-510fb3792d5e \
      -H "Authorization: Bearer {token}" \
      -H "Content-Type: application/json" \
      -d '{
        "title": "Mr",
        "forename": "John",
        "surname": "Doe",
        "email": "john.doe@example.com"
  }'

Get User Data Forms

GET/forms

Retrieves all user data forms.

Required attributes

  • Name
    token
    Type
    string
    Description

    Authentication token required in Authorization header

cURL

    curl -X GET https://your.platform.url/kong/core/api/gateway/forms \
      -H "Authorization: Bearer {token}"

Sample Response

{
  "data": [
    {
      "name": "test form",
      "uuid": "64df4f2d-5d84-424c-ba9e-838d58b92049",
      "description": "this is a test form",
      "state": "published",
      "formFields": [
        {
          "label": "checkbox",
          "name": "checkbox",
          "uuid": "7bc2153f-a9b6-46b4-bde3-e3bd7c4f3ad5",
          "reference": "checkbox",
          "validator": null,
          "order": 0,
          "description": null,
          "placeholder": null,
          "prePopulationKey": null,
          "options": null,
          "formPage": null,
          "formFieldType": {
            "name": "CHECKBOX"
          },
          "formFieldConditions": []
        }
      ],
      "formPages": [],
      "formSettings": [],
      "formType": {
        "uuid": "57e1ade8-900d-4705-a469-c34e8501ea03",
        "name": "STANDARD"
      },
      "editorValidator": {
        "canDelete": true,
        "canEdit": true,
        "protectedFields": []
      }
    }
  ],
  "links": [
    {
      "url": null,
      "label": "pagination.previous",
      "active": false
    },
    {
      "url": "http://dev.deliowealth.com/api/form-builder/form?page=1",
      "label": "1",
      "active": true
    },
    {
      "url": null,
      "label": "pagination.next",
      "active": false
    }
  ],
  "meta": {
    "current_page": 1,
    "first_page_url": "http://dev.deliowealth.com/api/form-builder/form?page=1",
    "from": 1,
    "last_page": 1,
    "last_page_url": "http://dev.deliowealth.com/api/form-builder/form?page=1",
    "next_page_url": null,
    "path": "http://dev.deliowealth.com/api/form-builder/form",
    "per_page": 15,
    "prev_page_url": null,
    "to": 1,
    "total": 1
  }
}

Get Enabled User Forms

GET/forms/enabled

Retrieves all enabled user forms.

cURL

    curl -X GET https://your.platform.url/kong/core/api/gateway/forms/enabled \
      -H "Authorization: Bearer {token}"

Sample Response

[
  {
    "name": "test form",
    "uuid": "64df4f2d-5d84-424c-ba9e-838d58b92049",
    "description": "this is a test form",
    "state": "published",
    "formFields": [
      {
        "label": "checkbox",
        "name": "checkbox",
        "uuid": "7bc2153f-a9b6-46b4-bde3-e3bd7c4f3ad5",
        "reference": "checkbox",
        "validator": null,
        "order": 0,
        "description": null,
        "placeholder": null,
        "prePopulationKey": null,
        "options": null,
        "formPage": null,
        "formFieldType": {
          "name": "CHECKBOX"
        },
        "formFieldConditions": []
      }
    ],
    "formPages": [],
    "formSettings": [],
    "formType": {
      "uuid": "57e1ade8-900d-4705-a469-c34e8501ea03",
      "name": "STANDARD"
    },
    "editorValidator": {
      "canDelete": true,
      "canEdit": true,
      "protectedFields": []
    }
  }
]

Get User Data Form

GET/forms/:uuid

Retrieves a specific user data form.

Required attributes

  • Name
    uuid
    Type
    string
    Description

    The UUID of the form to retrieve

cURL

    curl -X GET https://your.platform.url/kong/core/api/gateway/forms/8c63ce30-bb74-4910-9c2e-510fb3792d5e \
      -H "Authorization: Bearer {token}"

Sample Response

{
  "name": "test form",
  "uuid": "64df4f2d-5d84-424c-ba9e-838d58b92049",
  "description": "this is a test form",
  "state": "published",
  "formFields": [
    {
      "label": "checkbox",
      "name": "checkbox",
      "uuid": "7bc2153f-a9b6-46b4-bde3-e3bd7c4f3ad5",
      "reference": "checkbox",
      "validator": null,
      "order": 0,
      "description": null,
      "placeholder": null,
      "prePopulationKey": null,
      "options": null,
      "formPage": null,
      "formFieldType": {
        "name": "CHECKBOX"
      },
      "formFieldConditions": []
    }
  ],
  "formPages": [],
  "formSettings": [],
  "formType": {
    "uuid": "57e1ade8-900d-4705-a469-c34e8501ea03",
    "name": "STANDARD"
  },
  "editorValidator": {
    "canDelete": true,
    "canEdit": true,
    "protectedFields": []
  }
}

Update User Data Form State

PATCH/forms/:uuid/state

Updates the state of a specific user data form.

Required attributes

  • Name
    uuid
    Type
    string
    Description

    The UUID of the form to update

  • Name
    state
    Type
    Enabled | Disabled
    Description

    The state to update the form to

cURL

    curl -X PATCH https://your.platform.url/kong/core/api/gateway/forms/8c63ce30-bb74-4910-9c2e-510fb3792d5e/state \
      -H "Authorization: Bearer {token}" \
      -H "Content-Type: application/json" \
      -d '{
        "state": "Enabled"
      }'

Create User Data Form Implementation For User

POST/forms/:uuid/user/:userGuid

Creates a form implementation for a specific user.

Required attributes

  • Name
    uuid
    Type
    string
    Description

    The UUID of the form template

  • Name
    userUuid
    Type
    string
    Description

    The UUID of the user to create the implementation for

cURL

    curl -X POST https://your.platform.url/kong/core/api/gateway/forms/8c63ce30-bb74-4910-9c2e-510fb3792d5e/user/8c63ce30-bb74-4910-9c2e-510fb3792d5e \
      -H "Authorization: Bearer {token}" \
      -H "Content-Type: application/json" \
      -d '{}'

Sample Response

{
  "uuid":"b4fb32a2-4f88-42bc-af0a-4d2fa67ae818",
  "createdAt":"2024-10-09T14:03:05.000000Z",
  "form": {...see form response above},
  "formFieldAnswers": [],
  "type":"TRANSACTION",
  "formImplementationAssignments": [
    {
      "uuid":"775922a0-cff8-11ee-8f8c-35cdaa30f76b",
      "type":"USER"
    },
    {
      "uuid":"5bb470e9-9f31-48db-9dab-db79af1c3664",
      "type":"DEAL"
    }
  ]
}