📋 Business Request Fields

Endpoint: GET https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId={id}

Overview:

Retrieve all fields associated with a specific business request type, allowing detailed customization when creating a new business request. These fields are configured by the tenant admin via the Admin Portal.

Workflow:

  1. Send a GET request with the appropriate headers and requestTypeId as a query parameter.

  2. Receive a response containing all fields linked to the specified request type.

  3. Use the retrieved fields to customize and create a new business request.

get
Query parameters
requestTypeIdinteger · int32Optional
isLocalizedbooleanOptionalDefault: false
Responses
200

Success

get
/api/BusinessRequest/GetBusinessRequestTypeTemplateFields
GET /api/BusinessRequest/GetBusinessRequestTypeTemplateFields HTTP/1.1
Host: 
Accept: */*
200

Success

{
  "data": {
    "id": 1,
    "name": "text",
    "requestsFields": [
      {
        "order": 1,
        "key": "text",
        "displayText": "text",
        "displayArText": "text",
        "value": "text",
        "multiValues": [
          "text"
        ],
        "tabularData": [
          [
            "text"
          ]
        ],
        "type": "text",
        "visibleToUser": true,
        "defaultValue": "text",
        "defaultArValue": "text",
        "availableValues": [
          "text"
        ],
        "firstRowHeader": true,
        "convertNumbersToArabic": true,
        "availableValuesItems": [
          {
            "id": 1,
            "name": "text",
            "relatedQuestions": "[Circular Reference]"
          }
        ],
        "parentQuestionKey": "text",
        "parentQuestionValue": "text",
        "relatedQuestions": [
          {
            "order": 1,
            "key": "text",
            "displayText": "text",
            "displayArText": "text",
            "value": "text",
            "multiValues": [
              "text"
            ],
            "tabularData": [
              [
                "text"
              ]
            ],
            "type": "text",
            "visibleToUser": true,
            "defaultValue": "text",
            "defaultArValue": "text",
            "availableValues": [
              "text"
            ],
            "firstRowHeader": true,
            "convertNumbersToArabic": true,
            "availableValuesItems": "[Circular Reference]",
            "parentQuestionKey": "text",
            "parentQuestionValue": "text",
            "relatedQuestions": "[Circular Reference]",
            "groupTitle": "text",
            "groupArTitle": "text"
          }
        ],
        "groupTitle": "text",
        "groupArTitle": "text"
      }
    ],
    "requestsFieldsWithGroupTitles": [
      {
        "title": "text",
        "requestsFields": [
          {
            "order": 1,
            "key": "text",
            "displayText": "text",
            "displayArText": "text",
            "value": "text",
            "multiValues": [
              "text"
            ],
            "tabularData": [
              [
                "text"
              ]
            ],
            "type": "text",
            "visibleToUser": true,
            "defaultValue": "text",
            "defaultArValue": "text",
            "availableValues": [
              "text"
            ],
            "firstRowHeader": true,
            "convertNumbersToArabic": true,
            "availableValuesItems": "[Circular Reference]",
            "parentQuestionKey": "text",
            "parentQuestionValue": "text",
            "relatedQuestions": "[Circular Reference]",
            "groupTitle": "text",
            "groupArTitle": "text"
          }
        ]
      }
    ],
    "groupTitles": [
      "text"
    ],
    "groupArTitles": [
      "text"
    ],
    "content": "text",
    "signature": "text",
    "smsTemplate": "text",
    "confirmationMessage": "text",
    "coverPage": "text",
    "generalTC": "text",
    "technicalTC": "text",
    "contractEmailBody": "text",
    "financialTC": "text",
    "signers": [
      1
    ],
    "isLocalized": true,
    "hasCustomPayment": true,
    "hasPromissoryNote": true,
    "promissoryNote": "text",
    "type": 1,
    "parentId": 1,
    "parentName": "text"
  },
  "error_code": 1,
  "error_message": "text",
  "error_descriptions": null
}

async function getBusinessRequestFields(requestTypeId) {
  const url = `https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=${requestTypeId}`;
  const headers = {
    "Content-Type": "application/json",
    "ApiKey": "<your-api-key>",
    "Authorization": "Bearer <accessToken>"
  };

  try {
    const response = await fetch(url, { method: 'GET', headers });
    if (response.ok) {
      const data = await response.json();
      console.log(data);
    } else {
      console.error(`Error: ${response.status} - ${response.statusText}`);
    }
  } catch (error) {
    console.error('Fetch error:', error);
  }
}

getBusinessRequestFields(123);

Last updated