> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.vlenseg.com/llms.txt.
> For full documentation content, see https://docs.vlenseg.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.vlenseg.com/_mcp/server.

# Get form fields for a product type

GET https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields

Retrieve all configurable fields for a given business request type. Use these to build the form your users fill in before creating a request.

Fields support conditional visibility: when `parentQuestionKey` is present, the field only appears if the parent field's value matches `parentQuestionValue`.


Reference: https://docs.vlenseg.com/api-reference/vlens-api/business-request/get-business-request-type-template-fields

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: example-openapi
  version: 1.0.0
paths:
  /api/BusinessRequest/GetBusinessRequestTypeTemplateFields:
    get:
      operationId: get-business-request-type-template-fields
      summary: Get form fields for a product type
      description: >
        Retrieve all configurable fields for a given business request type. Use
        these to build the form your users fill in before creating a request.


        Fields support conditional visibility: when `parentQuestionKey` is
        present, the field only appears if the parent field's value matches
        `parentQuestionValue`.
      tags:
        - subpackage_businessRequest
      parameters:
        - name: requestTypeId
          in: query
          description: The request type ID from `GetAllRequestTypes`.
          required: true
          schema:
            type: integer
        - name: isLocalized
          in: query
          description: Use `displayArText` instead of `displayText` for Arabic labels.
          required: false
          schema:
            type: boolean
            default: false
        - name: ApiKey
          in: header
          description: >-
            Static API key issued to your tenant. Obtain from the Vlens
            dashboard.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Template fields for the request type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiOutputTemplateFields'
servers:
  - url: https://api.vlenseg.com
components:
  schemas:
    DropDownItemDto:
      type: object
      properties:
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
        relatedQuestions:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/BusinessRequestsField'
      title: DropDownItemDto
    BusinessRequestsField:
      type: object
      properties:
        order:
          type: integer
          description: Display order position.
        key:
          type:
            - string
            - 'null'
          description: >-
            Machine-readable identifier. Use this as the key in
            `requestFieldsValues`.
        displayText:
          type:
            - string
            - 'null'
          description: English label shown to the user.
        displayArText:
          type:
            - string
            - 'null'
          description: Arabic label shown to the user.
        value:
          type:
            - string
            - 'null'
        multiValues:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Submitted values for multi-select fields.
        tabularData:
          type:
            - array
            - 'null'
          items:
            type: array
            items:
              type: string
          description: Row-column data for table field types.
        type:
          type:
            - string
            - 'null'
          description: Field type (e.g., text, dropdown, date, table, checkbox).
        visibleToUser:
          type: boolean
        defaultValue:
          type:
            - string
            - 'null'
        defaultArValue:
          type:
            - string
            - 'null'
        availableValues:
          type:
            - array
            - 'null'
          items:
            type: string
        firstRowHeader:
          type: boolean
        convertNumbersToArabic:
          type: boolean
        availableValuesItems:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/DropDownItemDto'
        parentQuestionKey:
          type:
            - string
            - 'null'
          description: Key of the field this field is conditionally dependent on.
        parentQuestionValue:
          type:
            - string
            - 'null'
          description: The parent field value that makes this field visible.
        relatedQuestions:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/BusinessRequestsField'
        groupTitle:
          type:
            - string
            - 'null'
        groupArTitle:
          type:
            - string
            - 'null'
      description: >
        A single configurable field in a business request form.

        Fields can be conditional: when `parentQuestionKey` is set, this field
        only appears

        when the parent field's value matches `parentQuestionValue`.
      title: BusinessRequestsField
    RequestFieldsWithGroupTitle:
      type: object
      properties:
        title:
          type:
            - string
            - 'null'
        requestsFields:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/BusinessRequestsField'
      title: RequestFieldsWithGroupTitle
    BusinessRequestTypeTemplateFieldsDto:
      type: object
      properties:
        id:
          type: integer
        name:
          type:
            - string
            - 'null'
        requestsFields:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/BusinessRequestsField'
          description: Flat list of all fields.
        requestsFieldsWithGroupTitles:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/RequestFieldsWithGroupTitle'
          description: Fields grouped by section title for UI rendering.
        groupTitles:
          type:
            - array
            - 'null'
          items:
            type: string
        groupArTitles:
          type:
            - array
            - 'null'
          items:
            type: string
        content:
          type:
            - string
            - 'null'
          description: Contract document HTML template.
        confirmationMessage:
          type:
            - string
            - 'null'
        coverPage:
          type:
            - string
            - 'null'
        generalTC:
          type:
            - string
            - 'null'
          description: General terms and conditions.
        technicalTC:
          type:
            - string
            - 'null'
        financialTC:
          type:
            - string
            - 'null'
        contractEmailBody:
          type:
            - string
            - 'null'
        signers:
          type:
            - array
            - 'null'
          items:
            type: integer
            format: int64
          description: >-
            User IDs of configured contract signers on the service provider
            side.
        isLocalized:
          type: boolean
        hasCustomPayment:
          type: boolean
        hasPromissoryNote:
          type: boolean
        type:
          type: integer
        parentId:
          type: integer
        parentName:
          type:
            - string
            - 'null'
      description: >-
        All configurable fields and document templates for a business request
        type.
      title: BusinessRequestTypeTemplateFieldsDto
    ApiOutputTemplateFields:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/BusinessRequestTypeTemplateFieldsDto'
        error_code:
          type:
            - integer
            - 'null'
        error_message:
          type:
            - string
            - 'null'
        error_descriptions:
          oneOf:
            - description: Any type
            - type: 'null'
      title: ApiOutputTemplateFields
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: ApiKey
      description: Static API key issued to your tenant. Obtain from the Vlens dashboard.
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Short-lived JWT. Obtain via:
        - `/api/credentials/Login` for admin / service tokens
        - `/api/DigitalIdentity/Register` or login for end-user tokens

```

## SDK Code Examples

```python
import requests

url = "https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields"

querystring = {"requestTypeId":"414"}

payload = {}
headers = {
    "ApiKey": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=414';
const options = {
  method: 'GET',
  headers: {ApiKey: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=414"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("ApiKey", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=414")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["ApiKey"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=414")
  .header("ApiKey", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=414', [
  'body' => '{}',
  'headers' => [
    'ApiKey' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=414");
var request = new RestRequest(Method.GET);
request.AddHeader("ApiKey", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "ApiKey": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=414")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```