Leapsome workLocations API

The workLocations API from Leapsome — 1 operation(s) for worklocations.

OpenAPI Specification

leapsome-worklocations-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  version: 1.0.1
  title: Leapsome absences workLocations API
  contact:
    name: Support
    url: https://leapsome.zendesk.com
  description: The Content API enables you to export some raw data from Leapsome for usage within your own systems and beyond what the Leapsome application offers natively. Usage is restricted to a maximum of 20 requests per second when making requests in parallel. If you exceed this limit, you will receive a 429 status code.
servers:
- url: https://api.leapsome.com/v1
tags:
- name: workLocations
paths:
  /work-locations:
    get:
      summary: List work locations
      description: Get a paginated list of work locations with optional filtering by ID, name, or status. Returns full work location details including address information.
      operationId: listWorkLocations
      security:
      - bearerAuth: []
      tags:
      - workLocations
      parameters:
      - name: workLocationId
        in: query
        required: false
        description: Filter by specific work location ID
        schema:
          type: string
          pattern: ^[0-9a-f]{24}$
      - name: name
        in: query
        required: false
        description: Filter by work location name (partial match, case-insensitive)
        schema:
          type: string
      - name: status
        in: query
        required: false
        description: Filter by work location status
        schema:
          type: string
          enum:
          - active
          - inactive
      - name: page
        in: query
        required: false
        description: Page number for pagination (starts at 1)
        schema:
          type: integer
          minimum: 1
          maximum: 1000
          default: 1
      - name: pageSize
        in: query
        required: false
        description: Number of results per page
        schema:
          type: integer
          minimum: 1
          maximum: 1000
          default: 100
      responses:
        '200':
          description: A list of work locations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkLocationList'
        '401':
          description: Authorization failed. Token is missing or invalid.
components:
  schemas:
    WorkLocationList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WorkLocation'
        meta:
          type: object
          properties:
            page:
              type: integer
              description: Current page number
            pageSize:
              type: integer
              description: Number of items per page
            totalCount:
              type: integer
              description: Total number of work locations
    WorkLocation:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-f]{24}$
          example: 58d55e3ffdc2eb20547edd0a
          description: Work location ID
        name:
          type: string
          example: Berlin Office
          description: Name of the work location
        status:
          type: string
          enum:
          - active
          - inactive
          example: active
          description: Current status of the work location
        remote:
          type: boolean
          nullable: true
          example: false
          description: Whether this is a remote work location
        currency:
          type: string
          nullable: true
          example: EUR
          description: Default currency for this work location
        street:
          type: string
          nullable: true
          example: 123 Main Street
          description: Street address
        zip:
          type: string
          nullable: true
          example: '10115'
          description: ZIP/postal code
        city:
          type: string
          nullable: true
          example: Berlin
          description: City
        administrativeDivision:
          type: string
          nullable: true
          example: Berlin
          description: State/province/administrative division
        country:
          type: string
          nullable: true
          example: Germany
          description: Country
        dateFormat:
          type: string
          nullable: true
          enum:
          - MM-DD-YYYY
          - DD-MM-YYYY
          - YYYY-MM-DD
          - MM/DD/YYYY
          - DD/MM/YYYY
          - YYYY/MM/DD
          - DD.MM.YYYY
          - MMMM DD, YYYY
          - DD MMMM YYYY
          - YYYY MMMM DD
          example: DD.MM.YYYY
          description: Date format used in this work location
        primary:
          type: boolean
          nullable: true
          example: true
          description: Whether this is the primary work location
        createdAt:
          type: string
          format: date-time
          nullable: true
          example: '2024-01-15T08:30:00.000Z'
          description: When the work location was created
        updatedAt:
          type: string
          format: date-time
          nullable: true
          example: '2024-01-20T10:15:00.000Z'
          description: When the work location was last updated
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT