POST api/Pretranslate/Post?languageCode={languageCode}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
languageCode

string

Required

Body Parameters

None.

Response Information

Resource Description

PreTranslationResultModel
NameDescriptionTypeAdditional information
TranslatedMenu

Collection of MenuText

None.

Messages

Collection of Dictionary of string [key] and string [value]

None.

Response Formats

application/json, text/json

Sample:
{
  "TranslatedMenu": [
    {
      "Text": "sample string 1",
      "Intent": "sample string 2",
      "NextStepId": "sample string 3"
    },
    {
      "Text": "sample string 1",
      "Intent": "sample string 2",
      "NextStepId": "sample string 3"
    }
  ],
  "Messages": [
    {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    }
  ]
}

text/html

Sample:
{"TranslatedMenu":[{"Text":"sample string 1","Intent":"sample string 2","NextStepId":"sample string 3"},{"Text":"sample string 1","Intent":"sample string 2","NextStepId":"sample string 3"}],"Messages":[{"sample string 1":"sample string 2","sample string 3":"sample string 4"},{"sample string 1":"sample string 2","sample string 3":"sample string 4"}]}

application/xml, text/xml

Sample:
<PreTranslationResultModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SCMS.Carey.API.Models.PretranslationModel">
  <Messages xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:ArrayOfKeyValueOfstringstring>
      <d2p1:KeyValueOfstringstring>
        <d2p1:Key>sample string 1</d2p1:Key>
        <d2p1:Value>sample string 2</d2p1:Value>
      </d2p1:KeyValueOfstringstring>
      <d2p1:KeyValueOfstringstring>
        <d2p1:Key>sample string 3</d2p1:Key>
        <d2p1:Value>sample string 4</d2p1:Value>
      </d2p1:KeyValueOfstringstring>
    </d2p1:ArrayOfKeyValueOfstringstring>
    <d2p1:ArrayOfKeyValueOfstringstring>
      <d2p1:KeyValueOfstringstring>
        <d2p1:Key>sample string 1</d2p1:Key>
        <d2p1:Value>sample string 2</d2p1:Value>
      </d2p1:KeyValueOfstringstring>
      <d2p1:KeyValueOfstringstring>
        <d2p1:Key>sample string 3</d2p1:Key>
        <d2p1:Value>sample string 4</d2p1:Value>
      </d2p1:KeyValueOfstringstring>
    </d2p1:ArrayOfKeyValueOfstringstring>
  </Messages>
  <TranslatedMenu xmlns:d2p1="http://schemas.datacontract.org/2004/07/SCMS.Carey.Services.Interfaces.PreTranslatedText.Entities">
    <d2p1:MenuText>
      <d2p1:Intent>sample string 2</d2p1:Intent>
      <d2p1:NextStepId>sample string 3</d2p1:NextStepId>
      <d2p1:Text>sample string 1</d2p1:Text>
    </d2p1:MenuText>
    <d2p1:MenuText>
      <d2p1:Intent>sample string 2</d2p1:Intent>
      <d2p1:NextStepId>sample string 3</d2p1:NextStepId>
      <d2p1:Text>sample string 1</d2p1:Text>
    </d2p1:MenuText>
  </TranslatedMenu>
</PreTranslationResultModel>