| GET | /user/{userId}/authorize | Get user if exists and is not disabled |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Auth:
# @ApiMember(Description="Brand Trigram", IsRequired=true)
brand: Optional[str] = None
"""
Brand Trigram
"""
# @ApiMember(Description="List of Pos Group - in case of internal user")
pos_groups: Optional[List[int]] = None
"""
List of Pos Group - in case of internal user
"""
# @ApiMember(Description="Pos Code - in case of external users")
pos_code: Optional[str] = None
"""
Pos Code - in case of external users
"""
# @ApiMember(Description="List of user roles", IsRequired=true)
roles: Optional[List[str]] = None
"""
List of user roles
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetUserAuthResponse(List[Auth]):
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetUserAuth:
# @ApiMember(Description="User's UserID", IsRequired=true)
user_id: Optional[str] = None
"""
User's UserID
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /user/{userId}/authorize HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length []