Update User Email Bulk
This end point is use for update bulk user email
[POST] /ruangkerja/users/update-email-bulk
Information
This API is a function for update multiple user emails in single operation by employee id as parameter.
*This operation will update the password used
Headers
| Name | Type | Example | Required | Description | 
|---|---|---|---|---|
| Authorization | string | access_token | YES | Token of authentication. Get from Authentication API | 
| Accept | string | application/json | YES | Defines the message format that is expected by the client | 
| Content-Type | string | application/json | YES | Defines the message format of the request body that is sent by the client | 
Parameter
| Name | Type | Required | Location | Description | 
|---|---|---|---|---|
| employeeID | string | YES | body | Employee ID of user | 
| string | YES | body | Email of User | |
| password | string | OPTIONAL | body | If password empty, the password will be random | 
Example cURL Request
curl --location --request POST 'https://api.ruangkerja.id/ruangkerja/users/update-bulk-email' \
--header 'Authorization: access_token' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
    "items": [
        {
            "employeeID": "EMPLY001",
            "email": "John Doe",
            "password": null
        }
    ]
}'
Example Success Response
{
    "data": {
        "failedItems": [],
        "successItems": [
            {
                "payload": {
                    "employeeID": "EMPLY001",
                    "email": "John Doe",
                    "password": null
                },
                "response": {
                    "serial": "OPENAPI9Z7ZIHIFW"
                }
            }
        ]
    },
    "status": "success",
    "message": "success"
}
Example Failed Response
{
    "data": {
        "failedItems": [
            {
                "error": {
                    "detail": "user email already been taken",
                    "errorCode": 10102,
                    "message": "USER_EMAIL_EXISTS"
                },
                "payload": {
                    "employeeID": "EMPLY001",
                    "email": "John Doe",
                    "password": null
                }
            }
        ],
        "successItems": []
    },
    "status": "success",
    "message": "success"
}
See also: Error Dictionary.