{
    "openapi": "3.0.3",
    "info": {
        "title": "License API",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://www.cifora.ru/"
        }
    ],
    "paths": {
        "/api/license/activate": {
            "post": {
                "summary": "Активация ключа",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LicenseRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LicenseResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/license/verify": {
            "post": {
                "summary": "Проверка ключа",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/LicenseRequest"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/LicenseResponse"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "LicenseRequest": {
                "type": "object",
                "required": [
                    "key",
                    "site_id"
                ],
                "properties": {
                    "key": {
                        "type": "string"
                    },
                    "site_id": {
                        "type": "string"
                    },
                    "domain": {
                        "type": "string",
                        "nullable": true
                    }
                }
            },
            "LicenseResponse": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean"
                    },
                    "valid": {
                        "type": "boolean"
                    },
                    "error": {
                        "type": "string"
                    },
                    "product": {
                        "type": "string"
                    },
                    "kind": {
                        "type": "string"
                    },
                    "domain": {
                        "type": "string"
                    },
                    "site_id": {
                        "type": "string"
                    },
                    "issued_at": {
                        "type": "string"
                    },
                    "expires_at": {
                        "type": "string",
                        "nullable": true
                    },
                    "checked_at": {
                        "type": "string"
                    },
                    "signature": {
                        "type": "string"
                    }
                }
            }
        }
    }
}