POST api/Files/VoiceUpload

Voice chat submits the server

Request Information

Body Parameters

Language chat parameters

VoiceUploadModel
NameDescriptionTypeAdditional information
SerialNumber

device imei

string

None.

Long

Speech time

integer

None.

VoiceTime

Recording time

date

None.

Command

The content of the voice file turns the contents of the amr file into a base64 string

string

None.

IdentityID

Terminal unique id [terminal for caching, maintenance by APP, server only save]

string

None.

UserId

user id

integer

None.

ChatType

integer

None.

FileType

integer

None.

Token

Get it after logging in Token

string

None.

Language

Language Option

string

None.

AppId

APP Application Identifier

string

None.

Request Formats

application/json, text/json

Sample:
{
  "SerialNumber": "sample string 1",
  "Long": 2,
  "VoiceTime": "2018-12-19T13:25:26.1213672+08:00",
  "Command": "sample string 4",
  "IdentityID": "sample string 5",
  "UserId": 6,
  "ChatType": 7,
  "FileType": 8,
  "Token": "sample string 9",
  "Language": "sample string 10",
  "AppId": "sample string 11"
}

application/xml, text/xml

Sample:
<VoiceUploadModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ParModel">
  <AppId>sample string 11</AppId>
  <Language>sample string 10</Language>
  <Token>sample string 9</Token>
  <ChatType>7</ChatType>
  <Command>sample string 4</Command>
  <FileType>8</FileType>
  <IdentityID>sample string 5</IdentityID>
  <Long>2</Long>
  <SerialNumber>sample string 1</SerialNumber>
  <UserId>6</UserId>
  <VoiceTime>2018-12-19T13:25:26.1213672+08:00</VoiceTime>
</VoiceUploadModel>

Response Information

Resource Description

Stateillustrate:
0. success
1000. device does not exist
1100. IMEI is empty
8000. Voice data is empty or long

NormalResult
NameDescriptionTypeAdditional information
Message

Message [in most cases, the message can be used as a prompt]

string

None.

State

status code

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "Message": "sample string 1",
  "State": 2
}

application/xml, text/xml

Sample:
<NormalResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NewGPS2012.AppApi.Models.ResModel">
  <State>2</State>
  <Message>sample string 1</Message>
</NormalResult>