POST api/User/Device

Registro de dispositivos

Request Information

URI Parameters

None.

Body Parameters

Datos

DeviceModelApi
NameDescriptionTypeAdditional information
GrantorTaxId

RFC del grantor

string

Required

Matching regular expression pattern: ^[A-Z&Ñ]{3,4}[0-9]{2}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])[A-Z0-9]{2}[0-9A]$

Max length: 13

Min length: 12

Email

Identificador único del usuario (correo electrónico)

string

Required

Data type: EmailAddress

Matching regular expression pattern: ^((?:[\w-]+\.)*\w[\w-]{0,63})@((?:[\w-]+\.)*\w[\w-]{0,98})\.([a-zA-Z]{2,15}(?:\.[a-zA-Z]{2})?)$

DeviceID

Id de dispositivo

string

Required

DeviceToken

Token de registro (Firebase Cloud Messaging)

string

Required

DeviceName

Nombre de dispositivo ej: iPhone de Sara

string

Required

DeviceModel

Modelo de dispositivo ej: iPhone 6s

string

Required

Request Formats

application/json, text/json

Sample:
{
  "GrantorTaxId": "sample string 1",
  "Email": "sample string 2",
  "DeviceID": "sample string 3",
  "DeviceToken": "sample string 4",
  "DeviceName": "sample string 5",
  "DeviceModel": "sample string 6"
}

application/xml, text/xml

Sample:
<DeviceModelApi xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <GrantorTaxId>sample string 1</GrantorTaxId>
  <Email>sample string 2</Email>
  <DeviceID>sample string 3</DeviceID>
  <DeviceToken>sample string 4</DeviceToken>
  <DeviceName>sample string 5</DeviceName>
  <DeviceModel>sample string 6</DeviceModel>
</DeviceModelApi>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'DeviceModelApi'.

Response Information

Resource Description

ResponseModelApiOfBoolean
NameDescriptionTypeAdditional information
success

Indica si la solicitud se procesó de manera satisfactoria

boolean

None.

message

Mensaje de la solicitud

string

None.

messageDetail

Lista de mensajes

Collection of string

None.

failureCode

Código de error en caso de existir

string

None.

data

Layout de respuesta de la solicitud

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "success": true,
  "message": "sample string 2",
  "messageDetail": [
    "sample string 1",
    "sample string 2"
  ],
  "failureCode": "sample string 3",
  "data": true
}

application/xml, text/xml

Sample:
<ResponseModelApiOfBoolean xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <success>true</success>
  <message>sample string 2</message>
  <messageDetail>
    <string>sample string 1</string>
    <string>sample string 2</string>
  </messageDetail>
  <failureCode>sample string 3</failureCode>
  <data>true</data>
</ResponseModelApiOfBoolean>