Mercedes.Auth.API

<back to all web services

RefreshUserTokenRequest

UserSession
Requires Authentication
The following routes are available for this service:
POST/v1/User/RefreshTokenRefresh user token before timeout
import Foundation
import ServiceStack

public class RefreshUserTokenRequest : IPost, Codable
{
    required public init(){}
}

public class RefreshUserTokenResponse : Codable
{
    public var account:Account
    public var isValid:Bool

    required public init(){}
}

public class Account : Codable
{
    public var gasUserId:String
    public var userId:Int
    public var userRoleId:[Int]
    public var userRoleRedirectUrl:String
    public var userToken:String
    public var retailerGroupId:String
    public var modified:Date
    public var exists:Bool
    public var defaultVehicleType:String
    public var defaultRetailerGssn:String

    required public init(){}
}


Swift RefreshUserTokenRequest 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.

POST /v1/User/RefreshToken HTTP/1.1 
Host: prod-api-auth-mb-dhc.rapp-customers.co.uk 
Accept: application/json
Content-Type: application/json
Content-Length: length

{}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Account":{"GasUserId":"String","UserId":0,"UserRoleId":[0],"UserRoleRedirectUrl":"String","UserToken":"00000000000000000000000000000000","RetailerGroupId":"String","Modified":"\/Date(-62135596800000-0000)\/","Exists":false,"DefaultVehicleType":"String","DefaultRetailerGssn":"String"},"IsValid":false}