📝 Create Business Request
Endpoint:
POST https://api.vlenseg.com/api/BusinessRequest/Create/{typeId}
Overview:
Creates a new Business Request of a given type.
This endpoint is used to create a new Business Request of a given type (typeId).
It collects information such as customer location, device time, dynamic request field values, and the required signers.
geoLocation → The customer’s device location at the time of request creation (latitude & longitude).
userDeviceUtcTime → The UTC timestamp from the customer’s device.
requestFieldsValues → A set of key-value pairs (dynamic fields) required for this specific request type.
isDynamicSubTypes → Boolean flag to indicate if the request has dynamic subtypes.
customerSignersIdentifiers → List of identifiers for customers who must sign the request (e.g., phone, email, userId).
minimumRequiredSignatories → Minimum number of signers required for the request to be valid.
Workflow:
Send a POST request with the required headers and request body.
Receive a response with the request ID upon successful creation.
Success
POST /api/BusinessRequest/Create/{typeId} HTTP/1.1
Host:
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 242
{
"geoLocation": {
"latitude": 1,
"longitude": 1
},
"userDeviceUtcTime": "2025-11-08T01:05:07.832Z",
"requestFieldsValues": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"isDynamicSubTypes": true,
"customerSignersIdentifiers": [
"text"
],
"minimumRequiredSignatories": 1
}Success
{
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"requestNumber": "text",
"type": 0,
"typeName": "text",
"contractTypeId": 1,
"contractTypeName": "text",
"requestFields": [
{
"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"
}
],
"relatedBusinessRequest": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"requestNumber": "text",
"type": 0,
"typeName": "text",
"contractTypeId": 1,
"contractTypeName": "text",
"requestFields": [
{
"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"
}
],
"relatedBusinessRequest": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"requestNumber": "text",
"type": 0,
"typeName": "text",
"contractTypeId": 1,
"contractTypeName": "text",
"requestFields": "[Circular Reference]",
"relatedBusinessRequest": "[Circular Reference]",
"customerSignersIdentifiers": [
"text"
]
}
],
"customerSignersIdentifiers": [
"text"
]
}
],
"customerSignersIdentifiers": [
"text"
]
},
"error_code": 1,
"error_message": "text",
"error_descriptions": null
}
async function createBusinessRequest(typeId, geoLocation, requestFieldsValues) {
const url = `https://api.vlenseg.com/api/BusinessRequest/Create/${typeId}`;
const headers = {
"Content-Type": "application/json",
"ApiKey": "<your-api-key>",
"Authorization": "Bearer <accessToken>"
};
const body = JSON.stringify({
geoLocation,
requestFieldsValues
});
try {
const response = await fetch(url, {
method: 'POST',
headers,
body
});
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);
}
}
createBusinessRequest(
"123",
{ latitude: 34.0522, longitude: -118.2437 },
{ field1: "value1", field2: "value2" }
);
import requests
def create_business_request(type_id, geo_location, request_fields_values):
url = f"https://api.vlenseg.com/api/BusinessRequest/Create/{type_id}"
headers = {
"Content-Type": "application/json",
"ApiKey": "<your-api-key>",
"Authorization": "Bearer <accessToken>"
}
payload = {
"geoLocation": geo_location,
"requestFieldsValues": request_fields_values
}
response = requests.post(url, json=payload, headers=headers)
if response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code} - {response.text}")
create_business_request(
"123",
{"latitude": 34.0522, "longitude": -118.2437},
{"field1": "value1", "field2": "value2"}
)
curl -X POST "https://api.vlenseg.com/api/BusinessRequest/Create/123" \
-H "Content-Type: application/json" \
-H "ApiKey: <your-api-key>" \
-H "Authorization: Bearer <accessToken>" \
-d '{
"geoLocation": {
"latitude": 34.0522,
"longitude": -118.2437
},
"requestFieldsValues": {
"field1": "value1",
"field2": "value2"
}
}'Last updated