Validate employee exists by employee number

Summary

  • Source repository: jef-systems/jef-one-backend

  • Source SHA: ac65ed21b4ea52235f472efeef826c144a2fe812

  • Source run id: 30028079423

  • Module: One

  • Lambda function: jef-one-validate-employee-exists-by-employee-number

  • HTTP method: GET

  • Invocation mode: sync

  • Package mode: no-package

  • API category: One Complex Sync No Package GET APIs

  • API path: /one/complex-sync-no-packages/jef-one-validate-employee-exists-by-employee-number

  • Endpoint URL: https://api.jefoffice.com/one/complex-sync-no-packages/jef-one-validate-employee-exists-by-employee-number

  • Documentation scope: lambda-complex-sync-no-packages

Synchronous Lambda Complex Rule

This API is documented as a synchronous Lambda complex no-package API. API Gateway waits for the Lambda result and returns the final Lambda response.

Description

Validates a safe employee record and, when scoped, its current entity-access relationship.

Payload Example

{
  "employee_number": "10000",
  "entity_number": "1000"
}

Payload Schema

{
  "root": {
    "type": "M",
    "required": true,
    "attributes": {
      "employee_number": {
        "type": "S",
        "required": true,
        "pattern": "^[0-9]{5}$",
        "min_length": 5,
        "max_length": 5
      },
      "entity_number": {
        "type": "S",
        "required": false,
        "pattern": "^[0-9]{4}$",
        "min_length": 4,
        "max_length": 4
      }
    }
  }
}

Response Schema

{
  "root": {
    "type": "M",
    "required": true,
    "attributes": {
      "is_accepted": {
        "type": "BOOL",
        "required": true
      },
      "is_found": {
        "type": "BOOL",
        "required": true
      },
      "employee_exists": {
        "type": "BOOL",
        "required": true
      },
      "employee_active": {
        "type": "BOOL",
        "required": true
      },
      "employee_access_active": {
        "type": "BOOL",
        "required": true
      },
      "can_continue": {
        "type": "BOOL",
        "required": true
      },
      "message_type": {
        "type": "S",
        "required": true
      },
      "message": {
        "type": "S",
        "required": true
      },
      "next_action": {
        "type": "S",
        "required": true
      },
      "operation": {
        "type": "S",
        "required": true
      },
      "status_code": {
        "type": "N",
        "required": true,
        "integer": true,
        "minimum": 100,
        "maximum": 599
      },
      "employee_id": {
        "type": "S",
        "required": false,
        "format": "uuid",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "entity_allowed_employee_id": {
        "type": "S",
        "required": false,
        "format": "uuid",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "domain_id": {
        "type": "S",
        "required": false,
        "format": "uuid",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "entity_id": {
        "type": "S",
        "required": false,
        "format": "uuid",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
      },
      "entity_number": {
        "type": "S",
        "required": false,
        "pattern": "^[0-9]{4}$",
        "min_length": 4,
        "max_length": 4
      },
      "employee_number": {
        "type": "S",
        "required": false,
        "pattern": "^[0-9]{5}$",
        "min_length": 5,
        "max_length": 5
      },
      "display_name": {
        "type": "S",
        "required": false
      },
      "created": {
        "type": "S",
        "required": false,
        "format": "date-time"
      },
      "updated": {
        "type": "S",
        "required": false,
        "format": "date-time"
      },
      "failure_code": {
        "type": "S",
        "required": false
      },
      "failure_reason": {
        "type": "S",
        "required": false
      },
      "is_active": {
        "type": "BOOL",
        "required": false
      }
    }
  }
}

CMD curl

curl.exe -X GET "https://api.jefoffice.com/one/complex-sync-no-packages/jef-one-validate-employee-exists-by-employee-number"

PowerShell curl

curl.exe -X GET "https://api.jefoffice.com/one/complex-sync-no-packages/jef-one-validate-employee-exists-by-employee-number"