MDM NEW

Update Page Theme

Function: update_page_theme

Type: API Endpoint (PUT)

Purpose: This endpoint is used to update the page theme to light or dark, or to update the default firm.

URL: PUT /api/new_mdm/update_page_theme

Request Parameters:

  • flag (str): The flag to indicate whether to update the page theme or default firm.
  • data (PageOrFirm): The data to be updated.
  • Customer_Key (Header, required): A base64 encoded string containing lscode and firmcode.
  • User_Code (Header, required): A base64 encoded string containing the user code.
  • db (Session): The database session.
  • current_user (str): The current user performing the operation, obtained via dependency injection.

Process:

  1. Validates the customer key.
  2. Checks if the flag is 0 or 1.
  3. If flag is 0, updates the page theme to light or dark based on the request body.
  4. If flag is 1, updates the default firm to the firm that is given in request body.
  5. Commits the transaction and returns a response detailing the status of the operations.

Response:

  • A JSON object containing a status message and details of each column operation performed.
  • Indicates success or failure for each step, including any errors encountered.

Exceptions:

  • Handles exceptions related to database operations and invalid customer key formats, providing appropriate error messages.
put/api/new_mdm/update_page_theme

Query parameters

flagstring required

Headers

Customer-Keystring required
User-Codestring required

Request body

themestring nullable
firmstring nullable

Response

Successful Response

{"stackTrail":"paths:/api/new_mdm/update_page_theme:put:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

No recorded changes to this endpoint across all 1 revision of this API.