BokaMera.API.Host

<back to all web services

NewsletterFieldTranslationsQuery

Requires Authentication
The following routes are available for this service:
GET/newsletter/fieldtranslationsGet field translations that could be used in messagesGet field translations that could be used in messages.
namespace BokaMera.API.ServiceModel.Db

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type NewsletterFieldTranslationResponse() = 
        ///<summary>
        ///The field translation id
        ///</summary>
        [<ApiMember(Description="The field translation id")>]
        member val Id:Int32 = new Int32() with get,set

        ///<summary>
        ///The field translation code.
        ///</summary>
        [<ApiMember(Description="The field translation code.")>]
        member val Code:String = null with get,set

        ///<summary>
        ///The field translation name.
        ///</summary>
        [<ApiMember(Description="The field translation name.")>]
        member val Name:String = null with get,set

        ///<summary>
        ///The field translation description.
        ///</summary>
        [<ApiMember(Description="The field translation description.")>]
        member val Description:String = null with get,set

        ///<summary>
        ///The field translation group.
        ///</summary>
        [<ApiMember(Description="The field translation group.")>]
        member val Group:String = null with get,set

    [<AllowNullLiteral>]
    type BaseModel() = 
        class end

    [<AllowNullLiteral>]
    type FieldTranslation() = 
        inherit BaseModel()
        [<Required>]
        member val Code:String = null with get,set

        [<Required>]
        member val Name:String = null with get,set

        [<Required>]
        member val Description:String = null with get,set

        [<Required>]
        member val Group:String = null with get,set

        member val ModifiedDate:Nullable<DateTimeOffset> = new Nullable<DateTimeOffset>() with get,set
        member val Id:Int32 = new Int32() with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type QueryBase() = 
        [<DataMember(Order=1)>]
        member val Skip:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember(Order=2)>]
        member val Take:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<DataMember(Order=3)>]
        member val OrderBy:String = null with get,set

        [<DataMember(Order=4)>]
        member val OrderByDesc:String = null with get,set

        [<DataMember(Order=5)>]
        member val Include:String = null with get,set

        [<DataMember(Order=6)>]
        member val Fields:String = null with get,set

        [<DataMember(Order=7)>]
        member val Meta:Dictionary<String, String> = null with get,set

    [<AllowNullLiteral>]
    type QueryDb<From, Into>() = 
        inherit QueryBase()

    [<ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)>]
    [<ValidateRequest(Validator="IsAuthenticated")>]
    [<AllowNullLiteral>]
    type NewsletterFieldTranslationsQuery() = 
        inherit QueryDb<FieldTranslation, NewsletterFieldTranslationResponse>()
        ///<summary>
        ///The field translation id.
        ///</summary>
        [<ApiMember(Description="The field translation id.")>]
        member val Id:Nullable<Int32> = new Nullable<Int32>() with get,set

        ///<summary>
        ///The field translation group
        ///</summary>
        [<ApiMember(Description="The field translation group")>]
        member val Group:String = null with get,set

    [<AllowNullLiteral>]
    type AccessKeyTypeResponse() = 
        member val Id:Int32 = new Int32() with get,set
        member val KeyType:String = null with get,set
        member val Description:String = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type QueryResponse<T>() = 
        [<DataMember(Order=1)>]
        member val Offset:Int32 = new Int32() with get,set

        [<DataMember(Order=2)>]
        member val Total:Int32 = new Int32() with get,set

        [<DataMember(Order=3)>]
        member val Results:ResizeArray<AccessKeyTypeResponse> = null with get,set

        [<DataMember(Order=4)>]
        member val Meta:Dictionary<String, String> = null with get,set

        [<DataMember(Order=5)>]
        member val ResponseStatus:ResponseStatus = null with get,set

F# NewsletterFieldTranslationsQuery 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 /newsletter/fieldtranslations HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Offset":0,"Total":0,"Results":[{"Id":0,"Code":"String","Name":"String","Description":"String","Group":"String"}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}