POST api/Device/AddDevice

Add a new device for the current user [for car]

Request Information

Body Parameters

AddDeviceModel
NameDescriptionTypeAdditional information
UserId

target user

integer

None.

SerialNumber

IMEI

string

None.

DeviceSim

Device SIM number

string

None.

Avatar

Modified head

string

None.

CarNum

license plate number

string

None.

IccId

string

None.

CarType

string

None.

CarColor

string

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:
{
  "UserId": 1,
  "SerialNumber": "sample string 2",
  "DeviceSim": "sample string 3",
  "Avatar": "sample string 4",
  "CarNum": "sample string 5",
  "IccId": "sample string 6",
  "CarType": "sample string 7",
  "CarColor": "sample string 8",
  "Token": "sample string 9",
  "Language": "sample string 10",
  "AppId": "sample string 11"
}

application/xml, text/xml

Sample:
<AddDeviceModel 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>
  <Avatar>sample string 4</Avatar>
  <CarColor>sample string 8</CarColor>
  <CarNum>sample string 5</CarNum>
  <CarType>sample string 7</CarType>
  <DeviceSim>sample string 3</DeviceSim>
  <IccId>sample string 6</IccId>
  <SerialNumber>sample string 2</SerialNumber>
  <UserId>1</UserId>
</AddDeviceModel>

Response Information

Resource Description

State status illustrate:
0. Indicates success
1103. indicates failed to add

AddDeviceNormalResult
NameDescriptionTypeAdditional information
Message

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

string

None.

ImgUrl

Image address

string

None.

State

status code

integer

None.

Response Formats

application/json, text/json

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

application/xml, text/xml

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