Endpoint: '/rest/v1/leave-requests'

Description:

This endpoint is used to submit a leave request.

Method: ‘POST’

Request Body:

{ "positionNumber": "2", "employeeNumber": "ANON1000", "category": "DOCK", "reason": "ship", "startDate": "2024-01-01 01:00", "stopDate": "2024-01-02 01:00", "lengthOfAbsence": 1, "phoneNumber": "555-555-5555", "comments": "test", "substitute": false, "substituteComments": "John Doe", "supervisorName": "Jane Doe", "supervisorEmail": "jane.doe@gmail.com", "requestStatus": "INITIATED" }

Request Headers:

  • ‘Accept’:'application/json'

  • Content-Type’: ‘application/json’

  • X-SSDT-API-Token’:'TOKEN' (replace TOKEN with your valid API Access token)

Responses:

  • HTTP Status Code: 200 OK

  • Content-Type: application/json

Response Body:

{ "id": "27b9d5a9-7060-43c2-a583-098b01590429", "positionId": "8eaa96ad-1e01-404e-ac5e-bb312532dfb3", "positionDescription": "Driver", "employeeId": "6de342e5-4085-4cc8-87ce-0db1bbdc1dbf", "employeeName": "Hurst, Brent Carl - ANON1000", "positionNumber": "2", "employeeNumber": "ANON1000", "category": "DOCK", "reason": "ship", "startDate": "2024-01-01 01:00", "stopDate": "2024-01-02 01:00", "lengthOfAbsence": 1, "phoneNumber": "1234567890", "comments": "test", "substitute": false, "substituteComments": "John Doe", "supervisorName": "Jane Doe", "supervisorEmail": "jane.doe@gmail.com", "requestStatus": "INITIATED" }

Error Response:

  • HTTP Status Code: 401 Unauthorized

  • Content-Type: application/json

  • Body

{ "Invalid API Access Token" }

Example Request:

Example Response (Success):

Example Response (Error-Invalid API Key):