POST api/Pedido/Cadastrar

Request Information

URI Parameters

None.

Body Parameters

Pedido
NameDescriptionTypeAdditional information
Id

integer

None.

Itens

Collection of Item

None.

IdUsuario

integer

None.

Local

string

None.

NomeUsuario

string

None.

Aceito

boolean

None.

UsuarioQueAceitou

Usuario

None.

UsuarioQueCriou

Usuario

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Itens": [
    {
      "Id": 1,
      "Nome": "sample string 2",
      "Quantidade": 3,
      "PrecoMaximo": 4.1
    },
    {
      "Id": 1,
      "Nome": "sample string 2",
      "Quantidade": 3,
      "PrecoMaximo": 4.1
    }
  ],
  "IdUsuario": 2,
  "Local": "sample string 3",
  "NomeUsuario": "sample string 4",
  "Aceito": true,
  "UsuarioQueAceitou": {
    "Id": 1,
    "Login": "sample string 2",
    "Senha": "sample string 3",
    "Nome": "sample string 4",
    "DDD": "sample string 5",
    "WhatsApp": "sample string 6",
    "Email": "sample string 7",
    "TipoLogradouro": "sample string 8",
    "Logradouro": "sample string 9",
    "Numero": "sample string 10",
    "Complemento": "sample string 11",
    "Cep": "sample string 12",
    "WhatsAppConfirmado": true,
    "EmailConfirmado": true,
    "CodigoConfirmacaoEmail": 15,
    "CodigoConfirmacaoWhatsApp": 16,
    "Latitude": 17.1,
    "Longitude": 18.1,
    "PlayerIdOneSignal": "sample string 19",
    "TrocarSenha": true
  },
  "UsuarioQueCriou": {
    "Id": 1,
    "Login": "sample string 2",
    "Senha": "sample string 3",
    "Nome": "sample string 4",
    "DDD": "sample string 5",
    "WhatsApp": "sample string 6",
    "Email": "sample string 7",
    "TipoLogradouro": "sample string 8",
    "Logradouro": "sample string 9",
    "Numero": "sample string 10",
    "Complemento": "sample string 11",
    "Cep": "sample string 12",
    "WhatsAppConfirmado": true,
    "EmailConfirmado": true,
    "CodigoConfirmacaoEmail": 15,
    "CodigoConfirmacaoWhatsApp": 16,
    "Latitude": 17.1,
    "Longitude": 18.1,
    "PlayerIdOneSignal": "sample string 19",
    "TrocarSenha": true
  }
}

application/xml, text/xml

Sample:
<Pedido xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EuLevoPraVoce.Api.Models">
  <Aceito>true</Aceito>
  <Id>1</Id>
  <IdUsuario>2</IdUsuario>
  <Itens>
    <Item>
      <Id>1</Id>
      <Nome>sample string 2</Nome>
      <PrecoMaximo>4.1</PrecoMaximo>
      <Quantidade>3</Quantidade>
    </Item>
    <Item>
      <Id>1</Id>
      <Nome>sample string 2</Nome>
      <PrecoMaximo>4.1</PrecoMaximo>
      <Quantidade>3</Quantidade>
    </Item>
  </Itens>
  <Local>sample string 3</Local>
  <NomeUsuario>sample string 4</NomeUsuario>
  <UsuarioQueAceitou>
    <Cep>sample string 12</Cep>
    <CodigoConfirmacaoEmail>15</CodigoConfirmacaoEmail>
    <CodigoConfirmacaoWhatsApp>16</CodigoConfirmacaoWhatsApp>
    <Complemento>sample string 11</Complemento>
    <DDD>sample string 5</DDD>
    <Email>sample string 7</Email>
    <EmailConfirmado>true</EmailConfirmado>
    <Id>1</Id>
    <Latitude>17.1</Latitude>
    <Login>sample string 2</Login>
    <Logradouro>sample string 9</Logradouro>
    <Longitude>18.1</Longitude>
    <Nome>sample string 4</Nome>
    <Numero>sample string 10</Numero>
    <PlayerIdOneSignal>sample string 19</PlayerIdOneSignal>
    <Senha>sample string 3</Senha>
    <TipoLogradouro>sample string 8</TipoLogradouro>
    <TrocarSenha>true</TrocarSenha>
    <WhatsApp>sample string 6</WhatsApp>
    <WhatsAppConfirmado>true</WhatsAppConfirmado>
  </UsuarioQueAceitou>
  <UsuarioQueCriou>
    <Cep>sample string 12</Cep>
    <CodigoConfirmacaoEmail>15</CodigoConfirmacaoEmail>
    <CodigoConfirmacaoWhatsApp>16</CodigoConfirmacaoWhatsApp>
    <Complemento>sample string 11</Complemento>
    <DDD>sample string 5</DDD>
    <Email>sample string 7</Email>
    <EmailConfirmado>true</EmailConfirmado>
    <Id>1</Id>
    <Latitude>17.1</Latitude>
    <Login>sample string 2</Login>
    <Logradouro>sample string 9</Logradouro>
    <Longitude>18.1</Longitude>
    <Nome>sample string 4</Nome>
    <Numero>sample string 10</Numero>
    <PlayerIdOneSignal>sample string 19</PlayerIdOneSignal>
    <Senha>sample string 3</Senha>
    <TipoLogradouro>sample string 8</TipoLogradouro>
    <TrocarSenha>true</TrocarSenha>
    <WhatsApp>sample string 6</WhatsApp>
    <WhatsAppConfirmado>true</WhatsAppConfirmado>
  </UsuarioQueCriou>
</Pedido>

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 'Pedido'.

Response Information

Resource Description

Cadastro
NameDescriptionTypeAdditional information
Usuario

string

None.

Sucesso

boolean

None.

Observacao

string

None.

ErroDeValidacao

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Usuario": "sample string 1",
  "Sucesso": true,
  "Observacao": "sample string 3",
  "ErroDeValidacao": true
}

application/xml, text/xml

Sample:
<Cadastro xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EuLevoPraVoce.Api.Models">
  <ErroDeValidacao>true</ErroDeValidacao>
  <Observacao>sample string 3</Observacao>
  <Sucesso>true</Sucesso>
  <Usuario>sample string 1</Usuario>
</Cadastro>