🏢 Retrieve Business Request Types

Endpoint: GET https://api.vlenseg.com/api/BusinessRequest/GetAllRequestTypes

Overview:

Fetches all available business request types configured by the tenant admin through the Admin Portal. These types are used for creating various business requests.

Workflow:

  1. Send a GET request with the appropriate headers.

  2. Receive a response containing all available business request types.

  3. Use the retrieved types to categorize and manage business requests.

get
Query parameters
getSubContractbooleanOptionalDefault: false
skipCountinteger · int32Optional
MaxResultCountinteger · int32Optional
Responses
200

Success

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

Success

{
  "data": [
    {
      "id": 1,
      "name": "text",
      "type": 1,
      "typeName": "text",
      "requestTypes": [
        {
          "id": 1,
          "name": "text",
          "type": 1,
          "typeName": "text",
          "requestTypes": [
            "[Circular Reference]"
          ]
        }
      ]
    }
  ],
  "totalCount": 1,
  "returnedCount": 1,
  "error_code": 1,
  "error_message": "text",
  "error_descriptions": null
}

async function getBusinessRequestTypes() {
  const url = "https://api.vlenseg.com/api/BusinessRequest/GetAllRequestTypes";
  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);
  }
}

getBusinessRequestTypes();

Last updated