{
    "info": {
        "description": "Deep link endpoint for setting favorites in an org.",
        "title": "Talque Org Favorite Redirector",
        "version": "1.0.0"
    },
    "paths": {
        "/go/org/{org_id}/favorite": {
            "get": {
                "summary": "Set org favorites via deep link (redirect)",
                "description": "Generates a deep link that marks items as favorites in an organization.\n\nLectures, vendors, and products to favorite are each passed as query\nparameters.  Every item type accepts two encoding forms that are collected\nand merged:\n\n**Repeated parameters (singular key)**\n\n    GET /go/org/{org_id}/favorite\n        ?lecture=abc123\n        &lecture=def456\n        &vendor=uvw789\n        &product=cat1:prod1\n        &product=cat1:prod2\n\n**Comma-separated string (plural key)**\n\n    GET /go/org/{org_id}/favorite\n        ?lectures=abc123,def456\n        &vendors=uvw789\n        &products=cat1:prod1,cat1:prod2\n\nBoth forms may appear together in the same request and will be merged\nafter deduplication.\n\n**Product encoding**\n\nProducts are identified by both a catalog ID and a product ID, joined\nwith a colon: `catalogId:productId`.  The colon separates the two\ncomponents; neither ID contains a colon.\n\n**Methods**\n\n`GET` redirects the browser to the frontend deep-link handler URL.\n\n`POST` returns the parsed hyperlink as JSON so the frontend can\nprogrammatically inspect the destination without following a redirect.\n",
                "parameters": [
                    {
                        "name": "org_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Organization ID."
                    },
                    {
                        "name": "lecture",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "style": "form",
                        "explode": true,
                        "description": "Lecture (event) IDs to favorite.  May be repeated: `?lecture=a&lecture=b`."
                    },
                    {
                        "name": "lectures",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Comma-separated lecture (event) IDs to favorite: `?lectures=a,b`.",
                        "example": "abc123,def456"
                    },
                    {
                        "name": "vendor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "style": "form",
                        "explode": true,
                        "description": "Vendor IDs to favorite.  May be repeated: `?vendor=a&vendor=b`."
                    },
                    {
                        "name": "vendors",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Comma-separated vendor IDs to favorite: `?vendors=a,b`.",
                        "example": "uvw789,xyz012"
                    },
                    {
                        "name": "product",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "style": "form",
                        "explode": true,
                        "description": "Products to favorite, each encoded as `catalogId:productId`.  May be repeated: `?product=cat1:prod1&product=cat1:prod2`.",
                        "example": "cat1:prod1"
                    },
                    {
                        "name": "products",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Comma-separated products to favorite, each encoded as `catalogId:productId`: `?products=cat1:prod1,cat1:prod2`.",
                        "example": "cat1:prod1,cat1:prod2"
                    }
                ],
                "responses": {
                    "302": {
                        "description": "Redirect to the frontend deep-link handler URL.",
                        "headers": {
                            "Location": {
                                "schema": {
                                    "type": "string"
                                },
                                "description": "Frontend URL containing the encoded hyperlink token."
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request \u2014 an ID could not be parsed."
                    },
                    "404": {
                        "description": "Organization not found."
                    }
                }
            },
            "post": {
                "summary": "Set org favorites via deep link (JSON)",
                "description": "Same as GET but returns the hyperlink as JSON instead of redirecting.",
                "parameters": [
                    {
                        "name": "org_id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Organization ID."
                    },
                    {
                        "name": "lecture",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "style": "form",
                        "explode": true,
                        "description": "Lecture (event) IDs to favorite.  May be repeated: `?lecture=a&lecture=b`."
                    },
                    {
                        "name": "lectures",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Comma-separated lecture (event) IDs to favorite: `?lectures=a,b`.",
                        "example": "abc123,def456"
                    },
                    {
                        "name": "vendor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "style": "form",
                        "explode": true,
                        "description": "Vendor IDs to favorite.  May be repeated: `?vendor=a&vendor=b`."
                    },
                    {
                        "name": "vendors",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Comma-separated vendor IDs to favorite: `?vendors=a,b`.",
                        "example": "uvw789,xyz012"
                    },
                    {
                        "name": "product",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        "style": "form",
                        "explode": true,
                        "description": "Products to favorite, each encoded as `catalogId:productId`.  May be repeated: `?product=cat1:prod1&product=cat1:prod2`.",
                        "example": "cat1:prod1"
                    },
                    {
                        "name": "products",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Comma-separated products to favorite, each encoded as `catalogId:productId`: `?products=cat1:prod1,cat1:prod2`.",
                        "example": "cat1:prod1,cat1:prod2"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Parsed hyperlink token.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "hyperlink": {
                                            "type": "string",
                                            "description": "JWT-encoded hyperlink token."
                                        },
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "reason": {
                                            "type": "string"
                                        },
                                        "reasonEnum": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "hyperlink",
                                        "success",
                                        "reason",
                                        "reasonEnum"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Bad request \u2014 an ID could not be parsed."
                    },
                    "404": {
                        "description": "Organization not found."
                    }
                }
            }
        }
    },
    "openapi": "3.0.3"
}