> 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.

# Create a business request

POST https://api.vlenseg.com/api/BusinessRequest/Create/{typeId}
Content-Type: application/json

Create a new business request (e-contract) of a given type. The user must pass the eligibility check before calling this endpoint.

Pass the form field values from `GetBusinessRequestTypeTemplateFields` as `requestFieldsValues`, using each field's `key` as the map key.

The returned `id` is required for all subsequent signing steps.


Reference: https://docs.vlenseg.com/api-reference/vlens-api/business-request/create-business-request

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: example-openapi
  version: 1.0.0
paths:
  /api/BusinessRequest/Create/{typeId}:
    post:
      operationId: create-business-request
      summary: Create a business request
      description: >
        Create a new business request (e-contract) of a given type. The user
        must pass the eligibility check before calling this endpoint.


        Pass the form field values from `GetBusinessRequestTypeTemplateFields`
        as `requestFieldsValues`, using each field's `key` as the map key.


        The returned `id` is required for all subsequent signing steps.
      tags:
        - subpackage_businessRequest
      parameters:
        - name: typeId
          in: path
          description: The request type ID.
          required: true
          schema:
            type: integer
        - 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: >-
            Business request created. Store the returned `id` for the signing
            flow.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiOutputCreateRequest'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBusinessRequestInput'
servers:
  - url: https://api.vlenseg.com
components:
  schemas:
    GeoLocation:
      type: object
      properties:
        latitude:
          type: number
          format: double
        longitude:
          type: number
          format: double
      required:
        - latitude
        - longitude
      description: Geographic coordinates of the user's device.
      title: GeoLocation
    CreateBusinessRequestInput:
      type: object
      properties:
        geoLocation:
          $ref: '#/components/schemas/GeoLocation'
        userDeviceUtcTime:
          type:
            - string
            - 'null'
          format: date-time
          description: UTC timestamp from the user's device at submission time.
        requestFieldsValues:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          description: >
            Key-value pairs for the form fields of this request type.

            Keys are the `key` property values from
            `GetBusinessRequestTypeTemplateFields`.
        isDynamicSubTypes:
          type: boolean
          default: false
        customerSignersIdentifiers:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Phone numbers, emails, or user IDs of additional co-signers.
        minimumRequiredSignatories:
          type:
            - integer
            - 'null'
      title: CreateBusinessRequestInput
    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
    CreateBusinessRequestOutput:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            Business request ID. Store this — it is required for all signing
            steps.
        requestNumber:
          type:
            - string
            - 'null'
        type:
          type: integer
        typeName:
          type:
            - string
            - 'null'
        contractTypeId:
          type: integer
        contractTypeName:
          type:
            - string
            - 'null'
        requestFields:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/BusinessRequestsField'
        relatedBusinessRequest:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/CreateBusinessRequestOutput'
        customerSignersIdentifiers:
          type:
            - array
            - 'null'
          items:
            type: string
      title: CreateBusinessRequestOutput
    ApiOutputCreateRequest:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CreateBusinessRequestOutput'
        error_code:
          type:
            - integer
            - 'null'
        error_message:
          type:
            - string
            - 'null'
        error_descriptions:
          oneOf:
            - description: Any type
            - type: 'null'
      title: ApiOutputCreateRequest
  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 Business Request_createBusinessRequest_example
import requests

url = "https://api.vlenseg.com/api/BusinessRequest/Create/414"

payload = {
    "geoLocation": {
        "latitude": 30.0444,
        "longitude": 31.2357
    },
    "userDeviceUtcTime": "2025-01-15T10:30:00Z",
    "requestFieldsValues": {
        "fullName": "Ahmed Mohamed",
        "nationalId": "29901234567890",
        "monthlyIncome": "5000"
    }
}
headers = {
    "ApiKey": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Business Request_createBusinessRequest_example
const url = 'https://api.vlenseg.com/api/BusinessRequest/Create/414';
const options = {
  method: 'POST',
  headers: {ApiKey: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"geoLocation":{"latitude":30.0444,"longitude":31.2357},"userDeviceUtcTime":"2025-01-15T10:30:00Z","requestFieldsValues":{"fullName":"Ahmed Mohamed","nationalId":"29901234567890","monthlyIncome":"5000"}}'
};

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

```go Business Request_createBusinessRequest_example
package main

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

func main() {

	url := "https://api.vlenseg.com/api/BusinessRequest/Create/414"

	payload := strings.NewReader("{\n  \"geoLocation\": {\n    \"latitude\": 30.0444,\n    \"longitude\": 31.2357\n  },\n  \"userDeviceUtcTime\": \"2025-01-15T10:30:00Z\",\n  \"requestFieldsValues\": {\n    \"fullName\": \"Ahmed Mohamed\",\n    \"nationalId\": \"29901234567890\",\n    \"monthlyIncome\": \"5000\"\n  }\n}")

	req, _ := http.NewRequest("POST", 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 Business Request_createBusinessRequest_example
require 'uri'
require 'net/http'

url = URI("https://api.vlenseg.com/api/BusinessRequest/Create/414")

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

request = Net::HTTP::Post.new(url)
request["ApiKey"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"geoLocation\": {\n    \"latitude\": 30.0444,\n    \"longitude\": 31.2357\n  },\n  \"userDeviceUtcTime\": \"2025-01-15T10:30:00Z\",\n  \"requestFieldsValues\": {\n    \"fullName\": \"Ahmed Mohamed\",\n    \"nationalId\": \"29901234567890\",\n    \"monthlyIncome\": \"5000\"\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.vlenseg.com/api/BusinessRequest/Create/414")
  .header("ApiKey", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"geoLocation\": {\n    \"latitude\": 30.0444,\n    \"longitude\": 31.2357\n  },\n  \"userDeviceUtcTime\": \"2025-01-15T10:30:00Z\",\n  \"requestFieldsValues\": {\n    \"fullName\": \"Ahmed Mohamed\",\n    \"nationalId\": \"29901234567890\",\n    \"monthlyIncome\": \"5000\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.vlenseg.com/api/BusinessRequest/Create/414', [
  'body' => '{
  "geoLocation": {
    "latitude": 30.0444,
    "longitude": 31.2357
  },
  "userDeviceUtcTime": "2025-01-15T10:30:00Z",
  "requestFieldsValues": {
    "fullName": "Ahmed Mohamed",
    "nationalId": "29901234567890",
    "monthlyIncome": "5000"
  }
}',
  'headers' => [
    'ApiKey' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Business Request_createBusinessRequest_example
using RestSharp;

var client = new RestClient("https://api.vlenseg.com/api/BusinessRequest/Create/414");
var request = new RestRequest(Method.POST);
request.AddHeader("ApiKey", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"geoLocation\": {\n    \"latitude\": 30.0444,\n    \"longitude\": 31.2357\n  },\n  \"userDeviceUtcTime\": \"2025-01-15T10:30:00Z\",\n  \"requestFieldsValues\": {\n    \"fullName\": \"Ahmed Mohamed\",\n    \"nationalId\": \"29901234567890\",\n    \"monthlyIncome\": \"5000\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Business Request_createBusinessRequest_example
import Foundation

let headers = [
  "ApiKey": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "geoLocation": [
    "latitude": 30.0444,
    "longitude": 31.2357
  ],
  "userDeviceUtcTime": "2025-01-15T10:30:00Z",
  "requestFieldsValues": [
    "fullName": "Ahmed Mohamed",
    "nationalId": "29901234567890",
    "monthlyIncome": "5000"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.vlenseg.com/api/BusinessRequest/Create/414")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```