Xentral Employee API

Employees

OpenAPI Specification

xentral-employee-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Xentral Account Employee API
  version: v0.1
  description: Xentral is an ERP platform.
  contact:
    name: Xentral
    url: https://xentral.com
    email: api@xentral.com
servers:
- url: https://{xentralId}.xentral.biz
  description: Your Xentral Instance
  variables:
    xentralId:
      default: xentral
- url: https://{domain}
  description: Xentral at a custom domain
  variables:
    domain:
      default: xentral.com
security:
- BearerAuth: []
tags:
- name: Employee
  description: Employees
paths:
  /api/v1/employees:
    get:
      tags:
      - Employee
      operationId: employee.list
      summary: List employees
      description: Lists existing employees
      parameters:
      - name: searchTerm
        in: query
        required: false
        schema:
          type: string
      - name: filter
        in: query
        style: deepObject
        explode: true
        schema:
          type: array
          items:
            type: object
            additionalProperties: false
            required:
            - key
            - op
            - value
            properties:
              key:
                type: string
                enum:
                - id
                - name
                - number
                description: Field to filter by.
              op:
                type: string
                enum:
                - equals
                - notEquals
                - in
                - notIn
                - contains
                - notContains
                - startsWith
                - endsWith
                description: Operator to use for filtering.
              value:
                oneOf:
                - type: string
                  description: Always passed as string in query; backend parses as string, numeric, date, or datetime based on 'key'.
                - type: array
                  items:
                    type: string
                  description: Used for the 'in' operator. Items must be strings representing numeric, date, etc.
      responses:
        '200':
          description: Employee minimal list.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      additionalProperties: false
                      properties:
                        id:
                          type: string
                          pattern: \d+
                          example: '17'
                          description: Resource identifier.
                        number:
                          description: Employee Number
                          type: string
                          example: '342442'
                        name:
                          description: Employee Name
                          type: string
                          example: John
                        email:
                          description: Employee Email
                          type: string
                          example: john@example.com
        '400':
          description: IETF RFC 9457 Problem API compliant response
          content:
            application/problem+json:
              schema:
                oneOf:
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - violations
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/request-validation
                    title:
                      type: string
                      minLength: 1
                      example: Request payload validation failed.
                    violations:
                      oneOf:
                      - type: array
                        items:
                          type: object
                          example:
                            username:
                            - This value should not be blank.
                            email:
                            - This value is not a valid email address.
                        description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
                      - type: object
                        example:
                          _:
                          - This value should contain at most `9` elements.
                        description: This field will be a mirrored request payload with only invalid fields and values replaced by error messages.
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/generic-validation
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/conflict
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - items
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/conflictItems
                    title:
                      type: string
                      minLength: 1
                    items:
                      type: array
                      items:
                        type: object
                        additionalProperties: false
                        required:
                        - id
                        - title
                        - messages
                        properties:
                          id:
                            type: integer
                          title:
                            type: string
                            minLength: 1
                          messages:
                            type: array
                            items:
                              type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - scopes
                  properties:
                    type:
                      type: string
                      enum:
                      - https://developer.xentral.com/reference/problems#token-scopes
                    title:
                      type: string
                      minLength: 1
                    scopes:
                      type: array
                      items:
                        type: string
                - type: object
                  additionalProperties: false
                  required:
                  - type
                  - title
                  - messages
                  properties:
                    type:
                      type: string
                      enum:
                      - https://api.xentral.biz/problems/generic-validation
                    title:
                      type: string
                      minLength: 1
                    messages:
                      type: object
                      additionalProperties:
                        type: array
                        items:
                          type: string
        '403':
          description: Unable to authorize the client
        '404':
          description: Resource was not found or not enough access privileges
        '406':
          description: Requested resource representation does not exist.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token obtained in POST /tokens endpoint or pregenerated in the system.
x-readme:
  samples-languages: []