Mercedes.VehicleManagement.API

<back to all web services

ValidateBulkUnSecureRequest

Vehicle
Requires Authentication
The following routes are available for this service:
POST/v1/Vehicle/ValidateBulkUnSecureValidate unsetting secured status a group of vehicles
import Foundation
import ServiceStack

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

public class ValidateBulkSecureProcessResponse : Codable
{
    public var success:Bool
    public var validationRows:[BulkSecureValidationRow] = []

    required public init(){}
}

public class BulkSecureValidationRow : BulkSecureRow
{
    public var failureReason:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case failureReason
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        failureReason = try container.decodeIfPresent(String.self, forKey: .failureReason)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if failureReason != nil { try container.encode(failureReason, forKey: .failureReason) }
    }
}

public class BulkSecureRow : Codable
{
    public var row:Int
    public var comm:String
    public var reason:String

    required public init(){}
}


Swift ValidateBulkUnSecureRequest DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/Vehicle/ValidateBulkUnSecure HTTP/1.1 
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	success: False,
	validationRows: 
	[
		{
			failureReason: String,
			row: 0,
			comm: String,
			reason: String
		}
	]
}