{
    "openapi": "3.1.0",
    "info": {
        "title": "Bluereform Admin API",
        "version": "1.0.0",
        "description": "Bluereform Admin APIs - contains administrative backoffice services, metrics, and operations."
    },
    "servers": [
        {
            "url": "https:\/\/bluereform-test-api.webprismdynamics.com\/api\/v1\/admin"
        }
    ],
    "security": [
        {
            "http": []
        }
    ],
    "paths": {
        "\/auth\/login": {
            "post": {
                "operationId": "admin.auth.login",
                "description": "Authenticates an administrator using email, password, and optional keep-me-signed-in.",
                "summary": "Admin login",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/AdminLoginRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Admin sign in successful."
                                        },
                                        "token_type": {
                                            "type": "string",
                                            "const": "Bearer"
                                        },
                                        "access_token": {
                                            "type": "string"
                                        },
                                        "admin": {
                                            "$ref": "#\/components\/schemas\/AdminResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "token_type",
                                        "access_token",
                                        "admin"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": []
            }
        },
        "\/auth\/logout": {
            "post": {
                "operationId": "admin.auth.logout",
                "description": "Revokes the active access token for the currently authenticated administrator.",
                "summary": "Admin logout",
                "tags": [
                    "Auth"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Admin session terminated successfully."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            }
        },
        "\/auth\/change-password": {
            "post": {
                "operationId": "admin.auth.change-password",
                "description": "Allows an authenticated administrator to change their account password.",
                "summary": "Change admin password",
                "tags": [
                    "Auth"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/ChangePasswordRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Password updated successfully."
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        },
        "\/site-settings": {
            "get": {
                "operationId": "admin.site-settings.show",
                "description": "Retrieves current site configuration across all tabs for administration.",
                "summary": "Get admin site settings",
                "tags": [
                    "SiteSetting"
                ],
                "responses": {
                    "200": {
                        "description": "`SiteSettingResource`",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/SiteSettingResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    }
                }
            },
            "post": {
                "operationId": "admin.site-settings.update",
                "description": "Updates site settings across any or all tabs, handling image uploads and file replacement.",
                "summary": "Update admin site settings",
                "tags": [
                    "SiteSetting"
                ],
                "requestBody": {
                    "content": {
                        "multipart\/form-data": {
                            "schema": {
                                "$ref": "#\/components\/schemas\/UpdateSiteSettingRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "const": "Site settings updated successfully."
                                        },
                                        "data": {
                                            "$ref": "#\/components\/schemas\/SiteSettingResource"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#\/components\/responses\/AuthenticationException"
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "http": {
                "type": "http",
                "scheme": "bearer"
            }
        },
        "schemas": {
            "AdminLoginRequest": {
                "type": "object",
                "properties": {
                    "email": {
                        "type": "string",
                        "format": "email"
                    },
                    "password": {
                        "type": "string"
                    },
                    "remember_me": {
                        "type": "boolean"
                    }
                },
                "required": [
                    "email",
                    "password"
                ],
                "title": "AdminLoginRequest"
            },
            "AdminResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "name",
                    "email",
                    "created_at",
                    "updated_at"
                ],
                "title": "AdminResource"
            },
            "ChangePasswordRequest": {
                "type": "object",
                "properties": {
                    "current_password": {
                        "type": "string"
                    },
                    "password": {
                        "type": "string",
                        "minLength": 8
                    },
                    "password_confirmation": {
                        "type": "string",
                        "minLength": 8
                    }
                },
                "required": [
                    "current_password",
                    "password",
                    "password_confirmation"
                ],
                "title": "ChangePasswordRequest"
            },
            "SiteSettingResource": {
                "type": "object",
                "properties": {
                    "favicon": {
                        "type": "object",
                        "properties": {
                            "logo_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "logo_url"
                        ]
                    },
                    "header": {
                        "type": "object",
                        "properties": {
                            "logo_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "logo_url"
                        ]
                    },
                    "footer": {
                        "type": "object",
                        "properties": {
                            "logo_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "description": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "copyright": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "logo_url",
                            "description",
                            "copyright"
                        ]
                    },
                    "social_media_links": {
                        "type": "object",
                        "properties": {
                            "facebook_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "twitter_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "instagram_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "linkedin_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "facebook_url",
                            "twitter_url",
                            "instagram_url",
                            "linkedin_url"
                        ]
                    },
                    "contact_info": {
                        "type": "object",
                        "properties": {
                            "address_line_1": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "address_line_2": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "landmark": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "city": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "state": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "zip_code": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "email": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "phone_no": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "address_line_1",
                            "address_line_2",
                            "landmark",
                            "city",
                            "state",
                            "zip_code",
                            "email",
                            "phone_no"
                        ]
                    },
                    "call_to_action_banner": {
                        "type": "object",
                        "properties": {
                            "main_headline": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "description": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "bg_image_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "first_button_name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "first_button_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "second_button_name": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "second_button_url": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "main_headline",
                            "description",
                            "bg_image_url",
                            "first_button_name",
                            "first_button_url",
                            "second_button_name",
                            "second_button_url"
                        ]
                    },
                    "updated_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "favicon",
                    "header",
                    "footer",
                    "social_media_links",
                    "contact_info",
                    "call_to_action_banner",
                    "updated_at"
                ],
                "title": "SiteSettingResource"
            },
            "UpdateSiteSettingRequest": {
                "type": "object",
                "properties": {
                    "favicon_logo": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "description": "Favicon"
                    },
                    "header_logo": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "description": "Header"
                    },
                    "footer_logo": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "description": "Footer"
                    },
                    "footer_description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "footer_copyright": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "facebook_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "description": "Social Media Links",
                        "maxLength": 255
                    },
                    "twitter_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 255
                    },
                    "instagram_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 255
                    },
                    "linkedin_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 255
                    },
                    "address_line_1": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Contact Info",
                        "maxLength": 255
                    },
                    "address_line_2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "landmark": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "state": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 255
                    },
                    "zip_code": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 50
                    },
                    "email": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "email",
                        "maxLength": 255
                    },
                    "phone_no": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 50
                    },
                    "cta_main_headline": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Call To Action Banner",
                        "maxLength": 255
                    },
                    "cta_description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "cta_bg_image": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "binary",
                        "contentMediaType": "application\/octet-stream",
                        "description": "Maximum file size: 5120 kilobytes."
                    },
                    "cta_first_button_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "cta_first_button_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 255
                    },
                    "cta_second_button_name": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "maxLength": 100
                    },
                    "cta_second_button_url": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "format": "uri",
                        "maxLength": 255
                    }
                },
                "title": "UpdateSiteSettingRequest"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            },
            "AuthenticationException": {
                "description": "Unauthenticated",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Error overview."
                                }
                            },
                            "required": [
                                "message"
                            ]
                        }
                    }
                }
            }
        }
    }
}