PassThrough Requests for getting the Leave related fields

Sample PassThrough requeats for getting the list of possible values of LeaveBucket, and frequency fields in create leave request Api for PaySpace.

List Leave Buckets

Use the Value field, in the response, as LeaveBucket in create leave request api.

A cURL request could look like this:

curl --location 'https://api.getknit.dev/v1.0/passthrough' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
  "method": "GET",
  "path": "Lookup/LeaveType/<LeaveTypeId>"
}' 

and the response could look like the following:

{
  "success": true,
  "data": {
    "response": {
      "body": {
        "@odata.context": "https://apistaging.payspace.com/odata/v2.0/2307/$metadata#Lookup_LeaveType",
        "value": [
          {
            "Value": "Annual Leave",
            "Description": "Annual Leave"
          },
          {
            "Value": "leave-priority",
            "Description": "Use leave priority"
          }
        ]
      },
      "headers": {
        "Date": "Thu, 19 Nov 2026 13:13:15 GMT",
        "Content-Type": "application/json; charset=utf-8",
        "Connection": "keep-alive",
        "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
        "Request-Context": "appId=cid-v1:af96da10-e0eb-437e-bf13-b8d62aabbd6e",
        "X-RateLimit-Limit": "2000",
        "X-RateLimit-Remaining": "1999",
        "X-RateLimit-Reset": "2026-11-19T13:13:15Z",
        "odata.context": "https://apistaging.payspace.com/odata/v2.0/2307/$metadata#Lookup_LeaveType",
        "api-supported-versions": "1.0,1.1,2.0",
        "OData-Version": "4.0",
        "x-azure-ref": "20261119T131315Z-15d5c4f56575b99mhC1BOMnxn8000000045g000000003vcf",
        "X-Cache": "CONFIG_NOCACHE",
        "Accept-Ranges": "bytes",
        "content-length": "221"
      }
    }
  }
}


List Frequencies

Use the Frequency field, in the response, as frequency in create leave request api.

A cURL request could look like this:

curl --location 'https://api.getknit.dev/v1.0/passthrough' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'X-Knit-Integration-Id: <YOUR_INTEGRATION_ID>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
  "method": "GET",
  "path": "Lookup/CompanyFrequency"
}' 

and the response could look like the following:

{
  "success": true,
  "data": {
    "response": {
      "body": {
        "@odata.context": "https://apistaging.payspace.com/odata/v2.0/2307/$metadata#Lookup_CompanyFrequency",
        "value": [
          {
            "FrequencyId": 3148,
            "Frequency": "Monthly",
            "HoursPerDay": 8,
            "DaysPerPeriod": 21.67,
            "Value": "Monthly",
            "Description": "Monthly"
          }
        ]
      },
      "headers": {
        "Date": "Thu, 19 Nov 2026 13:55:36 GMT",
        "Content-Type": "application/json; charset=utf-8",
        "Connection": "keep-alive",
        "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",
        "Request-Context": "appId=cid-v1:af96da10-e0eb-437e-bf13-b8d62aabbd6e",
        "X-RateLimit-Limit": "2000",
        "X-RateLimit-Remaining": "1999",
        "X-RateLimit-Reset": "2026-11-19T13:55:36Z",
        "odata.context": "https://apistaging.payspace.com/odata/v2.0/2307/$metadata#Lookup_CompanyFrequency",
        "api-supported-versions": "1.0,1.1,2.0",
        "OData-Version": "4.0",
        "x-azure-ref": "20261119T135535Z-179f58cc8b8h56g9hC1PNQtfm00000000e1g000000009rd0",
        "X-Cache": "CONFIG_NOCACHE",
        "Accept-Ranges": "bytes",
        "content-length": "244"
      }
    }
  }
}

Did this page help you?