Skip to main content

Type Endpoints

The Type entity is referenced from the Item entity and references file types (image, pdf, etc).

Common Type Characteristics

  1. Unique Identification: Each type has a unique identifier id that distinguishes them from other typies in the system.

  2. Type Data: For each type there is a description and a variable that determines whether it is active or inactive. The description indicates what type it is.

Endpoints

GET/Type/getType

Retrieve a paginated list with existing types in the database.

Description

Allows you to obtain a list of file types organized according to pagination parameters such as page number (page) and items per page (pageSize).

Parameters
NameDescriptionTypeDefault Value
pagePage numberInteger1
pageSizeNumber of items per pageInteger10
Responses
JSON
  {
"data": [
{
"id": "string",
"description": "string",
"active": true
}
],
"pagination": {
"totalItems": 0,
"itemsPerPage": 0,
"currentPage": 0,
"totalPages": 0,
"nextPageUrl": "string"
}
}
XML
<?xml version="1.0" encoding="UTF-8"?>
<export>
<data>
<item>
<id>string</id>
<description>string</description>
<active>true</active>
</item>
</data>
<pagination>
<totalItems>0</totalItems>
<itemsPerPage>0</itemsPerPage>
<currentPage>0</currentPage>
<totalPages>0</totalPages>
<nextPageUrl>string</nextPageUrl>
</pagination>
</export>

👉Try it out🌱

Possible Response Errors

ErrorResponse StatusResponse Body
This error occurs when a connection to the database cannot be established. It is an internal server problem.500{"code": 500,"error": "Database connection failed."}
This error occurs when you cannot insert or update into the database.500{"code": 500,"error": "Invalid connection name, you cannot insert in default"}
This error indicates that the server rejects the request.400{"code": 400,"error": "Bad Request"}
This error occurs when you are not authorized.401{"code": 401,"error": "Unauthorized."}
This error indicates that the entity could not be found.404{"code": 404,"error": "No entity found."}
This error occurs when you try to send too many requests in a short period of time.429{"code": 429,"error": "Too Many Requests"}