PeopleForce · Capability

PeopleForce API — Leave Requests

PeopleForce API — Leave Requests. 3 operations. Lead operation: List leave requests. Self-contained Naftiko capability covering one Peopleforce business surface.

Run with Naftiko PeopleforceLeave Requests

What You Can Do

GET
Get — List leave requests
/v1/leave-requests
POST
Post — Create a leave request
/v1/leave-requests
GET
Get — Get a leave request
/v1/leave-requests/{id}

MCP Tools

list-leave-requests

List leave requests

read-only idempotent
create-leave-request

Create a leave request

get-leave-request

Get a leave request

read-only idempotent

Capability Spec

peopleforce-leave-requests.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: PeopleForce API — Leave Requests
  description: 'PeopleForce API — Leave Requests. 3 operations. Lead operation: List leave requests. Self-contained Naftiko
    capability covering one Peopleforce business surface.'
  tags:
  - Peopleforce
  - Leave Requests
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PEOPLEFORCE_API_KEY: PEOPLEFORCE_API_KEY
capability:
  consumes:
  - type: http
    namespace: peopleforce-leave-requests
    baseUri: https://app.peopleforce.io/api/public/v2
    description: PeopleForce API — Leave Requests business capability. Self-contained, no shared references.
    resources:
    - name: leave_requests
      path: /leave_requests
      operations:
      - name: get
        method: GET
        description: List leave requests
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: post
        method: POST
        description: Create a leave request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: leave_requests-id
      path: /leave_requests/{id}
      operations:
      - name: get
        method: GET
        description: Get a leave request
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.PEOPLEFORCE_API_KEY}}'
  exposes:
  - type: rest
    namespace: peopleforce-leave-requests-rest
    port: 8080
    description: REST adapter for PeopleForce API — Leave Requests. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/leave-requests
      name: leave-requests
      description: REST surface for leave_requests.
      operations:
      - method: GET
        name: get
        description: List leave requests
        call: peopleforce-leave-requests.get
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: post
        description: Create a leave request
        call: peopleforce-leave-requests.post
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/leave-requests/{id}
      name: leave-requests-id
      description: REST surface for leave_requests-id.
      operations:
      - method: GET
        name: get
        description: Get a leave request
        call: peopleforce-leave-requests.get
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: peopleforce-leave-requests-mcp
    port: 9090
    transport: http
    description: MCP adapter for PeopleForce API — Leave Requests. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-leave-requests
      description: List leave requests
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: peopleforce-leave-requests.get
      outputParameters:
      - type: object
        mapping: $.
    - name: create-leave-request
      description: Create a leave request
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: peopleforce-leave-requests.post
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-leave-request
      description: Get a leave request
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: peopleforce-leave-requests.get
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.