Forms
Routes for managing custom forms
Get Form
GET/forms/form/:formId
Retrieve form.
Required attributes
- Name
formId
- Type
- string
- Description
The id of the form you wish to load
cURL
curl https://your.platform.url/api/gateway/forms/form/64df4f2d-5d84-424c-ba9e-838d58b92049 \
-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 Form Implementation
GET/forms/form/implementations/:implementationId
Retrieve details of a specific form implementation by ID, to get the implementation ID see here.
Required attributes
- Name
implementationId
- Type
- string
- Description
The id of the form implementation you wish to load
cURL
curl https://your.platform.url/api/gateway/forms/form/implementations/b4fb32a2-4f88-42bc-af0a-4d2fa67ae818 \
-H "Authorization: Bearer {token}"
Sample Response
{
"uuid":"b4fb32a2-4f88-42bc-af0a-4d2fa67ae818",
"createdAt":"2024-10-09T14:03:05.000000Z",
"startedOn":"2024-10-09 14:03:05",
"completedOn":"2024-10-14 08:47:45",
"form": {...see form response above},
"formFieldAnswers": [
{
"answer":true,
"formField": {
"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": []
}
}
],
"type":"TRANSACTION",
"formImplementationAssignments": [
{
"uuid":"775922a0-cff8-11ee-8f8c-35cdaa30f76b",
"type":"USER"
},
{
"uuid":"5bb470e9-9f31-48db-9dab-db79af1c3664",
"type":"DEAL"
}
]
}
Get Form Templates
GET/forms/form/:formId/template
Retrieve available document generation templates for a specific form.
Required attributes
- Name
formId
- Type
- string
- Description
The id of the form you wish to load the templates for
cURL
curl https://your.platform.url/api/gateway/forms/form/64df4f2d-5d84-424c-ba9e-838d58b92049/template \
-H "Authorization: Bearer {token}"
Sample Response
{
"data": [
{
"uuid": "b1c6a2ec-35d2-41a8-8d9f-118e3bd4afa8",
"template": {
"guid": "38ce3bde-a5d9-4a54-a13e-19ae65a24268",
"type": "subscription_document",
"filename": "654c896b-186f-4282-80cf-ce6c21042d1d.docx",
"fqfn": "documents/main/654c896b-186f-4282-80cf-ce6c21042d1d.docx",
"originalFilename": "222222.docx",
"createdAt": "2024-03-07 10:02:00",
"validatedAt": null,
"updatedAt": "2024-03-07 10:02:00"
}
},
{
"uuid": "1a0cab8c-cb34-4f1d-89c4-e6bd2ba3fb1a",
"template": {
"guid": "ebf71da4-1c36-4844-a6ad-e70e40d329ce",
"type": "subscription_document",
"filename": "e50a4c00-f8cf-4be0-b599-88bcca0f9b41.docx",
"fqfn": "documents/main/e50a4c00-f8cf-4be0-b599-88bcca0f9b41.docx",
"originalFilename": "222222.docx",
"createdAt": "2024-05-15 09:38:43",
"validatedAt": null,
"updatedAt": "2024-05-15 09:38:43"
}
}
],
"links": [
{
"url": null,
"label": "pagination.previous",
"active": false
},
{
"url": "http://dev.deliowealth.com/api/form-builder/form/64df4f2d-5d84-424c-ba9e-838d58b92049/template?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/64df4f2d-5d84-424c-ba9e-838d58b92049/template?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http://dev.deliowealth.com/api/form-builder/form/64df4f2d-5d84-424c-ba9e-838d58b92049/template?page=1",
"next_page_url": null,
"path": "http://dev.deliowealth.com/api/form-builder/form/64df4f2d-5d84-424c-ba9e-838d58b92049/template",
"per_page": 15,
"prev_page_url": null,
"to": 2,
"total": 2
}
}
Create Document from Template
GET/forms/machine/form/implementations/:implementationId/document/:templateId
Create and return document using a specific form implementation and template.
Required attributes
- Name
implementationId
- Type
- string
- Description
The id of the form implementation you wish to generate a document for
- Name
templateId
- Type
- string
- Description
The id of the template to use for generation
cURL
curl https://your.platform.url/api/gateway/forms/form/implementations/64df4f2d-5d84-424c-ba9e-838d58b92049/document/b1c6a2ec-35d2-41a8-8d9f-118e3bd4afa8 \
-H "Authorization: Bearer {token}"