# Form API

### **Get Form Data by Form Id, Field Name, and Field Value**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                   |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                      |
| URL        | http\://\[server]/dolphin/apiv1/graph/forms/formData?formId=\[formId]\&fieldName=\[fieldName]\&start=0\&count=1                                                                                                                                                                                                                                                                       |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>Form Id : \[formId]<br>Field Name : \[fieldName]<br></p>                                                                                                                                                                                                                                                                               |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                       |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                   |
| Response   | <p>{<br>“status”: “success”,<br>“data”: \[<br>    {<br>     “email\_address”: “yolo”<br>     “spell”: \[<br>       “yolo”<br>     ],<br>     “form\_id”: “\[formId]”,<br>     “created\_date”: 1591851606605,<br>     “id”: “\[id]”,<br>     “*version*”: 1669177390257930200<br>    }<br>],<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 1<br>}</p> |

### **Get Form Data by param, startDate, and EndDate**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| URL        | https\://\[server]/dolphin/apiv1/graph/forms/data?formId=\[form\_id]\&startDate=2020-09-14\&endDate=2020-09-14\&start=0\&count=10                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>Form Id : \[form\_id]<br>startDate : \[startDate]<br>endDate : \[endDate]</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Response   | <p>{<br>“status”: “success”,<br>“data”: \[<br>    {<br>     “comment”: “Hallo”,<br>     “ticket\_number”: “\[ticketNumber]”,<br>     “form\_id”: “\[form\_id]”,<br>     “channel\_type”: “\[channel\_type]”,<br>     “channel\_key”: “\[channel\_key] “,<br>     “channel”: “\[channel]”,<br>     “account\_id”: “\[account\_id]”,<br>     “account\_name”: “\[account\_name]”,<br>     “created\_date”: 1600076391136,<br>     “id”: “\[id]”,<br>     “*version*”: 1677801702193889280<br>    }<br>],<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 1<br>}</p> |

### **Get Form by Form Id**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| URL        | http\://\[server]/dolphin/apiv1/graph/forms/form?formId=\[formId]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>Form Id : \[formId]<br></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Response   | <p>{<br>“status”: “success”,<br>“data”: {<br>     “id”: “\[id]”,<br>     “spell”: \[<br>       “”,<br>       “Comment”<br>     ],<br>     “owner”: “\[owner\_id]”,<br>     “createdDate”: 1564406718494,<br>     “createdBy”: “19119b20259b7ae38e80462cf449ae98”,<br>     “modifiedDate”: 1564406718494,<br>     “modifiedBy”: “19119b20259b7ae38e80462cf449ae98”,<br>     “dataRepository”: “\[dataRepository]”,<br>     “description”: “”,<br>     “formSchema”: “\[]”,<br>     “formOptions”:”\[]”,<br>     “formData”: “\[]”,<br>     “formDefinitionKey”: “”,<br>     “title”: “Comment”,<br>     “total”: “31”<br>},<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |

### **Get Form by Form Owner**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| URL        | http\://\[server]/dolphin/apiv1/graph/forms?start=0\&count=1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Header     | Authorization : Bearer \[generatedToken]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Response   | <p>{<br>“status”: “success”,<br>“data”: \[<br>   {<br>     “id”: “\[id]”,<br>     “spell”: \[<br>       “Booking appointment and product specialist”,<br>       “Branch Appointment”<br>     ],<br>     “owner”: “\[owner\_id]”,<br>     “createdDate”: 1547132442169,<br>     “createdBy”: “82ab0fd5cfd1e80d1ff97c0cfc9aa9e2”,<br>     “modifiedDate”: 1557987095681,<br>     “modifiedBy”: “19119b20259b7ae38e80462cf449ae98”,<br>     “dataRepository”: “\[dataRepository]”,<br>     “description”: “Booking appointment and product specialist”,<br>     “formSchema”: “\[formSchema]”,<br>     “formOptions”:”\[formOptions]”,<br>     “formData”: “\[]”,<br>     “formDefinitionKey”: “”,<br>     “title”: “Branch Appointment”<br>   },<br>],<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |

### **Add Form data by Form Id**

| Method     | POST                                                                                                                                                                 |
| ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                     |
| URL        | http\://\[server]/dolphin/apiv1/graph/forms/add/\[formId]/tickets/\[ticketNumber]                                                                                    |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>Form Id : \[formId]<br>Ticket Number : \[ticketNumber]</p>                                                            |
| Body       |                                                                                                                                                                      |
| Status     | 200                                                                                                                                                                  |
| Response   | <p>{<br>     “status”: “success”,<br>     “data”: “{}”,<br>     “hasMore”: false,<br>     “nextIndex”: 0,<br>     “prevIndex”: 0,<br>     “totalResults”: 0<br>}</p> |

### **Delete Form data by Id**

| Method     | DELETE                                                                                                                                                                                           |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Media Type | application/json                                                                                                                                                                                 |
| URL        | http\://\[server]/dolphin/apiv1/graph/forms/delete/\[formId]/\[Id]                                                                                                                               |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>Form Id : \[formId]<br>Id : \[Id]</p>                                                                                                             |
| Body       |                                                                                                                                                                                                  |
| Status     | 200                                                                                                                                                                                              |
| Response   | <p>{<br>     “status”: “success”,<br>     “data”: “Successfully Deleted Form Data”,<br>     “hasMore”: false,<br>     “nextIndex”: 0,<br>     “prevIndex”: 0,<br>     “totalResults”: 0<br>}</p> |

### **Get Form Data by Id**

| Method     | GET                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Media Type | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| URL        | http\://\[server]/dolphin/apiv1/graph/forms/get/\[form\_id]/\[id]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Header     | <p>Authorization : Bearer \[generatedToken]<br>Form Id : \[form\_id]<br>Id : \[Id]</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Body       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Status     | 200                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Response   | <p>{<br>“status”: “success”,<br>“data”: {<br>   “address”: “\[address]”,<br>   “ktp”: \[ktp],<br>   “npwp”: \[npwp],<br>   “form\_id”: “\[form\_id]”,<br>   “channel”: “\[channel]”,<br>   “last\_name”: “\[last\_name]”,<br>   “ticket\_number”: “\[ticket\_number]”,<br>   “email\_address”: “\[email\_address]”,<br>   “account\_id”: “\[account\_id]”,<br>   “*version*”: 1679425928220901400,<br>   “encrypt”: true,<br>   “account\_name”: “\[account\_name]”,<br>   “created\_date”: “Fri Oct 02 14:56:13 WIB 2020”,<br>   “id”: “\[id]”,<br>   “channel\_type”: “\[channel\_type]”,<br>   “first\_name”: “\[first\_name]”,<br>   “channel\_key”: “\[channel\_key]”<br>},<br>“hasMore”: false,<br>“nextIndex”: 0,<br>“prevIndex”: 0,<br>“totalResults”: 0<br>}</p> |
