digitaluapi

<back to all web services

SegmentsAutoQueryLookup

Requires Authentication
Requires the role:Client
The following routes are available for this service:
GET/auto/segments/{Id}
GET/auto/segments
import Foundation
import ServiceStack

public class SegmentsAutoQueryLookup : QueryDb<Segments>, IGet
{
    // @DataMember(Order=1)
    public var id:Int?

    // @DataMember(Order=2)
    public var tenantsId:Int

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

    private enum CodingKeys : String, CodingKey {
        case id
        case tenantsId
    }

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

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

public class Segments : Codable
{
    // @DataMember(Order=1)
    // @Required()
    public var id:Int?

    // @DataMember(Order=2)
    // @Required()
    // @References(typeof(Tenants))
    public var tenantsId:Int?

    // @DataMember(Order=3)
    // @Required()
    public var name:String?

    // @DataMember(Order=4)
    public var isCustom:Bool?

    required public init(){}
}

public class CampaignCustomersView : Codable
{
    // @DataMember(Order=1)
    public var id:Int?

    // @DataMember(Order=2)
    public var name:String

    // @DataMember(Order=3)
    public var Description:String

    // @DataMember(Order=4)
    public var customersId:Int?

    // @DataMember(Order=5)
    public var firstName:String

    // @DataMember(Order=6)
    public var lastName:String

    // @DataMember(Order=7)
    public var idNumber:String

    // @DataMember(Order=8)
    public var passportNumber:String

    // @DataMember(Order=9)
    public var email:String

    // @DataMember(Order=10)
    public var mobileNumber:String

    // @DataMember(Order=11)
    public var customerUniqueIdentifier:String

    // @DataMember(Order=12)
    public var customerPublicAccessGuid:String?

    // @DataMember(Order=13)
    public var campaignPublicAccessGuid:String?

    // @DataMember(Order=14)
    public var tenantsId:Int?

    required public init(){}
}


Swift SegmentsAutoQueryLookup DTOs

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

HTTP + OTHER

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

GET /auto/segments/{Id} HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Offset":0,"Total":0,"Results":[{"Id":0,"TenantsId":0,"Name":"String","IsCustom":false}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}