APIs

Data at your fingertips

Authentication

You can generate the Token by POSTing the following URL and REQUEST body

URL

https://backend.diceflow.in/api-auth/

Sample Request body

"root":{

  "username": "+919845612345"

  "password": "p4$sw0rd"

  "org_code": "MYORG"

}

Sample Response body

"root":{

  "id":"+919845612345"

  "code":"MYORG"

  "token":"eyJhbGciOiJIUzI1NiIsInVCJ9.eyJzdWI......."

}

Workflows

Released in Version 4.12.6. You can use the Token generated above (Authentication section) and bring down workflows in JSON format with the URL and REQUEST body, as specified below.

URL

https://backend.diceflow.in/analytics/workflows/

Header:

Authorization: The token to pass which identifies the user in the format, Bearer eyJhbGciOiJIUzI1NiIsInVCJ9.eyJzdWI.......

Sample Request body

"root":{

    "filter":{

      "workflowTypes": ["RASTTA - Screening ADH", "RASTTA - Risk Assessment - ADH"],

      "createdDate":{

         "start":"2024-01-01"

         "end":"2024-03-31"

       }

       "lastWorkedOnDate":{

       }

    }, # filter ends - pls remove this comment before using

    "pageSize":200,

    "pageNumber":1

} # root ends - pls remove this comment before using


Filters available:

Multiply pageSize by pageNumber to find the number of workflows which will be brought down.   Recommended maximum pageSize of 500 per request.

Sample Workflow in Response - Main Section 

Explanation of fields after # within response below; This is NOT shown in actual response; Field Names are only for illustration purposes.

   {

       "id": "03def31b-1bca-4966-8f1b-2789700408ee",     # Workflow System ID - Also, 1st column in Workflows export

       "type": {

           "id": "2b2b6b19-532f-4a93-b641-98dff34f3f36",

           "name": "RASTTA - Screening ADH"              # Workflow Name

       },

       "subtitle": "-",                                  # Workflow subtitle, if available

       "user": {

           "id": "c0e07b95-0c3d-4b19-a571-1be93a7a844f", # Assignee User System ID 

           "name": "Second Urb Tester",                  # Assignee Name

           "phoneNo": "+915555511111"                    # Assignee Phone Number

       },

       "affiliation": {

           "id": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a",

           "affiliationType": "member"                   # Workflow Affiliation type; Can be 'none',

       },                                                # 'member' or 'group' based on workflow affiliation

       "status": {

           "id": "5ef15d67-bd50-4aa9-ad8d-dfc3cfa80444",

           "name": "Open"                                # Current status of Workflow

       },


Sample Workflow in Response - Continued - Customfields

"customFields": [                                        # List of ALL Customfields and their values

           {

               "fieldId": "e61beefa-1384-4e98-9329-f300deb7f6ae",

               "name": "Consent for Interaction",        # Customfield Name

               "value": "-",                             # Customfield Value; '-' is undefined

               "affiliation": "member", # In Member affiliated workflows, this value is set to 'member'

                                        # In Group affiliated workflows, there might be 2 types of

                                        # customfields depending on whether you are storing at the

                                        # Group or Member level. So possible values are 'group' or

                                        # 'member'

                                        # In Unaffiliated Workflows, this value is set to 'none'

               "affiliationId": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a"

           },

           {

               "fieldId": "e2a322c4-2083-47f7-97a0-a2c0f9528c55",

               "name": "Request for Additional Information",

               "value": "-",

               "affiliation": "member",

               "affiliationId": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a"

           },

           {

               "fieldId": "f2eabcae-bf4b-4262-881e-be18abf9bf4b",

               "name": "Consent for Screening",

               "value": "-",

               "affiliation": "member",

               "affiliationId": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a"

           },

           field2 block {

           },

           field3 block {

           }, ... so on

] # customFields list ends


Sample Workflow in Response - Continued - Footer

       "dueDate": "2024-02-28",           # Due date of the Workflow

       "lastWorkedOnDate": "2024-02-27",  # Last worked on Date of the Workflow

       "lastUpdatedDate": "2024-02-27",   # Last updated Date of the workflow 

       "createdDate": "2024-02-27",       # Created Date of the workflow

       "isArchived": false,               # Is the workflow in Archived state?

       "previousOwners": [                # System User IDs of previous owners

           "c0e07b95-0c3d-4b19-a571-1be93a7a844f"

       ]

   },

