POST api/unidade/criaUnidade

Request Information

URI Parameters

None.

Body Parameters

UnidadeViewModel
NameDescriptionTypeAdditional information
CodigoUnidade

integer

Required

Range: inclusive between 1 and 2147483647

NomeUnidade

string

Required

String length: inclusive between 3 and 200

CNPJ

string

Required

String length: inclusive between 14 and 18

CidadeId

integer

Required

Range: inclusive between 1 and 5866

EstadoId

integer

Required

Range: inclusive between 1 and 27

id_empresa

integer

Required

Range: inclusive between 1 and 2147483647

Telefone

string

None.

EmailUnidade

string

None.

Endereco

string

None.

Numero

string

None.

Complemento

string

None.

Bairro

string

None.

CEP

string

None.

Request Formats

application/json, text/json

Sample:
{
  "CodigoUnidade": 1,
  "NomeUnidade": "sample string 2",
  "CNPJ": "sample string 3",
  "CidadeId": 4,
  "EstadoId": 5,
  "id_empresa": 6,
  "Telefone": "sample string 7",
  "EmailUnidade": "sample string 8",
  "Endereco": "sample string 9",
  "Numero": "sample string 10",
  "Complemento": "sample string 11",
  "Bairro": "sample string 12",
  "CEP": "sample string 13"
}

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Collection of UnidadeViewModel
NameDescriptionTypeAdditional information
CodigoUnidade

integer

Required

Range: inclusive between 1 and 2147483647

NomeUnidade

string

Required

String length: inclusive between 3 and 200

CNPJ

string

Required

String length: inclusive between 14 and 18

CidadeId

integer

Required

Range: inclusive between 1 and 5866

EstadoId

integer

Required

Range: inclusive between 1 and 27

id_empresa

integer

Required

Range: inclusive between 1 and 2147483647

Telefone

string

None.

EmailUnidade

string

None.

Endereco

string

None.

Numero

string

None.

Complemento

string

None.

Bairro

string

None.

CEP

string

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "CodigoUnidade": 1,
    "NomeUnidade": "sample string 2",
    "CNPJ": "sample string 3",
    "CidadeId": 4,
    "EstadoId": 5,
    "id_empresa": 6,
    "Telefone": "sample string 7",
    "EmailUnidade": "sample string 8",
    "Endereco": "sample string 9",
    "Numero": "sample string 10",
    "Complemento": "sample string 11",
    "Bairro": "sample string 12",
    "CEP": "sample string 13"
  },
  {
    "CodigoUnidade": 1,
    "NomeUnidade": "sample string 2",
    "CNPJ": "sample string 3",
    "CidadeId": 4,
    "EstadoId": 5,
    "id_empresa": 6,
    "Telefone": "sample string 7",
    "EmailUnidade": "sample string 8",
    "Endereco": "sample string 9",
    "Numero": "sample string 10",
    "Complemento": "sample string 11",
    "Bairro": "sample string 12",
    "CEP": "sample string 13"
  }
]