Open PhucHoangVan opened 10 months ago
Trường hợp kiểm tra JWT token để xác nhận vai trò là Admin. nếu người dùng không phải là Admin thì trả về lỗi HTTP Error 403 Forbidden
{
"statusCode": 403,
"data": {
"message": "You do not have access to this resource."
}
}
[API Description]
API Create Staff Account
description:
API cho phép Admin tạo tài khoản cho nhân viênBase URL:
[POST] api/accounts/create-staff-accountUsed By:
ADMIN (check role Admin in JWT Token)Validate:
Parameters Request:
Body Request:
Expected Response:
Errors
This API uses the following error codes:
400 Bad Request
: The request was malformed or missing required parameters.401 Unauthorized
: The API key provided was invalid or missing.404 Not Found
: The requested resource was not found.500 Internal Server Error
: An unexpected error occurred on the server.Example Error Response: