PTO Request

The Personal Time Off (PTO) feature in BQE CORE enables employees to request time off from their managers. Managers review these PTO requests and take an appropriate workflow action as per the company’s HR policies. The PTO Request API allows you to perform the following operations:

  • Retrieve a specific PTO request or a list of PTO requests
  • Create a PTO request
  • Update a PTO request
  • Delete a PTO request

  • cURL
  • NODE.JS
  • PHP
  • C#
  • PYTHON
  • JAVA
NameDescriptionFormatAttributes
endDate Date when the time off ends in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-timeSortable
startDate Date when the time off starts in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-timeSortable
adminMemo Memo from the user reviewing the PTO requeststringSortable
compTimeHours Number of comp hours to be used for the time offdoubleSortable
createdById Identifier of the user who created this objectuuidFilterable
createdOn Date and time when this object was created (UTC Now), in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-timeFilterable, Sortable
dateRequested Date when the PTO request was createddate-timeFilterable, Sortable
id Object identifieruuidFilterable
integrationSourceId Identifier of the integration source for this object. This property is only used by internal BQE apps and does not have any significance for external usersstringFilterable, Sortable
lastUpdated Last updated date and time value of this object in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-timeFilterable, Sortable
lastUpdatedById Identifier of the user who last updated this objectuuidFilterable
objectState Represents the state of the object. e.g., new, unchanged, modified or deleted
ObjectState Enumerated type: Click to see possible values and their descriptions.
paidHours Number of paid hours to be used for the time offdoubleSortable
requestMemo A brief description of the PTO requeststringSortable
resource Name of the employee or vendor for whom the time off is requestedstring
resourceId Identifier of the employee or vendor for whom the time off is requesteduuidFilterable
token Represents the token for update operationsint32
totalHours Total number of hours to be used for the time off. If you distribute the hours by setting paidHours, unpaidHours, or compTimeHours, then totalHours must equal their sum.doubleSortable
unpaidHours Number of unpaid hours to be used for the time offdoubleSortable
version Implements concurrency on this objectbyte
workflow []Array: Parent object can have multiple instances of this nested object under it.List of workflow items associated with the PTO request, showing a history of when the request was submitted, approved, etc.
WorkflowState Nested object: Click to see its details. To retrieve the details of this object via list endpoints, you must use the Expand parameter.

Use this method to retrieve a list of PTO requests. Optionally, pass where, orderBy, and page as the query parameters to filter the result. Use the fields parameter to request a subset of the model. By default, a complete model is returned. The expand parameter is used to request nested properties in the model.

Request URL
base_url/ptorequest

Method Overview

HTTP Method:

GET

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Headers:

Access Token

Module:

PTO Request

Required Scopes:

read:core

Required Subscription:

View Subscription


Request Parameters asterisk denotes required
NameParameter TypeDescriptionFormat
fields Query Specifies the model properties you want in the response bodystring
where Query Specifies only those records that match an expression in the querystring
orderBy Query Specifies the order of recordsstring
page Query Specifies the page number and number of records on each pagestring
expand Query Specifies the nested model properties you want in the response bodystring
Response Body
NameDescriptionFormat
endDate Date when the time off ends in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
startDate Date when the time off starts in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
adminMemo Memo from the user reviewing the PTO requeststring
compTimeHours Number of comp hours to be used for the time offdouble
createdById Identifier of the user who created this objectuuid
createdOn Date and time when this object was created (UTC Now), in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
dateRequested Date when the PTO request was createddate-time
id Object identifieruuid
integrationSourceId Identifier of the integration source for this object. This property is only used by internal BQE apps and does not have any significance for external usersstring
lastUpdated Last updated date and time value of this object in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
lastUpdatedById Identifier of the user who last updated this objectuuid
objectState Represents the state of the object. e.g., new, unchanged, modified or deleted
ObjectStateEnumerated type: Click to see possible values and their descriptions.
paidHours Number of paid hours to be used for the time offdouble
requestMemo A brief description of the PTO requeststring
resource Name of the employee or vendor for whom the time off is requestedstring
resourceId Identifier of the employee or vendor for whom the time off is requesteduuid
token Represents the token for update operationsint32
totalHours Total number of hours to be used for the time off. If you distribute the hours by setting paidHours, unpaidHours, or compTimeHours, then totalHours must equal their sum.double
unpaidHours Number of unpaid hours to be used for the time offdouble
version Implements concurrency on this objectbyte
workflow []Array: Parent object can have multiple instances of this nested object under it.List of workflow items associated with the PTO request, showing a history of when the request was submitted, approved, etc.
WorkflowState Nested object: Click to see its details. To retrieve the details of this object via list endpoints, you must use the Expand parameter.
Example Request
Example Response
[
  {
    "endDate": "2025-01-09T05:08:32Z",
    "startDate": "2025-01-09T05:08:32Z",
    "adminMemo": "adminMemo",
    "compTimeHours": 1,
    "createdById": "1170b75b-8ffd-4f9c-82e3-23a206803a30",
    "createdOn": "2025-01-09T05:08:32Z",
    "dateRequested": "2025-01-09T05:08:32Z",
    "id": "18f6c786-8d44-425a-8cfc-e42d1fe1ca38",
    "integrationSourceId": "integrationSourceId",
    "lastUpdated": "2025-01-09T05:08:32Z",
    "lastUpdatedById": "4002de21-45d2-4278-80d6-c9bda2686ab6",
    "objectState": null,
    "paidHours": 1,
    "requestMemo": "requestMemo",
    "resource": "resource",
    "resourceId": "ba3fa59a-9906-4ecf-8920-a448280a97f8",
    "token": 0,
    "totalHours": 1,
    "unpaidHours": 1,
    "version": "U3dhZ2dlciByb2Nrcw==",
    "workflow": [
      {
        "actionById": "948fb4e9-8894-4e57-8223-de14da73cdd9",
        "action": null,
        "actionBy": "actionBy",
        "createdById": "1ada9b55-862f-46ac-b43f-395b4327775f",
        "createdOn": "2025-01-09T05:08:32Z",
        "date": "2025-01-09T05:08:32Z",
        "id": "9113fd1c-33ef-47f1-ac2c-9d36be60ae7e",
        "integrationSourceId": "integrationSourceId",
        "lastUpdated": "2025-01-09T05:08:32Z",
        "lastUpdatedById": "a1e0e4d1-45a4-4ca2-9fc8-b274566d8ebf",
        "memo": "memo",
        "objectState": null,
        "sendTo": "sendTo",
        "sendToId": "1300c206-5c2f-4b28-828c-534390dae648",
        "submitTo": null,
        "token": 0,
        "type": null,
        "version": "U3dhZ2dlciByb2Nrcw=="
      }
    ]
  }
]