// Previous Workflow Ends here

// Next Workflow Starts here

   {

       "id": "0733949a-87a5-49e1-a1a8-b633a5a24541",

       "type": {

           "id": "2b2b6b19-532f-4a93-b641-98dff34f3f36",

           "name": "RASTTA - Screening ADH"

       },

       "subtitle": "-",

       "user": {

           "id": "dbdb2724-18e4-4518-a9e6-3795aace6841",

           "name": "Test Nurse 2",

           "phoneNo": "+915555511112"

       }

Members

Released in Version 4.12.8.  You can use the Token generated above (Authentication section) and bring down members in JSON format with the URL and REQUEST body, as specified below.

URL

https://backend.diceflow.in/analytics/members/

Header:

Authorization: The token to pass which identifies the user in the format, Bearer eyJhbGciOiJIUzI1NiIsInVCJ9.eyJzdWI.......

Sample Request body

"root":{

    "filter":{

      "memberTypes": ["Family Member (Urban)", "Family Member (Rural)"],

      "createdDate":{

         "start":"2024-01-01"

         "end":"2024-03-31"

       }

    }, # filter ends - pls remove this comment before using

    "pageSize":200,

    "pageNumber":1

} # root ends - pls remove this comment before using


Filters available:

Multiply pageSize by pageNumber to find the number of members which will be brought down.  Recommended maximum pageSize of 500 per request.

Sample Member in Response - Main Section 

Explanation of fields after # within response below; This is NOT shown in actual response; Field Names are only for illustration purposes.

       "id": "e4992c0e-6c59-4e63-aa4e-12565ab7a296",     # Member System ID

       "name": "Member FullName",                        # Member Name

       "lastSeen": "13.05157, 77.57147",                 # Member Lat/Long

       "subtitle": "+91 98545600000"                     # Member Subtitle

       "type": {

           "id": "ec95a12a-1591-4d7b-aec2-588a5d43e198", 

           "name": "Family Member (Urban)"               # Member Type

       },

       "location": [                                     # Member location as defined in

           "Country": "India",                           # Structure > Hierarchy configuration

           "State": "Karnataka",

           "District": "Bengalore Central",

           "Zone": "Rajajinagar",

           "Ward": "Shakti Ganapathi Nagara",

           "WF": "Meenakshi A"

       ]


Sample Member in Response - Continued - customFields

"customFields": [                                        # List of ALL Customfields and their values

           {

               "fieldId": "e61beefa-1384-4e98-9329-f300deb7f6ae",

               "name": "Consent for Interaction",        # Customfield Name

               "value": "-",                             # Customfield Value; '-' is undefined

               "affiliation": "member", # In Members API, this value is set to 'member'

                                        # In Groups API, this value is set to 'group'

               "affiliationId": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a"

           },

           {

               "fieldId": "e2a322c4-2083-47f7-97a0-a2c0f9528c55",

               "name": "Request for Additional Information",

               "value": "-",

               "affiliation": "member",

               "affiliationId": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a"

           },

           {

               "fieldId": "f2eabcae-bf4b-4262-881e-be18abf9bf4b",

               "name": "Consent for Screening",

               "value": "-",

               "affiliation": "member",

               "affiliationId": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a"

           },

           field2 block {

           },

           field3 block {

           }, ... so on

] # customFields list ends


Sample Member in Response - Continued - Footer

       "groups": [                      # List of Groups to which this member belongs

           {

               "id": "3cef9ce7-9745-4b63-b5b1-3f9434960398",

               "name": "Test 1",        # Name of Group to which this member belongs

               "type": {

                   "id": "dc587d19-452a-438d-8443-ebd701338425",

                   "name": "Family"     # Group type and ID

               }

           }

       ],

       "lastUpdatedDate": "2024-06-12", # Date when Member was last updated

       "createdDate": "2024-06-12",     # Date when Member was created

       "isArchived": false              # Is the Member in archived state?


// Previous Member Ends here

// Next Member Starts here

   {

       "id": "0733949a-87a5-49e1-a1a8-b633a5a24541",

       "type": {

           "id": "2b2b6b19-532f-4a93-b641-98dff34f3f36",

           "name": "Family Member (Urban)"

       },

Groups

Released in Version 4.12.8.  You can use the Token generated above (Authentication section) and bring down groups in JSON format with the URL and REQUEST body, as specified below.

URL

https://backend.diceflow.in/analytics/groups/

Header:

Authorization: The token to pass which identifies the user in the format, Bearer eyJhbGciOiJIUzI1NiIsInVCJ9.eyJzdWI.......

Sample Request body

"root":{

    "filter":{

      "groupTypes": ["Family", "Family-Rural"],

      "createdDate":{

         "start":"2024-01-01"

         "end":"2024-03-31"

       }

    }, # filter ends - pls remove this comment before using

    "pageSize":200,

    "pageNumber":1

} # root ends - pls remove this comment before using


Filters available:

Multiply pageSize by pageNumber to find the number of groups which will be brought down.   Recommended maximum pageSize of 500 per request.

Sample Group in Response - Main Section 

Explanation of fields after # within response below; This is NOT shown in actual response; Field Names are only for illustration purposes.

       "id": "e4992c0e-6c59-4e63-aa4e-12565ab7a296",     # Group System ID

       "name": "Group FullName",                         # Group Name

       "subtitle": "Family of 5 members"                 # Group Subtitle

       "type": {

           "id": "ec95a12a-1591-4d7b-aec2-588a5d43e198", 

           "name": "Family"                              # Group Type

       },

       "location": [                                     # Group location as defined in

           "Country": "India",                           # Structure > Hierarchy configuration

           "State": "Karnataka",

           "District": "Bengalore Central",

           "Zone": "Rajajinagar",

           "Ward": "Shakti Ganapathi Nagara",

           "WF": "Meenakshi A"

       ]


Sample Group in Response - Continued - customFields

"customFields": [                                        # List of ALL Customfields and their values

           {

               "fieldId": "e61beefa-1384-4e98-9329-f300deb7f6ae",

               "name": "Consent for Interaction",        # Customfield Name

               "value": "-",                             # Customfield Value; '-' is undefined

               "affiliation": "group", # In Members, this value is set to 'member'

                                        # In Groups, this value is set to 'group'

               "affiliationId": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a"

           },

           {

               "fieldId": "e2a322c4-2083-47f7-97a0-a2c0f9528c55",

               "name": "Request for Additional Information",

               "value": "-",

               "affiliation": "group",

               "affiliationId": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a"

           },

           {

               "fieldId": "f2eabcae-bf4b-4262-881e-be18abf9bf4b",

               "name": "Consent for Screening",

               "value": "-",

               "affiliation": "group",

               "affiliationId": "1f99dba0-ea94-4b6f-b7ed-af5b7660389a"

           },

           field2 block {

           },

           field3 block {

           }, ... so on

] # customFields list ends


Sample Group in Response - Continued - Footer

       "members": [                     # List of members in this group

           {

               "id": "3cef9ce7-9745-4b63-b5b1-3f9434960398",

               "name": "Member 1",      # Name of 1st Member in this Group

               "type": {

                   "id": "dc587d19-452a-438d-8443-ebd701338425",

                   "name": "Family"     # Group type and ID

               }

           },

           {

               "id": "3cef9ce7-9745-4b63-b5b1-3f9434960398",

               "name": "Member 2",      # Name of 2nd Member in this Group

               "type": {

                   "id": "dc587d19-452a-438d-8443-ebd701338425",

                   "name": "Family"     # Group type and ID

               }

           }

       ],

       "lastUpdatedDate": "2024-06-12", # Date when Group was last updated

       "createdDate": "2024-06-12",     # Date when Group was created

       "isArchived": false              # Is the Group in archived state?


// Previous Group Ends here

// Next Group Starts here

   {

       "id": "0733949a-87a5-49e1-a1a8-b633a5a24541",

       "type": {

           "id": "2b2b6b19-532f-4a93-b641-98dff34f3f36",

           "name": "Family"