Overview
The Países (Countries) API manages country records used throughout the system for location-based operations.Model Structure
The Pais model represents countries with basic identification and naming.Fields
Primary key. Auto-incremented unique identifier for the country.
Country name. Maximum 50 characters.
Endpoints
List Countries
Response
Unique identifier for the country
Name of the country
Example Response
Get Country
Path Parameters
The unique identifier of the country to retrieve
Response
Unique identifier for the country
Name of the country
Example Response
Create Country
Request Body
Name of the country. Maximum 50 characters.
Example Request
Response
Unique identifier for the newly created country
Name of the country
Update Country
Path Parameters
The unique identifier of the country to update
Request Body
Updated name of the country. Maximum 50 characters.
Example Request
Delete Country
Path Parameters
The unique identifier of the country to delete
Response
Returns 204 No Content on successful deletion.Relationships
The Pais model is referenced by:- Ciudad: Cities belong to countries
- Usuario: Users are associated with countries
- Empresa: Companies operate in specific countries
- CampanaPublicitaria: Advertising campaigns target specific countries
- Chofer: Drivers are registered in specific countries
- Cliente: Clients are located in specific countries
Usage Notes
- Countries are foundational data and should be created before cities
- Deleting a country will cascade delete all related cities and other dependent records
- The
nombrefield should use the Spanish name of the country