Use this method to retrieve a specific PTO request. Pass id as the parameter.

Request URL
base_url/ptorequest/{id}

Method Overview

HTTP Method:

GET

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Headers:

Access Token

Module:

PTO Request

Required Scopes:

read:core

Required Subscription:

View Subscription


Request Parameters asterisk denotes required
NameParameter TypeDescriptionFormat
id Path PTO request identifierstring
Response Body
NameDescriptionFormat
endDate Date when the time off ends in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
startDate Date when the time off starts in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
adminMemo Memo from the user reviewing the PTO requeststring
compTimeHours Number of comp hours to be used for the time offdouble
createdById Identifier of the user who created this objectuuid
createdOn Date and time when this object was created (UTC Now), in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
dateRequested Date when the PTO request was createddate-time
id Object identifieruuid
integrationSourceId Identifier of the integration source for this object. This property is only used by internal BQE apps and does not have any significance for external usersstring
lastUpdated Last updated date and time value of this object in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
lastUpdatedById Identifier of the user who last updated this objectuuid
objectState Represents the state of the object. e.g., new, unchanged, modified or deleted
ObjectStateEnumerated type: Click to see possible values and their descriptions.
paidHours Number of paid hours to be used for the time offdouble
requestMemo A brief description of the PTO requeststring
resource Name of the employee or vendor for whom the time off is requestedstring
resourceId Identifier of the employee or vendor for whom the time off is requesteduuid
token Represents the token for update operationsint32
totalHours Total number of hours to be used for the time off. If you distribute the hours by setting paidHours, unpaidHours, or compTimeHours, then totalHours must equal their sum.double
unpaidHours Number of unpaid hours to be used for the time offdouble
version Implements concurrency on this objectbyte
workflow []Array: Parent object can have multiple instances of this nested object under it.List of workflow items associated with the PTO request, showing a history of when the request was submitted, approved, etc.
WorkflowState Nested object: Click to see its details. To retrieve the details of this object via list endpoints, you must use the Expand parameter.
Example Request
Example Response
{
  "endDate": "2025-01-09T05:08:32Z",
  "startDate": "2025-01-09T05:08:32Z",
  "adminMemo": "adminMemo",
  "compTimeHours": 1,
  "createdById": "30017091-2197-41a2-a091-1faf81a34ddc",
  "createdOn": "2025-01-09T05:08:32Z",
  "dateRequested": "2025-01-09T05:08:32Z",
  "id": "e078b130-1d5b-4e6c-a68a-ea9b045b14a3",
  "integrationSourceId": "integrationSourceId",
  "lastUpdated": "2025-01-09T05:08:32Z",
  "lastUpdatedById": "2abaea7c-11a3-4163-8520-fc933f2226d5",
  "objectState": null,
  "paidHours": 1,
  "requestMemo": "requestMemo",
  "resource": "resource",
  "resourceId": "5d884e70-3808-4164-b00d-46a95363f6f4",
  "token": 0,
  "totalHours": 1,
  "unpaidHours": 1,
  "version": "U3dhZ2dlciByb2Nrcw==",
  "workflow": [
    {
      "actionById": "9b8cabfd-b693-42f0-a6a4-45581b11a738",
      "action": null,
      "actionBy": "actionBy",
      "createdById": "fc01c99f-5d1e-4632-ba56-7e409cc71b2f",
      "createdOn": "2025-01-09T05:08:32Z",
      "date": "2025-01-09T05:08:32Z",
      "id": "0894c706-3fcc-4598-bd7a-05cf8b07d778",
      "integrationSourceId": "integrationSourceId",
      "lastUpdated": "2025-01-09T05:08:32Z",
      "lastUpdatedById": "47c7a731-a777-4372-a08a-c236ddd27a57",
      "memo": "memo",
      "objectState": null,
      "sendTo": "sendTo",
      "sendToId": "e022b356-fbfb-4e57-8807-ca2c5f80be18",
      "submitTo": null,
      "token": 0,
      "type": null,
      "version": "U3dhZ2dlciByb2Nrcw=="
    }
  ]
}

