Richemont.Booster2.PublicApi

<back to all web services

GetUserAuth

Requires Authentication
The following routes are available for this service:
GET/user/{userId}/authorizeGet user if exists and is not disabled
import Foundation
import ServiceStack

public class GetUserAuth : Codable
{
    /**
    * User's UserID
    */
    // @ApiMember(Description="User's UserID", IsRequired=true)
    public var userId:String

    required public init(){}
}

public class GetUserAuthResponse : List<Auth>
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}

public class Auth : Codable
{
    /**
    * Brand Trigram
    */
    // @ApiMember(Description="Brand Trigram", IsRequired=true)
    public var brand:String

    /**
    * List of Pos Group - in case of internal user
    */
    // @ApiMember(Description="List of Pos Group - in case of internal user")
    public var posGroups:[Int] = []

    /**
    * Pos Code - in case of external users
    */
    // @ApiMember(Description="Pos Code - in case of external users")
    public var posCode:String

    /**
    * List of user roles
    */
    // @ApiMember(Description="List of user roles", IsRequired=true)
    public var roles:[String] = []

    required public init(){}
}


Swift GetUserAuth DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

[]