DigiOffice Gateway Web Services

<back to all web services

GetTranslations

namespace IDB.API.DTO.Globalization

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

    [<DataContract>]
    [<AllowNullLiteral>]
    type Translation() = 
        [<DataMember>]
        member val Key:String = null with get,set

        [<DataMember>]
        member val NL:String = null with get,set

        [<DataMember>]
        member val EN:String = null with get,set

        [<DataMember>]
        member val DE:String = null with get,set

        [<DataMember>]
        member val FR:String = null with get,set

        [<DataMember>]
        member val C1:String = null with get,set

        [<DataMember>]
        member val C2:String = null with get,set

        [<DataMember>]
        member val C3:String = null with get,set

        [<DataMember>]
        member val C4:String = null with get,set

        [<DataMember>]
        member val C5:String = null with get,set

        [<DataMember>]
        member val C6:String = null with get,set

    [<DataContract>]
    [<AllowNullLiteral>]
    type GetTranslationsResponse() = 
        [<DataMember>]
        member val Translations:ResizeArray<Translation> = new ResizeArray<Translation>() with get,set

        [<DataMember>]
        member val PreferredLanguage:String = null with get,set

        [<DataMember>]
        member val PreferredLanguageShort:String = null with get,set

    [<AllowNullLiteral>]
    type GetTranslations() = 
        member val TranslateKeys:ResizeArray<String> = new ResizeArray<String>() with get,set

F# GetTranslations DTOs

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

HTTP + CSV

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

POST /csv/reply/GetTranslations HTTP/1.1 
Host: digiofficeapigateway.deltares.nl 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"TranslateKeys":["String"]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Translations":[{"Key":"String","NL":"String","EN":"String","DE":"String","FR":"String","C1":"String","C2":"String","C3":"String","C4":"String","C5":"String","C6":"String"}],"PreferredLanguage":"String","PreferredLanguageShort":"String"}