Find User by Employee ID

This end point is use for get user by user serial

[GET] /ruangkerja/users/:employeeID

Information

This API is a function for retrieve single user information by employee id as parameter.

Headers

NameTypeExampleRequiredDescription
Authorizationstringaccess_tokenYESToken of authentication. Get from Authentication API
Acceptstringapplication/jsonYESDefines the message format that is expected by the client
Content-Typestringapplication/jsonYESDefines the message format of the request body that is sent by the client

Parameter

NameTypeRequiredLocationDescription
employeeIDstringYESpathEmployee ID of user

Example cURL Request

curl --location --request GET 'https://api.ruangkerja.id/ruangkerja/users/EMPLY001' \
--header 'Authorization: access_token'

Example Success Response

{
    "status": "success",
    "message": "Success",
    "data": {
        "employeeID": "EMPLY001",
        "name": "John Doe",
        "username": "johndoe",
        "email": "[email protected]",
        "phone": "6281122334455",
        "isActive": true,
        "companyName": "PT Ruang Raya Indonesia",
        "companySerial": "CMP-RUANGGURU",
        "organizationDisplayName": "Ruangkerja",
        "organizationLevelSerial": "CMP-RUANGKERJA",
        "tags": [
            {
                "serial": "TAG-SERIAL-01",
                "name": "Example Tag"
            }
        ]
    }
}

Example Failed Response

{
    "errorCode": 123,
    "message": "rpc error: code = PermissionDenied desc = Token is not valid",
    "detail": "rpc error: code = PermissionDenied desc = Token is not valid"
}

See also: Error Dictionary.