Get a form content type
Log in to add to favouritesPage last updated 25 September 2024
This endpoint retrieves the content type definition of a form within a specified project for a given language.
GET/api/forms/projects/{projectId}/contenttypes/{contentTypeId}/languages/{language}
Parameters
| Name | Parameter type | Type | Format | Description |
|---|---|---|---|---|
| projectId(required) | path | string | - | The project identifier found in the project overview screen of the management console. |
| contentTypeId(required) | path | string | - | The content type identifier. |
| language(required) | path | string | language | The language property specifies the language variation of the form, or use `default` for the default language. |
Responses
| HTTP status code | Reason | Model |
|---|---|---|
| 200 | Success | Content type |
| 404 | Project not found | Error |
| 404 | Content type not found | Error |
| 422 | Language is invalid | Error |
| 500 | Internal server error | Error |
Examples
{
"id": "enquiryForm",
"projectId": "website",
"name": "Enquiry Form",
"description": null,
"entryTitleField": "reference",
"fields": [
{
"id": "name",
"name": "Name",
"dataType": "string",
"dataFormat": null,
"description": null,
"default": null,
"validations": {},
"editor": {
"id": null,
"instructions": null,
"label": "Name",
"properties": {
"placeholderText": "Name placeholder"
}
},
"groupId": "main"
},
{
"id": "mobileNumber",
"name": "Mobile Number",
"dataType": "string",
"dataFormat": "phone",
"description": null,
"default": null,
"validations": {},
"editor": {
"id": null,
"instructions": null,
"label": "Mobile Number",
"properties": {}
},
"groupId": "main"
},
{
"id": "emailAddress",
"name": "Email address",
"dataType": "string",
"dataFormat": "email",
"description": null,
"default": null,
"validations": {},
"editor": {
"id": null,
"instructions": null,
"label": "Email address",
"properties": {}
},
"groupId": "main"
},
{
"id": "typeOfEnquiry",
"name": "Type of enquiry",
"dataType": "string",
"dataFormat": null,
"description": null,
"default": null,
"validations": {
"allowedValues": {
"labeledValues": [
{
"value": "general-enquiry",
"label": "General enquiry"
},
{
"value": "complaint",
"label": "Complaint"
},
{
"value": "request-for-information",
"label": "Request for information"
}
],
"message": null
}
},
"editor": {
"id": "list-dropdown",
"instructions": null,
"label": "Type of enquiry",
"properties": {}
},
"groupId": "enquiryDetails"
},
{
"id": "enquiry",
"name": "Enquiry",
"dataType": "string",
"dataFormat": null,
"description": null,
"default": null,
"validations": {},
"editor": {
"id": "multiline",
"instructions": null,
"label": "Enquiry",
"properties": {
"rows": 4
}
},
"groupId": "enquiryDetails"
},
{
"id": "reference",
"name": "Reference",
"dataType": "string",
"dataFormat": "reference",
"description": null,
"default": null,
"validations": {},
"editor": {
"id": null,
"instructions": null,
"label": null,
"properties": {
"prefix": "EF"
}
},
"groupId": "main"
}
],
"defaultLanguage": "en-GB",
"supportedLanguages": [
"en-GB"
],
"workflowId": "contensisFormBasic",
"dataFormat": "form",
"groups": [
{
"id": "main",
"name": "Your details",
"description": null
},
{
"id": "enquiryDetails",
"name": "Enquiry details",
"description": null
}
],
"includeInDelivery": false,
"enabled": true,
"properties": {
"autoCloseForm": true,
"autoCloseDateTime": "2045-11-02T00:00:00",
"autoSaveProgress": true,
"captcha": {
"enabled": true
},
"localizations": {
"errorSummaryTitle": "There has been an error submitting the form, please try again.",
"closedReasonMessage": "We are no longer accepting enquiries"
}
},
"language": "en-GB",
"version": {
"versionNo": "17.0"
}
}Remarks
Certain properties have been removed from the form content type definition in the delivery API to protect sensitive information. The removed properties include:
-
Properties:
properties.autoResponderRulesproperties.confirmationRulesproperties.notificationRulesproperties.requirePermissionToPost
-
Version Metadata:
version.createdByversion.createdversion.modifiedByversion.modifiedversion.publishedByversion.publishedversion.deletedByversion.deletedversion.archivedByversion.archivedversion.permanentDeletion
These properties are excluded as they could contain internal information, such as email addresses and business rules, that could reveal internal processes and potentially compromise security.