Settings
User and company preferences, appearance, mailing lists, contacts, and the audit trail.
Overview
Settings covers all personalisation and configuration options for an Ananas GDS account. It is split into two scopes: personal settings that apply to the individual user (theme, language, notification toggles), and company settings that apply across the whole account (company profile, branding, fact sheet output format, partner override permissions).
Company Profile
The Company model holds the account's public-facing identity. It is a OneToOne relation to the owner user and is shared across all sub-users.
| Field | Description |
|---|---|
company | Company name — appears on fact sheets, invoices, and partner listings. |
website | Company website URL. |
address, post_code, country, state, city | Physical address components. |
contact_number | Primary contact phone number. |
logo / logo_id | Hosted logo URL and ImageKit file ID. Old logo is auto-deleted when replaced. |
description / about_us | Company overview text shown on the partner marketplace profile. |
work_in_countries | JSON array of country names where the company operates. |
branding | JSON object for custom branding options. |
facebook, instagram, linked_in, trustpilot, trip_advisor | Social media and review platform URLs. |
Company Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/settings/company/ | Get the company profile for the authenticated user. |
POST | /api/settings/company/create/ | Create initial company profile (first-time setup). |
PUT | /api/settings/company/edit/ | Update company name, address, description, social links, branding. |
GET | /api/settings/company/settings | Canonical company settings endpoint (returns merged company + preferences data). |
GET | /api/settings/company/preferences/ | Get company-level preferences (audit trail, output format, override moderation). |
GET | /api/settings/portfolio/{company_id}/ | Public portfolio view of a company (used in partner marketplace). |
User Preferences
The Preferences model is a OneToOne to the user and controls personal UI and notification behaviour. Company-level output format and override permissions are stored in CompanyPreferences (OneToOne to the owner user).
Personal Preferences
| Field | Description |
|---|---|
theme | UI colour theme string. |
layout | C (Compact) or S (Stylish) — controls dashboard density. |
language_override | BCP-47 locale code to override the browser default. |
two_factor_auth | Whether 2FA is enabled for this user. |
email_addresses | Comma-separated additional email addresses for notifications. |
partnership_changes_mail | Email when a partner contract changes status. |
partnership_new_mail | Email when a new partner request is received. |
features_offers_mail | Marketing emails for new features and offers. |
fact_review_mail | Email when a fact sheet is reviewed. |
notify_partnership_request | In-app notification for partner requests. |
notify_partnership_changes | In-app notification for contract changes. |
notify_fact_sheet_changes | In-app notification when a connected hotel updates their fact sheet. |
notify_fact_sheet_download | In-app notification when a partner downloads your fact sheet. |
notify_fact_review | In-app notification when a fact sheet review is completed. |
Company Preferences
| Field | Description |
|---|---|
audit_trail | When enabled, all data changes are logged for compliance review. |
add_logo | Include the company logo on generated PDF fact sheets. |
add_company_info | Include contact info block on PDF fact sheets. |
partner_override_facts | Allow connected tour operators to override fact sheet values for their own view. |
overriding_moderation | Level of override control: M Minimum, R Reasonable, D Moderate, A Advanced, O Open. |
pdf_layout | PDF output format: F Facts points, R Rich text, G Grouped, S Summarized. |
api_layout | API response format: same options as pdf_layout. |
Preference Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/settings/account/settings | Canonical personal settings (preferences + user profile merged). |
GET | /api/settings/preferences/ | Get personal preferences. |
POST | /api/settings/preferences/create/ | Create preferences record (first-time setup). |
PUT | /api/settings/preferences/edit/ | Update personal preferences. |
GET | /api/settings/settings/ | Get AppSettings JSON blobs (preferences, security, templates, visibility, etc.). |
PUT | /api/settings/settings/update/ | Update one or more AppSettings JSON blobs. |
GET | /api/settings/settings/defaults/ | Get the default values for all settings blobs. |
Mailing Lists & Contacts
Mailing lists let accommodation providers group contacts for bulk PDF distribution of fact sheets. Each list has a name and optional description, and contains any number of Contact records linked via MailingListContact.
| Model | Key Fields |
|---|---|
MailingList | name (unique per user), description, date_created. |
Contact | name, title, email_address (unique per user), location, phone, source, metadata. |
MailingListContact | Join table between MailingList and Contact. unique_together enforced. |
Mailing List Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/settings/mailing-lists/ | List all mailing lists. |
POST | /api/settings/mailing-lists/create/ | Create a new list. |
PUT | /api/settings/mailing-lists/update/{id}/ | Rename or update a list. |
DELETE | /api/settings/mailing-lists/delete/{id}/ | Delete a list (contacts are not deleted). |
GET | /api/settings/mailing-lists/{id}/contacts/ | List contacts in a specific mailing list. |
POST | /api/settings/mailing-lists/{id}/add-contact/ | Add a contact to a list. |
POST | /api/settings/mailing-lists/{id}/remove-contact/ | Remove a contact from a list. |
GET | /api/settings/contacts/ | List all contacts in the address book. |
POST | /api/settings/contacts/create/ | Add a contact manually. |
PUT | /api/settings/contacts/update/{id}/ | Update contact details. |
DELETE | /api/settings/contacts/delete/{id}/ | Delete a contact from the address book. |
POST | /api/settings/contacts/import/csv/ | Bulk import contacts from a CSV file. |
AppSettings JSON Blobs
The AppSettings model stores all extended configuration as typed JSON blobs. Each blob maps to a settings category retrievable and updatable independently:
| Blob | Purpose |
|---|---|
preferences | UI and behaviour preferences. |
security | Session limits, IP allowlisting, login alert settings. |
templates | Custom email and PDF template configuration. |
moderation | Fact sheet review and approval workflow settings. |
visibility | Controls what data is visible to partners. |
notifications | Notification delivery preferences (mirrors Preferences model toggles). |
audit | Audit trail configuration. |
advanced | Advanced options for power users. |
Audit Trail
When CompanyPreferences.audit_trail is enabled, significant data changes are recorded. The audit log is retrievable via:
| Method | Path | Description |
|---|---|---|
GET | /api/settings/audit/ | List audit log entries for the account, ordered by timestamp descending. |
Using get_setting() in backend code
Backend views should read settings via from settings.services import get_setting and get_setting(user, 'category', 'key', default=False). Do not use the deprecated check_settings_status() shim.