Obtain legal documents
GET/company/settings/legal
Returns the legal documents available in the specified language.
Purpose:
- Provide centralized access to the platform's legal documents
- Support for multiple languages (Spanish and English)
- Ensure users access the correct version of the documents
Use Cases:
- Display terms and conditions during registration
- Display privacy policy in the settings area
- Centralized update of legal documents
- Compliance with transparency regulations
Typical Flow:
- The client calls the endpoint specifying the preferred language
- The server searches for legal documents in the requested language
- Returns the active documents (visible=true)
- The client displays the documents to the user
Considerations:
- By default, returns documents in Spanish (es)
- Only returns documents marked as visible (visible=true)
- Documents include:
- Terms and conditions
- Privacy policy
- Cookie policy
- This endpoint is public and does not require authentication
Implementation Example:
// Example of consumption from frontend
async function getLegalDocuments(lang = 'es') {
try {
const response = await fetch(`/company/settings/legal?lang=${lang}`);
const documents = await response.json();
renderLegalDocuments(documents);
} catch (error) {
console.error('Error fetching legal documents:', error);
}
}
Request
Responses
- 200
- 404
- 500
Legal documents obtained
Response Headers
No legal documents were found for the specified language.
Response Headers
Internal server error