POST api/Categorias
Request Information
URI Parameters
None.
Body Parameters
Categoria| Name | Description | Type | Additional information |
|---|---|---|---|
| Id | integer |
None. |
|
| Nome | string |
None. |
|
| Livros | Collection of Livro |
None. |
Request Formats
application/json, text/json
Sample:
{
"Id": 1,
"Nome": "sample string 2",
"Livros": [
{
"Id": 1,
"Titulo": "sample string 2",
"Autor": "sample string 3",
"Editora": "sample string 4",
"AnoPublicacao": 5,
"CategoriaId": 1,
"Exemplares": 7,
"Reservas": [
{
"Id": 1,
"DataReserva": "2026-10-22T11:23:22.5570868-05:00",
"Estado": "sample string 3",
"LivroId": 1,
"UtilizadorId": 1,
"Utilizador": {
"Id": 1,
"Nome": "sample string 2",
"Contacto": "sample string 3",
"Email": "sample string 4",
"Tipo": "sample string 5",
"Reservas": [],
"Emprestimos": [
{
"Id": 1,
"DataDoEmprestimo": "2026-10-22T11:23:22.5570868-05:00",
"DataDaDevolucao": "2026-10-22T11:23:22.5570868-05:00",
"PrazoDeDevolucao": 4,
"LivroId": 1,
"UtilizadorId": 1,
"Devolvido": true,
"Multa": 8.0,
"MultaPaga": true
}
]
}
}
],
"Emprestimos": [
{
"Id": 1,
"DataDoEmprestimo": "2026-10-22T11:23:22.5570868-05:00",
"DataDaDevolucao": "2026-10-22T11:23:22.5570868-05:00",
"PrazoDeDevolucao": 4,
"LivroId": 1,
"UtilizadorId": 1,
"Devolvido": true,
"Multa": 8.0,
"MultaPaga": true,
"Utilizador": {
"Id": 1,
"Nome": "sample string 2",
"Contacto": "sample string 3",
"Email": "sample string 4",
"Tipo": "sample string 5",
"Reservas": [
{
"Id": 1,
"DataReserva": "2026-10-22T11:23:22.5570868-05:00",
"Estado": "sample string 3",
"LivroId": 1,
"UtilizadorId": 1
}
],
"Emprestimos": []
}
}
]
}
]
}
application/xml
Sample:
Sample not available.
text/xml
Sample:
Sample not available.
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
IHttpActionResultNone.
Response Formats
application/json, text/json, application/xml, text/xml
Sample:
Sample not available.