Use this method to create a new PTO request. Pass a PTORequest object as the parameter.

Request URL
base_url/ptorequest

Method Overview

HTTP Method:

POST

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Headers:

Access Token

Module:

PTO Request

Required Scopes:

readwrite:core

Required Subscription:

View Subscription


Request Parameters asterisk denotes required
NameParameter TypeDescriptionFormat
body Body PTORequest objectPTORequest
Response Body
NameDescriptionFormat
endDate Date when the time off ends in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
startDate Date when the time off starts in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
adminMemo Memo from the user reviewing the PTO requeststring
compTimeHours Number of comp hours to be used for the time offdouble
createdById Identifier of the user who created this objectuuid
createdOn Date and time when this object was created (UTC Now), in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
dateRequested Date when the PTO request was createddate-time
id Object identifieruuid
integrationSourceId Identifier of the integration source for this object. This property is only used by internal BQE apps and does not have any significance for external usersstring
lastUpdated Last updated date and time value of this object in ISO 8601 date-time format, such as YYYY-MM-DDThh:mm:ssdate-time
lastUpdatedById Identifier of the user who last updated this objectuuid
objectState Represents the state of the object. e.g., new, unchanged, modified or deleted
ObjectStateEnumerated type: Click to see possible values and their descriptions.
paidHours Number of paid hours to be used for the time offdouble
requestMemo A brief description of the PTO requeststring
resource Name of the employee or vendor for whom the time off is requestedstring
resourceId Identifier of the employee or vendor for whom the time off is requesteduuid
token Represents the token for update operationsint32
totalHours Total number of hours to be used for the time off. If you distribute the hours by setting paidHours, unpaidHours, or compTimeHours, then totalHours must equal their sum.double
unpaidHours Number of unpaid hours to be used for the time offdouble
version Implements concurrency on this objectbyte
workflow []Array: Parent object can have multiple instances of this nested object under it.List of workflow items associated with the PTO request, showing a history of when the request was submitted, approved, etc.
WorkflowState Nested object: Click to see its details. To retrieve the details of this object via list endpoints, you must use the Expand parameter.
Example Request
Example Response
{
  "endDate": "2025-01-09T05:08:32Z",
  "startDate": "2025-01-09T05:08:32Z",
  "adminMemo": "adminMemo",
  "compTimeHours": 1,
  "createdById": "47f111ef-18e9-4bf7-9730-bfaeed06746d",
  "createdOn": "2025-01-09T05:08:32Z",
  "dateRequested": "2025-01-09T05:08:32Z",
  "id": "0c5ef843-bc06-449d-9ac4-2eafb89d406d",
  "integrationSourceId": "integrationSourceId",
  "lastUpdated": "2025-01-09T05:08:32Z",
  "lastUpdatedById": "21330973-0893-4a36-825b-5a10760aa6a8",
  "objectState": null,
  "paidHours": 1,
  "requestMemo": "requestMemo",
  "resource": "resource",
  "resourceId": "969eb59d-a3b7-472a-97b3-249c9db6f91c",
  "token": 0,
  "totalHours": 1,
  "unpaidHours": 1,
  "version": "U3dhZ2dlciByb2Nrcw==",
  "workflow": [
    {
      "actionById": "11692343-4394-4bc3-a1c3-fa55f5d98c39",
      "action": null,
      "actionBy": "actionBy",
      "createdById": "b4edfbe1-8567-43ae-aaab-2ce38ad99dd9",
      "createdOn": "2025-01-09T05:08:32Z",
      "date": "2025-01-09T05:08:32Z",
      "id": "6961bc37-eee9-4f94-bf05-b63e905f79c2",
      "integrationSourceId": "integrationSourceId",
      "lastUpdated": "2025-01-09T05:08:32Z",
      "lastUpdatedById": "b2198ed1-1836-4a07-8c70-330646da0751",
      "memo": "memo",
      "objectState": null,
      "sendTo": "sendTo",
      "sendToId": "85a480a2-40e6-417d-b062-125ac6941abb",
      "submitTo": null,
      "token": 0,
      "type": null,
      "version": "U3dhZ2dlciByb2Nrcw=="
    }
  ]
}

