Digital Identity
  • Introduction
  • Quick Start
  • Reference
    • API Reference
      • Register
      • User Profile
      • Verify
      • CancelVerifiedDigitalIdentity
      • Get Verify Data
      • Login
      • Admin Login
      • Check Eligibility
      • Current
      • Get All Product Types
      • Get Business Request Type Template Fields
      • User Create Request
      • User Activate Request
      • ⚙️ Admin Control Panel
        • Login API
        • GetRequests API
        • GetContractToPdf
        • GetUsers
        • GetTransactionById API
        • CancelVerifiedDigitalIdentity
      • Error Codes
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Get Business Request Type Template Fields

PreviousGet All Product TypesNextUser Create Request

Last updated 8 months ago

GetBusinessRequestTypeTemplateFields API

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

Overview:

This endpoint retrieves the template fields for a specific business request type. The fields include questions, their display texts, possible values, and other relevant data. It supports bearer authentication and requires an API key.

Authorization

Bearer Authentication

Query parameters

  • requestTypeId (required): The unique identifier of the business request type (integer).

Header parameters

  • ApiKey: API key for the request.

  • TenancyName: Name of the tenant.

  • Authorization: Bearer token.

const fetchBusinessRequestTypeTemplateFields = async (requestTypeId) => {
  const apiUrl = `https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=${requestTypeId}`;
  
  const headers = {
    'Authorization': 'Bearer <access_token>', // Replace <access_token> with the actual token
    'ApiKey': 'your_api_key',                 // Replace 'your_api_key' with your actual API key
    'TenancyName': 'your_tenancy_name'        // Replace 'your_tenancy_name' with your actual tenancy name
  };

  try {
    const response = await fetch(apiUrl, { method: 'GET', headers: headers });
    if (response.ok) {
      const data = await response.json();
      console.log(data);
    } else {
      console.error('Error:', response.status, await response.text());
    }
  } catch (error) {
    console.error('Error:', error);
  }
};

fetchBusinessRequestTypeTemplateFields(1); // Replace with the appropriate request type ID
import requests

# Replace with your actual API key, access token, and tenancy name
api_url = "https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields"
params = {
    'requestTypeId': 1  # Replace with the appropriate request type ID
}
headers = {
    'Authorization': 'Bearer <access_token>',
    'ApiKey': 'your_api_key',
    'TenancyName': 'your_tenancy_name'
}

response = requests.get(api_url, headers=headers, params=params)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print(f"Error: {response.status_code}, {response.text}")
curl -X GET "https://api.vlenseg.com/api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=1" \
-H "Authorization: Bearer <access_token>" \
-H "ApiKey: your_api_key" \
-H "TenancyName: your_tenancy_name"

Get business request type template fields

get

This endpoint retrieves the template fields for a specific business request type.

Authorizations
Query parameters
requestTypeIdintegerRequired

The unique identifier of the business request type.

Responses
200
Successful response
application/json
400
Invalid request
401
Unauthorized
404
Business request type not found
get
GET /api/BusinessRequest/GetBusinessRequestTypeTemplateFields?requestTypeId=1 HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "data": {
    "id": 1,
    "name": "text",
    "requestsFields": [
      {
        "order": 1,
        "key": "text",
        "displayText": "text",
        "value": "text",
        "tabularData": "text",
        "type": "text",
        "visibleToUser": true,
        "defaultValue": "text",
        "availableValues": [
          "text"
        ],
        "availableValuesItems": [
          {
            "id": 1,
            "name": "text",
            "relatedQuestions": [
              {}
            ]
          }
        ],
        "parentQuestionKey": "text",
        "parentQuestionValue": "text",
        "relatedQuestions": [
          {}
        ]
      }
    ]
  }
}