Skip to main content

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:

  1. The client calls the endpoint specifying the preferred language
  2. The server searches for legal documents in the requested language
  3. Returns the active documents (visible=true)
  4. 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

Legal documents obtained

Response Headers