Use this method to save multiple entities. Pass the model as the parameter.

Request URL
base_url/ptorequest/batch

Method Overview

HTTP Method:

POST

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Headers:

Access Token

Module:

PTO Request

Required Scopes:

readwrite:core

Required Subscription:

View Subscription


Request Parameters asterisk denotes required
NameParameter TypeDescriptionFormat
body Body The model objectPTORequestBatchRequest
Example Request

Use this method to update a PTO request. Pass id and PTORequest object as the parameters. To add a workflow action to a PTO request using the Update method, embed it in the workflow object nested within the PTORequest object.

Request URL
base_url/ptorequest/{id}

Method Overview

HTTP Method:

PUT

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Headers:

Access Token

Module:

PTO Request

Required Scopes:

readwrite:core

Required Subscription:

View Subscription


Request Parameters asterisk denotes required
NameParameter TypeDescriptionFormat
id Path PTO request identifierstring
body Body PTORequest objectPTORequest
Response Body
NameDescriptionFormat
Example Request
Example Response
{
  "endDate": "2025-01-09T05:08:32Z",
  "startDate": "2025-01-09T05:08:32Z",
  "adminMemo": "adminMemo",
  "compTimeHours": 1,
  "createdById": "729b6891-4075-433a-87a0-b7c68408658c",
  "createdOn": "2025-01-09T05:08:32Z",
  "dateRequested": "2025-01-09T05:08:32Z",
  "id": "ec173eec-def8-49f0-abde-969c2f8c61f2",
  "integrationSourceId": "integrationSourceId",
  "lastUpdated": "2025-01-09T05:08:32Z",
  "lastUpdatedById": "0fd680aa-c5dc-4b1f-b852-33c8cdb203eb",
  "objectState": null,
  "paidHours": 1,
  "requestMemo": "requestMemo",
  "resource": "resource",
  "resourceId": "6e26e991-535e-4c0e-aa9e-d3c26d9dc0bc",
  "token": 0,
  "totalHours": 1,
  "unpaidHours": 1,
  "version": "U3dhZ2dlciByb2Nrcw==",
  "workflow": [
    {
      "actionById": "a0ef13fc-af9a-445e-accc-d0c81a3c61b6",
      "action": null,
      "actionBy": "actionBy",
      "createdById": "e43d2cbe-c864-43e4-8308-c47e181ce106",
      "createdOn": "2025-01-09T05:08:32Z",
      "date": "2025-01-09T05:08:32Z",
      "id": "6942fc30-c2c1-4b2c-b6b7-7f95e2a36678",
      "integrationSourceId": "integrationSourceId",
      "lastUpdated": "2025-01-09T05:08:32Z",
      "lastUpdatedById": "37da5409-f3e0-4344-a7e7-6b304b9dc489",
      "memo": "memo",
      "objectState": null,
      "sendTo": "sendTo",
      "sendToId": "5f6716ea-7753-4fd9-b491-813b5a2bd30d",
      "submitTo": null,
      "token": 0,
      "type": null,
      "version": "U3dhZ2dlciByb2Nrcw=="
    }
  ]
}

Use this method to delete a PTO request. Pass id as the parameter.

Request URL
base_url/ptorequest/{id}

Method Overview

HTTP Method:

DELETE

Content Type:

application/json

Response Format:

N/A

Requires Authentication?

Yes

Headers:

Access Token

Required Scopes:

readwrite:core

Required Subscription:

View Subscription


Request Parameters asterisk denotes required
NameParameter TypeDescriptionFormat
id Path PTO request identifierstring
Example Request

Use this method to perform partial modifications to a PTO request. Pass id and PTORequestPatchDocument object as the parameters.

Request URL
base_url/ptorequest/{id}

Method Overview

HTTP Method:

PATCH

Content Type:

application/json

Response Format:

json

Requires Authentication?

Yes

Headers:

Access Token

Module:

PTO Request

Required Scopes:

readwrite:core

Required Subscription:

View Subscription


Request Parameters asterisk denotes required
NameParameter TypeDescriptionFormat
id Path PTO Request identifierstring
body Body A document containing an array of objects with each object representing a single operationPTORequestPatchDocument
Response Body
NameDescriptionFormat
Example Request
Example Response