# Create Bgv

> Source: https://truto.one/docs/api-reference/unified-hris-api/bgv/create/

`POST /unified/hris/bgv`

Resource: **Bgv** · API: **Unified HRIS API**

## Supported integrations

SpringVerify India (partial), SpringVerify US (partial)

## Query parameters

- **`integrated_account_id`** _(string, required)_
  The ID of the integrated account to use for the request.
- **`truto_response_format`** _(string)_
  The format of the response. - `unified` returns the response with unified mappings applied. - `raw` returns the unprocessed, raw response from the remote API. - `normalized` applies the unified mappings and returns the data in a normalized format. - `stream` returns the response as a stream, which is ideal for transmitting large datasets, files, or binary data. Using streaming mode helps to efficiently handle large payloads or real-time data flows without requiring the entire data to be buffered in memory. - `debug` returns the final unified result alongside raw remote fetch information. The response is an envelope containing `result` (identical to unified mode output) and `debug` (with `requestUrl`, `requestOptions`, `data`, `responseHeaders`, and for list operations: `nextCursor`, `isLooping`, `isEmptyResult`, `resultCount`). `debug` is `null` for static responses or when `truto_skip_api_call=true`. Defaults to `unified`.
  Allowed: `unified`, `raw`, `normalized`, `stream`, `debug`
- **`truto_ignore_remote_data`** _(boolean)_
  Excludes the `remote_data` attribute from the response.
- **`truto_exclude_fields`** _(array<string>)_
  Array of fields to exclude from the response.
