APIsBGV APIGet My BGV Orders

Get My BGV Orders

This endpoint retrieves BGV orders by employer ID with pagination and filtering options.

Endpoint

POST /api.ezyhire.com/test/getMyBGVOrders

Headers

HeaderTypeRequiredDescription
USER-KeystringYesYour API authentication key

Request Body

{
  "pageNumber": 0,
  "pageSize": 10,
  "orderType": "LITE_CHECK",
  "searchString": "string",
  "status": "INITIALIZED"
}

Request Parameters

ParameterTypeRequiredDescription
pageNumberintegerYesPage number for pagination (0-based)
pageSizeintegerYesNumber of records per page
orderTypestringNoType of BGV order to filter by
searchStringstringNoSearch term to filter results
statusstringNoStatus of orders to filter by

Responses

Success Response

Status Code: 200 OK

{
  "statusCode": 200,
  "error": null,
  "message": "BGV Order fetched successfully.",
  "data": [
    {
      "bgvOrderId": "61571280-6597-44c2-84a6-cb813d1c30d2",
      "externalId": "EXT123456",
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@example.com",
      "dateOfBirth": [1990, 1, 15],
      "consent": "True",
      "consentTimestamp": [2024, 1, 15, 10, 30, 0, 0],
      "orderType": "LITE_CHECK",
      "orderStatus": "IN_PROGRESS",
      "createdOn": [2024, 1, 15, 10, 30, 0, 0],
      "updatedOn": [2024, 1, 15, 10, 30, 0, 0]
    },
    {
      "bgvOrderId": "25822562-29d2-48eb-8252-6789d6d3bb2c",
      "externalId": "EXT789012",
      "firstName": "Jane",
      "lastName": "Smith",
      "email": "jane.smith@example.com",
      "dateOfBirth": [1985, 6, 22],
      "consent": "yes willing to continue",
      "consentTimestamp": [2024, 1, 16, 14, 45, 0, 0],
      "orderType": "LITE_CHECK",
      "orderStatus": "IN_PROGRESS",
      "createdOn": [2024, 1, 16, 14, 45, 0, 0],
      "updatedOn": [2024, 1, 16, 14, 45, 0, 0]
    }
  ]
}

Error Responses

Unauthorized

Status Code: 401 Unauthorized

{
  "status": 401,
  "message": "Invalid User/API key",
  "data": "Please provide a valid User/API key"
}

Internal Server Error

Status Code: 500 Internal Server Error

{
  "statusCode": 500,
  "error": "string",
  "message": "string",
  "data": "string"
}

Enum Values

Field NamePossible Values
orderTypeLITE_CHECK, STANDARD_CHECK, ID_VERIFICATION, PROFESSIONAL_CHECK, ID_PLUS_SOFT
statusINITIALIZED, IN_PROGRESS, NEED_INFO, COMPLETED

Example Usage

const response = await fetch('https://api.ezyhire.com/test/getBGVOrderByEmployerId', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'USER-Key': 'your-api-key-here'
  },
  body: JSON.stringify({
    pageNumber: 0,
    pageSize: 10,
    employerId: "EMP123456",
    orderType: "LITE_CHECK",
    searchString: "John",
    status: "IN_PROGRESS"
  })
});
 
const data = await response.json();