- **`remote_query`** _(object)_
  Query parameters to pass to the underlying API without any transformations. Refer [this guide](https://truto.one/docs/api-reference/overview/querying#remote-query-parameters) to see how to structure the query parameters.

## Request body

- **`candidate`** _(object)_
  The person whose background verification is being run. Providers may call this person a candidate, applicant, or employee.
  - **`id`** _(string)_
    The provider identifier for the candidate or applicant
  - **`first_name`** _(string)_
    Candidate first name
  - **`middle_name`** _(string)_
    Candidate middle name
  - **`last_name`** _(string)_
    Candidate last name
  - **`name`** _(string)_
    Candidate full name
  - **`emails`** _(array<object>)_
    The candidate email addresses
    - **`email`** _(string)_
      The email address
    - **`type`** _(string)_
      The type of email address
    - **`is_primary`** _(boolean)_
      Whether the email address is primary
  - **`phones`** _(array<object>)_
    The candidate phone numbers
    - **`number`** _(string)_
      The phone number
    - **`extension`** _(string)_
      The extension of the phone number
    - **`type`** _(string)_
      The type of phone number
  - **`gender`** _(string)_
    The candidate gender. If no clear mapping is available, the raw provider value is returned.
  - **`date_of_birth`** _(string)_
    The candidate date of birth
  - **`address`** _(object)_
    The candidate address used for the background verification case
    - **`street_1`** _(string)_
      The first line of the address
    - **`street_2`** _(string)_
      The second line of the address
    - **`city`** _(string)_
      The city of the address
    - **`state`** _(string)_
      The state or province of the address
    - **`postal_code`** _(string)_
      The postal code of the address
    - **`country`** _(string)_
      The country of the address
  - **`employee_number`** _(string)_
    The provider or customer employee number associated with the candidate, when available. This is not a Truto employees.id reference.
  - **`invite`** _(boolean)_
    Whether to invite the candidate. Defaults to true for SpringVerify India.
  - **`resume_url`** _(string)_
    Candidate resume URL. You can also pass this as a document with type resume.
  - **`ssn`** _(string)_
- **`package`** _(object)_
  The verification package, program, or screening bundle used for this case.
  - **`id`** _(string, required)_
    BGV package id returned by bgv_packages.list. For SpringVerify India this maps to subtype_id.
  - **`name`** _(string)_
    The name of the BGV package
  - **`checks`** _(object)_
- **`documents`** _(array<object>)_
  Documents used to create the BGV case. SpringVerify India requires a resume document.
  - **`id`** _(string)_
    The unique identifier for the document
  - **`type`** _(string)_
    The document type
  - **`name`** _(string)_
    The document name
  - **`url`** _(string)_
    A provider URL for the document, when available
  - **`uploaded_at`** _(string)_
    The date when the document was uploaded
- **`send_invite`** _(boolean)_
  Whether to invite the candidate. Defaults to true for SpringVerify India.
- **`consent_url`** _(string)_
  A URL for candidate consent, when available
- **`verifications`** _(object)_
- **`remote_data`** _(object)_
  Any additional data that should be passed as part of the request body. This data is not transformed by Truto and is passed as is to the remote API.

## Response body

- **`id`** _(string, required)_
  The unique identifier for the background verification case
- **`candidate`** _(object)_
  The person whose background verification is being run. Providers may call this person a candidate, applicant, or employee.
  - **`id`** _(string)_
    The provider identifier for the candidate or applicant
  - **`first_name`** _(string)_
    The candidate first name
  - **`middle_name`** _(string)_
    The candidate middle name
  - **`last_name`** _(string)_
    The candidate last name
  - **`name`** _(string)_
    The candidate full name
  - **`emails`** _(array<object>)_
    The candidate email addresses
    - **`email`** _(string)_
      The email address
    - **`type`** _(string)_
      The type of email address
    - **`is_primary`** _(boolean)_
      Whether the email address is primary
  - **`phones`** _(array<object>)_
    The candidate phone numbers
    - **`number`** _(string)_
      The phone number
    - **`extension`** _(string)_
      The extension of the phone number
    - **`type`** _(string)_
      The type of phone number
  - **`gender`** _(string)_
    The candidate gender. If no clear mapping is available, the raw provider value is returned.
  - **`date_of_birth`** _(string)_
    The candidate date of birth
  - **`address`** _(object)_
    The candidate address used for the background verification case
    - **`street_1`** _(string)_
      The first line of the address
    - **`street_2`** _(string)_
      The second line of the address
    - **`city`** _(string)_
      The city of the address
    - **`state`** _(string)_
      The state or province of the address
    - **`postal_code`** _(string)_
      The postal code of the address
    - **`country`** _(string)_
      The country of the address
  - **`employee_number`** _(string)_
    The provider or customer employee number associated with the candidate, when available. This is not a Truto employees.id reference.
- **`employee`** _(object)_
  The HRIS employee associated with this background verification case when a real Truto employee identifier is known. Provider-specific employee numbers are returned on candidate.employee_number instead.
  - **`id`** _(string)_
    The unique identifier for employees
  - **`name`** _(string)_
    This represents the name of the employee
- **`package`** _(object)_
  The verification package, program, or screening bundle used for this case.
  - **`id`** _(string)_
    The unique identifier for the BGV package
  - **`name`** _(string)_
    The name of the BGV package
- **`status`** _(string)_
  The normalized lifecycle status of the background verification case. If no clear mapping is available, the raw provider value is returned.
  Allowed: `draft`, `invited`, `pending_candidate`, `in_progress`, `insufficient`, `completed`, `canceled`, `expired`, `failed`, `unknown`
- **`result`** _(string)_
  The normalized verification outcome. This is not a hiring recommendation. If no clear mapping is available, the raw provider value is returned.
  Allowed: `clear`, `consider`, `discrepant`, `verified`, `unable_to_verify`, `not_applicable`, `unknown`
- **`checks`** _(array<object>)_
  Individual checks that compose this background verification case.
  - **`id`** _(string)_
    The unique identifier for the check
  - **`name`** _(string)_
    The check name
  - **`type`** _(string)_
    The check type
  - **`status`** _(string)_
    The check lifecycle status
  - **`result`** _(string)_
    The check result
  - **`details`** _(string)_
    Additional provider details for the check
- **`documents`** _(array<object>)_
  Documents associated with this background verification case.
  - **`id`** _(string)_
    The unique identifier for the document
  - **`type`** _(string)_
    The document type
  - **`name`** _(string)_
    The document name
  - **`url`** _(string)_
    A provider URL for the document, when available
  - **`uploaded_at`** _(string)_
    The date when the document was uploaded
- **`report`** _(object)_
  The final background verification report when available.
  - **`url`** _(string)_
    A URL for the report, when available
  - **`expires_at`** _(string)_
    The date when the report URL expires
  - **`mime_type`** _(string)_
    The report MIME type
- **`invitation_url`** _(string)_
  A URL for the candidate invitation, when available
- **`consent_url`** _(string)_
  A URL for candidate consent, when available
- **`candidate_portal_url`** _(string)_
  A URL for the candidate portal, when available
- **`requested_at`** _(string)_
  The date when the background verification was requested
- **`submitted_at`** _(string)_
  The date when the candidate submitted required information
- **`completed_at`** _(string)_
  The date when the background verification was completed
- **`expires_at`** _(string)_
  The date when the background verification expires
- **`created_at`** _(string)_
  The date when the background verification case was created
- **`updated_at`** _(string)_
  The date when the background verification case was updated
- **`etag`** _(string)_
  The unique identifier for the specific version of the resource
- **`remote_data`** _(object)_
  Raw data returned from the remote API call.

## Code examples

### Truto CLI

```bash
truto unified hris bgv \
  -m create \
  -a '<integrated_account_id>' \
  -b '{
  "candidate": {},
  "package": {},
  "documents": [],
  "send_invite": true,
  "consent_url": "your_consent_url",
  "verifications": {},
  "remote_data": {}
}' \
  -o json
```

### Truto TS SDK

```typescript
import Truto from '@truto/truto-ts-sdk';

const truto = new Truto({
  token: '<your_api_token>',
});

const result = await truto.unifiedApi.create(
  'hris',
  'bgv',
  {
  "candidate": {},
  "package": {},
  "documents": [],
  "send_invite": true,
  "consent_url": "your_consent_url",
  "verifications": {},
  "remote_data": {}
},
  { integrated_account_id: '<integrated_account_id>' }
);

console.log(result);
```

### Truto Python SDK

```python
import asyncio
from truto_python_sdk import TrutoApi

truto_api = TrutoApi(token="<your_api_token>")

async def main():
    result = await truto_api.unified_api.create(
        "hris",
        "bgv",
        {
        "candidate": {},
        "package": {},
        "documents": [],
        "send_invite": True,
        "consent_url": "your_consent_url",
        "verifications": {},
        "remote_data": {}
},
        {"integrated_account_id": "<integrated_account_id>"}
    )
    print(result)

asyncio.run(main())
```

### curl

```bash
curl -X POST 'https://api.truto.one/unified/hris/bgv?integrated_account_id=<integrated_account_id>' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "candidate": {},
  "package": {},
  "documents": [],
  "send_invite": true,
  "consent_url": "your_consent_url",
  "verifications": {},
  "remote_data": {}
}'
```

### JavaScript

```javascript
const integratedAccountId = '<integrated_account_id>';

const body = {
  "candidate": {},
  "package": {},
  "documents": [],
  "send_invite": true,
  "consent_url": "your_consent_url",
  "verifications": {},
  "remote_data": {}
};

const response = await fetch(`https://api.truto.one/unified/hris/bgv?integrated_account_id=${integratedAccountId}`, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/unified/hris/bgv"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
    "integrated_account_id": "<integrated_account_id>"
}
payload = {
    "candidate": {},
    "package": {},
    "documents": [],
    "send_invite": True,
    "consent_url": "your_consent_url",
    "verifications": {},
    "remote_data": {}
}

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